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

能否提供一个自定义设置远端dns ip的功能?

Open leonliu315 opened this issue 12 years ago • 10 comments

我有几个vps连接8.8.8.8需要200ms,而连接opendns,或者4.2.2.2却只要10ms,还有就是udp能提供直接使用tun2socks里的udpgw的功能么?

leonliu315 avatar Jul 15 '14 03:07 leonliu315

No plan for this.

madeye avatar Jul 15 '14 03:07 madeye

2年前的请求,真心需要这个功能,应该是技术不可实现。

yebr avatar Jul 22 '16 05:07 yebr

@yebr 你试试在服务器上转发一下8888

iptables -t nat -A OUTPUT -d 8.8.8.8 -j DNAT --to 158.69.209.100

我这里看起来工作正常,DNS被成功的转发走了。

codexss avatar Aug 08 '16 04:08 codexss

@codexss 谢谢,是的,开始也是用了这个方法,应该用OUTPUT就可以,不需要PREROUTING: https://github.com/shadowsocks/shadowsocks-android/issues/777#issuecomment-234708103

iptables -t nat -D OUTPUT -d 8.8.8.8 -j DNAT --to-destination 192.168.1.1

但这个方法对于我的路由器来说缺点是连接数激增,经常出现: nf_conntrack: table full, dropping packet 然后因为内存原因连接数改不到太大,我改用了另一个方法,就是在本机新起一个lo接口,IP地址为8.8.8.8/32 这样同样可以解决问题,而且连接数也没有激增。

yebr avatar Aug 08 '16 04:08 yebr

@yebr 你好,我在docker部署shadowsocks server。docker的linux内核不支持iptables -t nat。

请问你的新建lo接口是如何操作的?

shellus avatar Oct 02 '16 12:10 shellus

好吧,我试过了。 route add -host 8.8.8.8 dev lo
SIOCADDRT: Operation not permitted

一样是不行。该死的安卓客户端,为什么要写死8.8.8.8啊。真变态

shellus avatar Oct 02 '16 12:10 shellus

ssr可以解决这个问题

娃娃脾气 [email protected]于2016年10月2日周日 20:36写道:

好吧,我试过了。 route add -host 8.8.8.8 dev lo

SIOCADDRT: Operation not permitted

一样是不行。该死的安卓客户端,为什么要写死8.8.8.8啊。真变态

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shadowsocks/shadowsocks-android/issues/96#issuecomment-250969190, or mute the thread https://github.com/notifications/unsubscribe-auth/AFruIb2r25SSFFHdoDkRL-bdlxosFeBtks5qv6VJgaJpZM4CNLN3 .

codexss avatar Oct 02 '16 12:10 codexss

@codexss 你是说使用ssr的服务端和客户端吗?

还是只使用ssr的客户端就行?

我看过ssr的客户端,上面并没有dns设置的选项。

shellus avatar Oct 02 '16 12:10 shellus

是粉色图标的那个吗? zeronet打开shadowsocksr.bit下载客户端

娃娃脾气 [email protected]于2016年10月2日周日 20:44写道:

@codexss https://github.com/codexss 你是说使用ssr的服务端和客户端吗?

还是只使用ssr的客户端就行?

我看过ssr的客户端,上面并没有dns设置的选项。

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shadowsocks/shadowsocks-android/issues/96#issuecomment-250969513, or mute the thread https://github.com/notifications/unsubscribe-auth/AFruIc6u6z8Xsapi44pcSit7AHJ9wzP5ks5qv6cYgaJpZM4CNLN3 .

codexss avatar Oct 02 '16 12:10 codexss

@codexss ok,搞定了,thanks。 因为我开始直接在github下载的版本低,所以没有dns设置选项。在shadowsocksr.bit下了新版就有了

但是可惜路由规则没有https://github.com/shadowsocks/shadowsocks-android的这样有“仅代理国内流量”的规则。

不过已经能用了就好,谢谢你。

shellus avatar Oct 02 '16 13:10 shellus