Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
68701ae
Set resolver overrides using the new ResolverOverrides type.
trojanfoe Oct 10, 2025
5cdf6d7
Set resolver overrides using the new ResolverOverrides type.
trojanfoe Oct 10, 2025
95deef6
Merge branch 'feature/vpn-4192-fix-domain-fronting' of https://github…
trojanfoe Oct 10, 2025
a2a32b1
The old behaviour of from_network was use_nym_api_urls=false.
trojanfoe Oct 10, 2025
43b2ade
Update firewall when we receive a new discovery.
trojanfoe Oct 10, 2025
a4f5e76
Remove unnecessary variable renames.
trojanfoe Oct 10, 2025
59920ab
Set resolver overrides using the new ResolverOverrides type.
trojanfoe Oct 10, 2025
7e5b7ba
The old behaviour of from_network was use_nym_api_urls=false.
trojanfoe Oct 10, 2025
42d541a
Update firewall when we receive a new discovery.
trojanfoe Oct 10, 2025
90ab2a4
Remove unnecessary variable renames.
trojanfoe Oct 10, 2025
f4f2629
Support `CommonCommand` to set `ResolverOverrides`.
trojanfoe Oct 13, 2025
c2c693d
Merge branch 'feature/vpn-4192-fix-domain-fronting' of https://github…
trojanfoe Oct 13, 2025
41578f6
You cannot set the firewall on iOS/Android.
trojanfoe Oct 13, 2025
8406b46
Try again with iOS/Android fix.
trojanfoe Oct 13, 2025
394fcc4
Minor change.
trojanfoe Oct 13, 2025
679758a
Merge remote-tracking branch 'origin/develop' into feature/vpn-4192-f…
trojanfoe Oct 13, 2025
5ca75ac
Remove some duplication.
trojanfoe Oct 13, 2025
7686ec9
Use `url_to_socket_addrs` to resolve addresses.
trojanfoe Oct 13, 2025
f25835b
Merge remote-tracking branch 'origin/develop' into feature/vpn-4192-f…
trojanfoe Oct 13, 2025
48328c2
Remove comments.
trojanfoe Oct 13, 2025
3218538
Merge remote-tracking branch 'origin/develop' into feature/vpn-4192-f…
trojanfoe Oct 13, 2025
d610c47
Add `build_fronted_http_client()`.
trojanfoe Oct 14, 2025
23b181b
Use fronted HTTP client for validator.
trojanfoe Oct 14, 2025
97175fd
Allow setting of timeout for fronted HTTP client.
trojanfoe Oct 14, 2025
b0214d9
Fix error.
trojanfoe Oct 14, 2025
17a07f0
Merge remote-tracking branch 'origin/develop' into feature/vpn-4192-f…
trojanfoe Oct 14, 2025
ee7027f
Fix clippy errors.
trojanfoe Oct 14, 2025
da1a5cc
Change order of setting HTTP client fronting in order to avoid warning.
trojanfoe Oct 14, 2025
34db4e7
Fix format errors.
trojanfoe Oct 15, 2025
5106ac5
Use `ResolverOverrides` from gateway config.
trojanfoe Oct 15, 2025
0d409f4
Use `ResolverOverrides` from gateway config.
trojanfoe Oct 15, 2025
17e89da
Fix error with private field.
trojanfoe Oct 15, 2025
b6ea428
Fix error with private field.
trojanfoe Oct 15, 2025
36b0906
Fix error with private field.
trojanfoe Oct 15, 2025
d4e8ba0
Expand Windows firewall endpoints to 24.
trojanfoe Oct 15, 2025
b9378f4
Merge remote-tracking branch 'origin/develop' into feature/vpn-4192-f…
trojanfoe Oct 15, 2025
9bfb982
Remove all blocking address resolver functions.
trojanfoe Oct 15, 2025
3b55748
Remove all blocking address resolver functions.
trojanfoe Oct 15, 2025
9fb98b5
Print errors resolving IP addresses.
trojanfoe Oct 15, 2025
b75918a
Merge from origin/develop.
trojanfoe Oct 15, 2025
b440570
Fix creation of `VpnApiClient`.
trojanfoe Oct 15, 2025
4b331e9
Only use VPN URLs when creating `VpnApiClient`.
trojanfoe Oct 15, 2025
02eee0b
Use the right `ApiUrl` and `Url` types!
trojanfoe Oct 15, 2025
04b9f5c
Restore the `ApiUrl` type used by `Discovery`.
trojanfoe Oct 16, 2025
bf74923
Do the conversion from `ApiUrl` to `Url` ourselves.
trojanfoe Oct 16, 2025
309f1d1
Also do the conversion in `build_fronted_http_client()`.
trojanfoe Oct 16, 2025
88ab8a8
Set-up resolver overrides for fronted hosts.
trojanfoe Oct 16, 2025
5393fc4
Fix clippy error about large future.
trojanfoe Oct 16, 2025
477d03e
Fix clippy warning about large future.
trojanfoe Oct 16, 2025
a050d8e
Fix clippy import warnings.
trojanfoe Oct 16, 2025
e850c34
More clippy import warnings.
trojanfoe Oct 16, 2025
1c37599
Also open-up the non-fronted domains.
trojanfoe Oct 16, 2025
54f735b
Remove singular API URLs in favour of `Vec<ApiUrl>`.
trojanfoe Oct 16, 2025
a69f515
Limit resolved addresses to 1-per-host.
trojanfoe Oct 16, 2025
8eee525
Fix compilation issues in nym-vpn-lib-uniffi.
trojanfoe Oct 17, 2025
5073b9f
Merge remote-tracking branch 'origin/develop' into
trojanfoe Oct 17, 2025
8726b55
Fix `api_url_to_url()` to handle URLs with IP addresses.
trojanfoe Oct 17, 2025
a57b1db
Add unit tests for `api_url_to_url()`.
trojanfoe Oct 17, 2025
0793dc9
If the URL doesn't have a domain then don't return host instead. Tha…
trojanfoe Oct 17, 2025
2f37e1e
Allow one IPv4 and one IPv6 address when resolving addresses.
trojanfoe Oct 17, 2025
42cc2b8
Restore patch line.
trojanfoe Oct 17, 2025
98613fd
`make_gateway_config()` now returns `Result`.
trojanfoe Oct 17, 2025
352329a
Move to using `Url`s to create HTTP clients.
trojanfoe Oct 17, 2025
8529121
Merge remote-tracking branch 'origin/develop' into feature/vpn-4192-f…
trojanfoe Oct 18, 2025
9154c83
Complete move to using `Url`s to create HTTP clients.
trojanfoe Oct 18, 2025
f126b79
More work around gateway client.
trojanfoe Oct 18, 2025
908e4d2
Use a `HashSet` to ensure all addresses in `ResolverOverrides` are un…
trojanfoe Oct 20, 2025
aed2a5a
Add `has_resolver_overrides()` as a convenience.
trojanfoe Oct 20, 2025
dc871d3
Merge remote-tracking branch 'origin/develop' into feature/vpn-4192-f…
trojanfoe Oct 20, 2025
e69caa0
Update change log.
trojanfoe Oct 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# AI coding agents: project guardrails and workflows

