1111DEFAULT_ROUTE_IP6 = ip_network ('::/0' )
1212DEFAULT_ROUTES = [DEFAULT_ROUTE_IP4 , DEFAULT_ROUTE_IP6 ]
1313LINK_LOCAL_IP6 = ip_network ('fe80::/64' )
14+ BOGONS_IP4 = [
15+ ip_network ('0.0.0.0/8' ),
16+ ip_network ('10.0.0.0/8' ),
17+ ip_network ('100.64.0.0/10' ),
18+ ip_network ('127.0.0.0/8' ),
19+ ip_network ('127.0.53.53' ),
20+ ip_network ('169.254.0.0/16' ),
21+ ip_network ('172.16.0.0/12' ),
22+ ip_network ('192.0.0.0/24' ),
23+ ip_network ('192.0.2.0/24' ),
24+ ip_network ('192.168.0.0/16' ),
25+ ip_network ('198.18.0.0/15' ),
26+ ip_network ('198.51.100.0/24' ),
27+ ip_network ('203.0.113.0/24' ),
28+ ip_network ('224.0.0.0/4' ),
29+ ip_network ('240.0.0.0/4' ),
30+ ip_network ('255.255.255.255/32' ),
31+ ]
32+ BOGONS_IP6 = [
33+ ip_network ('::/128' ),
34+ ip_network ('::1/128' ),
35+ ip_network ('::ffff:0:0/96' ),
36+ ip_network ('::/96' ),
37+ ip_network ('100::/64' ),
38+ ip_network ('2001:10::/28' ),
39+ ip_network ('2001:db8::/32' ),
40+ ip_network ('3fff::/20' ),
41+ ip_network ('fc00::/7' ),
42+ ip_network ('fe80::/10' ),
43+ ip_network ('fec0::/10' ),
44+ ip_network ('ff00::/8' ),
45+ ]
46+ BOGONS = BOGONS_IP4 .copy ()
47+ BOGONS .extend (BOGONS_IP6 )
48+
49+ # dns-resolving firewall-rule content
50+ DNS_RESOLVE_TIMEOUT = 1
51+ DNS_RESOLVE_THREADS = 50
52+
53+ IPLIST_DOWNLOAD_TIMEOUT = 3
54+ IPLIST_COMMENT_CHARS = ['#' , ';' ]
1455
1556
1657class Proto (ABC ):
@@ -33,10 +74,11 @@ class ProtoL3IP4IP6(ProtoL3):
3374 N = 'ip'
3475
3576
36- PROTOS_L3 = [ProtoL3IP4 , ProtoL3IP6 ]
77+ PROTOS_L3 = [ProtoL3IP4 , ProtoL3IP6 , ProtoL3IP4IP6 ]
3778PROTO_L3_MAPPING = {
3879 ProtoL3IP4 .N : ProtoL3IP4 ,
3980 ProtoL3IP6 .N : ProtoL3IP6 ,
81+ ProtoL3IP4IP6 .N : ProtoL3IP4IP6 ,
4082}
4183
4284class ProtoL4 (Proto ):
0 commit comments