Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any version above 5.0.4 no longer works on IPv6 only network #2907

Open
4 of 17 tasks
ijgnaig opened this issue Jul 17, 2022 · 0 comments
Open
4 of 17 tasks

Any version above 5.0.4 no longer works on IPv6 only network #2907

ijgnaig opened this issue Jul 17, 2022 · 0 comments
Labels

Comments

@ijgnaig
Copy link

ijgnaig commented Jul 17, 2022

Please read contributing guidelines. Thanks.

Describe the bug
From above version 5.0.4, the Android version of shadowsocks, shadowsocks-android no longer works on IPv6 only network, now it always resolves to IPv4 regardless of any configuration combination on both sides. PC clients like the rust and libev ports work as expected.

Server software: Arch Linux x86_64 with shadowsocks-rust 1.14.3 built from AUR
Server network: IPv6 only Internet with IPv6 only dnscrypt client, no IPv4 local nor Internet address

To Reproduce
Steps to reproduce the behavior:

  1. Connect to the server using its IPv6 address directly
  2. Click on Connected, tap to check connection
  3. Success: HTTPS handshake took N ms
  4. Open a browser, go to some dual stack sites, here web.telegram.org
  5. The browser returnes error connection closed
  6. On server side this line is registered on systemd:
    tcp tunnel [CLIENT_IPV6_ADDR]:40671 -> 149.154.167.99:443 connect failed, error: Network is unreachable (os error 101)
  7. 149.154.167.99 is actually the A record of web.telegram.org

Expected behavior
shadowsocks-android either has an option to select which IP version to resolve first or its resolution behavior is determined by server side configuration, which enables ipv6_only and ipv6_first

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Android/Chrome OS version: Android 9, PQ1A.190105.112
  • Device: Essential Phone PH-1
  • Version: 5.2.6
  • Last version that did not exhibit the issue: 5.0.4

Configuration
Put an x inside the [ ] that applies.

  • IPv4 server address
  • IPv6 server address
  • Client IPv4 availability
  • Client IPv6 availability
  • Encrypt method: none
  • Route
    • All
    • Bypass LAN
    • Bypass China
    • Bypass LAN & China
    • GFW List
    • China List
    • Custom rules
  • IPv6 route
  • Apps VPN mode
    • Bypass mode
  • Remote DNS: dns.google
  • DNS over UDP
  • Plugin configuration (if applicable):
  • Auto Connect
  • TCP Fast Open
  • If you're not using VPN mode, please supply more details here:

Additional context

  1. Versions <= 5.0.4 work only if Bypass LAN & China route mode is selected, otherwise it will always resolve to IPv4 (For example you've selected All or GFWList)
  2. The Connected, tap to check connection works without problem. When checking connection, it resolves dns.google to 2001:4860:4860::8844 at first and then establishes a connection with IPv6
  3. Direct IPv6 connection without domain name resolution works without problem as well
  4. Server side configuration:
{
    "server": "INBOUND_IPV6_ADDR",
    "server_port": 65535,
    "method": "none",
    "password": "PASSWORD",
    "local_address": "OUTBOUND_IPV6_ADDR",

    "dns": "udp://[::1]:53",
    "mode": "tcp_and_udp",

    "ipv6_first": true,
    "ipv6_only": true,

    "log": {
        "level": 1,
    },

}
@ijgnaig ijgnaig added the bug label Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant