TCP over WebSocket
[tcp 服务器]
|
| <= TCP
|
[ztun 服务端]
||
|| <= WebSocket
||
[nginx等]
||
|| <= WebSocket
||
[ztun客户端]
|
| <= TCP
|
[tcp客户端,如secureCRT]
sh build.sh dockerDeploy
go build cmd/main.go -o zserver
./zserver -conf configs/
./ztun
upstream websocket {
server 127.0.0.1:8000;
}
server {
listen 80;
server_name console.ali;
index index.html;
set $root_path '/opt/code/zserver/www';
root $root_path;
location ~ / {
proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 6000s;
proxy_connect_timeout 300s;
}
}
Content type
Image
Digest
Size
12.2 MB
Last updated
about 6 years ago
docker pull gauzy/zserver