github.com/mholt/caddy-l4@v0.0.0-20241104153248-ec8fae209322/integration/caddyfile_adapt/gd_handler_proxyprotocol.caddytest (about) 1 { 2 layer4 { 3 0.0.0.0:8080 { 4 route { 5 proxy_protocol { 6 allow 10.0.0.0/8 7 timeout 5s 8 } 9 proxy 10.0.0.1:8080 10 } 11 } 12 0.0.0.0:8081 { 13 route { 14 proxy_protocol { 15 allow 10.0.0.0/8 192.168.0.0/16 16 timeout 3s 17 } 18 proxy 192.168.0.1:8080 19 } 20 } 21 } 22 } 23 ---------- 24 { 25 "apps": { 26 "layer4": { 27 "servers": { 28 "srv0": { 29 "listen": [ 30 "0.0.0.0:8080" 31 ], 32 "routes": [ 33 { 34 "handle": [ 35 { 36 "allow": [ 37 "10.0.0.0/8" 38 ], 39 "handler": "proxy_protocol", 40 "timeout": 5000000000 41 }, 42 { 43 "handler": "proxy", 44 "upstreams": [ 45 { 46 "dial": [ 47 "10.0.0.1:8080" 48 ] 49 } 50 ] 51 } 52 ] 53 } 54 ] 55 }, 56 "srv1": { 57 "listen": [ 58 "0.0.0.0:8081" 59 ], 60 "routes": [ 61 { 62 "handle": [ 63 { 64 "allow": [ 65 "10.0.0.0/8", 66 "192.168.0.0/16" 67 ], 68 "handler": "proxy_protocol", 69 "timeout": 3000000000 70 }, 71 { 72 "handler": "proxy", 73 "upstreams": [ 74 { 75 "dial": [ 76 "192.168.0.1:8080" 77 ] 78 } 79 ] 80 } 81 ] 82 } 83 ] 84 } 85 } 86 } 87 } 88 }