dev-python/conda-libmamba-solver: bump version to 24.11.1
[gentoo-zh.git] / net-proxy / clash-rs / files / config.example.yaml
blob7cbd952e0ae62145d2a3fadded0d2a93f8c231b9
1 port: 8888
2 socks-port: 8889
3 mixed-port: 8899
5 tun:
6   enable: false
7   device-id: "dev://utun1989"
9 dns:
10   enable: true
11   listen: 127.0.0.1:53553
12   #   udp: 127.0.0.1:53553
13   #   tcp: 127.0.0.1:53553
14   #   dot: 127.0.0.1:53554
15   #   doh: 127.0.0.1:53555
17   # ipv6: false # when the false, response to AAAA questions will be empty
19   # These nameservers are used to resolve the DNS nameserver hostnames below.
20   # Specify IP addresses only
21   default-nameserver:
22     - 114.114.114.114
23     - 8.8.8.8
24   enhanced-mode: fake-ip
25   fake-ip-range: 198.18.0.2/16 # Fake IP addresses pool CIDR
26   # use-hosts: true # lookup hosts and return IP record
28   # Hostnames in this list will not be resolved with fake IPs
29   # i.e. questions to these domain names will always be answered with their
30   # real IP addresses
31   # fake-ip-filter:
32   #   - '*.lan'
33   #   - localhost.ptlogin2.qq.com
35   # Supports UDP, TCP, DoT, DoH. You can specify the port to connect to.
36   # All DNS questions are sent directly to the nameserver, without proxies
37   # involved. Clash answers the DNS question with the first result gathered.
38   nameserver:
39     - 114.114.114.114 # default value
40     - 1.1.1.1 # default value
41     - tls://1.1.1.1:853 # DNS over TLS
42     - https://1.1.1.1/dns-query # DNS over HTTPS
43 #    - dhcp://en0 # dns from dhcp
45 allow-lan: true
46 mode: rule
47 log-level: debug
48 external-controller: 127.0.0.1:9090
49 external-ui: "public"
50 # secret: "clash-rs"
51 experimental:
52   ignore-resolve-fail: true
54 profile:
55   store-selected: true
56   store-fake-ip: false
59 proxy-groups:
60   - name: "relay"
61     type: relay
62     proxies:
63       - "plain-vmess"
64       - "ws-vmess"
65       - "auto"
66       - "fallback-auto"
67       - "load-balance"
68       - "select"
69       - DIRECT
71   - name: "relay-one"
72     type: relay
73     use:
74       - "file-provider"
76   - name: "auto"
77     type: url-test
78     use:
79       - "file-provider"
80     proxies:
81       - DIRECT
82     url: "http://www.gstatic.com/generate_204"
83     interval: 300
85   - name: "fallback-auto"
86     type: fallback
87     use:
88       - "file-provider"
89     proxies:
90       - DIRECT
91     url: "http://www.gstatic.com/generate_204"
92     interval: 300
94   - name: "load-balance"
95     type: load-balance
96     use:
97       - "file-provider"
98     proxies:
99       - DIRECT
100     strategy: round-robin
101     url: "http://www.gstatic.com/generate_204"
102     interval: 300
104   - name: select
105     type: select
106     use:
107       - "file-provider"
109   - name: test 🌏
110     type: select
111     use:
112       - "file-provider"
113     proxies:
114       - DIRECT
116 proxies:
117   - name: plain-vmess
118     type: vmess
119     server: 10.0.0.13
120     port: 16823
121     uuid: b831381d-6324-4d53-ad4f-8cda48b30811
122     alterId: 0
123     cipher: auto
124     udp: true
125     skip-cert-verify: true
126   - name: ws-vmess
127     type: vmess
128     server: 10.0.0.13
129     port: 16824
130     uuid: b831381d-6324-4d53-ad4f-8cda48b30811
131     alterId: 0
132     cipher: auto
133     udp: true
134     skip-cert-verify: true
135     network: ws
136     ws-opts:
137       path: /api/v3/download.getFile
138       headers:
139         Host: www.amazon.com
141   - name: tls-vmess
142     type: vmess
143     server: 10.0.0.13
144     port: 8443
145     uuid: 23ad6b10-8d1a-40f7-8ad0-e3e35cd38297
146     alterId: 0
147     cipher: auto
148     udp: true
149     skip-cert-verify: true
150     tls: true
152   - name: h2-vmess
153     type: vmess
154     server: 10.0.0.13
155     port: 8444
156     uuid: b831381d-6324-4d53-ad4f-8cda48b30811
157     alterId: 0
158     cipher: auto
159     udp: true
160     skip-cert-verify: true
161     tls: true
162     network: h2
163     h2-opts:
164       path: /ray
166   - name: vmess-altid
167     type: vmess
168     server: tw-1.ac.laowanxiang.com
169     port: 153
170     uuid: 46dd0dd3-2cc0-3f55-907c-d94e54877687
171     alterId: 64
172     cipher: auto
173     udp: true
174     network: ws
175     ws-opts:
176       path: /api/v3/download.getFile
177       headers:
178         Host: 5607b9d187e655736f563fee87d7283994721.laowanxiang.com
179   - name: "ss-simple"
180     type: ss
181     server: 10.0.0.13
182     port: 8388
183     cipher: aes-256-gcm
184     password: "password"
185     udp: true
186   - name: "trojan"
187     type: trojan
188     server: 10.0.0.13
189     port: 9443
190     password: password1
191     udp: true
192     # sni: example.com # aka server name
193     alpn:
194       - h2
195       - http/1.1
196     skip-cert-verify: true
198 proxy-providers:
199   file-provider:
200     type: file
201     path: ./ss.yaml
202     interval: 300
203     health-check:
204       enable: true
205       url: http://www.gstatic.com/generate_204
206       interval: 300
208 rule-providers:
209   file-provider:
210     type: file
211     path: ./rule-set.yaml
212     interval: 300
213     behavior: domain
215 rules:
216   - DOMAIN,ipinfo.io,relay
217   - RULE-SET,file-provider,trojan
218   - GEOIP,CN,relay
219   - DOMAIN-SUFFIX,facebook.com,REJECT
220   - DOMAIN-KEYWORD,google,select
221   - DOMAIN,google.com,select
222   - SRC-IP-CIDR,192.168.1.1/24,DIRECT
223   - GEOIP,CN,DIRECT
224   - DST-PORT,53,trojan
225   - SRC-PORT,7777,DIRECT
226   - MATCH, DIRECT