vps 通过 curl 可以访问 chatgpt,但通过浏览器又不能访问

324 天前
 maoshummm

我通过 curl -v ttps://chat.openai.com/cdn-cgi/trace 回测的 ip 是 ipv6 的,但是浏览器又不能访问。fl=12f901 h=chat.openai.com ip=2001:470:f147:2acd::d532 ts=1687451520.188 visit_scheme=https uag=curl/7.74.0 colo=LAX sliver=none http=http/2 loc=US tls=TLSv1.3 sni=plaintext warp=off gateway=off rbi=off kex=X25519 有大佬知道原因吗

1994 次点击
所在节点    VPS
16 条回复
cxtrinityy
323 天前
是指 VPS 搭的梯子,本地浏览器通过梯子访问 openai 不行? vps 是纯 v6 还是 4/6 双栈?
maoshummm
323 天前
@cxtrinityy 搬瓦工 v4 的
cxtrinityy
323 天前
那可能到了 VPS 出口走的 v4 ,你在 VPS 上用 v4 curl 试试,看看什么情况
maoshummm
323 天前
@cxtrinityy 我用 curl -4 -v https://chat.openai.com/cdn-cgi/trace 回测的还是 ipv6 的地址。
fl=465f68
h=chat.openai.com
ip=2001:470:8096:10a4::ef5b
ts=1687494811.513
visit_scheme=https
uag=curl/7.74.0
colo=SJC
sliver=none
http=http/2
loc=US
tls=TLSv1.3
sni=plaintext
warp=off
gateway=off
rbi=off
kex=X25519
cxtrinityy
323 天前
@maoshummm 你这个有点奇怪啊, 如果没有 v4 出口地址 curl 应该请求不通? 现在通了却返回 v6, 可能搬瓦工机房网关给你出口做了转 v6? 感觉不太可能.
这个先不管, 你浏览器访问不了还有个可能是你本地代理没通, 或者通了但是你的浏览器流量没走代理, 你看看本地代理软件 listen 的端口, 本地用 curl -x 代理地址试试
lns103
323 天前
你看一下 nslookup chat.openai.com 的结果,可能是 VPS 提供商做了代理,自己用的话,可以用 WARP 或者 HE IPv6 Tunnel Broker ,换正常的 1.1.1.1 8.8.8.8 之类的进行解析,把流量导入隧道
maoshummm
323 天前
@lns103 输入命名:nslookup chat.openai.com
Server: 172.31.255.2
Address: 172.31.255.2#53

Name: chat.openai.com
Address: 172.31.255.2
应该没有代理。
下午试了使用:curl -x socks5://127.0.0.1:1080 https://chat.openai.com
直接报 schannel: disabled automatic use of client certificate 这个错误。
我在另外一台可以连接 chat.openai.com 的 vps 上是通过 curl -x socks5h://127.0.0.1:1080 https://chat.openai.com 连通的
非常感谢
maoshummm
323 天前
我用 https://test-ipv6.com/index.html.zh_CN 这个网站查看
你的公网 IPv4 地址是 74.211.104.222
你的运营商( ISP )是 FIBER-LOGIC
没有检测到 IPv6 地址 [更多信息]
你只接入了 IPv4 互联网,不能访问纯 IPv6 网站。
可向运营商咨询如何使用 IPv6 ,实现最佳的网络性能。 [更多信息]
你的 DNS 服务器(可能由运营商提供)已经接入 IPv6 互联网了。

但是,我通过这个 http://ipv6test.google.com/测试是没有接入 ipv6
不清楚具体原因
lns103
322 天前
172.31.255.2 是局域网 IP ,明显是走了代理
lns103
322 天前
理论上 VPS 提供商的代理是可以访问 chatGPT 的,你看一下浏览器访问 https://chat.openai.com/cdn-cgi/trace 的结果是不是那个 ipv6 ,如果不是,那就可以在服务器上强制重新解析域名
maoshummm
322 天前
@lns103 vps 浏览器上间隔一段时间访问 https://chat.openai.com/cdn-cgi/trace 这个回测的 ipv6 地址都不一样与 curl 访问的也不一样
maoshummm
321 天前
@lns103 非常感谢,已经找到原因了,是 naiveproxy 代理的问题,换成 ss 就可以直接访问了。
anjunecha
300 天前
@maoshummm 你好,请问你后来 naiveproxy 有解决不?我现在也遇到了用 naiveproxy 无法访问 chatgpt
maoshummm
300 天前
@anjunecha 换成支持 ipv6 的代理就可以
anjunecha
300 天前
@maoshummm 谢谢指导!
bankroft
197 天前

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/950954

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX