-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathall.js
827 lines (783 loc) · 26 KB
/
all.js
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
const maxConfigItems = 600
const maxPerType = 300
const includeOriginalConfigs = 0
const subLinks = [
"https://raw.githubusercontent.com/coldwater-10/V2Hub4/main/Split/Base64/vmess",
"https://raw.githubusercontent.com/coldwater-10/V2Hub4/main/Split/Base64/trojan",
"https://raw.githubusercontent.com/coldwater-10/V2Hub4/main/Split/Base64/shadowsocks",
"https://raw.githubusercontent.com/coldwater-10/V2Hub3/main/Split/Base64/vmess",
"https://raw.githubusercontent.com/coldwater-10/V2Hub3/main/Split/Base64/trojan",
"https://raw.githubusercontent.com/coldwater-10/V2Hub3/main/Split/Base64/shadowsocks"
]
const cnfLinks = [
"https://raw.githubusercontent.com/coldwater-10/V2ray-Config/main/Splitted-By-Protocol/vmess.txt",
"https://raw.githubusercontent.com/coldwater-10/V2ray-Config/main/Splitted-By-Protocol/trojan.txt",
"https://raw.githubusercontent.com/coldwater-10/V2ray-Config/main/Splitted-By-Protocol/ss.txt"
]
const cleanIPLink = "https://raw.githubusercontent.com/coldwater-10/clash_rules/main/List%20of%20clean%20IPs.txt"
const operatorList = ["AST", "HWB", "IRC", "MBT", "MCI", "MKB", "PRS", "RTL", "SHT", "ZTL", "PIS", "DAT", "SAB", "ASR", "FAN", "ZTL", "SFR", "DID", "LAY", "MAH", "TAK", "PET", "AND", "RES", "AFR", "ARA", "SAM", "APT", "ALL", "PLUS", "TEST", "ENG", "FA", "IPV6", "IRCF", "ANTY"]
const addressList = ["discord.com", "cloudflare.com", "nginx.com", "cdnjs.com", "vimeo.com", "networksolutions.com"]
const fpList = ["chrome", "chrome", "chrome", "firefox", "safari", "edge", "ios", "android", "360", "qq", "random", "random"]
const alpnList = ["http/1.1", "h2,http/1.1", "h2,http/1.1", "h2,http/1.1"]
var cleanIPs = []
export default {
async fetch(request) {
var url = new URL(request.url)
var pathParts = url.pathname.replace(/^\/|\/$/g, "").split("/")
var type = pathParts[0].toLowerCase()
if (["sub", "clash"].includes(type)) {
if (pathParts[1] !== undefined) {
var operator = pathParts[1].toUpperCase()
if (operatorList.includes(operator)) {
cleanIPs = await fetch(cleanIPLink).then(r => r.text()).then(t => t.split("\n"))
cleanIPs = cleanIPs.filter(line => (line.search(operator) > 0))
cleanIPs = cleanIPs.map(line => line.split(" ")[0].trim())
} else {
cleanIPs = [operator.toLowerCase()]
}
}
var configList = []
for (var subLink of subLinks) {
try {
configList = configList.concat(await fetch(subLink).then(r => r.text()).then(a => atob(a)).then(t => t.split("\n")))
} catch (e) { }
}
for (var cnfLink of cnfLinks) {
try {
configList = configList.concat(await fetch(cnfLink).then(r => r.text()).then(t => t.split("\n")))
} catch (e) { }
}
var vmessConfigList = configList.filter(cnf => (cnf.search("vmess://") == 0))
var trojanConfigList = configList.filter(cnf => (cnf.search("trojan://") == 0))
var ssConfigList = configList.filter(cnf => (cnf.search("ss://") == 0))
var mergedConfigList = []
if (type == "sub") {
if (includeOriginalConfigs) {
mergedConfigList = mergedConfigList.concat(getMultipleRandomElements(vmessConfigList, maxPerType))
}
mergedConfigList = mergedConfigList.concat(
getMultipleRandomElements(
vmessConfigList.map(decodeVmess).map(cnf => mixConfig(cnf, url, "vmess")).filter(cnf => (!!cnf && cnf.id)).map(encodeVmess).filter(cnf => !!cnf),
maxPerType
)
)
if (includeOriginalConfigs) {
mergedConfigList = mergedConfigList.concat(getMultipleRandomElements(trojanConfigList, maxPerType))
mergedConfigList = mergedConfigList.concat(getMultipleRandomElements(ssConfigList, maxPerType))
}
return new Response(btoa(getMultipleRandomElements(mergedConfigList, maxConfigItems).join("\n")));
} else { // clash
if (includeOriginalConfigs) {
mergedConfigList = mergedConfigList.concat(
getMultipleRandomElements(
vmessConfigList.map(decodeVmess).filter(cnf => (cnf && cnf.id)).map(cnf => toClash(cnf, "vmess")).filter(cnf => (cnf && cnf.uuid)),
maxPerType
)
)
}
mergedConfigList = mergedConfigList.concat(
getMultipleRandomElements(
vmessConfigList.map(decodeVmess).map(cnf => mixConfig(cnf, url, "vmess")).filter(cnf => (cnf && cnf.id)).map(cnf => toClash(cnf, "vmess")),
maxPerType
)
)
return new Response(toYaml(mergedConfigList));
}
} else {
var url = new URL(request.url)
var newUrl = new URL("https://" + url.pathname.replace(/^\/|\/$/g, ""))
return fetch(new Request(newUrl, request));
}
}
}
function encodeVmess(conf) {
try {
return "vmess://" + btoa(JSON.stringify(conf))
} catch {
return null
}
}
function decodeVmess(conf) {
try {
return JSON.parse(atob(conf.substr(8)))
} catch {
return {}
}
}
function mixConfig(conf, url, protocol) {
try {
if (conf.tls != "tls") {
return {}
}
var addr = conf.sni
if (!addr) {
if (conf.add && !isIp(conf.add)) {
addr = conf.add
} else if (conf.host && !isIp(conf.host)) {
addr = conf.host
}
}
if (!addr) {
return conf
}
conf.name = (conf.name ? conf.name : conf.ps) + '-👷'
conf.sni = url.hostname
if (cleanIPs.length) {
conf.add = cleanIPs[Math.floor(Math.random() * cleanIPs.length)]
} else {
conf.add = addressList[Math.floor(Math.random() * addressList.length)]
}
if (protocol == "vmess") {
conf.sni = url.hostname
conf.host = url.hostname
if (conf.path == undefined) {
conf.path = ""
}
conf.path = "/" + addr + ":" + conf.port + "/" + conf.path.replace(/^\//g, "")
conf.fp = fpList[Math.floor(Math.random() * fpList.length)]
conf.alpn = alpnList[Math.floor(Math.random() * alpnList.length)]
conf.port = 443
}
return conf
} catch (e) {
return {}
}
}
function getMultipleRandomElements(arr, num) {
var shuffled = arr //[...arr].sort(() => 0.5 - Math.random())
return shuffled.slice(0, num)
}
function isIp(str) {
try {
if (str == "" || str == undefined) return false
if (!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])$/.test(str)) {
return false
}
var ls = str.split('.')
if (ls == null || ls.length != 4 || ls[3] == "0" || parseInt(ls[3]) === 0) {
return false
}
return true
} catch (e) { }
return false
}
let proxyCount = 1;
function toClash(conf, protocol) {
const regexUUID = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi;
var config = {};
try {
config = {
name: conf.name ? conf.name : conf.ps,
type: protocol,
server: conf.add,
port: conf.port,
uuid: conf.id,
alterId: 0,
tls: true,
cipher: conf.cipher ? conf.cipher : "auto",
"skip-cert-verify": true,
servername: conf.sni,
network: conf.net,
"ws-opts": {
path: conf.path,
headers: {
host: conf.host
}
}
};
config.name = config.name.replace(/\s/g, '')
config.name = config.name.replace(/[^\u0000-\u007F\u0600-\u06FF\[\]\/\\:|@\(\).,#$%&*+=;~{}"'\-_?<>\^]+/gu, '') + "ℹ️" + conf.add + "-🔢" + "-" + proxyCount++;
if (!regexUUID.test(config.uuid)) {
return {};
}
return config;
} catch (e) {
return {};
}
}
function toYaml(configList) {
var yaml =
`
global-client-fingerprint: chrome
port: 7890
socks-port: 7891
redir-port: 7892
mixed-port: 7893
tproxy-port: 7895
allow-lan: true
tcp-concurrent: true
enable-process: true
find-process-mode: always
ipv6: true
log-level: info
cfw-latency-timeout: 6000
cfw-latency-url: https://api.v2fly.org/checkConnection.svgz
cfw-proxies-order: latency
external-controller: 0.0.0.0:9090
secret: ''
bind-address: '*'
#hosts:
# '+.workers.dev': 185.59.218.86
unified-delay: true
experimental:
ignore-resolve-fail: true
sniff-tls-sni: true
tracing: true
profile:
store-selected: true
store-fake-ip: true
dns:
enable: true
ipv6: true
use-host: true
enhanced-mode: fake-ip
listen: 0.0.0.0:7874
nameserver:
- https://cloudflare-dns.com/dns-query
- 'https://1.1.1.1/dns-query#en0'
- https://1.1.1.1/dns-query
- https://dns.google/dns-query
- https://dns.quad9.net/dns-query
- https://dns.nextdns.io
- https://doh.opendns.com/dns-query
- https://dns.adguard.com/dns-query
- https://dns.surfshark.com/dns-query
- https://8.8.8.8/dns-query
- https://9.9.9.9/dns-query
- https://doh.cleanbrowsing.org/doh/security-filter/
- https://resolver2.dns.watch/dns-query
- https://doh-de.blahdns.com/dns-query
- https://freedns.controld.com/p2
- https://dns.dnswarden.com/adblock
- https://adblock.doh.mullvad.net/dns-query
- https://basic.rethinkdns.com/dns-query
- tls://1.0.0.1:853
- tls://1.1.1.1:853
- tls://dns.google:853
- 162.159.36.1
- 162.159.46.1
- https://dns.aa.net.uk/dns-query
- https://rubyfish.cn/dns-query
- https://nsc.torgues.net/dns-query
- https://xmission-slc-1.edge.nextdns.io/dns-query
- https://Doh1.B-Cdn.net/dns-query
- https://dns.melalandia.tk/dns-query
- https://jp-kix2.doh.sb/
- https://dns.gi.co.id/dns-query
- https://dns.controld.com/
- https://xtom-osa-1.edge.nextdns.io/dns-query
- https://170.176.145.150/
- https://ipv4-zepto-mci-1.edge.nextdns.io/dns-query
- https://res-acst3.absolight.net/
- https://zepto-sto-1.edge.nextdns.io
- https://xtom-osa-1.edge.nextdns.io/
- https://ipv4-zepto-mci-1.edge.nextdns.io/
- https://nsc.torgues.net/
- https://zepto-sto-1.edge.nextdns.io/
- https://doh.dns.sb/dns-query
- tls://dns.rubyfish.cn:853
- 'tls://8.8.8.8#en0'
fake-ip-range: 198.18.0.1/16
fake-ip-filter:
- '*.lan'
- '*.localdomain'
- '*.example'
- '*.invalid'
- '*.localhost'
- '*.test'
- '*.local'
- '*.home.arpa'
- time.*.com
- time.*.gov
- time.*.edu.cn
- time.*.apple.com
- time1.*.com
- time2.*.com
- time3.*.com
- time4.*.com
- time5.*.com
- time6.*.com
- time7.*.com
- ntp.*.com
- ntp1.*.com
- ntp2.*.com
- ntp3.*.com
- ntp4.*.com
- ntp5.*.com
- ntp6.*.com
- ntp7.*.com
- '*.time.edu.cn'
- '*.ntp.org.cn'
- +.pool.ntp.org
- time1.cloud.tencent.com
- music.163.com
- '*.music.163.com'
- '*.126.net'
- musicapi.taihe.com
- music.taihe.com
- songsearch.kugou.com
- trackercdn.kugou.com
- '*.kuwo.cn'
- api-jooxtt.sanook.com
- api.joox.com
- joox.com
- y.qq.com
- '*.y.qq.com'
- streamoc.music.tc.qq.com
- mobileoc.music.tc.qq.com
- isure.stream.qqmusic.qq.com
- dl.stream.qqmusic.qq.com
- aqqmusic.tc.qq.com
- amobile.music.tc.qq.com
- '*.xiami.com'
- '*.music.migu.cn'
- music.migu.cn
- '*.msftconnecttest.com'
- '*.msftncsi.com'
- msftconnecttest.com
- msftncsi.com
- localhost.ptlogin2.qq.com
- localhost.sec.qq.com
- +.srv.nintendo.net
- +.stun.playstation.net
- xbox.*.microsoft.com
- xnotify.xboxlive.com
- +.battlenet.com.cn
- +.wotgame.cn
- +.wggames.cn
- +.wowsgame.cn
- +.wargaming.net
- proxy.golang.org
- stun.*.*
- stun.*.*.*
- +.stun.*.*
- +.stun.*.*.*
- +.stun.*.*.*.*
- heartbeat.belkin.com
- '*.linksys.com'
- '*.linksyssmartwifi.com'
- '*.router.asus.com'
- mesu.apple.com
- swscan.apple.com
- swquery.apple.com
- swdownload.apple.com
- swcdn.apple.com
- swdist.apple.com
- lens.l.google.com
- stun.l.google.com
- +.nflxvideo.net
- '*.square-enix.com'
- '*.finalfantasyxiv.com'
- '*.ffxiv.com'
- '*.mcdn.bilivideo.cn'
- +.media.dssott.com
sniffer:
enable: true
sniff:
http: { ports: [1-442, 444-8442, 8444-65535], override-destination: true }
tls: { ports: [1-79, 81-8079, 8081-65535], override-destination: true }
force-domain:
- "+.v2ex.com"
- www.google.com
- google.com
skip-domain:
- Mijia Cloud
- dlg.io.mi.com
sniffing:
- tls
- http
port-whitelist:
- "80"
- "443"
tun:
enable: true
prefer-h3: true
listen: 0.0.0.0:53
stack: gvisor
dns-hijack:
- "any:53"
- "tcp://any:53"
auto-redir: true
auto-route: true
auto-detect-interface: true
rule-providers:
Purification_ip:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/Purification%20app%20ip.yaml
interval: 432000
path: ./ruleset/Purificationip.yaml
ads_ip:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/ads%20ip.yaml
interval: 432000
path: ./ruleset/adsip.yaml
Purification:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/Purification%20app.yaml
interval: 432000
path: ./ruleset/Purification.yaml
category_public_tracker:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/category-public-tracker.yaml
interval: 432000
path: ./ruleset/category_public_tracker.yaml
Global:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/Global%20tracking.yaml
interval: 432000
path: ./ruleset/Global.yaml
category_ads_all:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/category-ads-all.yaml
interval: 432000
path: ./ruleset/category_ads_all.yaml
iran_ads:
type: http
behavior: domain
url: https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/clash_rules_ads.yaml
interval: 432000
path: ./ruleset/iran_ads.yaml
PersianBlocker:
type: http
behavior: domain
url: "https://github.com/MasterKia/iran-hosted-domains/releases/latest/download/clash_rules_ads.yaml"
path: ./ruleset/PersianBlocker.yaml
interval: 432000
add:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/add.yaml
interval: 432000
path: ./ruleset/add.yaml
MoreAd:
type: http
behavior: domain
url: https://howdy.id/download/rules/clash.txt
interval: 86400
path: ./providers/rule-provider_clash.yaml
AntiAd:
type: http
behavior: domain
url: https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-clash.yaml
interval: 432000
path: ./ruleset/AntiAd.yaml
GoodbyeAds:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/GoodbyeAds.yaml
interval: 432000
path: ./ruleset/add.yaml
blocked:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/blocked-sites.yml
interval: 432000
path: ./ruleset/blocked.yaml
category_porn:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/category-porn.yaml
interval: 432000
path: ./ruleset/category_porn.yaml
facebook:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/facebook.yaml
interval: 432000
path: ./ruleset/facebook.yaml
youtube:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/youtube.yaml
interval: 432000
path: ./ruleset/youtube.yaml
instagram:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/instagram.yaml
interval: 432000
path: ./ruleset/instagram.yaml
spotify:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/spotify.yaml
interval: 432000
path: ./ruleset/spotify.yaml
twitter:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/twitter.yaml
interval: 432000
path: ./ruleset/twitter.yaml
telegram:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/telegram.yaml
interval: 432000
path: ./ruleset/telegram.yaml
openai:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/openai.yaml
interval: 432000
path: ./ruleset/openai.yaml
whatsapp:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/whatsapp.yaml
interval: 432000
path: ./ruleset/whatsapp.yaml
tiktok:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/tiktok.yaml
interval: 432000
path: ./ruleset/tiktok.yaml
twitch:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/twitch.yaml
interval: 432000
path: ./ruleset/twitch.yaml
censor:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/censor.yaml
interval: 432000
path: ./ruleset/tahrim.yaml
local_ips:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/local-ips.yaml
interval: 432000
path: ./ruleset/local_ips.yaml
private:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/private.yaml
interval: 432000
path: ./ruleset/private.yaml
category_ir:
type: http
behavior: domain
url: https://raw.githubusercontent.com/coldwater-10/V2rayDomains2Clash/generated/category-ir.yaml
interval: 432000
path: ./ruleset/category_ir.yaml
iran:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/iran.yaml
interval: 432000
path: ./ruleset/iran.yaml
iran_other:
type: http
behavior: domain
url: https://github.com/bootmortis/iran-hosted-domains/releases/latest/download/clash_rules_other.yaml
interval: 432000
path: ./ruleset/iran_other.yaml
steam:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/steam.yaml
interval: 432000
path: ./ruleset/steam.yaml
tahrim:
type: http
behavior: classical
url: https://raw.githubusercontent.com/coldwater-10/clash_rules/main/tahrim.yaml
interval: 432000
path: ./ruleset/tahrim.yaml
ir:
type: http
format: yaml
behavior: domain
url: "https://github.com/chocolate4u/Iran-clash-rules/releases/latest/download/ir.yaml"
path: ./ruleset/ir.yaml
interval: 86400
ads:
type: http
format: yaml
behavior: domain
url: "https://github.com/chocolate4u/Iran-clash-rules/releases/latest/download/category-ads-all.yaml"
path: ./ruleset/ads.yaml
interval: 86400
malware:
type: http
format: yaml
behavior: domain
url: "https://github.com/chocolate4u/Iran-clash-rules/releases/latest/download/malware.yaml"
path: ./ruleset/malware.yaml
interval: 86400
phishing:
type: http
format: yaml
behavior: domain
url: "https://github.com/chocolate4u/Iran-clash-rules/releases/latest/download/phishing.yaml"
path: ./ruleset/phishing.yaml
interval: 86400
cryptominers:
type: http
format: yaml
behavior: domain
url: "https://github.com/chocolate4u/Iran-clash-rules/releases/latest/download/cryptominers.yaml"
path: ./ruleset/cryptominers.yaml
interval: 86400
apps:
type: http
format: yaml
behavior: classical
url: "https://github.com/chocolate4u/Iran-clash-rules/releases/latest/download/apps.yaml"
path: ./ruleset/apps.yaml
interval: 86400
ircidr:
type: http
format: yaml
behavior: ipcidr
url: "https://github.com/chocolate4u/Iran-clash-rules/releases/latest/download/ircidr.yaml"
path: ./ruleset/ircidr.yaml
interval: 86400
proxies:
${configList.map(cnf => " - " + JSON.stringify(cnf)).join("\n")}
proxy-groups:
- name: 🔀 نوع انتخاب پروکسی
type: select
proxies:
- خودکار (بهترین پینگ) 🤖
- دستی 🤏🏻
- ⛔ قطع اینترنت
- 🛡️ بدون فیلترشکن
- name: 📶 انتخاب نوع اتصال
type: select
proxies:
- 🌐 همه سایتا
- 🔐 فقط سایتای فیلتر شده
- name: دستی 🤏🏻
type: select
proxies:
${configList.map(cnf => " - " + cnf.name.trim()).join("\n")}
- name: خودکار (بهترین پینگ) 🤖
type: url-test
url: https://api.v2fly.org/checkConnection.svgz
interval: 600
tolerance: 180
proxies:
${configList.map(cnf => " - " + cnf.name.trim()).join("\n")}
- name: 🇮🇷 سایتای ایرانی
type: select
proxies:
- 🛡️ بدون فیلترشکن
- 🚫 اجازه ندادن
- 🔀 نوع انتخاب پروکسی
- name: 🏴☠️ سایتای تحریمی
type: select
proxies:
- 🔀 نوع انتخاب پروکسی
- 🛡️ بدون فیلترشکن
- 🚫 اجازه ندادن
- name: 🤬 سایتای سانسوری
type: select
proxies:
- 🚫 اجازه ندادن
- 🔀 نوع انتخاب پروکسی
- 🛡️ بدون فیلترشکن
- name: ⚠️ سایتای مخرب
type: select
proxies:
- 🚫 اجازه ندادن
- 🔀 نوع انتخاب پروکسی
- 🛡️ بدون فیلترشکن
- name: 🆎 تبلیغات
type: select
proxies:
- 🚫 اجازه ندادن
- 🛡️ بدون فیلترشکن
- 🔀 نوع انتخاب پروکسی
- name: 🍃 تصفیه برنامه
type: select
proxies:
- 🚫 اجازه ندادن
- 🛡️ بدون فیلترشکن
- 🔀 نوع انتخاب پروکسی
- name: 🛑 رهگیری جهانی
type: select
proxies:
- 🚫 اجازه ندادن
- 🛡️ بدون فیلترشکن
- 🔀 نوع انتخاب پروکسی
- name: 🎮 استیم
type: select
proxies:
- 🛡️ بدون فیلترشکن
- 🚫 اجازه ندادن
- 🔀 نوع انتخاب پروکسی
- name: 🛡️ بدون فیلترشکن
type: select
proxies:
- DIRECT
- name: ⛔ قطع اینترنت
type: select
proxies:
- REJECT
- name: 🚫 اجازه ندادن
type: select
proxies:
- REJECT
- name: 🔐 فقط سایتای فیلتر شده
type: select
proxies:
- DIRECT
- name: 🌐 همه سایتا
type: select
proxies:
- 🔀 نوع انتخاب پروکسی
rules:
- RULE-SET,Purification_ip,🍃 تصفیه برنامه,no-resolve
- RULE-SET,Purification,🍃 تصفیه برنامه
- RULE-SET,category_public_tracker,🛑 رهگیری جهانی
- RULE-SET,Global,🛑 رهگیری جهانی
- RULE-SET,malware,⚠️ سایتای مخرب
- RULE-SET,phishing,⚠️ سایتای مخرب
- RULE-SET,cryptominers,⚠️ سایتای مخرب
- RULE-SET,category_ads_all,🆎 تبلیغات
- RULE-SET,ads,🆎 تبلیغات
- RULE-SET,iran_ads,🆎 تبلیغات
- RULE-SET,PersianBlocker,🆎 تبلیغات
- RULE-SET,ads_ip,🆎 تبلیغات,no-resolve
- RULE-SET,add,🆎 تبلیغات
- RULE-SET,MoreAd,🆎 تبلیغات
- RULE-SET,AntiAd,🆎 تبلیغات
- RULE-SET,GoodbyeAds,🆎 تبلیغات
- RULE-SET,blocked,🔀 نوع انتخاب پروکسی
- RULE-SET,censor,🤬 سایتای سانسوری
- RULE-SET,local_ips,🛡️ بدون فیلترشکن
- RULE-SET,private,🛡️ بدون فیلترشکن
- RULE-SET,ircidr,🇮🇷 سایتای ایرانی
- GEOIP,IR,🇮🇷 سایتای ایرانی
- RULE-SET,category_ir,🇮🇷 سایتای ایرانی
- RULE-SET,iran,🇮🇷 سایتای ایرانی
- RULE-SET,iran_other,🇮🇷 سایتای ایرانی
- RULE-SET,ir,🇮🇷 سایتای ایرانی
- RULE-SET,apps,🇮🇷 سایتای ایرانی
- RULE-SET,steam,🎮 استیم
- RULE-SET,tahrim,🏴☠️ سایتای تحریمی
- RULE-SET,category_porn,🔀 نوع انتخاب پروکسی
- RULE-SET,facebook,🔀 نوع انتخاب پروکسی
- RULE-SET,youtube,🔀 نوع انتخاب پروکسی
- RULE-SET,instagram,🔀 نوع انتخاب پروکسی
- RULE-SET,spotify,🔀 نوع انتخاب پروکسی
- RULE-SET,twitter,🔀 نوع انتخاب پروکسی
- RULE-SET,telegram,🔀 نوع انتخاب پروکسی
- RULE-SET,openai,🔀 نوع انتخاب پروکسی
- RULE-SET,whatsapp,🔀 نوع انتخاب پروکسی
- RULE-SET,tiktok,🔀 نوع انتخاب پروکسی
- RULE-SET,twitch,🔀 نوع انتخاب پروکسی
- MATCH,📶 انتخاب نوع اتصال
`
return yaml;
}