[squid-users] Can SQUID change the destination address from ip to hostname?

Foxy Lady Foxy_Lady_1966 at proton.me
Tue Feb 4 21:22:56 UTC 2025


I try again asking the ML if

- can Squid change the destination address of a call?

I mean, something like

<url_rewrite_command> $destination $Host

original $destination is 104.26.9.59:443
$Host is the original HTTP Header "Host: xxxxx" alias "api.myip.com:443"

So, a call to
https://104.26.9.59:443/test
will become
https://api.myip.com:443/test

Thanks.

Inviato con l'email sicura Proton Mail.

martedì 4 febbraio 2025 06:17, Foxy Lady <Foxy_Lady_1966 at proton.me> ha scritto:

> Hi again.
> I finally found a tool (great tool, "GO Simple Tunnel") which can serves both HTTP(S)/SOCKS5 Proxy with dns resolution, so chaining it in the middle of Squid, Squid receives the destination in format of "domain.fqdn" and not ip "x.x.x.x",
> 
> TCP_TUNNEL/200 4118 CONNECT api.myip.com:443 username HIER_DIRECT/104.26.9.59 - "Go-http-client/1.1" [User-Agent: Go-http-client/1.1\r\nProxy-Authorization: Basic bWFyY286dHIwdHQwbGE=\r\nProxy-Connection: keep-alive\r\nHost: api.myip.com:443\r\n] [HTTP/1.1 200 Connection established\r\n\r\n]
> 
> 👍👍👍
> 
> 
> Inviato con l'email sicura Proton Mail.
> 
> 
> lunedì 3 febbraio 2025 22:22, Foxy Lady Foxy_Lady_1966 at proton.me ha scritto:
> 
> > Sorry, resend the post in txt and correct some parts.
> > The question is: can i force SQUID to do a reverse dns lookup and maintain the Host Header inside (where's a ptr record is found), also if i can't find a ptr record? SOCKS5 works with 1st level tcp, so send ip addresses, i need some tool, or Squid workaround, which can force a reverse dns. I know, it's quite impossible if a ptr record is not found in dnses, but... i try..
> > 
> > ----------
> > 
> > Hi all.
> > As in subject.
> > SQUID server has its own dns resolver.
> > 
> > Can SQUID change the destination address from ip to hostname?
> > 
> > CLIENT > SQUID > DESTINATION
> > 
> > 192.168.178.2 TCP_TUNNEL/200 4120 CONNECT api.myip.com:443 - HIER_DIRECT/104.26.8.59
> > 
> > CLIENT > SOCKS5 PROXY > SQUID > DESTINATION
> > 
> > 192.168.178.50 TCP_TUNNEL/200 4126 CONNECT 104.26.9.59:443 - HIER_DIRECT/104.26.9.59
> > 
> > I would need,
> > 
> > CLIENT > SOCKS5 PROXY > SQUID > DESTINATION
> > 
> > 192.168.178.50 TCP_TUNNEL/200 4126 CONNECT api.myip.com:443 - HIER_DIRECT/104.26.9.59
> > 
> > Thanks.
> > 
> > Inviato con l'email sicura Proton Mail.


More information about the squid-users mailing list