Comparison

mod_net_proxy/README.markdown @ 2961:33227efa2cdc

mod_net_proxy: Automatically listen on all mapped ports if proxy_ports was not configured
author Pascal Mathis <mail@pascalmathis.com>
date Wed, 28 Mar 2018 19:00:13 +0200
parent 2959:731fbefaabaf
child 2963:504bb330e910
comparison
equal deleted inserted replaced
2960:b8834fec4b7e 2961:33227efa2cdc
34 As the PROXY protocol specifications do not allow guessing if the PROXY protocol 34 As the PROXY protocol specifications do not allow guessing if the PROXY protocol
35 shall be used or not, you need to configure separate ports for all the services 35 shall be used or not, you need to configure separate ports for all the services
36 that should be exposed with PROXY protocol support: 36 that should be exposed with PROXY protocol support:
37 37
38 ```lua 38 ```lua
39 proxy_ports = {15222, 15269} 39 --[[
40 Hint: While you can manually override the ports this module is listening on with
41 the "proxy_ports" directive, it is highly recommended to not set it and instead
42 only configure the appropriate mappings with "proxy_port_mappings", which will
43 automatically start listening on all mapped ports.
44 ]]--
45
40 proxy_port_mappings = { 46 proxy_port_mappings = {
41 [15222] = "c2s", 47 [15222] = "c2s",
42 [15269] = "s2s" 48 [15269] = "s2s"
43 } 49 }
44 ``` 50 ```
82 for both modules, configured as tcp/15222 (C2S) and tcp/15269 (S2S): 88 for both modules, configured as tcp/15222 (C2S) and tcp/15269 (S2S):
83 89
84 ```lua 90 ```lua
85 c2s_ports = {5222} 91 c2s_ports = {5222}
86 s2s_ports = {5269} 92 s2s_ports = {5269}
87 proxy_ports = {15222, 15269}
88 proxy_port_mappings = { 93 proxy_port_mappings = {
89 [15222] = "c2s", 94 [15222] = "c2s",
90 [15269] = "s2s" 95 [15269] = "s2s"
91 } 96 }
92 ``` 97 ```