[GH-ISSUE #44] websocket: bad handshake 问题 #143

Closed
opened 2026-03-01 17:50:37 +03:00 by kerem · 8 comments
Owner

Originally created by @fakeboboliu on GitHub (Nov 27, 2023).
Original GitHub issue: https://github.com/Archeb/opentrace/issues/44

如果您遇到了 websocket: bad handshake

此问题是 NextTrace 相关问题,
表示 NextTrace IP 地理位置 API 无法连接,可能是网络异常。

因为 NextTrace 默认使用的 LeoMoeAPI 是社区的免费项目,使用 CloudFlare 免费 CDN,连接性可能受地区运营商的影响。

建议把问题向上游 NextTrace 报告,也可以考虑在主界面右上角切换其他数据源或者在设置中配置本地数据源。

Originally created by @fakeboboliu on GitHub (Nov 27, 2023). Original GitHub issue: https://github.com/Archeb/opentrace/issues/44 如果您遇到了 `websocket: bad handshake`: 此问题是 [NextTrace](https://github.com/nxtrace/NTrace-core) 相关问题, 表示 NextTrace IP 地理位置 API 无法连接,可能是网络异常。 因为 NextTrace 默认使用的 LeoMoeAPI 是社区的免费项目,使用 CloudFlare 免费 CDN,连接性可能受地区运营商的影响。 建议把问题向上游 [NextTrace](https://github.com/nxtrace/NTrace-core/issues) 报告,也可以考虑在主界面右上角切换其他数据源或者在设置中配置本地数据源。
kerem closed this issue 2026-03-01 17:50:38 +03:00
Author
Owner

@tsosunchia commented on GitHub (Nov 30, 2023):

是否可以增加一个http或者socks5代理,用于联网

不是有吗?

<!-- gh-comment-id:1833700446 --> @tsosunchia commented on GitHub (Nov 30, 2023): > 是否可以增加一个http或者socks5代理,用于联网 不是有吗?
Author
Owner

@wwng2333 commented on GitHub (Nov 30, 2023):

是否可以增加一个http或者socks5代理,用于联网

不是有吗?

刚看到,所以删了,感谢回复

<!-- gh-comment-id:1833701321 --> @wwng2333 commented on GitHub (Nov 30, 2023): > > 是否可以增加一个http或者socks5代理,用于联网 > > 不是有吗? 刚看到,所以删了,感谢回复
Author
Owner

@tsosunchia commented on GitHub (Dec 7, 2023):

请检查你的dns是否经过代理

<!-- gh-comment-id:1844340490 --> @tsosunchia commented on GitHub (Dec 7, 2023): 请检查你的dns是否经过代理
Author
Owner

@tsosunchia commented on GitHub (Dec 7, 2023):

nslookup api.nxtrace.org

curl https://api.nxtrace.org/

curl https://origin-fallback.nxtrace.org/

分别查看以上三个命令结果

<!-- gh-comment-id:1844370907 --> @tsosunchia commented on GitHub (Dec 7, 2023): nslookup api.nxtrace.org curl https://api.nxtrace.org/ curl https://origin-fallback.nxtrace.org/ 分别查看以上三个命令结果
Author
Owner

@tsosunchia commented on GitHub (Dec 7, 2023):

三条命令结果是啥

第二个/第三个 报错是正常的

chenwcy @.***>于2023年12月7日 周四下午12:44写道:

nslookup api.nxtrace.org

curl https://api.nxtrace.org/

curl https://origin-fallback.nxtrace.org/

分别查看以上三个命令结果

第二条命令报错 。


Reply to this email directly, view it on GitHub
https://github.com/Archeb/opentrace/issues/44#issuecomment-1844373434,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ
.
You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:1844374689 --> @tsosunchia commented on GitHub (Dec 7, 2023): 三条命令结果是啥 第二个/第三个 报错是正常的 chenwcy ***@***.***>于2023年12月7日 周四下午12:44写道: > nslookup api.nxtrace.org > > curl https://api.nxtrace.org/ > > curl https://origin-fallback.nxtrace.org/ > > 分别查看以上三个命令结果 > > 第二条命令报错 。 > > — > Reply to this email directly, view it on GitHub > <https://github.com/Archeb/opentrace/issues/44#issuecomment-1844373434>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@tsosunchia commented on GitHub (Dec 7, 2023):

你是在大陆吧?

chenwcy @.***>于2023年12月7日 周四下午12:47写道:

三条命令结果是啥 第二个/第三个 报错是正常的 chenwcy @.

>于2023年12月7日 周四下午12:44写道: … <#m_-8446665265840364013_> nslookup
api.nxtrace.org http://api.nxtrace.org curl https://api.nxtrace.org/
https://api.nxtrace.org/ curl https://origin-fallback.nxtrace.org/
https://origin-fallback.nxtrace.org/ 分别查看以上三个命令结果 第二条命令报错 。 — Reply to
this email directly, view it on GitHub <#44 (comment)
https://github.com/Archeb/opentrace/issues/44#issuecomment-1844373434>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ
https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ
. You are receiving this because you commented.Message ID: @.
>

Misaka.LAX


Reply to this email directly, view it on GitHub
https://github.com/Archeb/opentrace/issues/44#issuecomment-1844375338,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOGBNB3C2BAZ7W5Z6BTDHMLYIFC6FAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMZTHA
.
You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:1844377232 --> @tsosunchia commented on GitHub (Dec 7, 2023): 你是在大陆吧? chenwcy ***@***.***>于2023年12月7日 周四下午12:47写道: > 三条命令结果是啥 第二个/第三个 报错是正常的 chenwcy *@*. > > *>于2023年12月7日 周四下午12:44写道: … <#m_-8446665265840364013_> nslookup > api.nxtrace.org <http://api.nxtrace.org> curl https://api.nxtrace.org/ > <https://api.nxtrace.org/> curl https://origin-fallback.nxtrace.org/ > <https://origin-fallback.nxtrace.org/> 分别查看以上三个命令结果 第二条命令报错 。 — Reply to > this email directly, view it on GitHub <#44 (comment) > <https://github.com/Archeb/opentrace/issues/44#issuecomment-1844373434>>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ > <https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ> > . You are receiving this because you commented.Message ID: @.*> > > Misaka.LAX > > — > Reply to this email directly, view it on GitHub > <https://github.com/Archeb/opentrace/issues/44#issuecomment-1844375338>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AOGBNB3C2BAZ7W5Z6BTDHMLYIFC6FAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMZTHA> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@tsosunchia commented on GitHub (Dec 7, 2023):

如果你是在大陆

那就是你本地dns问题

我们的api是geodns,你的dns被代理了,返回了我们为海外用户设置的ip,自然无法连接

chenwcy @.***>于2023年12月7日 周四下午12:49写道:

isaka.LAX

你是在大陆吧? chenwcy @.

>于2023年12月7日 周四下午12:47写道: … <#m_2027896486840905074_> 三条命令结果是啥 第二个/第三个
报错是正常的 chenwcy @. >于2023年12月7日 周四下午12:44写道: … <#m_-8446665265840364013_>
nslookup api.nxtrace.org http://api.nxtrace.org http://api.nxtrace.org
http://api.nxtrace.org curl https://api.nxtrace.org/
https://api.nxtrace.org/ https://api.nxtrace.org/
https://api.nxtrace.org/ curl https://origin-fallback.nxtrace.org/
https://origin-fallback.nxtrace.org/ https://origin-fallback.nxtrace.org/
https://origin-fallback.nxtrace.org/ 分别查看以上三个命令结果 第二条命令报错 。 — Reply to
this email directly, view it on GitHub <#44
https://github.com/Archeb/opentrace/issues/44 (comment) <#44 (comment)
https://github.com/Archeb/opentrace/issues/44#issuecomment-1844373434>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ
https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ
https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ
https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ
. You are receiving this because you commented.Message ID: @.> Misaka.LAX —
Reply to this email directly, view it on GitHub <#44 (comment)
https://github.com/Archeb/opentrace/issues/44#issuecomment-1844375338>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOGBNB3C2BAZ7W5Z6BTDHMLYIFC6FAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMZTHA
https://github.com/notifications/unsubscribe-auth/AOGBNB3C2BAZ7W5Z6BTDHMLYIFC6FAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMZTHA
. You are receiving this because you commented.Message ID: @.
>

不清楚命令对应的结果,谢谢大哥不搞了


Reply to this email directly, view it on GitHub
https://github.com/Archeb/opentrace/issues/44#issuecomment-1844386194,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOGBNB7DCYNZSSZDG7ZUPLDYIFDGXAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM4DMMJZGQ
.
You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:1844399197 --> @tsosunchia commented on GitHub (Dec 7, 2023): 如果你是在大陆 那就是你本地dns问题 我们的api是geodns,你的dns被代理了,返回了我们为海外用户设置的ip,自然无法连接 chenwcy ***@***.***>于2023年12月7日 周四下午12:49写道: > isaka.LAX > > 你是在大陆吧? chenwcy *@*. > > *>于2023年12月7日 周四下午12:47写道: … <#m_2027896486840905074_> 三条命令结果是啥 第二个/第三个 > 报错是正常的 chenwcy @. >于2023年12月7日 周四下午12:44写道: … <#m_-8446665265840364013_> > nslookup api.nxtrace.org <http://api.nxtrace.org> http://api.nxtrace.org > <http://api.nxtrace.org> curl https://api.nxtrace.org/ > <https://api.nxtrace.org/> https://api.nxtrace.org/ > <https://api.nxtrace.org/> curl https://origin-fallback.nxtrace.org/ > <https://origin-fallback.nxtrace.org/> https://origin-fallback.nxtrace.org/ > <https://origin-fallback.nxtrace.org/> 分别查看以上三个命令结果 第二条命令报错 。 — Reply to > this email directly, view it on GitHub <#44 > <https://github.com/Archeb/opentrace/issues/44> (comment) <#44 (comment) > <https://github.com/Archeb/opentrace/issues/44#issuecomment-1844373434>>>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ > <https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ> > https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ > <https://github.com/notifications/unsubscribe-auth/AOGBNB3JWFHULNDBG64IYLDYIFCTJAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TGNBTGQ> > . You are receiving this because you commented.Message ID: @.> Misaka.LAX — > Reply to this email directly, view it on GitHub <#44 (comment) > <https://github.com/Archeb/opentrace/issues/44#issuecomment-1844375338>>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AOGBNB3C2BAZ7W5Z6BTDHMLYIFC6FAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMZTHA > <https://github.com/notifications/unsubscribe-auth/AOGBNB3C2BAZ7W5Z6BTDHMLYIFC6FAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM3TKMZTHA> > . You are receiving this because you commented.Message ID: @.*> > > 不清楚命令对应的结果,谢谢大哥不搞了 > > — > Reply to this email directly, view it on GitHub > <https://github.com/Archeb/opentrace/issues/44#issuecomment-1844386194>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AOGBNB7DCYNZSSZDG7ZUPLDYIFDGXAVCNFSM6AAAAAA74FXXAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBUGM4DMMJZGQ> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@tsosunchia commented on GitHub (Dec 7, 2023):

最近在issue区有很多反馈,出现如下报错的问题

websocket: bad handshake

对于这种问题,不要急于发issue。大多数情况下,这是由用户的本地环境所引起的。特别需要注意的是,如果用户只为自己的DNS设置了代理,而没有为API设置代理,这可能会导致问题。我们的项目API使用了GeoDNS,如果用户代理了DNS,可能会接收到Cloudflare的IP地址。由于众所周知的原因,Cloudflare在中国大陆的访问并不顺畅。因此,当您遇到此类问题时,建议要么将DNS和API同时设置代理,要么就让DNS和API直连。

<!-- gh-comment-id:1844689999 --> @tsosunchia commented on GitHub (Dec 7, 2023): 最近在issue区有很多反馈,出现如下报错的问题 ``` websocket: bad handshake ``` 对于这种问题,不要急于发issue。大多数情况下,这是由用户的本地环境所引起的。特别需要注意的是,如果用户只为自己的DNS设置了代理,而没有为API设置代理,这可能会导致问题。我们的项目API使用了GeoDNS,如果用户代理了DNS,可能会接收到Cloudflare的IP地址。由于众所周知的原因,Cloudflare在中国大陆的访问并不顺畅。因此,当您遇到此类问题时,建议要么将DNS和API同时设置代理,要么就让DNS和API直连。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentrace#143
No description provided.