| 70 | |
| 71 | |
| 72 | def load_base_config() -> dict: |
| 73 | if EXAMPLE_PATH.exists(): |
| 74 | try: |
| 75 | with EXAMPLE_PATH.open() as f: |
| 76 | return json.load(f) |
| 77 | except Exception: |
| 78 | pass |
| 79 | return { |
| 80 | "google_ip": "216.239.38.120", |
| 81 | "front_domain": "www.google.com", |
| 82 | "listen_host": "127.0.0.1", |
| 83 | "http_port": 8085, |
| 84 | "socks5_port": 1080, |
| 85 | "log_level": "INFO", |
| 86 | "verify_ssl": True, |
| 87 | "lan_sharing": False, |
| 88 | "relay_timeout": 25, |
| 89 | "tls_connect_timeout": 15, |
| 90 | "tcp_connect_timeout": 10, |
| 91 | "direct_hosts": [], |
| 92 | "hosts": {}, |
| 93 | } |
| 94 | |
| 95 | |
| 96 | def configure_apps_script(cfg: dict) -> dict: |