Barre / privaxy

Privaxy is the next generation tracker and advertisement blocker. It blocks ads and trackers by MITMing HTTP(s) traffic.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moderate-high RAM usage, internet throttling (Windows)

Darthagnon opened this issue · comments

Taskmgr_LLUzegQh0l

Not sure if I'm doing something wrong, or if by default it uses many more filters than in the tests, but Privaxy uses around 100mb by default on Windows ( (I realise RAM usage will increase with number of filters used) and internet browsing feels slow. Is there a way to run it silently without the console window? I found out how to run Privaxy on Windows without a console window, using an old method.

chrome_lyJg10BTR0

Internet Speed Test:

Same speed with and without Privaxy, but there is a noticeable delay of a second or two when loading pages while Privaxy is running, while the same pages load instantly without Privaxy.
Speedtest_vCW9kVG8tN

Maybe HDD throttling? Not sure what the limiting factor is.

How to run Privaxy on Windows without an annoying CMD window

Also seems to halve the RAM usage when run this way.
Taskmgr_HwqV02HfHt

  1. Create a run.bat batch file next to privaxy.exe containing only the name of the executable, i.e. privaxy.exe
  2. Create a hide.vbs script file in the same folder, and put the following code into it: CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
  3. Create a New Shortcut (e.g. in %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\, if you want to start Privaxy automatically with your PC) and put the following into the Target: field: C:\Windows\System32\wscript.exe "D:\Absolute\Path\to\hide.vbs" "C:\Absolute\Path\to\run.bat"
  4. Run Privaxy via this shortcut will launch it without a console window, and it will use 1/2 the RAM it would otherwise.

Hmmm... looks like it's not that simple. While running hidden via the above method and using less RAM, the GUI is accessible via the browser, but it seems to not work reliably, with ads or placeholders appearing I forgot to save my proxy settings (whereas running with the console open, it works perfectly). When running "hidden", it seems to be unreliable, spitting out

502

Bad Gateway.
Unable to process your request.

Reason:

error sending request for url (https://uk.news.yahoo.com/amanda-owen-breaks-silence-split-161903537.html): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer

I saw a few of the following in the console, which seemed related to the 502 error:

WARN  privaxy::proxy::mitm] Unable to perform handshake for host: github.com:443. Consider excluding it from blocking. The service may not tolerate TLS interception.

EDIT:

  • I'm typically using Yahoo.com and wololo.net (both have heavy ads) to test.
  • Hmmm... Wonder if I've broken something, it's now giving 502 and the above console reading all the time.
  • Might have just been a browser caching issue or a github.com issue, as github (the website that wouldn't load at all with 502) loads in incognito. Things still kinda slow, and it would be nice to figure out how to hide that console window successfully
  • RAM usage seems to start at 42MB and increase with content blocked or rules loaded (?)

Memory usage seems ok to me.

On slowness, I did some troubleshooting. Reqwest by default uses system proxy settings which just makes privaxy forwards requests to privaxy. I didn't observe the same behavior on linux / macos though.

I also saw slowness coming from trustdns with many related issues such as hickory-dns/hickory-dns#1607, hickory-dns/hickory-dns#1696, hickory-dns/hickory-dns#1636, let's use getaddrinfo everywhere then.

I fixed both issues in #24 and published a new release https://github.com/Barre/privaxy/releases/tag/v0.3.0

Can you confirm if it fixes things for you?

Thank you!!! Confirm that it's a lot faster. Memory usage is about 100mb with standard filters enabled during standard usage, which is okay (voidtools Everything, Quicklook each take about that much).