nixos: clash-meta-client: use geodata from nixpkgs
This commit is contained in:
parent
e6d7a787a1
commit
fc231ebf75
2 changed files with 12 additions and 21 deletions
|
@ -20,29 +20,15 @@ use-backup: &use-backup
|
||||||
- ermaozi
|
- ermaozi
|
||||||
#- jsnzkpg
|
#- jsnzkpg
|
||||||
|
|
||||||
allow-lan: true
|
|
||||||
port: 7890
|
port: 7890
|
||||||
unified-delay: true
|
|
||||||
tcp-concurrent: true
|
|
||||||
external-controller: 127.0.0.1:9090
|
external-controller: 127.0.0.1:9090
|
||||||
log-level: warning
|
log-level: warning
|
||||||
|
unified-delay: true
|
||||||
|
tcp-concurrent: true
|
||||||
geodata-mode: true
|
geodata-mode: true
|
||||||
geox-url:
|
|
||||||
geoip: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat"
|
|
||||||
geosite: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
|
|
||||||
mmdb: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country-lite.mmdb"
|
|
||||||
|
|
||||||
find-process-mode: strict
|
|
||||||
global-client-fingerprint: chrome
|
|
||||||
|
|
||||||
profile:
|
|
||||||
store-selected: true
|
|
||||||
store-fake-ip: true
|
|
||||||
|
|
||||||
proxy-groups:
|
proxy-groups:
|
||||||
- { name: PROXY, type: select, proxies: [自动选择, 备用自动选择, DIRECT, lon0] }
|
- { name: PROXY, type: select, proxies: [自动选择, 备用自动选择, DIRECT, lon0] }
|
||||||
|
|
||||||
- { name: 自动选择, <<: *use, tolerance: 2, type: url-test }
|
- { name: 自动选择, <<: *use, tolerance: 2, type: url-test }
|
||||||
- { name: 备用自动选择, <<: *use-backup, tolerance: 2, type: url-test }
|
- { name: 备用自动选择, <<: *use-backup, tolerance: 2, type: url-test }
|
||||||
|
|
||||||
|
@ -55,10 +41,10 @@ proxy-groups:
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
- GEOIP, lan, DIRECT, no-resolve
|
- GEOIP, lan, DIRECT, no-resolve
|
||||||
- GEOSITE, bilibili, DIRECT
|
- GEOSITE, category-ads, REJECT
|
||||||
- GEOSITE, spotify, 台湾
|
- GEOSITE, spotify, 台湾
|
||||||
- GEOSITE, CN, DIRECT
|
- GEOIP, cn, DIRECT
|
||||||
- GEOIP, CN, DIRECT
|
- GEOSITE, cn, DIRECT
|
||||||
|
|
||||||
# 未匹配到任何规则
|
# 未匹配到任何规则
|
||||||
- MATCH, PROXY
|
- MATCH, PROXY
|
||||||
|
|
|
@ -11,6 +11,11 @@
|
||||||
webui = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.metacubexd;
|
webui = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.metacubexd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.clash.serviceConfig.ExecStartPre = [
|
||||||
|
"${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-geoip}/share/v2ray/geoip.dat /var/lib/private/clash/GeoIP.dat"
|
||||||
|
"${pkgs.coreutils}/bin/ln -sf ${pkgs.v2ray-domain-list-community}/share/v2ray/geosite.dat /var/lib/private/clash/GeoSite.dat"
|
||||||
|
];
|
||||||
|
|
||||||
### System proxy settings
|
### System proxy settings
|
||||||
networking.proxy.default = "http://127.0.0.1:7890/";
|
networking.proxy.default = "http://127.0.0.1:7890/";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue