feat(desktop): make the PAC port a local-ports setting - #219
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make the desktop PAC-server port a user setting (
localPacPort, default 10811), symmetric withlocalSocksPort/localHttpPort— closing the "fixed PAC port" note from #218/#65. The default constant is single-sourced inkasumi-coreand exported to the frontend through the generated defaults;pac::startnow binds the port it is given (resolved inDesktopPlatformbeside the http port — thePlatformtrait is untouched). The settings UI shows the field in Local ports, desktop-only (the PAC mode doesn't exist on Android).Affected layer
frontend/— React Web UIcrates/·src-tauri/— Rust core / backend / Tauri desktopmodule/— Android installable zip (thin launcher over the Rust daemon)scripts/— build / release helpers.github/Verification
Web UI (
frontend/):bun run check— Biome lint + format cleanbun run test— vitest green (69 passed)bun run build—tsc -b+ vite build succeedbun run check:i18n— locale dictionaries in sync (652 keys × 8 locales)Rust (
crates/·src-tauri/):cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace— one failure:net::tests::tcp_ping_fails_on_unreachable_host, the known environment flake (an active VPN tun on the dev machine captures the TEST-NET-1 connect); fails identically onmaincargo run -p kasumi-desktop --bin codegenleavesgitcleanChecklist
module/bin/<abi>/,geoip/geosite, builtmodule/webroot/,src-tauri/gen/— all gitignored on purpose)frontend/src/generated/was regenerated from Rust, not hand-editedi18n/en.tsand every locale file updated (one label key,settings.pac, ×8)kasumi-proxy,Kasumi Proxy, camelCase)Notes for reviewers
settings.pac("PAC" in every locale), mirroring the sibling acronym labelssettings.socks/settings.httprather than a longer sentence-style key.