docs: update readme to document tcpmux
with httpconnect
This commit is contained in:
parent
ef0b21c3d5
commit
2cc839b311
16
README.md
16
README.md
@ -818,13 +818,15 @@ locations = /news,/about
|
||||
|
||||
HTTP requests with URL prefix `/news` or `/about` will be forwarded to **web02** and other requests to **web01**.
|
||||
|
||||
### TCP HTTP Tunnel
|
||||
### TCP Multiplexing
|
||||
|
||||
frp supports receiving TCP sockets directed to different proxies on a single port on frps, similar to `vhost_http_port` and `vhost_https_port`.
|
||||
|
||||
When setting `tcp_http_tunnel_port` to anything other than 0 in frps under `[common]`, frps will listen on this port for HTTP CONNECT requests.
|
||||
The only supported TCP multiplexing method available at the moment is `httpconnect` - HTTP CONNECT tunnel.
|
||||
|
||||
The host of the HTTP CONNECT request will be used to match the proxy in frps. Proxy hosts can be configured in frpc by configuring `custom_domain` and / or `subdomain` under `[tcphttptunnel]` proxies.
|
||||
When setting `tcpmux_httpconnect_port` to anything other than 0 in frps under `[common]`, frps will listen on this port for HTTP CONNECT requests.
|
||||
|
||||
The host of the HTTP CONNECT request will be used to match the proxy in frps. Proxy hosts can be configured in frpc by configuring `custom_domain` and / or `subdomain` under `type = tcpmux` proxies, when `multiplexer = httpconnect`.
|
||||
|
||||
For example:
|
||||
|
||||
@ -832,7 +834,7 @@ For example:
|
||||
# frps.ini
|
||||
[common]
|
||||
bind_port = 7000
|
||||
tcp_http_tunnel_port = 1337
|
||||
tcpmux_httpconnect_port = 1337
|
||||
```
|
||||
|
||||
```ini
|
||||
@ -842,11 +844,13 @@ server_addr = x.x.x.x
|
||||
server_port = 7000
|
||||
|
||||
[proxy1]
|
||||
type = tcphttptunnel
|
||||
type = tcpmux
|
||||
multiplexer = httpconnect
|
||||
custom_domains = test1
|
||||
|
||||
[proxy2]
|
||||
type = tcphttptunnel
|
||||
type = tcpmux
|
||||
multiplexer = httpconnect
|
||||
custom_domains = test2
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user