github.com/mholt/caddy-l4@v0.0.0-20241104153248-ec8fae209322/integration/caddyfile_adapt/gd_matcher_wireguard.caddytest (about) 1 { 2 layer4 { 3 udp/:51820 { 4 @wg0 wireguard 5 route @wg0 { 6 proxy udp/wg.machine.local:51820 7 } 8 @wgX wireguard 4285988864 9 route @wgX { 10 proxy udp/wg.machine.local:51821 11 } 12 route { 13 echo 14 } 15 } 16 } 17 } 18 ---------- 19 { 20 "apps": { 21 "layer4": { 22 "servers": { 23 "srv0": { 24 "listen": [ 25 "udp/:51820" 26 ], 27 "routes": [ 28 { 29 "match": [ 30 { 31 "wireguard": {} 32 } 33 ], 34 "handle": [ 35 { 36 "handler": "proxy", 37 "upstreams": [ 38 { 39 "dial": [ 40 "udp/wg.machine.local:51820" 41 ] 42 } 43 ] 44 } 45 ] 46 }, 47 { 48 "match": [ 49 { 50 "wireguard": { 51 "zero": 4285988864 52 } 53 } 54 ], 55 "handle": [ 56 { 57 "handler": "proxy", 58 "upstreams": [ 59 { 60 "dial": [ 61 "udp/wg.machine.local:51821" 62 ] 63 } 64 ] 65 } 66 ] 67 }, 68 { 69 "handle": [ 70 { 71 "handler": "echo" 72 } 73 ] 74 } 75 ] 76 } 77 } 78 } 79 } 80 }