Code Monkey home page Code Monkey logo

Comments (5)

RyanRaw avatar RyanRaw commented on June 15, 2024 5

确实用了反代,改下配置可以用了,比用GateOne舒服多了,感谢大佬。
配置如下,群晖中登陆root用户,编辑/etc/nginx/app.d/server.ReverseProxy.conf文件,添加以下两段,然后保存退出。执行nginx -s reload命令,给有需要的人

map $http_upgrade $connection_upgrade { default upgrade; '' close; }

proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade;

from sshwifty.

nirui avatar nirui commented on June 15, 2024

WebSocket错误1006表示链接异常关闭。

你的连接有没有通过中间层?比如Nginx反向代理之类。

如果有的话,可能需要检查一下Nginx的配置,允许它反向代理Websocket请求;如果是直接连接,没有中间层,则可能是因为服务器主动断开了你的客户端。如果是这样,建议首先看看运行Sshwifty服务端的机器与进行访问的客户端之间有没有时间差,因为Sshwifty的Websocket协议是时间敏感的,时间差可能会让服务器认为客户端是非法的。

你可以看一下Docker日志,docker logs <运行Sshwifty的容器>。如果有“cipher authentication”之类的警告,那么大体是因为时间差导致的,你可以用ntp同步一下两台机器的时间。

当然,也有可能是访问密码错了。如果是这样,一般刷新一下页面就行了。

from sshwifty.

raining1123 avatar raining1123 commented on June 15, 2024

确实用了反代,改下配置可以用了,比用GateOne舒服多了,感谢大佬。
配置如下,群晖中登陆root用户,编辑/etc/nginx/app.d/server.ReverseProxy.conf文件,添加以下两段,然后保存退出。执行nginx -s reload命令,给有需要的人

map $http_upgrade $connection_upgrade { default upgrade; '' close; }

proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade;

老哥,我把您自己的教程图转发过来了 嘻嘻嘻
https://aichh.com/507.html

image

from sshwifty.

waylonwang avatar waylonwang commented on June 15, 2024

不用那么麻烦,在群晖的反代中直接添加自定义标题就可以了

屏幕快照 2022-09-18 上午11 11 35

from sshwifty.

cubale avatar cubale commented on June 15, 2024

不用那么麻烦,在群晖的反代中直接添加自定义标题就可以了

屏幕快照 2022-09-18 上午11 11 35

非常感谢,成功解决了我的问题

from sshwifty.

Related Issues (20)

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.