mirror of
https://github.com/masterking32/MasterHttpRelayVPN.git
synced 2026-05-17 21:24:37 +03:00
Implement google candidate ips with a script that finds the fastest ip
This commit is contained in:
@@ -249,10 +249,53 @@ python3 main.py --log-level DEBUG # Show detailed logs
|
||||
python3 main.py -c /path/to/config.json # Use a different config file
|
||||
python3 main.py --install-cert # Install MITM CA certificate and exit
|
||||
python3 main.py --no-cert-check # Skip automatic CA install check on startup
|
||||
python3 main.py --scan # Scan Google IPs and find the fastest one
|
||||
```
|
||||
|
||||
> **Auto-install:** On startup (MITM mode), the proxy automatically checks if the CA certificate is trusted and attempts to install it. Use `--no-cert-check` to skip this. If auto-install fails (e.g. needs elevation), run `python main.py --install-cert` manually or follow Step 6 above.
|
||||
|
||||
### Scanning for the Fastest Google IP
|
||||
|
||||
If your current `google_ip` in `config.json` is blocked or slow, you can scan to find a faster one:
|
||||
|
||||
```bash
|
||||
python3 main.py --scan
|
||||
```
|
||||
|
||||
This will:
|
||||
1. Probe 27 candidate Google IPs in parallel
|
||||
2. Measure latency from your network
|
||||
3. Display results in a table
|
||||
4. Recommend the fastest IP
|
||||
5. Exit with exit code 0 if at least one IP is reachable, 1 otherwise
|
||||
|
||||
**Example output:**
|
||||
```
|
||||
Scanning 27 Google frontend IPs
|
||||
SNI: www.google.com
|
||||
Timeout: 4s per IP
|
||||
Concurrency: 8 parallel probes
|
||||
|
||||
IP LATENCY STATUS
|
||||
-------------------- ------------ -------------------------
|
||||
216.239.32.120 42ms OK
|
||||
216.239.34.120 45ms OK
|
||||
216.239.36.120 52ms OK
|
||||
142.250.80.142 timeout timeout
|
||||
...
|
||||
|
||||
Result: 15 / 27 reachable
|
||||
|
||||
Top 3 fastest IPs:
|
||||
1. 216.239.32.120 (42ms)
|
||||
2. 216.239.34.120 (45ms)
|
||||
3. 216.239.36.120 (52ms)
|
||||
|
||||
Recommended: Set "google_ip": "216.239.32.120" in config.json
|
||||
```
|
||||
|
||||
After scanning, update your `config.json` with the recommended IP and restart the proxy.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
@@ -287,6 +330,7 @@ MasterHttpRelayVPN/
|
||||
├── mitm.py # On-the-fly TLS interception
|
||||
├── cert_installer.py # Cross-platform CA installer (Windows/macOS/Linux + Firefox)
|
||||
├── codec.py # Content-Encoding decoder (gzip/deflate/br/zstd)
|
||||
├── google_ip_scanner.py # Scanner to find the fastest reachable Google IP
|
||||
├── constants.py # Tunable defaults and shared data
|
||||
└── logging_utils.py # Colored, aligned log formatter
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user