pull/409/head
lhie1 5 years ago
parent efa15d01b7
commit 674ffd7bfb

@ -25,4 +25,4 @@ payload:
- DOMAIN-SUFFIX,apple.news
# > Apple Maps
- PROCESS-NAME,com.apple.geod
# - PROCESS-NAME,com.apple.geod

File diff suppressed because it is too large Load Diff

@ -3,7 +3,7 @@ payload:
- DOMAIN-SUFFIX,dler.cloud
# > Apple CDN
- PROCESS-NAME,storedownloadd
# - PROCESS-NAME,storedownloadd
# - User-Agent,com.apple.appstored*
- DOMAIN,aod.itunes.apple.com
- DOMAIN,api.smoot.apple.cn
@ -29,8 +29,8 @@ payload:
- DOMAIN-SUFFIX,msftconnecttest.com
# > Proxy plugin
- PROCESS-NAME,v2ray
- PROCESS-NAME,ss-local
# - PROCESS-NAME,v2ray
# - PROCESS-NAME,ss-local
# > Steam
# - User-Agent,Steam*
@ -38,7 +38,7 @@ payload:
- DOMAIN-SUFFIX,steamcontent.com
# > UUBooster
- PROCESS-NAME,UUBooster
# - PROCESS-NAME,UUBooster
# > Windows
- DOMAIN-SUFFIX,windows.com
@ -50,15 +50,15 @@ payload:
- DOMAIN-SUFFIX,xunlei.com
# > Download
- PROCESS-NAME,aria2c
- PROCESS-NAME,fdm
- PROCESS-NAME,Folx
- PROCESS-NAME,NetTransport
- PROCESS-NAME,Thunder
- PROCESS-NAME,Transmission
- PROCESS-NAME,uTorrent
- PROCESS-NAME,WebTorrent
- PROCESS-NAME,WebTorrent Helper
# - PROCESS-NAME,aria2c
# - PROCESS-NAME,fdm
# - PROCESS-NAME,Folx
# - PROCESS-NAME,NetTransport
# - PROCESS-NAME,Thunder
# - PROCESS-NAME,Transmission
# - PROCESS-NAME,uTorrent
# - PROCESS-NAME,WebTorrent
# - PROCESS-NAME,WebTorrent Helper
# > Private Tracker
- DOMAIN-SUFFIX,awesome-hd.me

@ -50,6 +50,7 @@
- RULE-SET,PROXY,Proxy
- RULE-SET,Domestic,Domestic
- RULE-SET,Domestic IPs,Domestic
- RULE-SET,Apple,Apple
- GEOIP,CN,Domestic
@ -58,14 +59,6 @@
script:
code: |
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]
ruleset_action = {"Reject": "AdBlock",
"Special": "DIRECT",
@ -111,6 +104,7 @@ script:
"Microsoft": "Microsoft",
"PROXY": "Proxy",
"Domestic": "Domestic",
"Domestic IPs": "Domestic",
"Apple": "Apple"
}
port = int(metadata["dst_port"])
@ -122,6 +116,18 @@ script:
if ctx.rule_providers[rule_name].match(metadata):
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"
rule-providers:
@ -406,4 +412,10 @@ rule-providers:
behavior: classical
url: 'https://git.dler.io/lhie1/Rules/master/Clash/Provider/Apple.yaml'
path: ./Rules/Apple
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
Loading…
Cancel
Save