Update
This commit is contained in:
@@ -117,10 +117,11 @@ script:
|
||||
"Domestic": "Domestic",
|
||||
"Domestic IPs": "Domestic",
|
||||
"LAN": "DIRECT"
|
||||
}
|
||||
}
|
||||
|
||||
port = int(metadata["dst_port"])
|
||||
|
||||
if (metadata["network"] == "UDP":
|
||||
if metadata["network"] == "UDP":
|
||||
if port == 443:
|
||||
ctx.log('[Script] matched QUIC traffic use reject')
|
||||
return "REJECT"
|
||||
@@ -128,22 +129,22 @@ script:
|
||||
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]
|
||||
if port not in port_list:
|
||||
return "DIRECT"
|
||||
ctx.log('[Script] not common port use direct')
|
||||
|
||||
for rule_name in ctx.rule_providers.keys():
|
||||
if ctx.rule_providers[rule_name].match(metadata):
|
||||
return ruleset_action[rule_name]
|
||||
|
||||
ip = metadata["dst_ip"] or ctx.resolve_ip(metadata["host"])
|
||||
|
||||
if ip == "":
|
||||
return "DIRECT"
|
||||
|
||||
code = ctx.geoip(ip)
|
||||
|
||||
if code == "CN":
|
||||
return "Domestic"
|
||||
|
||||
ctx.log('[Script] Geoip CN')
|
||||
return "Others"
|
||||
ctx.log('[Script] FINAL')
|
||||
|
||||
rule-providers:
|
||||
Reject:
|
||||
|
||||
Reference in New Issue
Block a user