Skip to content

Add SNI discovery and DPI validation for Google IPs - #83

Merged
therealaleph merged 1 commit into
therealaleph:mainfrom
v4g4b0nd-0x76:feat/scan-sni
Apr 23, 2026
Merged

therealaleph merged 1 commit into
therealaleph:mainfrom
v4g4b0nd-0x76:feat/scan-sni

Conversation

@v4g4b0nd-0x76

Copy link
Copy Markdown
Contributor

Implements automated SNI discovery from Google IP ranges with DPI bypass validation.

Changes:

  • Added PTR record lookup via dns.google to discover SNI domains from Google IPs
  • Implemented DPI validation by testing TLS handshakes against live Google infrastructure
  • Added progress tracking for batch IP testing with detailed statistics
  • Enhanced SNI filtering logic to catch 1e100.net domains and Google-related substrings
  • Expanded FAMOUS_GOOGLE_DOMAINS list with frontend-focused services
  • The discovery process fetches Google IP ranges, performs reverse DNS lookups to find associated domains, filters for Google-related SNIs, then validates each against a test IP to ensure they bypass DPI blocking.

as in #9 i implemented ip lookup we can extend dynamic scanning which there is no guarantee it be helpful and return valid and working sni's but it may worth having.

NOTE: this #47 suggested many new sni addresses which the whole purpose of this scanner is to find some of this without using non google related services as Iran users don't have access to them. it is obvious that cert.sh can return many better result

@therealaleph
therealaleph merged commit 9f1a659 into therealaleph:main Apr 23, 2026
therealaleph added a commit that referenced this pull request Apr 23, 2026
v1.2.4 and v1.2.5 both cut clean tags but CI failed downstream for
different self-hosted reasons:

- v1.2.4 failed on parallel apt-lock race (fixed)
- v1.2.5 failed with "TOML parse error at line 5 column 9" because
  rust-cache v2's default cache-bin=true prunes $CARGO_HOME/bin of
  any binary not installed via `cargo install`. `rustup` itself is
  installed by rustup-init, not cargo install, so it got flagged as
  "unknown" and deleted on cache save. Next job hits the cargo
  symlink that points at a missing rustup, which resolves somehow
  to a very old cargo that can't parse our Cargo.toml.

Fix:
- Set `cache-bin: "false"` on every Swatinem/rust-cache@v2 call.
  We still cache target/ + registry (the big win), just not bin/.
  Binaries are stable across runs on our self-hosted box anyway.
- Reinstalled rustup inside each per-runner CARGO_HOME on the server
  to recover from the broken state.

Also in this release:
- PR #83: new `mhrv-rs scan-sni` subcommand. Pulls Google's
  published IP ranges, does PTR lookups via dns.google on each IP,
  filters to Google-related hostnames, then TLS-probes each
  discovered SNI against the configured google_ip to see which ones
  bypass DPI. Useful for rebuilding a working SNI pool on a new ISP.
  Adds the `url` crate dep.

Same user-facing code as v1.2.4/v1.2.5 (PRs #78, #79, README Android
note) plus PR #83 and the CI fixes on top.
therealaleph pushed a commit that referenced this pull request Apr 25, 2026
New `mhrv-rs scan-sni` subcommand: pulls Google's published IP ranges, issues PTR lookups via dns.google, filters results to Google-related hostnames, then TLS-probes each discovered SNI against the user's configured `google_ip`. Prints the SNIs that pass DPI for the user to paste into `sni_hosts`. Also expands the hardcoded FAMOUS_GOOGLE_DOMAINS list the existing scan-ips command already used.

Adds `url` crate for URL parsing in the DNS-over-HTTPS client. No other behavioural changes.
therealaleph added a commit that referenced this pull request Apr 25, 2026
v1.2.4 and v1.2.5 both cut clean tags but CI failed downstream for
different self-hosted reasons:

- v1.2.4 failed on parallel apt-lock race (fixed)
- v1.2.5 failed with "TOML parse error at line 5 column 9" because
  rust-cache v2's default cache-bin=true prunes $CARGO_HOME/bin of
  any binary not installed via `cargo install`. `rustup` itself is
  installed by rustup-init, not cargo install, so it got flagged as
  "unknown" and deleted on cache save. Next job hits the cargo
  symlink that points at a missing rustup, which resolves somehow
  to a very old cargo that can't parse our Cargo.toml.

Fix:
- Set `cache-bin: "false"` on every Swatinem/rust-cache@v2 call.
  We still cache target/ + registry (the big win), just not bin/.
  Binaries are stable across runs on our self-hosted box anyway.
- Reinstalled rustup inside each per-runner CARGO_HOME on the server
  to recover from the broken state.

Also in this release:
- PR #83: new `mhrv-rs scan-sni` subcommand. Pulls Google's
  published IP ranges, does PTR lookups via dns.google on each IP,
  filters to Google-related hostnames, then TLS-probes each
  discovered SNI against the configured google_ip to see which ones
  bypass DPI. Useful for rebuilding a working SNI pool on a new ISP.
  Adds the `url` crate dep.

Same user-facing code as v1.2.4/v1.2.5 (PRs #78, #79, README Android
note) plus PR #83 and the CI fixes on top.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants