Skip to content

scan: support scanning built-in vpn-gate remotes without a directory - #3

Merged
codewiththiha merged 1 commit into
mainfrom
feature/builtin-scan
Aug 4, 2026
Merged

scan: support scanning built-in vpn-gate remotes without a directory#3
codewiththiha merged 1 commit into
mainfrom
feature/builtin-scan

Conversation

@codewiththiha

Copy link
Copy Markdown
Owner

Wires the builtin module into scan/discovery:

  • scan/all with no directory materializes the selected provider's built-in remotes into ~/.config/vmate-cli/builtin/<provider>/<proto>/ and scans them; explicit directories scan normally.
  • New --provider (default vpn-gate) and --proto (udp|tcp, default udp) flags on scan/all.
  • Geo country detection skips the filename heuristic for built-in paths so generated names are never mis-parsed as country codes.
  • README documents the new behavior.

Follow-up to #1 (builtin module).

When scan/all are invoked with no directory, materialize every built-in
config for the chosen provider + proto into builtin_dir/<provider>/<proto>/
and scan that directory. Adds --provider (default vpn-gate) and --proto
(udp|tcp, default udp) to ScanArgs, shared by scan and all via flattening.

Geo lookup skips the filename heuristic for built-in paths so a generated
file name is never mis-parsed as a country code; country is always resolved
from the remote host for built-ins.
@codewiththiha
codewiththiha merged commit 79b9f8b into main Aug 4, 2026
@codewiththiha
codewiththiha deleted the feature/builtin-scan branch August 4, 2026 03:18
codewiththiha added a commit that referenced this pull request Aug 4, 2026
- #1 builtin identity: BuiltinConfig::from_path + display_name centralize the
  path-layout parse; export_name and recent route through them (3 inline
  file_stem parses deleted)
- #2 scan pipeline: scan::scan_pipeline shared by scan and all; all.rs keeps
  only the connect half; report format unified
- #3 retry budget: pure RetryBudget type drives the retry/drop rules;
  ConnectService::run consults it instead of inline counters
- #4 settings persist: persist_scan/persist_connect live beside the resolvers
  in UserSettings; command-layer apply helpers deleted
- #5 process teardown: OpenVpnHandle owns kill_graceful; kill_handle deleted;
  the kill registry becomes a per-session ProcessRegistry threaded through
  spawn sites (hides the global, fixes cross-test killing)
- #6a/6b: journal_mode moves to db::pool; ScanProgress reports deltas

Flaky custom_retry_count test fixed (per-session registry + 30s handshake
timeout); full suite now stable across repeated runs.
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.

1 participant