hoarder-app / hoarder

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
https://hoarder.app
GNU Affero General Public License v3.0
4.53k stars 149 forks source link

[Feature Request] Add Puppeteer proxyServer Support #420

Closed tdharris closed 3 weeks ago

tdharris commented 3 weeks ago

Add support for a configuring a PROXY_SERVER address in the Hoarder configuration, which would pass through to Puppeteer's proxyServer configuration. Puppetteer would then automatically use this for all requests. This would add a lot of support for other external proxy services with a seemingly straightforward approach. There is also a proxyBypassList if it's needed to ensure certain requests remain local.

kamtschatka commented 3 weeks ago

Do you already have an external proxy service in mind / what is your exact usecase?

tdharris commented 3 weeks ago

Sending requests through a Privoxy web proxy service using a container that has the VPN configured and opens up the Privoxy service for other clients to go through. For example, there are many popular containers that leverage Privoxy as the exposed web proxy service and then supporting various VPN clients within the image (OpenVPN, WireGuard, PIA, ProtonVPN, etc) that all traffic gets routed through:

So the pattern is a self-hosted container, connecting to a VPN provider of choice, and then Privoxy being the common web proxy service being exposed through a URL that other clients/services can route traffic through.

kamtschatka commented 3 weeks ago

tbh, i don't think this feature is needed. Hoarder is connecting to a chrome docker container already, so in the docker compose file, if you add --proxy-server=<ip>:<port> that should already work? From what I saw so far, you can only pass the proxy server to puppetteer when launching the browser, but since chrome is already running in that container, that should not be necessary? Works fine for me at least

tdharris commented 3 weeks ago

Sweet! That will be perfect, thanks for that info, I'll give that a try. 💯

tdharris commented 3 weeks ago

✔️ Verified this works for me perfectly. Thanks for such an awesome app! ❤️

In case it's helpful to anyone later, for more info, see Chrome Network Settings:

--proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://"