Closed manaphp closed 6 months ago
./tcp2ws 22 50022
Proxy with Nginx: location /ws/ { proxy_pass http://192.168.1.2:50022/; proxy_read_timeout 3600; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Forwarded-For $remote_addr; access_log off; }
我懒,所以他只会显示0.0.0.0,欢迎pr,但请注意需要全平台兼容 其实Linux完全可以用 ip address 配合 grep 或是 awk 实现你这个需求 举个例子 ip addr | grep inet | awk '{print($2)}'
ip addr | grep inet | awk '{print($2)}'
./tcp2ws 22 50022
Proxy with Nginx: location /ws/ { proxy_pass http://192.168.1.2:50022/; proxy_read_timeout 3600; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Forwarded-For $remote_addr; access_log off; }