Block QUIC
This commit is contained in:
+6
-1
@@ -67,7 +67,6 @@
|
|||||||
script:
|
script:
|
||||||
code: |
|
code: |
|
||||||
def main(ctx, metadata):
|
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",
|
ruleset_action = {"Reject": "AdBlock",
|
||||||
"Special": "DIRECT",
|
"Special": "DIRECT",
|
||||||
"Netflix": "Netflix",
|
"Netflix": "Netflix",
|
||||||
@@ -121,6 +120,12 @@ script:
|
|||||||
}
|
}
|
||||||
port = int(metadata["dst_port"])
|
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:
|
if port not in port_list:
|
||||||
return "DIRECT"
|
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
|
||||||
Reference in New Issue
Block a user