Code Monkey home page Code Monkey logo

Comments (2)

uknowsec avatar uknowsec commented on July 17, 2024

使用阿里云CDN时,报错[W] [service.go:103] login to server failed: websocket.Dial ws://61.240.227.243:80/websocket: bad status
frps端配置:
image

frpc端配置:
image

无法连接,尝试把server_addr 改为cdn_ip也是同样的报错。

cdn连通性证明:
image

且使用nc 可以接受到数据:
image

看起来是因为阿里云cdn把下面两个websocket的需要的header吞掉了

Upgrade: websocket
Connection: Upgrade

有什么解决办法嘛?师傅测试时用的什么厂商的cdn?

另外

我根据你的文章修改时,把验证Upgrade、Connection去掉后,还是会报错,但IP直连是可以的
下图看起来阿里云CDN好像不直接支持websocket?
frps端:
image

frpc端:
image
image

wireshark抓包记录
image

师傅是怎么用cdn保持websocket连接的?

我测试用的就是阿里云,阿里云配置的时候回源设置为http。另外阿里云是支持websocket的。
https://dcdn.console.aliyun.com/

from frpmodify.

shadow1ng avatar shadow1ng commented on July 17, 2024

后面解决了,更换腾讯云就正常了,当时咨询阿里云客服,说是新用户不支持websocket

from frpmodify.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.