github.com/mholt/caddy-l4@v0.0.0-20241104153248-ec8fae209322/integration/caddyfile_adapt/gd_matcher_quic.caddytest (about)

     1  {
     2  	layer4 {
     3  		udp/:8843 {
     4  			@q1 quic sni one.com two.com
     5  			route @q1 {
     6  				proxy udp/{l4.quic.tls.server_name}:443
     7  			}
     8  			@q2 quic {
     9  				alpn custom
    10  				sni example.com
    11  			}
    12  			route @q2 {
    13  				proxy udp/localhost:6543
    14  			}
    15  		}
    16  	}
    17  }
    18  ----------
    19  {
    20  	"apps": {
    21  		"layer4": {
    22  			"servers": {
    23  				"srv0": {
    24  					"listen": [
    25  						"udp/:8843"
    26  					],
    27  					"routes": [
    28  						{
    29  							"match": [
    30  								{
    31  									"quic": {
    32  										"sni": [
    33  											"one.com",
    34  											"two.com"
    35  										]
    36  									}
    37  								}
    38  							],
    39  							"handle": [
    40  								{
    41  									"handler": "proxy",
    42  									"upstreams": [
    43  										{
    44  											"dial": [
    45  												"udp/{l4.quic.tls.server_name}:443"
    46  											]
    47  										}
    48  									]
    49  								}
    50  							]
    51  						},
    52  						{
    53  							"match": [
    54  								{
    55  									"quic": {
    56  										"alpn": [
    57  											"custom"
    58  										],
    59  										"sni": [
    60  											"example.com"
    61  										]
    62  									}
    63  								}
    64  							],
    65  							"handle": [
    66  								{
    67  									"handler": "proxy",
    68  									"upstreams": [
    69  										{
    70  											"dial": [
    71  												"udp/localhost:6543"
    72  											]
    73  										}
    74  									]
    75  								}
    76  							]
    77  						}
    78  					]
    79  				}
    80  			}
    81  		}
    82  	}
    83  }