github.com/mholt/caddy-l4@v0.0.0-20241104153248-ec8fae209322/integration/caddyfile_adapt/lw_matcher_sets.caddytest (about) 1 { 2 servers { 3 listener_wrappers { 4 layer4 { 5 @a not remote_ip 192.168.0.0/16 6 @b { 7 local_ip 192.168.0.0/16 8 remote_ip 192.168.0.0/16 9 } 10 @c not local_ip 192.168.0.0/16 11 route @a { 12 proxy localhost:4431 13 } 14 route @b @c { 15 proxy localhost:4432 16 } 17 } 18 tls 19 } 20 } 21 } 22 :443 { 23 respond 200 "OK" 24 } 25 ---------- 26 { 27 "apps": { 28 "http": { 29 "servers": { 30 "srv0": { 31 "listen": [ 32 ":443" 33 ], 34 "listener_wrappers": [ 35 { 36 "routes": [ 37 { 38 "handle": [ 39 { 40 "handler": "proxy", 41 "upstreams": [ 42 { 43 "dial": [ 44 "localhost:4431" 45 ] 46 } 47 ] 48 } 49 ], 50 "match": [ 51 { 52 "not": [ 53 { 54 "remote_ip": { 55 "ranges": [ 56 "192.168.0.0/16" 57 ] 58 } 59 } 60 ] 61 } 62 ] 63 }, 64 { 65 "handle": [ 66 { 67 "handler": "proxy", 68 "upstreams": [ 69 { 70 "dial": [ 71 "localhost:4432" 72 ] 73 } 74 ] 75 } 76 ], 77 "match": [ 78 { 79 "local_ip": { 80 "ranges": [ 81 "192.168.0.0/16" 82 ] 83 }, 84 "remote_ip": { 85 "ranges": [ 86 "192.168.0.0/16" 87 ] 88 } 89 }, 90 { 91 "not": [ 92 { 93 "local_ip": { 94 "ranges": [ 95 "192.168.0.0/16" 96 ] 97 } 98 } 99 ] 100 } 101 ] 102 } 103 ], 104 "wrapper": "layer4" 105 }, 106 { 107 "wrapper": "tls" 108 } 109 ], 110 "routes": [ 111 { 112 "handle": [ 113 { 114 "body": "200", 115 "handler": "static_response", 116 "status_code": "OK" 117 } 118 ] 119 } 120 ] 121 } 122 } 123 } 124 } 125 }