Skip to content

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

Closed
dolonet wants to merge 1 commit into
9seconds:masterfrom
dolonet:doctor/skip-native-check
Closed

doctor: add --skip-native-check flag#484
dolonet wants to merge 1 commit into
9seconds:masterfrom
dolonet:doctor/skip-native-check

Conversation

@dolonet
Copy link
Copy Markdown
Collaborator

@dolonet dolonet commented Apr 29, 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 used to reach Telegram DCs, so this section currently times out for every DC — roughly 10s × 6 DCs = ~60s of dead air before the rest of the doctor output continues.

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.

Closes #482.

Test plan

  • `go vet ./internal/cli/` clean
  • `go build ./...` 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

When proxy chaining is configured, the native network connectivity
check times out for every Telegram DC (~10s × 6 DCs = ~60s) because
direct egress is intentionally not used. This flag lets users skip
that section of the doctor output.

Refs 9seconds#482
@dolonet dolonet force-pushed the doctor/skip-native-check branch from 23e4f39 to e897a5f Compare April 29, 2026 06:30
@dolonet
Copy link
Copy Markdown
Collaborator Author

dolonet commented Apr 29, 2026

Closing in favor of #485 alone — parallelizing the DC dials cuts the worst case from ~60s to ~10s, which addresses the actual pain point in #482 without adding new CLI surface. If a hard skip is still wanted on top of that, happy to revisit.

@dolonet dolonet closed this Apr 29, 2026
@dolonet dolonet deleted the doctor/skip-native-check branch April 29, 2026 06:33
@dolonet dolonet mentioned this pull request Apr 30, 2026
2 tasks
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

1 participant