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

5.3.0-preview doen't resolve server dns name to IP address correctly - no connection possible #2915

Closed
spi43984 opened this issue Aug 24, 2022 · 13 comments
Labels

Comments

@spi43984
Copy link

Describe the bug
With 5.2.6 connection to server is set up - either by IP address or dns name for server.
With 5.3.0-preview only IP address for server can be configured - if dns name is used there is no connection established. No incoming packets on the server are to see.

To Reproduce
Steps to reproduce the behavior:

  1. configure server's dns name instead of IP address.
  2. tap to establish connection
  3. check for established connection in app or trace on the server for incoming packets.

Expected behavior
Connection should be established even if server's dns name is used.

Smartphone (please complete the following information):

  • Android 12
  • Google Pixel 6
  • Version: 5.3.0-preview
  • Last version that did not exhibit the issue: 5.2.6
@spi43984 spi43984 added the bug label Aug 24, 2022
@dev4u
Copy link
Contributor

dev4u commented Aug 24, 2022

四个方面问题:
1 连接服务器的地址是域名?IPv4?还是IPv6?如是域名是否双栈?如果IPv6,确认手机分配的IPv6地址没丢失?
2 设定的远程dns域名,是否支持公网直连?域名的地址是否双栈?
3 使用了哪种代理模式?是否开启IPv6开关?ACL列表自建还是内置?
4 何种加密方式?如果用2022加密,用回以前的加密方式能正常?

@spi43984
Copy link
Author

四个方面问题: 1 连接服务器的地址是域名?IPv4?还是IPv6?如是域名是否双栈?如果IPv6,确认手机分配的IPv6地址没丢失? 2 设定的远程dns域名,是否支持公网直连?域名的地址是否双栈? 3 使用了哪种代理模式?是否开启IPv6开关?ACL列表自建还是内置? 4 何种加密方式?如果用2022加密,用回以前的加密方式能正常?

Sorry, had it translated by Google. Hopefully I get the questions right.

Four questions:

  1. Is the address of the connection server a domain name? IPv4? Or IPv6?
    If so, is the domain name dual stack?
    If IPv6, confirm that the IPv6 address assigned by the mobile phone is not lost?

A: IPv4 DNS name, no IPv6.

  1. Does the set remote dns domain name support direct connection to the public network?
    Is the address of the domain name dual stack?

A: Yes, the server ist directly connected to the Internet and works (as long IPv4 address or client 5.2.6 is used on Android)
Pv4 DNS name. Server itself is dual-stack, but DNS name resolves to IPv4 address only.

  1. Which proxy mode is used?
    Is the IPv6 switch turned on?
    Is the ACL list self-built or built-in?

A: All default values, changing to something different doesn't change anything. As soon 5.3.0-preview is used there are no packets coming into the server. If IPv4 address is configured in client the connection works. If 5.2.6 is installed the connection works with DNS name as well.

  1. What kind of encryption?
    If 2022 is used for encryption, can it be normal to use the previous encryption method?

A: No difference what encryption is configured as client doesn't even try to connect to server - there are no incoming packets from the client traceable on the server.

@iamsad3508
Copy link

actually i am having the same problem, Pixel 5

@madeye
Copy link
Contributor

madeye commented Aug 28, 2022

It seems a regression in shadowsocks-rust. Any changes to server hostname resolving? @zonyitoo

@madeye
Copy link
Contributor

madeye commented Aug 28, 2022

@zonyitoo do we still support unix://file_path in the dns field in the config file?

@madeye
Copy link
Contributor

madeye commented Aug 28, 2022

@iamsad3508
Copy link

@madeye madeye closed this as completed Aug 28, 2022
@zonyitoo
Copy link

@zonyitoo do we still support unix://file_path in the dns field in the config file?

How did you resolve this issue? What did I changed?

@madeye
Copy link
Contributor

madeye commented Aug 29, 2022

I'm using system resolver now.

Since this option means using getaddrinfo() for server's host name resolving, it can work with our android app's internal resolver.

@Mygod
Copy link
Contributor

Mygod commented Aug 29, 2022

Would this break DDNS in VPN mode?

@madeye
Copy link
Contributor

madeye commented Aug 30, 2022

Would this break DDNS in VPN mode?

Nope. I checked the connect_with_hostname logic in shadowsocks-rust, it should work.

@dev4u
Copy link
Contributor

dev4u commented Aug 31, 2022

@zonyitoo do we still support unix://file_path in the dns field in the config file?

我确认在更新android代码之前,unix://file_path是支持、正常的,更新后就不支持了。
会不会是文件权限导致uds出异常?我观察到我在rust写的一段代码也出现异常:能创建文件,但不能往里面写数据,文件大小始终为零。

@kennethlau
Copy link

if using private dns , can't be made the vpn connection with v2ray-plugin but there is no problem in proxy mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants