what I'm trying to understand the feasibility is to create a completely transparent system for any client's browser that allows me to visit any destination url using a syntax like:
what I am trying to do is perfectly reported, but no solution provieded here http://mailman.nginx.org/pipermail/nginx/2008-December/008987.html
https://example.com/<uri_to_visit>.
the system has to work as if browser is confgured to use a proxy but I don't want to force users to configure proxy parameter.
I thought to use nginx to proxy the uri requests and then squid to process the request. nginx and squid are on the same server but may also be on different servers. I'm trying to access to any website ( for example ) google.com from any browser using
"https://example.com/service/google.com"
example.com is managed by one of my nginx web server
Following https://stackoverflow.com/questions/28331813/reverse-proxy-from-nginx-to-squid
nginx config section has been set as follows:
location ~* ^/service/(.*) {
proxy_pass http://localhost:3128/$1$is_args$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Request-URI $request_uri;
proxy_set_header Host $host;
proxy_redirect off;
}
and squid.conf
http_port 3128 vhost allow-direct
now, when I try to access to https://example.com/service/google.com squid logs report.
I suppose is question regarding proxy_pass but I have made many attempts and have not been able to fix it correctly.
squid.log
TCP_MISS/403 4495 GET http://example.com/google.com - HIER_NONE/- text/html
TCP_MISS/403 4589 GET http://example.com/google.com - ORIGINAL_DST/127.0.0.1 text/html