Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using invidious with a Squid Proxy to make it transparent to all users regardless of browser/OS/etc... #462

Closed
ElCoyote27 opened this issue Nov 3, 2023 · 2 comments
Labels
question Further information is requested

Comments

@ElCoyote27
Copy link

The SQUID proxy (http://www.squid-cache.org/) has been available for decades and it has a cool feature named "url_rewrite_program" (I used to use this to extend squid with SquidGuard), e.g:

# UdfGuard's squid.conf section:
url_rewrite_program /usr/sbin/ufdbgclient -l /var/log/squid
url_rewrite_children 64 startup=16 idle=4 concurrency=0

I wonder if it would be possible to create a small url_rewrite_program (a shell script would work) to make the invidious lookaside automatic? That way, all clients would benefit from the invidious 'service' as long as they'd properly configured to use the proxy.
I was reading the redirector rules of invidious and they seemed similar to what the url_rewrite_program does.

Benefits:

  • all lookadside configuration done on the squid server. All clients are made to use invidious by SQUID regardless of OS, Browser or config. They just need to use the squid proxy (and this can be made 100% transparent by using an iptables rule to redirect).

Ideas, Comments? Would that work? Note that I am unfamiliar with the intrinsics of squid's url_rewite_program inner works.

@unixfox unixfox added the question Further information is requested label Nov 3, 2023
@unixfox
Copy link
Member

unixfox commented Nov 3, 2023

Won't work due to HTTPS though... unless you are installing the root certificate of squid on the machines

@ElCoyote27
Copy link
Author

ElCoyote27 commented Nov 3, 2023

I agree, but then again squid apparently has transparent SSL proxying with ssl_bump and I'd rather push a PAC URL + my CA to the clients machines than do the same client-side config for invidious on all clients.

e.g:

$ cat 20_ssl-mitm.conf

# Splicing
always_direct allow all
#acl broken_sites dstdomain .github.com

sslcrtd_program /usr/lib64/squid/security_file_certgen -s /etc/squid/certs/ssl_db -M 64MB

sslproxy_cert_error allow all
tls_outgoing_options flags=DONT_VERIFY_PEER

acl step1 at_step SslBump1
ssl_bump peek all
ssl_bump bump all
#ssl_bump splice broken_sites
ssl_bump splice all
ssl_bump stare all

@unixfox unixfox closed this as completed Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants