Last active
January 27, 2025 15:55
-
-
Save segfault-bilibili/5fcf39911a892d5e3d3fc41994e15d34 to your computer and use it in GitHub Desktop.
Clash config which makes use of naiveproxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 这个配置可以让Clash将naiveproxy作为上游代理,尤其是可以利用它的tun模式方便地实现全局透明代理 | |
# 但很显然,必须额外跑一个naiveproxy客户端,不能做到简单拖动Clash配置后立即可用 | |
# 注意:务必按下述示例把naiveproxy服务器的IPv4/v6地址以及域名加入直连规则 | |
mixed-port: 7890 | |
allow-lan: false | |
bind-address: '127.0.0.1' | |
mode: rule | |
log-level: info | |
external-controller: '127.0.0.1:9090' | |
dns: | |
enable: true | |
ipv6: true | |
default-nameserver: [114.114.114.114, 1.1.1.1] | |
enhanced-mode: fake-ip | |
fake-ip-range: 198.18.0.1/16 | |
use-hosts: true | |
nameserver: ['https://doh.pub/dns-query', 'https://dns.alidns.com/dns-query'] | |
fallback: ['https://1.1.1.1/dns-query', 'tls://8.8.4.4:853'] | |
fallback-filter: { geoip: true, ipcidr: [240.0.0.0/4, 0.0.0.0/32] } | |
proxies: | |
- { name: naive-line-1, type: socks5, server: 127.0.0.1, port: 1080, udp: false } | |
- { name: naive-line-2, type: socks5, server: 127.0.0.1, port: 1081, udp: false } | |
proxy-groups: | |
- { name: naiveproxy, type: select, proxies: [naive-line-1, naive-line-2] } | |
rules: | |
# 把naiveproxy服务器的IPv4/v6地址以及域名加入直连规则 | |
- 'IP-CIDR,___YOUR_NAIVE_SERVER_IPV4_ADDRESS_HERE___/32,DIRECT,no-resolve' | |
- 'IP-CIDR6,___YOUR_NAIVE_SERVER_IPV6_ADDRESS_HERE___/128,DIRECT,no-resolve' | |
- 'DOMAIN-SUFFIX,___YOUR_NAIVE_SERVER_DOMAIN_NAME_HERE___,DIRECT' | |
- 'DOMAIN-SUFFIX,local,DIRECT' | |
- 'IP-CIDR,127.0.0.0/8,DIRECT' | |
- 'IP-CIDR,172.16.0.0/12,DIRECT' | |
- 'IP-CIDR,192.168.0.0/16,DIRECT' | |
- 'IP-CIDR,10.0.0.0/8,DIRECT' | |
- 'IP-CIDR,100.64.0.0/10,DIRECT' | |
- 'IP-CIDR,224.0.0.0/4,DIRECT' | |
- 'IP-CIDR6,fe80::/10,DIRECT' | |
- 'MATCH,naiveproxy' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
适用于Windows/MacOS
Android可以设置CFA VpnService的禁用列表,把nekobox排除在VpnService外即可。