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

Failed to connect remote server #118

Closed
e2ge opened this issue Jul 15, 2018 · 12 comments
Closed

Failed to connect remote server #118

e2ge opened this issue Jul 15, 2018 · 12 comments

Comments

@e2ge
Copy link

e2ge commented Jul 15, 2018

[2018-07-14][20:53:14.591223300][ERROR] Failed to connect remote server, err: resolved xx.xxx.com to empty address, all IPs are filtered
[2018-07-14][20:53:14.592222200][ERROR] Failed to handle client: resolved xx.xxx.com to empty address, all IPs are filtered

一直在等新的版本,alpha9和alpha10终于能在windows上的mingw环境编译过了,用的gnu abi编译,电脑原因没有试msvc abi。
因为新的版本和旧的版本变动有点大,增加了ssdns.exe,看log貌似是dns没有响应,无法返回server的ip。
会不会需要在config.json里面设置fallback的dns呢?

@zonyitoo
Copy link
Collaborator

日志的意思是DNS解析xx.xxx.com的时候,返回的是空值,或者是有返回,但是被过滤掉了。
具体你的怎么做的?
ssdns是一个新的工具,是用来把DNS请求放到远端去解析。可以不使用它的。

@e2ge
Copy link
Author

e2ge commented Jul 15, 2018

没有进行什么特殊的操作。在win10下,mingw更新到最新的版本,rustup update更新到最新的版本。
编译命令:OPENSSL_DIR=C:\OpenSSL-Win64 OPENSSL_STATIC=yes SODIUM_BUILD_STATIC=yes cargo build --release --features miscreant
在mingw下执行./sslocal.exe -c ./config.json
正常出现启动log,出现提示监听端口,在firefox自带option中更改到socks5,会出现一段时间的等待状态,然后log蹦出来Failed to connect remote server
试着用-v开启debug日志,并没有过多的信息。

@zonyitoo
Copy link
Collaborator

说明是解析不了这个 xx.xxx.com 地址

nslookup xx.xxx.com

有返回吗?

配置里不要写域名,直接用IP呢?

@e2ge
Copy link
Author

e2ge commented Jul 15, 2018

地址是肯定可以解析的,因为有其他的连接存在,我需要等一会试一下直接用ip。
另外我系统中有dnscrypt-proxy,所以系统的dns设置为127.0.0.1,不知道是否会影响ss-rust的dns解析,我也会试一下。

@zonyitoo
Copy link
Collaborator

不会。因为我的Linux服务器上也用了dnsmasq,OS X本地本身也有dsutils,我还试过用ssdns来代理本地所有DNS请求,然后再启动sslocal,解析也是没有问题。

@zonyitoo
Copy link
Collaborator

也许Windows下有什么特殊的设置有影响,我没有测试过,没有Windows可测。

@e2ge
Copy link
Author

e2ge commented Jul 15, 2018

把server换成ip就可以了,奇怪的问题。

@zonyitoo
Copy link
Collaborator

说明是Windows下解析不了,跟trust-dns有关了……

@e2ge
Copy link
Author

e2ge commented Jul 15, 2018

问一个题外的问题,ssdns是基于trust-dns的,而trust-dns是支持dns over tls,不知道ssdns是否支持dns-over-tls设置成上有dns,例如9.9.9.9就支持dns-over-tls

@zonyitoo
Copy link
Collaborator

ssdns是在本地监听端口,把DNS请求封装成ShadowSocks UDP包,发到ssserver去访问DNS服务器。

ssserver用的是trust-dns,应该是支持。我个人没有试过。
在服务端改一下/etc/resolv.conf试试?

@zonyitoo
Copy link
Collaborator

貌似是需要在代码里改一下DNS resolver的配置,指定protocol才行。这个可以另提一个issue吧,可以做一下。

@zonyitoo
Copy link
Collaborator

zonyitoo commented Aug 7, 2018

Should be fixed in #122 .

@zonyitoo zonyitoo closed this as completed Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants