mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
modules.services.xray: do not proxy sslvpn.xmu.edu.cn
This commit is contained in:
@@ -51,7 +51,7 @@ inputs:
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig =
|
||||
{
|
||||
ExecStart = "${inputs.pkgs.tcping-go}/bin/tcping office.chn.moe 22 -c 0 -I 1s -H";
|
||||
ExecStart = "${inputs.pkgs.tcping-go}/bin/tcping office.chn.moe 22 -c 0 -I 10s -H";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -255,6 +255,8 @@ inputs:
|
||||
"${ipset} create xmu_net hash:net"
|
||||
"${ipset} create noproxy_net hash:net"
|
||||
"${ipset} add noproxy_net 223.5.5.5"
|
||||
# sslvpn.xmu.edu.cn
|
||||
"${ipset} add noproxy_net 121.192.178.179"
|
||||
"${ipset} create noproxy_src_net hash:net"
|
||||
"${ipset} create noproxy_port bitmap:port range 0-65535"
|
||||
"${ipset} create proxy_net hash:net"
|
||||
@@ -272,8 +274,9 @@ inputs:
|
||||
"-m set --match-set noproxy_src_net src -j RETURN"
|
||||
"-m set --match-set noproxy_net dst -j RETURN"
|
||||
"-m set --match-set noproxy_port src -j RETURN"
|
||||
"-m set --match-set xmu_net dst -p tcp -j TPROXY --on-port ${xmuPort} --tproxy-mark 1/1"
|
||||
"-m set --match-set xmu_net dst -p udp -j TPROXY --on-port ${xmuPort} --tproxy-mark 1/1"
|
||||
# if source from docker, do not redirect xmunet
|
||||
"! -s 172.16.0.0/12 -m set --match-set xmu_net dst -p tcp -j TPROXY --on-port ${xmuPort} --tproxy-mark 1/1"
|
||||
"! -s 172.16.0.0/12 -m set --match-set xmu_net dst -p udp -j TPROXY --on-port ${xmuPort} --tproxy-mark 1/1"
|
||||
"-m set --match-set proxy_net dst -p tcp -j TPROXY --on-port ${proxyPort} --tproxy-mark 1/1"
|
||||
"-m set --match-set proxy_net dst -p udp -j TPROXY --on-port ${proxyPort} --tproxy-mark 1/1"
|
||||
"-m set --match-set lo_net dst -j RETURN"
|
||||
|
||||
Reference in New Issue
Block a user