Block QUIC

pull/448/head
lhie1 3 years ago
parent 7b2a078b55
commit 527c255005

@ -67,7 +67,6 @@
script:
code: |
def main(ctx, metadata):
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",
"Netflix": "Netflix",
@ -121,6 +120,12 @@ script:
}
port = int(metadata["dst_port"])
if (metadata["network"] == "UDP":
if port == 443:
ctx.log('[Script] matched QUIC traffic use reject')
return "REJECT"
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"

@ -0,0 +1,5 @@
#!name=Block QUIC Protocol
#!desc=Forced fallback HTTP2/HTTP1.1
[Rule]
AND,((PROTOCOL,UDP),(DEST-PORT,443)),REJECT-NO-DROP
Loading…
Cancel
Save