MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / parse_args

Function parse_args

stream/main.py:12–34  ·  view source on GitHub ↗

Parse command line arguments

()

Source from the content-addressed store, hash-verified

10
11
12def parse_args() -> argparse.Namespace:
13 """Parse command line arguments"""
14 parser = argparse.ArgumentParser(
15 description="HTTPS Proxy Server with SSL Inspection"
16 )
17
18 parser.add_argument(
19 "--host", default="127.0.0.1", help="Host to bind the proxy server"
20 )
21 parser.add_argument(
22 "--port", type=int, default=3120, help="Port to bind the proxy server"
23 )
24 parser.add_argument(
25 "--domains",
26 nargs="+",
27 default=["*.google.com"],
28 help="List of domain patterns to intercept (regex)",
29 )
30 parser.add_argument(
31 "--proxy", help="Upstream proxy URL (e.g., http://user:pass@host:port)"
32 )
33
34 return parser.parse_args()
35
36
37async def main() -> None:

Callers 2

test_parse_argsFunction · 0.90
mainFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_parse_argsFunction · 0.72