Jrohy / webssh

简易在线终端和sftp工具

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

无法实现nginx的反向代理

superglg738 opened this issue · comments

webssh写的静态文件 引用是用绝对路径。
nginx没法配置反向代理

static 可能在多个平台上被引用,又不能直接在写/static跳转。

go程序没整过,可以重新打包一个,采用相对路径的吗?

python也有一个webssh,也是用websocket传递的,可以配置在nginx后,
但是它没有文件上传功能

https://pypi.org/project/webssh/

+---------+ http +--------+ ssh +-----------+
| browser | <==========> | webssh | <=======> | ssh server|
+---------+ websocket +--------+ ssh +-----------+

Nginx config example

location / {
proxy_pass http://127.0.0.1:8888;
proxy_http_version 1.1;
proxy_read_timeout 300;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
}