forked from wrizzhi/quic_client_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParserClient.py
65 lines (51 loc) · 1.44 KB
/
ParserClient.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import argparse
def parse(name):
parser = argparse.ArgumentParser(description="Parser for Quic Server")
parser.add_argument("-t", "--type", type=str, help="Type of record to ")
parser.add_argument(
"--host",
type=str,
default="localhost",
help="The remote peer's host name or IP address",
)
parser.add_argument(
"--port", type=int, default=4784, help="The remote peer's port number"
)
parser.add_argument(
"-k",
"--insecure",
action="store_true",
help="do not validate server certificate",
)
parser.add_argument(
"--ca-certs", type=str, help="load CA certificates from the specified file"
)
parser.add_argument(
"-q",
"--quic-log",
type=str,
help="log QUIC events to QLOG files in the specified directory",
)
parser.add_argument(
"-l",
"--secrets-log",
type=str,
help="log secrets to a file, for use with Wireshark",
)
parser.add_argument(
"-v", "--verbose", action="store_true", help="increase logging verbosity"
)
parser.add_argument(
"-td",
"--test-dir",
type=str,
help="directory to output throughput measurements to"
)
parser.add_argument(
"-qsize",
"--query-size",
type=int,
help="Amount of data to send in bytes"
)
args = parser.parse_args()
return args