nixos/sing-box: bypass lan
This commit is contained in:
parent
89a91fdd0c
commit
1df7471bf7
1 changed files with 20 additions and 1 deletions
|
@ -39,10 +39,21 @@
|
||||||
route = {
|
route = {
|
||||||
rules = [
|
rules = [
|
||||||
{
|
{
|
||||||
rule_set = ["geoip-cn" "geosite-cn"];
|
rule_set = [
|
||||||
|
"geoip-cn"
|
||||||
|
"geosite-cn"
|
||||||
|
];
|
||||||
|
outbound = "direct";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
rule_set = [
|
||||||
|
"geosite-private"
|
||||||
|
];
|
||||||
|
ip_is_private = true;
|
||||||
outbound = "direct";
|
outbound = "direct";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
rule_set = [
|
rule_set = [
|
||||||
{
|
{
|
||||||
tag = "geoip-cn";
|
tag = "geoip-cn";
|
||||||
|
@ -56,7 +67,14 @@
|
||||||
format = "binary";
|
format = "binary";
|
||||||
path = "${pkgs.sing-geosite}/share/sing-box/rule-set/geosite-cn.srs";
|
path = "${pkgs.sing-geosite}/share/sing-box/rule-set/geosite-cn.srs";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
tag = "geosite-private";
|
||||||
|
type = "local";
|
||||||
|
format = "binary";
|
||||||
|
path = "${pkgs.sing-geosite}/share/sing-box/rule-set/geosite-private.srs";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
final = "tyo0";
|
final = "tyo0";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,6 +93,7 @@
|
||||||
httpProxy = "http://127.0.0.1:1080/";
|
httpProxy = "http://127.0.0.1:1080/";
|
||||||
httpsProxy = "http://127.0.0.1:1080/";
|
httpsProxy = "http://127.0.0.1:1080/";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.shellAliases = let
|
environment.shellAliases = let
|
||||||
inherit (config.networking.proxy) httpProxy httpsProxy;
|
inherit (config.networking.proxy) httpProxy httpsProxy;
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Reference in a new issue