Skip to content

feat: add --network and --country flags to rescan - #33

Merged
ayoubfaouzi merged 1 commit into
mainfrom
feat/rescan-network-flags
Aug 14, 2026
Merged

ayoubfaouzi merged 1 commit into
mainfrom
feat/rescan-network-flags

Conversation

@ayoubfaouzi

Copy link
Copy Markdown
Member

Summary

The rescan API accepts sandbox network settings, but the CLI never sent them. This adds two flags to rescan and forwards them to /v1/files/<sha256>/rescan:

  • --network (default true) — allow sandbox internet access, sent as network_enabled
  • --country (default US) — two-letter VPN exit country used when network access is enabled

Service.Rescan now takes networkEnabled bool, country string; all call sites in cmd/scanui.go (scan, rescan, and archive-child paths) pass them through.

Test plan

  • go build ./..., go vet ./..., go test ./... all pass
  • TestRescan asserts network_enabled and country are present in the request body

Note

The flags are registered on rescanCmd only, so scan (which triggers a rescan for archive children and --force) uses the defaults network_enabled=true / country=US without a way to override them. Happy to mirror the flags onto scan in a follow-up if you want that knob there too.

The rescan API accepts sandbox network settings, but the CLI never sent
them. Add --network (default true) and --country (default US) to the
rescan command and forward both to the /rescan endpoint, with test
coverage for the new request body fields.
@ayoubfaouzi
ayoubfaouzi merged commit de8d020 into main Aug 14, 2026
3 checks passed
@ayoubfaouzi
ayoubfaouzi deleted the feat/rescan-network-flags branch August 14, 2026 15:22
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