diff --git a/README.md b/README.md index 0ecd13a..3285ee5 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,32 @@ FLUSH PRIVILEGES; Quit from database console by exit. +## nginx proxy + +rttys.conf +``` +addr-http-proxy: :5914 +http-proxy-redir-url: http://your-server.com:5914 +local-auth: false +``` + +nginx.conf +``` +server { + listen 8080; + + location /connect/ { + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass http://127.0.0.1:5913; + } + + location / { + proxy_pass http://127.0.0.1:5913; + } +} +``` + ## Docker sudo docker run -it -p 5912:5912 -p 5913:5913 -p 5914:5914 zhaojh329/rttys:latest run --addr-http-proxy :5914 diff --git a/README_ZH.md b/README_ZH.md index a0f8a59..80b61a0 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -84,6 +84,34 @@ FLUSH PRIVILEGES; 退出数据库控制台。 +## nginx 反向代理 + +``` +# rttys.conf + +addr-http-proxy: :5914 +http-proxy-redir-url: http://your-server.com:5914 +local-auth: false +``` + +``` +# nginx.conf + +server { + listen 8080; + + location /connect/ { + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass http://127.0.0.1:5913; + } + + location / { + proxy_pass http://127.0.0.1:5913; + } +} +``` + ## Docker sudo docker run -it -p 5912:5912 -p 5913:5913 -p 5914:5914 zhaojh329/rttys:latest run --addr-http-proxy :5914