File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ acl BLOCKDOMAIN dstdomain {{ domain }}
30
30
{% endfor %}
31
31
http_access deny BLOCKDOMAIN
32
32
{% endif %}
33
+
34
+ {% if domain_noncache is vyos_defined %}
35
+ {% for domain in domain_noncache %}
36
+ acl NOCACHE dstdomain {{ domain }}
37
+ {% endfor %}
38
+ no_cache deny NOCACHE
39
+ {% endif %}
40
+
33
41
{% if authentication is vyos_defined %}
34
42
{% if authentication .children is vyos_defined %}
35
43
auth_param basic children {{ authentication.children }}
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
2
#
3
- # Copyright (C) 2020-2022 VyOS maintainers and contributors
3
+ # Copyright (C) 2020-2025 VyOS maintainers and contributors
4
4
#
5
5
# This program is free software; you can redistribute it and/or modify
6
6
# it under the terms of the GNU General Public License version 2 or later as
@@ -297,6 +297,22 @@ def test_05_basic_squidguard(self):
297
297
# Check for running process
298
298
self .assertTrue (process_named_running (PROCESS_NAME ))
299
299
300
+ def test_06_nocache_domain_proxy (self ):
301
+ domains_nocache = ['test1.net' , 'test2.net' ]
302
+ self .cli_set (base_path + ['listen-address' , listen_ip ])
303
+ for domain in domains_nocache :
304
+ self .cli_set (base_path + ['domain-noncache' , domain ])
305
+ # commit changes
306
+ self .cli_commit ()
307
+
308
+ config = read_file (PROXY_CONF )
309
+
310
+ for domain in domains_nocache :
311
+ self .assertIn (f'acl NOCACHE dstdomain { domain } ' , config )
312
+ self .assertIn (f'no_cache deny NOCACHE' , config )
313
+
314
+ # Check for running process
315
+ self .assertTrue (process_named_running (PROCESS_NAME ))
300
316
301
317
if __name__ == '__main__' :
302
318
unittest .main (verbosity = 2 )
You can’t perform that action at this time.
0 commit comments