Skip to content

Commit

Permalink
update 220406-nginx-stream.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanbao2000 committed May 4, 2024
1 parent c9f779e commit 8eb3790
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/blog/2022/220406-nginx-stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,17 @@ load_module /usr/lib/nginx/modules/ngx_stream_module.so;
```

如此一来便能正常使用 stream 模块。

然后可以使用以下语法进行 stream 转发:

```nginx
stream {
server {
listen 6161 reuseport;
listen [::]:6161 reuseport;
proxy_pass arcapi-v2.lowiro.com:443;
}
}
```

这段配置的意思是,监听本机的 6161 端口(IPv4 和 IPv6),然后将所有请求转发到 `arcapi-v2.lowiro.com:443`

0 comments on commit 8eb3790

Please sign in to comment.