Repository navigation
fix(network): add a Prefer IPv4 switch for YouTube bot checks on IPv6 - #656
Merged
Merged
Conversation
3 tasks done
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
api/ip_family.rs) read on every new connection, so clients built at startup follow a change without a restart, like the proxy setting.with_app_proxyis renamedwith_app_networkand installs both the proxy and the resolver. Innertube requests and googlevideo media, SABR and download fetches all go through it, so they use the same address family (googlevideo URLs are bound to the requesting IP).Related issue
Closes #622
Change type
Validation
pnpm test: 456 files, 2706 tests, 0 failurespnpm build: tsc and vite build passcargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: cleancargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: no new warningscargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: 74 test binaries, 1853 passed, 0 failed, 12 ignoredNew unit tests cover the address filter (off, IPv4 only, IPv6 and NAT64 fallback, empty list) and a client built before the setting changes following it on a local request. Not tested on a real IPv6 network that YouTube flags; the reporter can confirm.
Screenshots or recordings
Risk and compatibility
Network: only changes which resolved addresses are used, and only while the switch is on. With it off, resolution goes through the same system lookup as before.
Connections already open when the switch changes keep their family until they close, and a cached player response keeps its URLs until it expires, so a video started right before switching may need a retry.
The BotGuard sidecar and token webview connect directly, as they already do for the proxy, and are not affected.
No migrations or database schema changes; the new key is a device setting.
No new secrets, private data, telemetry, or broad Tauri permissions were introduced.
User-facing documentation was updated where needed.
Dependency and lockfile changes are intentional and limited to this PR.
Breaking changes and upgrade steps are clearly documented.