mirror of
https://github.com/bytedance/g3.git
synced 2026-05-05 23:41:57 +00:00
g3proxy: support proxy protocol v1 for incoming connections (#128)
* g3proxy: support proxy protocol v1 for incoming connections * g3proxy: add example conf for proxy protocol
This commit is contained in:
parent
533af168e9
commit
0d9016a799
9 changed files with 284 additions and 22 deletions
46
g3proxy/examples/chain_proxy_protocol/g3proxy.yaml
Normal file
46
g3proxy/examples/chain_proxy_protocol/g3proxy.yaml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
runtime:
|
||||
thread_number: 2
|
||||
|
||||
server:
|
||||
- name: http1
|
||||
escaper: proxy_pp1
|
||||
type: http_proxy
|
||||
listen:
|
||||
address: "[::]:3128"
|
||||
- name: http2
|
||||
escaper: proxy_pp2
|
||||
type: http_proxy
|
||||
listen:
|
||||
address: "[::]:3129"
|
||||
- name: http0
|
||||
escaper: default
|
||||
type: http_proxy
|
||||
- name: port_pp1
|
||||
type: plain_tcp_port
|
||||
server: http0
|
||||
proxy_protocol: 1
|
||||
listen: "[::1]:3131"
|
||||
- name: port_pp2
|
||||
type: plain_tcp_port
|
||||
server: http0
|
||||
proxy_protocol: 2
|
||||
listen: "[::1]:3132"
|
||||
|
||||
resolver:
|
||||
- name: default
|
||||
type: c-ares
|
||||
server: 223.5.5.5
|
||||
|
||||
escaper:
|
||||
- name: proxy_pp1
|
||||
type: proxy_http
|
||||
proxy_addr: "[::1]:3131"
|
||||
use_proxy_protocol: 1
|
||||
- name: proxy_pp2
|
||||
type: proxy_http
|
||||
proxy_addr: "[::1]:3132"
|
||||
use_proxy_protocol: 2
|
||||
- name: default
|
||||
type: direct_fixed
|
||||
resolver: default
|
||||
Loading…
Add table
Add a link
Reference in a new issue