forked from wrizzhi/quic_client_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParserServer.py
49 lines (39 loc) · 1.06 KB
/
ParserServer.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
import argparse
def parse(name):
parser = argparse.ArgumentParser(description=f"Parse args for the QUIC protocol")
parser.add_argument(
"--host",
type=str,
default="::",
help="listen on the specified address (defaults to ::)",
)
parser.add_argument(
"--port",
type=int,
default=4784,
help="listen on the specified port (defaults to 4784)",
)
parser.add_argument(
"-c",
"--certificate",
type=str,
required=True,
help="load the TLS certificate from the specified file",
)
parser.add_argument(
"-k",
"--private-key",
type=str,
help="load the TLS private key 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(
"-v", "--verbose", action="store_true", help="increase logging verbosity"
)
args = parser.parse_args()
return args