1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
| # HTTP 代理监听端口
port: 7890
# SOCKS5 代理监听端口
socks-port: 7891
# 允许本地连接的 IP 地址和 CIDR 子网掩码
allow-lan: true
local-address: "0.0.0.0"
external-ui: /ui
external-controller: "0.0.0.0:9090"
# 拦截所有 DNS 请求,使用特定的 DNS 服务器
dns:
enable: true # set true to enable dns (default is false)
ipv6: false # default is false
listen: 0.0.0.0:53
# enhanced-mode: fake-ip # or redir-host
# fake-ip-range: 198.18.0.1/16 # if you don't know what it is, don't change it
nameserver:
- 172.13.0.7
- 172.13.0.8
fallback: # concurrent request with nameserver, fallback used when GEOIP country isn't CN
- 114.114.114.114
- tcp://1.1.1.1
- 8.8.8.8
- 8.8.4.4
# fallback-filter:
# geoip: true # default
# ipcidr: # ips in these subnets will be considered polluted
# - 240.0.0.0/4
# 代理服务器配置
proxies:
- name: "vless"
type: vless
server: server
port: port
uuid: uuid
alterId: 0 # 和服务端一样即可
tls: true
- name: "test"
type: ss
server: ip
port: port
cipher: aes-256-gcm
password: "password"
udp: false
# 规则集配置
rules:
# - DOMAIN.www.baidu.com,DIRECT
# 默认规则,将其余流量路由到代理
- MATCH,test
- IP-CIDR,192.168.0.0/16,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT
- IP-CIDR,172.16.0.0/12,DIRECT
- IP-CIDR,172.12.0.0/12,DIRECT
- IP-CIDR,127.0.0.0/8,DIRECT
- IP-CIDR,100.64.0.0/10,DIRECT
- IP-CIDR,224.0.0.0/4,DIRECT
# 通过域名匹配,将指定域名的流量路由到代理
# - DOMAIN-SUFFIX,google.com,test
# # 拦截广告域名,不发送请求
# - DOMAIN-KEYWORD,ad.,REJECT
# 允许局域网流量直接连接,不走代理
# 代理模式
mode: Rule
|