Update
This commit is contained in:
@@ -25,4 +25,4 @@ payload:
|
|||||||
- DOMAIN-SUFFIX,apple.news
|
- DOMAIN-SUFFIX,apple.news
|
||||||
|
|
||||||
# > Apple Maps
|
# > Apple Maps
|
||||||
- PROCESS-NAME,com.apple.geod
|
# - PROCESS-NAME,com.apple.geod
|
||||||
Executable
+6608
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -3,7 +3,7 @@ payload:
|
|||||||
- DOMAIN-SUFFIX,dler.cloud
|
- DOMAIN-SUFFIX,dler.cloud
|
||||||
|
|
||||||
# > Apple CDN
|
# > Apple CDN
|
||||||
- PROCESS-NAME,storedownloadd
|
# - PROCESS-NAME,storedownloadd
|
||||||
# - User-Agent,com.apple.appstored*
|
# - User-Agent,com.apple.appstored*
|
||||||
- DOMAIN,aod.itunes.apple.com
|
- DOMAIN,aod.itunes.apple.com
|
||||||
- DOMAIN,api.smoot.apple.cn
|
- DOMAIN,api.smoot.apple.cn
|
||||||
@@ -29,8 +29,8 @@ payload:
|
|||||||
- DOMAIN-SUFFIX,msftconnecttest.com
|
- DOMAIN-SUFFIX,msftconnecttest.com
|
||||||
|
|
||||||
# > Proxy plugin
|
# > Proxy plugin
|
||||||
- PROCESS-NAME,v2ray
|
# - PROCESS-NAME,v2ray
|
||||||
- PROCESS-NAME,ss-local
|
# - PROCESS-NAME,ss-local
|
||||||
|
|
||||||
# > Steam
|
# > Steam
|
||||||
# - User-Agent,Steam*
|
# - User-Agent,Steam*
|
||||||
@@ -38,7 +38,7 @@ payload:
|
|||||||
- DOMAIN-SUFFIX,steamcontent.com
|
- DOMAIN-SUFFIX,steamcontent.com
|
||||||
|
|
||||||
# > UUBooster
|
# > UUBooster
|
||||||
- PROCESS-NAME,UUBooster
|
# - PROCESS-NAME,UUBooster
|
||||||
|
|
||||||
# > Windows
|
# > Windows
|
||||||
- DOMAIN-SUFFIX,windows.com
|
- DOMAIN-SUFFIX,windows.com
|
||||||
@@ -50,15 +50,15 @@ payload:
|
|||||||
- DOMAIN-SUFFIX,xunlei.com
|
- DOMAIN-SUFFIX,xunlei.com
|
||||||
|
|
||||||
# > Download
|
# > Download
|
||||||
- PROCESS-NAME,aria2c
|
# - PROCESS-NAME,aria2c
|
||||||
- PROCESS-NAME,fdm
|
# - PROCESS-NAME,fdm
|
||||||
- PROCESS-NAME,Folx
|
# - PROCESS-NAME,Folx
|
||||||
- PROCESS-NAME,NetTransport
|
# - PROCESS-NAME,NetTransport
|
||||||
- PROCESS-NAME,Thunder
|
# - PROCESS-NAME,Thunder
|
||||||
- PROCESS-NAME,Transmission
|
# - PROCESS-NAME,Transmission
|
||||||
- PROCESS-NAME,uTorrent
|
# - PROCESS-NAME,uTorrent
|
||||||
- PROCESS-NAME,WebTorrent
|
# - PROCESS-NAME,WebTorrent
|
||||||
- PROCESS-NAME,WebTorrent Helper
|
# - PROCESS-NAME,WebTorrent Helper
|
||||||
|
|
||||||
# > Private Tracker
|
# > Private Tracker
|
||||||
- DOMAIN-SUFFIX,awesome-hd.me
|
- DOMAIN-SUFFIX,awesome-hd.me
|
||||||
|
|||||||
+20
-8
@@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
- RULE-SET,PROXY,Proxy
|
- RULE-SET,PROXY,Proxy
|
||||||
- RULE-SET,Domestic,Domestic
|
- RULE-SET,Domestic,Domestic
|
||||||
|
- RULE-SET,Domestic IPs,Domestic
|
||||||
- RULE-SET,Apple,Apple
|
- RULE-SET,Apple,Apple
|
||||||
|
|
||||||
- GEOIP,CN,Domestic
|
- GEOIP,CN,Domestic
|
||||||
@@ -58,14 +59,6 @@
|
|||||||
script:
|
script:
|
||||||
code: |
|
code: |
|
||||||
def main(ctx, metadata):
|
def main(ctx, metadata):
|
||||||
ip = ctx.resolve_ip(metadata["host"])
|
|
||||||
if ip == "":
|
|
||||||
return "DIRECT"
|
|
||||||
|
|
||||||
code = ctx.geoip(ip)
|
|
||||||
if code == "CN":
|
|
||||||
return "Domestic"
|
|
||||||
|
|
||||||
port_list = [21, 22, 23, 53, 80, 123, 143, 194, 443, 465, 587, 853, 993, 995, 998, 2052, 2053, 2082, 2083, 2086, 2095, 2096, 5222, 5228, 5229, 5230, 8080, 8443, 8880, 8888, 8889]
|
port_list = [21, 22, 23, 53, 80, 123, 143, 194, 443, 465, 587, 853, 993, 995, 998, 2052, 2053, 2082, 2083, 2086, 2095, 2096, 5222, 5228, 5229, 5230, 8080, 8443, 8880, 8888, 8889]
|
||||||
ruleset_action = {"Reject": "AdBlock",
|
ruleset_action = {"Reject": "AdBlock",
|
||||||
"Special": "DIRECT",
|
"Special": "DIRECT",
|
||||||
@@ -111,6 +104,7 @@ script:
|
|||||||
"Microsoft": "Microsoft",
|
"Microsoft": "Microsoft",
|
||||||
"PROXY": "Proxy",
|
"PROXY": "Proxy",
|
||||||
"Domestic": "Domestic",
|
"Domestic": "Domestic",
|
||||||
|
"Domestic IPs": "Domestic",
|
||||||
"Apple": "Apple"
|
"Apple": "Apple"
|
||||||
}
|
}
|
||||||
port = int(metadata["dst_port"])
|
port = int(metadata["dst_port"])
|
||||||
@@ -122,6 +116,18 @@ script:
|
|||||||
if ctx.rule_providers[rule_name].match(metadata):
|
if ctx.rule_providers[rule_name].match(metadata):
|
||||||
return ruleset_action[rule_name]
|
return ruleset_action[rule_name]
|
||||||
|
|
||||||
|
ip = ctx.resolve_ip(metadata["host"])
|
||||||
|
|
||||||
|
if ip == "":
|
||||||
|
return "DIRECT"
|
||||||
|
|
||||||
|
code = ctx.geoip(ip)
|
||||||
|
if code == "CN":
|
||||||
|
return "Domestic"
|
||||||
|
|
||||||
|
if code == "LAN":
|
||||||
|
return "DIRECT"
|
||||||
|
|
||||||
return "Others"
|
return "Others"
|
||||||
|
|
||||||
rule-providers:
|
rule-providers:
|
||||||
@@ -407,3 +413,9 @@ rule-providers:
|
|||||||
url: 'https://git.dler.io/lhie1/Rules/master/Clash/Provider/Apple.yaml'
|
url: 'https://git.dler.io/lhie1/Rules/master/Clash/Provider/Apple.yaml'
|
||||||
path: ./Rules/Apple
|
path: ./Rules/Apple
|
||||||
interval: 86400
|
interval: 86400
|
||||||
|
Domestic IPs:
|
||||||
|
type: http
|
||||||
|
behavior: ipcidr
|
||||||
|
url: 'https://git.dler.io/lhie1/Rules/master/Clash/Provider/Domestic%20IPs.yaml'
|
||||||
|
path: ./Rules/Domestic_IPs
|
||||||
|
interval: 86400
|
||||||
Reference in New Issue
Block a user