github.com/mholt/caddy-l4@v0.0.0-20241104153248-ec8fae209322/integration/caddyfile_adapt/gd_matcher_sets.caddytest (about) 1 { 2 layer4 { 3 0.0.0.0:443 { 4 @a not remote_ip 192.168.0.0/16 5 @b { 6 local_ip 192.168.0.0/16 7 remote_ip 192.168.0.0/16 8 } 9 @c not local_ip 192.168.0.0/16 10 route @a { 11 proxy localhost:4431 12 } 13 route @b @c { 14 proxy localhost:4432 15 } 16 } 17 } 18 } 19 ---------- 20 { 21 "apps": { 22 "layer4": { 23 "servers": { 24 "srv0": { 25 "listen": [ 26 "0.0.0.0:443" 27 ], 28 "routes": [ 29 { 30 "match": [ 31 { 32 "not": [ 33 { 34 "remote_ip": { 35 "ranges": [ 36 "192.168.0.0/16" 37 ] 38 } 39 } 40 ] 41 } 42 ], 43 "handle": [ 44 { 45 "handler": "proxy", 46 "upstreams": [ 47 { 48 "dial": [ 49 "localhost:4431" 50 ] 51 } 52 ] 53 } 54 ] 55 }, 56 { 57 "match": [ 58 { 59 "local_ip": { 60 "ranges": [ 61 "192.168.0.0/16" 62 ] 63 }, 64 "remote_ip": { 65 "ranges": [ 66 "192.168.0.0/16" 67 ] 68 } 69 }, 70 { 71 "not": [ 72 { 73 "local_ip": { 74 "ranges": [ 75 "192.168.0.0/16" 76 ] 77 } 78 } 79 ] 80 } 81 ], 82 "handle": [ 83 { 84 "handler": "proxy", 85 "upstreams": [ 86 { 87 "dial": [ 88 "localhost:4432" 89 ] 90 } 91 ] 92 } 93 ] 94 } 95 ] 96 } 97 } 98 } 99 } 100 }