From 35ac1e7adee7aa65880dcc2bc810a77b69f8e421 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 13 Dec 2024 15:26:05 +0800 Subject: [PATCH] doc: update Signed-off-by: Jianhui Zhao --- README.md | 26 ++++++++++++++++++++++++++ README_ZH.md | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) 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..f3cc26b 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -84,6 +84,32 @@ 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