- Repo layout (top-level):

- `nym-vpn-core/` Rust workspace (edition 2024). Core crates include daemon `nym-vpnd`, CLI `nym-vpnc`, proto `nym-vpn-proto`, RPC bindings, firewall/DNS, and shared types.
- `nym-vpn-app/` Desktop app (Tauri 2.x + React/Vite/TypeScript). Rust backend in `src-tauri/` with commands; TS frontend in `src/`.
- `nym-vpn-android/` Kotlin app + Rust via uniffi; `nym-vpn-apple/` Swift/SwiftUI apps with uniffi.
- `wireguard/`, `nym-vpn-windows/` OS glue (Wintun/WFP) and prebuilt libs in `build/`.

- Cross-component interfaces:

- gRPC: `.proto` compiled by `nym-vpn-core/crates/nym-vpn-proto` (tonic/tonic-build). Use types from `nym_vpn_proto` in Rust. Edit proto there, then rebuild to regenerate.
- Mobile bindings: `nym-vpn-core` crates expose APIs via uniffi; Android/Apple consume generated Kotlin/Swift modules.
- Desktop types: Rust → TS types via `ts-rs`; run from `nym-vpn-app` when Rust types change.

- Day-to-day workflows (examples):

- Core build (daemon + CLI): in `nym-vpn-core/` run a normal Cargo build (e.g., build the `nym-vpnd` and `nym-vpnc` packages). Respect workspace features and profiles.
- Desktop app: in `nym-vpn-app/` install deps, then:
- Generate TS types from Rust: run the TS type generation script.
- Dev (Tauri): start the desktop app in dev mode.
- Build (Tauri): produce a desktop bundle for your OS.
- Android/iOS/macOS: follow platform READMEs for NDK/Xcode setup, uniffi generation, and Gradle/Xcode builds. Don’t hand-edit generated uniffi code.

