shadowsocks-android icon indicating copy to clipboard operation
shadowsocks-android copied to clipboard

Using FQDN as server result in network failure when the FQDN's IP was updated

Open fqdnmastr opened this issue 3 years ago • 1 comments

Please read contributing guidelines. Thanks.

Describe the bug

When the user is using FQDN (myproxy.example.com) instead of raw IP address, and the IP address of FQDN was updated, Shadowsocks failed to detect IP changes and keep sending data to old IP address until the user disconnect and connect by pressing widget button or opening the UI and reconnect.

To Reproduce Steps to reproduce the behavior:

  1. Open shadowsocksclient and connect to myproxy.example.com:1234
  2. While connecting, change the IP address of myproxy.example.com from DNS settings page of DNS provider (for example, Dynamic IP service)
  3. Wait for 5 minutes (myproxy.example.com A TTL = 300sec)
  4. Try opening any website with shadowsocksclient

Expected behavior

Shadowsocksclient SHOULD update the IP address (honor TTL value and ask for IP to DNS after the TTL expires) THEN connect to new IP address silently.

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

Smartphone (please complete the following information):

  • Android/Chrome OS version: Android 10
  • Device: Android
  • Version: 10
  • Last version that did not exhibit the issue: [not applicable]

Configuration Put an x inside the [ ] that applies.

  • [x] IPv4 server address
  • [ ] IPv6 server address
  • [x] Client IPv4 availability
  • [ ] Client IPv6 availability
  • Encrypt method:
  • 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
  • [ ] DNS over UDP
  • Plugin configuration (if applicable):
  • [ ] Auto Connect
  • [x] TCP Fast Open
  • If you're not using VPN mode, please supply more details here:

Additional context

Dynamic DNS service such as duckdns.org can map the IPv4 to FQDN

fqdnmastr avatar Jun 23 '22 08:06 fqdnmastr

Shadowsocks relies on Android system resolver on server's hostname resolving. If the system resolver cannot handle the TTL well, nothing we can do from our side.

madeye avatar Aug 30 '22 04:08 madeye