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

     1  {
     2  	layer4 {
     3  		0.0.0.0:443 {
     4  			@external not remote_ip 192.168.0.0/16
     5  			route @external {
     6  				tee {
     7  					proxy primary.machine.local:443
     8  					proxy secondary.machine.local:443
     9  				}
    10  			}
    11  			route {
    12  				echo
    13  			}
    14  		}
    15  	}
    16  }
    17  ----------
    18  {
    19  	"apps": {
    20  		"layer4": {
    21  			"servers": {
    22  				"srv0": {
    23  					"listen": [
    24  						"0.0.0.0:443"
    25  					],
    26  					"routes": [
    27  						{
    28  							"match": [
    29  								{
    30  									"not": [
    31  										{
    32  											"remote_ip": {
    33  												"ranges": [
    34  													"192.168.0.0/16"
    35  												]
    36  											}
    37  										}
    38  									]
    39  								}
    40  							],
    41  							"handle": [
    42  								{
    43  									"branch": [
    44  										{
    45  											"handler": "proxy",
    46  											"upstreams": [
    47  												{
    48  													"dial": [
    49  														"primary.machine.local:443"
    50  													]
    51  												}
    52  											]
    53  										},
    54  										{
    55  											"handler": "proxy",
    56  											"upstreams": [
    57  												{
    58  													"dial": [
    59  														"secondary.machine.local:443"
    60  													]
    61  												}
    62  											]
    63  										}
    64  									],
    65  									"handler": "tee"
    66  								}
    67  							]
    68  						},
    69  						{
    70  							"handle": [
    71  								{
    72  									"handler": "echo"
    73  								}
    74  							]
    75  						}
    76  					]
    77  				}
    78  			}
    79  		}
    80  	}
    81  }