{"action":"created","issue":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-android/issues/275","labels_url":"https://api.github.com/repos/shadowsocks/shadowsocks-android/issues/275/labels{/name}","comments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-android/issues/275/comments","events_url":"https://api.github.com/repos/shadowsocks/shadowsocks-android/issues/275/events","html_url":"https://github.com/shadowsocks/shadowsocks-android/issues/275","id":67172123,"number":275,"title":"Prefer IPv4 or disable IPv6","user":{"login":"matttbe","id":768677,"avatar_url":"https://avatars.githubusercontent.com/u/768677?v=3","gravatar_id":"","url":"https://api.github.com/users/matttbe","html_url":"https://github.com/matttbe","followers_url":"https://api.github.com/users/matttbe/followers","following_url":"https://api.github.com/users/matttbe/following{/other_user}","gists_url":"https://api.github.com/users/matttbe/gists{/gist_id}","starred_url":"https://api.github.com/users/matttbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matttbe/subscriptions","organizations_url":"https://api.github.com/users/matttbe/orgs","repos_url":"https://api.github.com/users/matttbe/repos","events_url":"https://api.github.com/users/matttbe/events{/privacy}","received_events_url":"https://api.github.com/users/matttbe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-08T16:49:28Z","updated_at":"2015-04-09T05:41:52Z","closed_at":"2015-04-09T05:41:52Z","body":"Hello,\r\n\r\nFirst, thank you for developing and maintaining this free, open-source and nice SOCKS proxy!\r\n\r\nI have a problem with IPv6: When my smartphone has an IPv6 address, it will first try to connect to an IPv6 address if one is available. But the problem is that my proxy (shdowsocks-libev) is running on a server without IPv6 address and the DNS resolver can answer to AAAA requests. I'm able to block AAAA DNS requests on the proxy if they are made on top of UDP but it seems the proxy do all requests on top of TCP. If I block the port 53 for TCP protocol, each time I use `nslookup` on the smartphone, I have an error.\r\n\r\nThe result is that when my smartphone has an IPv6 address, the connections are \"slow\": it first tries to connect to an IPv6 address but because it will not be possible to do that, after a few seconds, the smartphone tries to connect to the IPv4 address.\r\nIt's not really a problem with the browsers because they have implemented Happy Eyeballs feature (RFC6555) but apps like the Play Store are \"slow\" because Google supports IPv6.\r\n\r\nI could also disable IPv6 on the smartphone by setting this Sysctl but Android will re-enable IPv6 after any re-connection: `net.ipv6.conf.all.disable_ipv6 = 1`.\r\n\r\nDo you have any idea how to solve this problem? :-)\r\n\r\nIs it maybe possible to add an (hidden) option to disable IPv6 support / to not prefer IPv6? ~~When looking at the source code, I see this line:~~\r\n\r\n    Utils.resolve(config.proxy, enableIPv6 = true)\r\n\r\n**EDIT**: Sorry, I didn't see that this method is only called at the initialisation part to get the IP of the proxy server.\r\n\r\nBest Regards,\r\n\r\nMatt"},"comment":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-android/issues/comments/91121315","html_url":"https://github.com/shadowsocks/shadowsocks-android/issues/275#issuecomment-91121315","issue_url":"https://api.github.com/repos/shadowsocks/shadowsocks-android/issues/275","id":91121315,"user":{"login":"madeye","id":627917,"avatar_url":"https://avatars.githubusercontent.com/u/627917?v=3","gravatar_id":"","url":"https://api.github.com/users/madeye","html_url":"https://github.com/madeye","followers_url":"https://api.github.com/users/madeye/followers","following_url":"https://api.github.com/users/madeye/following{/other_user}","gists_url":"https://api.github.com/users/madeye/gists{/gist_id}","starred_url":"https://api.github.com/users/madeye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madeye/subscriptions","organizations_url":"https://api.github.com/users/madeye/orgs","repos_url":"https://api.github.com/users/madeye/repos","events_url":"https://api.github.com/users/madeye/events{/privacy}","received_events_url":"https://api.github.com/users/madeye/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T05:41:52Z","updated_at":"2015-04-09T05:41:52Z","body":"1. shadowsocks-android cannot proxy IPv6 traffic.All IPv6 fraffic are just bypassed to the lower interface.\r\n2. To avoid using IPv6, the best way I think is to disable it on your server. Filtering all AAAA queries should work."}}