<div dir="ltr">Hi,<div><br></div><div>We have our company proxy and this is how the topology is expected to look like for the deployment:</div><div><br></div><div>Client -------------------squid-host.com---------------------------company-proxy------------Internet</div><div><br></div><div>Now I need to allow reverse proxy(3128) for some request from the client and tunnel (3129) as well.</div><div><br></div><div>Configuration:<br></div><div><div>http_port 3128 accel allow-direct</div><div>http_port 3129</div><div>never_direct allow all</div><div>always_direct deny all</div></div><div>...</div><div><div>cache_peer company-proxy parent 80       0  no-query no-digest login=PASS originserver</div><div>url_rewrite_access allow all<br></div><div>url_rewrite_program  /usr/bin/python ./rewriter_program.py</div></div><div><br></div><div>Usecases:</div><div><br></div><div>1) Reverse proxy: Now I can successfully get the response for the query like curl -X GET <a href="http://squid-host.com:3128/microsoftapi/api/something">http://squid-host.com:3128/microsoftapi/api/something</a>. Basically I rewrite URL to <a href="https://microsft.com/api/something">https://microsft.com/api/something</a> and through company-proxy I get the response successfully from e.g., <a href="http://microsoft.com">microsoft.com</a>.<br></div><div><br></div><div>2) Tunnel: It fails when the client do a query like curl -x <a href="http://squid-host.com:3129">http://squid-host.com:3129</a> -X GET <a href="https://googlecloudapis.com/api/something">https://googlecloudapis.com/api/something</a></div><div><div>< HTTP/1.1 503 Service Unavailable</div><div>< Server: squid/3.5.20</div><div>< Mime-Version: 1.0</div><div>< Date: Tue, 07 Aug 2018 12:36:07 GMT</div><div>< Content-Type: text/html;charset=utf-8</div><div>< Content-Length: 3879</div><div>< X-Squid-Error: ERR_CANNOT_FORWARD 0</div><div>< Vary: Accept-Language</div><div>< Content-Language: en</div><div><</div><div>* The requested URL returned error: 503</div><div>* CONNECT phase completed!</div><div>* Connection #0 to host <a href="http://squidhostname.com">squidhostname.com</a> left intact</div></div><div>Now, if I remove the origin server, the TUNNEL goes through and getting the response but the reverse proxy fails.</div><div><br></div><div>Could you let me know how I can handle both tunneling and reverse proxy through same cache peer?</div><div><br></div><div>Thanks,</div><div>Hari</div><div><br></div></div>