Parse command line arguments
()
| 10 | |
| 11 | |
| 12 | def 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 | |
| 37 | async def main() -> None: |
no outgoing calls