Files
nix-config-ryan4yin/hosts/homelab_tailscale_gw/proxy.nix
2024-02-17 04:42:41 +08:00

33 lines
725 B
Nix

{
# dae(running on aquamarine) do not provides http/socks5 proxy server, so we use v2ray here.
# https://github.com/v2fly
services.v2ray = {
enable = true;
config = {
inbounds = [
{
listen = "0.0.0.0";
port = 7890;
protocol = "http";
}
{
listen = "0.0.0.0";
port = 7891;
protocol = "socks";
settings = {
auth = "noauth";
udp = true;
};
}
];
outbounds = [
# forward traffic directly via system's default network(to dae proxy running on aquamarine)
{
protocol = "freedom";
tag = "freedom";
}
];
};
};
}