@@ -106,199 +106,174 @@ WantedBy=multi-user.target
106106
107107``` json
108108{
109- "log" : {
110- "loglevel" : " none"
111- },
112- "inbounds" : [
113- {
114- "listen" : " /dev/shm/vless.sock,0666" ,
115- "protocol" : " vless" ,
116- "settings" : {
117- "clients" : [
118- {
119- "id" : " uuid"
120- }
121- ],
122- "decryption" : " none"
123- },
124- "streamSettings" : {
125- "network" : " tcp"
126- },
127- "sniffing" : {
128- "enabled" : true ,
129- "destOverride" : [
130- " http" ,
131- " tls"
132- ]
133- }
134- }
135- ],
136- "outbounds" : [
137- {
138- "protocol" : " freedom"
139- }
140- ]
109+ "log" : {
110+ "loglevel" : " none"
111+ },
112+ "inbounds" : [
113+ {
114+ "listen" : " /dev/shm/vless.sock,0666" ,
115+ "protocol" : " vless" ,
116+ "settings" : {
117+ "clients" : [
118+ {
119+ "id" : " uuid"
120+ }
121+ ],
122+ "decryption" : " none"
123+ },
124+ "streamSettings" : {
125+ "network" : " tcp"
126+ },
127+ "sniffing" : {
128+ "enabled" : true ,
129+ "destOverride" : [" http" , " tls" ]
130+ }
131+ }
132+ ],
133+ "outbounds" : [
134+ {
135+ "protocol" : " freedom"
136+ }
137+ ]
141138}
142139```
143140
144141客户端 xray 配置,此处以旁路由透明代理为例
145142
146143``` json
147144{
148- "log" : {
149- "loglevel" : " none"
150- },
151- "dns" : {
152- "servers" : [
153- " 1.1.1.1" ,
154- {
155- "address" : " 119.29.29.29" ,
156- "domains" : [
157- " geosite:cn"
158- ],
159- "expectIP" : [
160- " geoip:cn"
161- ]
162- }
163- ],
164- "disableFallback" : true ,
165- "disableFallbackIfMatch" : true
145+ "log" : {
146+ "loglevel" : " none"
147+ },
148+ "dns" : {
149+ "servers" : [
150+ " 1.1.1.1" ,
151+ {
152+ "address" : " 119.29.29.29" ,
153+ "domains" : [" geosite:cn" ],
154+ "expectIP" : [" geoip:cn" ]
155+ }
156+ ],
157+ "disableFallback" : true ,
158+ "disableFallbackIfMatch" : true
159+ },
160+ "inbounds" : [
161+ {
162+ "tag" : " tproxy-in" ,
163+ "port" : 12345 ,
164+ "protocol" : " dokodemo-door" ,
165+ "settings" : {
166+ "network" : " tcp,udp" ,
167+ "followRedirect" : true
168+ },
169+ "sniffing" : {
170+ "enabled" : true ,
171+ "destOverride" : [" http" , " tls" ]
172+ },
173+ "streamSettings" : {
174+ "sockopt" : {
175+ "tproxy" : " tproxy" ,
176+ "mark" : 255
177+ }
178+ }
166179 },
167- "inbounds" : [
168- {
169- "tag" : " tproxy-in" ,
170- "port" : 12345 ,
171- "protocol" : " dokodemo-door" ,
172- "settings" : {
173- "network" : " tcp,udp" ,
174- "followRedirect" : true
175- },
176- "sniffing" : {
177- "enabled" : true ,
178- "destOverride" : [
179- " http" ,
180- " tls"
181- ]
182- },
183- "streamSettings" : {
184- "sockopt" : {
185- "tproxy" : " tproxy" ,
186- "mark" : 255
187- }
188- }
180+ {
181+ "tag" : " http" ,
182+ "port" : 10808 ,
183+ "listen" : " 127.0.0.1" ,
184+ "protocol" : " http" ,
185+ "sniffing" : {
186+ "enabled" : true ,
187+ "destOverride" : [" http" , " tls" ]
188+ }
189+ }
190+ ],
191+ "outbounds" : [
192+ {
193+ "tag" : " nginxtls" ,
194+ "protocol" : " vless" ,
195+ "settings" : {
196+ "vnext" : [
197+ {
198+ "address" : " 127.0.0.1" ,
199+ "port" : 6666 ,
200+ "users" : [
201+ {
202+ "id" : " uuid" ,
203+ "encryption" : " none"
204+ }
205+ ]
206+ }
207+ ]
208+ },
209+ "streamSettings" : {
210+ "sockopt" : {
211+ "mark" : 255
189212 },
190- {
191- "tag" : " http" ,
192- "port" : 10808 ,
193- "listen" : " 127.0.0.1" ,
194- "protocol" : " http" ,
195- "sniffing" : {
196- "enabled" : true ,
197- "destOverride" : [
198- " http" ,
199- " tls"
200- ]
201- }
213+ "network" : " tcp"
214+ }
215+ },
216+ {
217+ "tag" : " direct" ,
218+ "protocol" : " freedom" ,
219+ "streamSettings" : {
220+ "sockopt" : {
221+ "mark" : 255
202222 }
203- ],
204- "outbounds" : [
205- {
206- "tag" : " nginxtls" ,
207- "protocol" : " vless" ,
208- "settings" : {
209- "vnext" : [
210- {
211- "address" : " 127.0.0.1" ,
212- "port" : 6666 ,
213- "users" : [
214- {
215- "id" : " uuid" ,
216- "encryption" : " none"
217- }
218- ]
219- }
220- ]
221- },
222- "streamSettings" : {
223- "sockopt" : {
224- "mark" : 255
225- },
226- "network" : " tcp"
227- }
228- },
229- {
230- "tag" : " direct" ,
231- "protocol" : " freedom" ,
232- "streamSettings" : {
233- "sockopt" : {
234- "mark" : 255
235- }
236- }
237- },
238- {
239- "tag" : " block" ,
240- "protocol" : " blackhole" ,
241- "settings" : {
242- "response" : {
243- "type" : " http"
244- }
245- }
223+ }
224+ },
225+ {
226+ "tag" : " block" ,
227+ "protocol" : " blackhole" ,
228+ "settings" : {
229+ "response" : {
230+ "type" : " http"
246231 }
247- ],
248- "routing" : {
249- "domainMatcher" : " mph" ,
250- "domainStrategy" : " AsIs" ,
251- "rules" : [
252- {
253- "type" : " field" ,
254- "domain" : [
255- " geosite:category-ads-all"
256- ],
257- "outboundTag" : " block"
258- },
259- {
260- "type" : " field" ,
261- "port" : 123 ,
262- "network" : " udp" ,
263- "outboundTag" : " direct"
264- },
265- {
266- "type" : " field" ,
267- "ip" : [
268- " 1.1.1.1"
269- ],
270- "outboundTag" : " proxy"
271- },
272- {
273- "type" : " field" ,
274- "domain" : [
275- " geosite:cn"
276- ],
277- "outboundTag" : " direct"
278- },
279- {
280- "type" : " field" ,
281- "protocol" : [
282- " bittorrent"
283- ],
284- "outboundTag" : " direct"
285- },
286- {
287- "type" : " field" ,
288- "ip" : [
289- " geoip:private"
290- ],
291- "outboundTag" : " direct"
292- },
293- {
294- "type" : " field" ,
295- "inboundTag" : [
296- " tproxy-in"
297- ],
298- "outboundTag" : " nginxtls"
299- }
300- ]
232+ }
301233 }
234+ ],
235+ "routing" : {
236+ "domainMatcher" : " mph" ,
237+ "domainStrategy" : " AsIs" ,
238+ "rules" : [
239+ {
240+ "type" : " field" ,
241+ "domain" : [" geosite:category-ads-all" ],
242+ "outboundTag" : " block"
243+ },
244+ {
245+ "type" : " field" ,
246+ "port" : 123 ,
247+ "network" : " udp" ,
248+ "outboundTag" : " direct"
249+ },
250+ {
251+ "type" : " field" ,
252+ "ip" : [" 1.1.1.1" ],
253+ "outboundTag" : " proxy"
254+ },
255+ {
256+ "type" : " field" ,
257+ "domain" : [" geosite:cn" ],
258+ "outboundTag" : " direct"
259+ },
260+ {
261+ "type" : " field" ,
262+ "protocol" : [" bittorrent" ],
263+ "outboundTag" : " direct"
264+ },
265+ {
266+ "type" : " field" ,
267+ "ip" : [" geoip:private" ],
268+ "outboundTag" : " direct"
269+ },
270+ {
271+ "type" : " field" ,
272+ "inboundTag" : [" tproxy-in" ],
273+ "outboundTag" : " nginxtls"
274+ }
275+ ]
276+ }
302277}
303278```
304279
0 commit comments