Loading nixos/tests/sing-box.nix +25 −22 Original line number Diff line number Diff line Loading @@ -57,8 +57,6 @@ let "${hosts."${server_host}"}/32" ]; strict_route = false; sniff = true; sniff_override_destination = false; }; tproxyPort = 1081; Loading Loading @@ -219,6 +217,9 @@ in tag = "outbound:direct"; } ]; route = { default_interface = "eth1"; }; }; }; }; Loading Loading @@ -267,6 +268,7 @@ in vmessOutbound ]; route = { default_interface = "eth1"; final = "outbound:block"; rules = [ { Loading Loading @@ -315,25 +317,28 @@ in type = "block"; tag = "outbound:block"; } ]; endpoints = [ { type = "direct"; tag = "outbound:direct"; } { detour = "outbound:direct"; type = "wireguard"; tag = "outbound:wireguard"; interface_name = "wg0"; local_address = [ "10.23.42.2/32" ]; name = "wg0"; address = [ "10.23.42.2/32" ]; mtu = 1280; private_key = wg-keys.peer1.privateKey; peer_public_key = wg-keys.peer0.publicKey; server = server_host; server_port = 2408; system_interface = true; peers = [ { address = server_host; port = 2408; public_key = wg-keys.peer0.publicKey; allowed_ips = [ "0.0.0.0/0" ]; } ]; system = true; } ]; route = { default_interface = "eth1"; final = "outbound:block"; }; }; Loading Loading @@ -377,8 +382,6 @@ in listen = "0.0.0.0"; listen_port = tproxyPort; udp_fragment = true; sniff = true; sniff_override_destination = false; } ]; outbounds = [ Loading @@ -393,6 +396,7 @@ in vmessOutbound ]; route = { default_interface = "eth1"; final = "outbound:block"; rules = [ { Loading Loading @@ -434,7 +438,7 @@ in independent_cache = true; fakeip = { enabled = true; "inet4_range" = "198.18.0.0/16"; inet4_range = "198.18.0.0/16"; }; servers = [ { Loading @@ -458,7 +462,6 @@ in "AAAA" ]; server = "dns:fakeip"; } ]; }; Loading @@ -474,17 +477,17 @@ in type = "direct"; tag = "outbound:direct"; } { type = "dns"; tag = "outbound:dns"; } ]; route = { default_interface = "eth1"; final = "outbound:direct"; rules = [ { action = "sniff"; } { protocol = "dns"; outbound = "outbound:dns"; action = "hijack-dns"; } ]; }; Loading Loading
nixos/tests/sing-box.nix +25 −22 Original line number Diff line number Diff line Loading @@ -57,8 +57,6 @@ let "${hosts."${server_host}"}/32" ]; strict_route = false; sniff = true; sniff_override_destination = false; }; tproxyPort = 1081; Loading Loading @@ -219,6 +217,9 @@ in tag = "outbound:direct"; } ]; route = { default_interface = "eth1"; }; }; }; }; Loading Loading @@ -267,6 +268,7 @@ in vmessOutbound ]; route = { default_interface = "eth1"; final = "outbound:block"; rules = [ { Loading Loading @@ -315,25 +317,28 @@ in type = "block"; tag = "outbound:block"; } ]; endpoints = [ { type = "direct"; tag = "outbound:direct"; } { detour = "outbound:direct"; type = "wireguard"; tag = "outbound:wireguard"; interface_name = "wg0"; local_address = [ "10.23.42.2/32" ]; name = "wg0"; address = [ "10.23.42.2/32" ]; mtu = 1280; private_key = wg-keys.peer1.privateKey; peer_public_key = wg-keys.peer0.publicKey; server = server_host; server_port = 2408; system_interface = true; peers = [ { address = server_host; port = 2408; public_key = wg-keys.peer0.publicKey; allowed_ips = [ "0.0.0.0/0" ]; } ]; system = true; } ]; route = { default_interface = "eth1"; final = "outbound:block"; }; }; Loading Loading @@ -377,8 +382,6 @@ in listen = "0.0.0.0"; listen_port = tproxyPort; udp_fragment = true; sniff = true; sniff_override_destination = false; } ]; outbounds = [ Loading @@ -393,6 +396,7 @@ in vmessOutbound ]; route = { default_interface = "eth1"; final = "outbound:block"; rules = [ { Loading Loading @@ -434,7 +438,7 @@ in independent_cache = true; fakeip = { enabled = true; "inet4_range" = "198.18.0.0/16"; inet4_range = "198.18.0.0/16"; }; servers = [ { Loading @@ -458,7 +462,6 @@ in "AAAA" ]; server = "dns:fakeip"; } ]; }; Loading @@ -474,17 +477,17 @@ in type = "direct"; tag = "outbound:direct"; } { type = "dns"; tag = "outbound:dns"; } ]; route = { default_interface = "eth1"; final = "outbound:direct"; rules = [ { action = "sniff"; } { protocol = "dns"; outbound = "outbound:dns"; action = "hijack-dns"; } ]; }; Loading