{{ message }}
Repository navigation
add ipv6Pref to HTTPTunnelPort - #1792
Merged
bitmold merged 1 commit intoAug 30, 2026
Merged
Conversation
SOCKSPort already gets $ipv6Pref appended so IPv6Traffic/PreferIPv6/ NoIPv4Traffic follow the user's setting, but HTTPTunnelPort was missing the same flags, so IPv6 selections made in the UI only applied to the socks proxy and not the http tunnel. Tor's client port options (IPv6Traffic, PreferIPv6, NoIPv4Traffic) are valid on HTTPTunnelPort the same as SOCKSPort, so append it there too.
Collaborator
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.

Fixes #1420
SOCKSPort gets $ipv6Pref appended in both branches (open-on-all-interfaces and the default) so IPv6Traffic/PreferIPv6/NoIPv4Traffic follow whatever the user picked in the UI, but HTTPTunnelPort was missing the same flags, so the IPv6 setting never reached the http tunnel.
One-line fix, appends $ipv6Pref to the HTTPTunnelPort line the same way SOCKSPort already does.
The tor man page only documents isolation flags for HTTPTunnelPort, so I checked the parser before trusting this: in tor's config.c, HTTPTunnelPort is parsed by port_parse_config with CL_PORT_TAKES_HOSTNAMES set, and IPv6Traffic/PreferIPv6 are accepted exactly when that flag is set, same as SocksPort. The flags are valid there even though the man page does not list them.
No JVM-level test for this one. TorConfig.build() reads through Prefs, which needs a real android.content.Context backing SharedPreferences, and there's no Robolectric (or similar) in this project to fake that at the JVM level, so a meaningful unit test here would mean adding a chunk of test infrastructure for a one-line change.