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

修复 ipv4/ipv6 双栈网络(或ipv6网络优先)时,WS+TLS ping 获取不到 ipv4 地址的问题。 #1174

Closed
wants to merge 2 commits into from

Conversation

ambilight2010
Copy link

No description provided.

@233boy
Copy link
Owner

233boy commented Jul 11, 2023

@ambilight2010

这里获取域名解析的结果,由于脚本默认是优先获取 V4 IP 的,如果域名只解析 A 记录,是不会获取到 V6 的,如果强制了 -4 那么就是只会获取了 V4 的地址了

或许根据 IP 的类型再来 PING -4 或者 PING -6 是一个好的选择

@ambilight2010
Copy link
Author

@ambilight2010

这里获取域名解析的结果,由于脚本默认是优先获取 V4 IP 的,如果域名只解析 A 记录,是不会获取到 V6 的,如果强制了 -4 那么就是只会获取了 V4 的地址了

或许根据 IP 的类型再来 PING -4 或者 PING -6 是一个好的选择

那感觉把 ping 换成 nslookup 更合理?如果是双栈网络,nslookup 本身就会返回 A 和 AAAA 记录,这样也不必区分获取的源ip是 v4 还是 v6

@233boy
Copy link
Owner

233boy commented Jul 12, 2023

@ambilight2010

nslookup 并不是所有的机子默认自带,得安装,PING 的话一般都有,用 host 命令其实返回的内容更加简化,用 PING 的原因就是想要省去安装……

其实这个问题我知道,但我的想法是,一般来说,只解析 A 或者 AAAA 就不会有这个问题了,毕竟😂用来翻墙的域名,随便一个二级域名就行

我直接修复这个问题,感谢你的反馈,我关闭 PR 了,抱歉

https://github.com/233boy/v2ray/releases/tag/v4.12

67387eb

@233boy 233boy closed this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants