nirui / sshwifty

Web SSH & Telnet (WebSSH & WebTelnet client) 🔮
https://sshwifty-demo.nirui.org
GNU Affero General Public License v3.0
2.43k stars 366 forks source link

I get a connection error when opening SSH or Telnet with DDNSTO #173

Open jiangjianghu opened 2 months ago

jiangjianghu commented 2 months ago

I can open the website, but I get an error when I click on Create SSH Connection, and I exit the configure SSH interface, which is also the case with telnet. Does anyone know why? Sshwifty is disconnected from it's backend server: Error: Error: Connection is closed

nirui commented 2 months ago

Hi,

Are you connecting directly to the Sshwifty instance or through a reverse proxy?

In the case of reverse proxy, it must support WebSocket in order to allow Sshwifty client (the web page) to connect with the server.

jiangjianghu commented 2 months ago

Access is through a proxy, my host is in the LAN, ddnsto can access the website in the LAN through a domain name, but the websocket does not know whether it is supported

nirui commented 2 months ago

Hi,

My guess is, if your reverse proxy is something like Nginx, then you need to enable WebSocket support on it as it's not usually enabled by default. Please take look: https://nginx.org/en/docs/http/websocket.html.

Though, other proxies such as Traefik may already has WebSocket enabled by default. In that case then maybe it's something else causing the problem. In such case I'll need more information in order to help you figure it out.

jiangjianghu commented 2 months ago

I see, it may be the reason that ddnsto does not support websockets, so this may not be solved,

thank you

nirui commented 2 months ago

I'm not really familiar with DDNSTO. Do they offer documentation or customer service for their users? Maybe you can inquire the company to see if they can help. WebSocket is fairly commonly used now days, makes no sense to not support it.