- Conventions and gotchas:

- Rust: edition 2024; clippy config lives in `nym-vpn-core/`. Keep lints green; prefer small, composable crates. Public API changes require updating consumers (daemon, CLI, uniffi, TS types).
- Logging: use `tracing`; enable via `RUST_LOG` (e.g., `info,nym_vpnd=trace`).
- Important env flags used during dev/debug: `NYM_DISABLE_LOCAL_DNS_RESOLVER`, `NYM_DISABLE_OFFLINE_MONITOR`, `NYM_USE_PATH_MONITOR`, `NYM_FIREWALL_DEBUG` (see `nym-vpn-core/README.md`).
- Codegen output (tonic/uniffi/ts-rs) is generated — do not hand-edit. Change sources, then re-run generators/build.
- Windows: firewall/WFP and WireGuard/Wintun require admin context and correct prebuilt libs; see `nym-vpn-core/README.md` and `nym-vpn-windows/`.

- Integration patterns to follow:

- New daemon API: update proto in `nym-vpn-proto`, rebuild to regenerate Rust stubs, implement server in `nym-vpnd` (e.g., `crates/nym-vpnd/src/service/`), and update clients (`nym-vpnc`, uniffi, desktop if applicable).
- New UI-visible types: add/adjust Rust structs with `ts-rs` derives in core crates, then regenerate TS in `nym-vpn-app`.
- Mobile API surface: expose via uniffi crates in `nym-vpn-core`, regenerate Kotlin/Swift bindings, and wire in Android/iOS projects.

- Quality gates for PRs (keep changes tight and reproducible):

- Build `nym-vpn-core` workspace (at least `nym-vpnd` and `nym-vpnc`) for your target OS.
- Desktop: from `nym-vpn-app/`, generate TS types, run lint/format, and ensure dev build starts.
- Format/lint: `cargo fmt`/clippy in core; ESLint/Prettier in app. Don’t commit artifacts under `target/` or generated files unless they are intended outputs.

- Where to look for details:

- Root `README.md` (architecture), plus platform docs: `nym-vpn-core/README.md`, `nym-vpn-app/README.md`, `nym-vpn-android/README.md`, `nym-vpn-apple/README.md`.

- When in doubt: prefer expanding existing patterns (proto → tonic, uniffi, ts-rs) over inventing new IPC/FFI paths. Keep platform-specific logic in the platform crates/dirs and reuse shared crates from `nym-vpn-core`.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ nym-vpn-core/upload/mac/nym-vpnd
# Visual Studio
*.vcxproj.user
.vs/

# GitHub Copilot
.github/copilot-settings.json
Loading
Loading