Skip to content

Commit

Permalink
doc: update
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Dec 14, 2024
1 parent 0e1fdf1 commit 47d3fa4
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,44 @@ FLUSH PRIVILEGES;

Quit from database console by exit.

## nginx proxy

```
# rttys.conf
addr-user: 127.0.0.1:5913
addr-http-proxy: 127.0.0.1:5914
http-proxy-redir-url: http://your-server.com:5954
```

```
# 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;
}
}
server {
listen 5954;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://127.0.0.1:5914;
}
}
```

## Docker

sudo docker run -it -p 5912:5912 -p 5913:5913 -p 5914:5914 zhaojh329/rttys:latest run --addr-http-proxy :5914
Expand Down
38 changes: 38 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,44 @@ FLUSH PRIVILEGES;

退出数据库控制台。

## nginx 反向代理

```
# rttys.conf
addr-user: 127.0.0.1:5913
addr-http-proxy: 127.0.0.1:5914
http-proxy-redir-url: http://your-server.com:5954
```

```
# 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;
}
}
server {
listen 5954;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://127.0.0.1:5914;
}
}
```

## Docker

sudo docker run -it -p 5912:5912 -p 5913:5913 -p 5914:5914 zhaojh329/rttys:latest run --addr-http-proxy :5914
Expand Down

0 comments on commit 47d3fa4

Please sign in to comment.