Shadowsocks-android: Cannot connect with ipv4 if hostname has also an AAAA record

Created on 6 Sep 2018  路  6Comments  路  Source: shadowsocks/shadowsocks-android

Please read contributing guidelines. Thanks.

Describe the bug
If a hostname is used for the server, and that hostname has an A record and an AAAA record shadowsocks won't connect if it has only an ipv4 address.

To Reproduce
Steps to reproduce the behavior:

  1. Use a hostname for your server and give it an A and an AAAA record.
  2. try to connect to your server using only ipv4.
  3. Doesn't work

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

Smartphone (please complete the following information):

  • Android version: [e.g. "7.1.1]
  • Device: [e.g. Vivo x9i]
  • Version: []
  • Last version that did not exhibit the issue: [not applicable]

Configuration
Put an x inside the [ ] that applies.

  • [x] IPv4 server address
  • [x] IPv6 server address
  • [x] Client IPv4 availability
  • [ ] Client IPv6 availability
  • Encrypt method: Chacha20-ietf-poly1305
  • Route

    • [x] All

    • [ ] Bypass LAN

    • [ ] Bypass China

    • [ ] Bypass LAN & China

    • [ ] GFW List

    • [ ] China List

    • [ ] Custom rules

  • [ ] IPv6 route
  • [ ] Apps VPN mode

    • [ ] Bypass mode

  • Remote DNS: 8.8.8.8
  • [x] DNS Forwarding
  • Plugin configuration (if applicable):
  • [ ] Auto Connect
  • [x] TCP Fast Open
  • If you're not using VPN mode, please supply more details here:

Additional context
If necessary I can provide a server + dns record.

third-party bug

All 6 comments

DNS resolution is handled by system.

If you cannot get correct IPv4 address, it means the system "think" there is a "valid" IPv6 link.

DNS resolution is handled by system.

Ah, so it's a bug in Android then?

If you cannot resolve correct IPv4 address, it means the system "think" it doesn't have a valid IPv6 link.

I don't think I understand what you mean here. Did you mean to write IPv4 instead of IPv6?

Should not be an Android bug, but probably a bug of your system.

Should not be an Android bug, but probably a bug of your system.

There is another problem. The dual stack domain name (IPV4+IPV6) will give priority to the IPV6 result under the 4G IPV6 network, which is normal.
But if I switch to WIFI without IPV6, I can't link.
After re-resolving the domain name after switching networks, it should be solved?

@giftzn Use Tasker to switch on/off between networks.

Closing due to inactivity.

Was this page helpful?
0 / 5 - 0 ratings