Skip to content

Commit 3e95858

Browse files
committed
fix: privman init
1 parent 9722397 commit 3e95858

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This means that this image also includes an nginx server so that the advanced CS
1414
This image downloads the 'trustedCAs' file from curl.se and also generates the ca-bundle file. So, you only need copy the 'ca-bundle' file and install it on your browser/system.
1515

1616
- Check Privoxy Status: ```https://config.privoxy.org/show-status```
17-
- Check *ab2p* is working: ```https://<ADBLOCK_CSS_DOMAIN>/ab2p.common.css```
17+
- Check *ab2p* is fully operational (needs privoxy ca-bundle to verify SSL): ```https://<ADBLOCK_CSS_DOMAIN>/ab2p.common.css```
1818

1919
### Default Ports
2020

bin/privman.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ def generate_nginx_certs(subj, ca_bundle_file, ca_key_file):
9090

9191

9292
def init_adblock_filters():
93+
adblock_css_domain = os.environ.get("ADBLOCK_CSS_DOMAIN", "")
94+
adblock_urls = os.environ.get("ADBLOCK_URLS", "").split(" ")
9395
subprocess.run(
9496
[
9597
"adblock2privoxy",
@@ -98,10 +100,10 @@ def init_adblock_filters():
98100
"-w",
99101
"/usr/local/etc/adblock2privoxy/css",
100102
"-d",
101-
os.environ.get("ADBLOCK_CSS_DOMAIN", ""),
103+
adblock_css_domain,
102104
"-t",
103105
"/usr/local/etc/privoxy/ab2p.task",
104-
os.environ.get("ADBLOCK_URLS", ""),
106+
*adblock_urls,
105107
]
106108
)
107109
return True

0 commit comments

Comments
 (0)