Skip to content

doctor: add --skip-native-check flag#488

Merged
9seconds merged 1 commit into
9seconds:masterfrom
dolonet:doctor/skip-native-check-v2
May 4, 2026
Merged

doctor: add --skip-native-check flag#488
9seconds merged 1 commit into
9seconds:masterfrom
dolonet:doctor/skip-native-check-v2

Conversation

@dolonet
Copy link
Copy Markdown
Collaborator

@dolonet dolonet commented Apr 30, 2026

Summary

Adds a --skip-native-check flag to mtg doctor that skips the Validate native network connectivity section.

When proxy chaining is configured (network.proxies), the native dialer is intentionally not the path used to reach Telegram DCs, so this section currently times out for every DC. #485 makes those dials concurrent (worst case ~10s instead of ~60s), but for users who know native egress is broken by design, even a single 10s window is wasted time on every mtg doctor invocation.

The check is still useful by default (it confirms the host can reach Telegram directly when no proxy is configured), so the behavior is opt-in.

Sample output with the flag set:

Validate native network connectivity
  ⏭ Skipped (--skip-native-check)
Validate network connectivity with proxy ...
  ✅ DC 1
  ...

Scope is intentionally narrow — only checkNetwork(base) is gated. checkFrontingDomain also uses the native dialer, but it is conceptually distinct (it tests whether the proxy host itself can reach the fronting domain, which is still meaningful under chain-mode), so it is left untouched.

This re-sends the same diff as the previously closed #484 — closed it prematurely thinking #485 alone would be enough; the issue reporter clarified in #482 (comment) that both the speedup and the skip option are wanted. Independent of #485 and can land in either order.

Closes #482.

Test plan

  • Diff is byte-for-byte identical to closed doctor: add --skip-native-check flag #484 which was mergeable_state: clean
  • Manual verification: run mtg doctor --skip-native-check config.toml against a chained-proxy config, confirm the native section is skipped and the rest of the report runs normally

@9seconds
Copy link
Copy Markdown
Owner

9seconds commented May 4, 2026

Yes, makes sense. This part of the project has to be revisited though: this is not enough to check for simple socket opening, we also need to ping those servers with RPC pings. Current verification is a very shallow unfortunately.

Thank you!

@9seconds 9seconds merged commit b0923a5 into 9seconds:master May 4, 2026
6 checks passed
@dolonet dolonet deleted the doctor/skip-native-check-v2 branch May 4, 2026 15:56
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.

feature request: make native network connectivity validation optional

2 participants