<div dir="auto">Hey,<div dir="auto"><br></div><div dir="auto">Unless you have access to the dns resolver resolved domain and ip addresses.</div><div dir="auto">With these you can try(not 100%) to find the relevant domain if it's not a multi tenant vps or cdn or waf provider.</div><div dir="auto"><br></div><div dir="auto">Eliezer </div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">בתאריך יום ד׳, 5 בפבר׳ 2025, 12:01, מאת Matus UHLAR - fantomas ‏<<a href="mailto:uhlar@fantomas.sk">uhlar@fantomas.sk</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04.02.25 21:22, Foxy Lady wrote:<br>
>I try again asking the ML if<br>
><br>
>- can Squid change the destination address of a call?<br>
><br>
>I mean, something like<br>
><br>
><url_rewrite_command> $destination $Host<br>
><br>
>original $destination is <a href="http://104.26.9.59:443" rel="noreferrer noreferrer" target="_blank">104.26.9.59:443</a><br>
>$Host is the original HTTP Header "Host: xxxxx" alias "<a href="http://api.myip.com:443" rel="noreferrer noreferrer" target="_blank">api.myip.com:443</a>"<br>
><br>
>So, a call to<br>
><a href="https://104.26.9.59:443/test" rel="noreferrer noreferrer" target="_blank">https://104.26.9.59:443/test</a><br>
>will become<br>
><a href="https://api.myip.com:443/test" rel="noreferrer noreferrer" target="_blank">https://api.myip.com:443/test</a><br>
<br>
Hello,<br>
<br>
I guess that the URL redirector could do that.<br>
<a href="http://www.squid-cache.org/Doc/config/url_rewrite_program/" rel="noreferrer noreferrer" target="_blank">http://www.squid-cache.org/Doc/config/url_rewrite_program/</a><br>
<br>
Note that it's extremely unreliable, because IP=>hostname mapping is a wild <br>
guess, because after client asks for IP address, you don't really know what <br>
hostname they want. <br>
So my recommendation is: don't do that.<br>
<br>
Note that SOCKS5 protocol supports DNS resolution at server level<br>
<br>
>martedì 4 febbraio 2025 06:17, Foxy Lady <<a href="mailto:Foxy_Lady_1966@proton.me" target="_blank" rel="noreferrer">Foxy_Lady_1966@proton.me</a>> ha scritto:<br>
><br>
>> Hi again.<br>
>> 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",<br>
>><br>
>> TCP_TUNNEL/200 4118 CONNECT <a href="http://api.myip.com:443" rel="noreferrer noreferrer" target="_blank">api.myip.com:443</a> username HIER_DIRECT/<a href="http://104.26.9.59" rel="noreferrer noreferrer" target="_blank">104.26.9.59</a> - "Go-http-client/1.1" [User-Agent: Go-http-client/1.1\r\nProxy-Authorization: Basic bWFyY286dHIwdHQwbGE=\r\nProxy-Connection: keep-alive\r\nHost: <a href="http://api.myip.com:443" rel="noreferrer noreferrer" target="_blank">api.myip.com:443</a>\r\n] [HTTP/1.1 200 Connection established\r\n\r\n]<br>
>><br>
>> 👍👍👍<br>
>><br>
>><br>
>> Inviato con l'email sicura Proton Mail.<br>
>><br>
>><br>
>> lunedì 3 febbraio 2025 22:22, Foxy Lady <a href="mailto:Foxy_Lady_1966@proton.me" target="_blank" rel="noreferrer">Foxy_Lady_1966@proton.me</a> ha scritto:<br>
>><br>
>> > Sorry, resend the post in txt and correct some parts.<br>
>> > 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..<br>
>> ><br>
>> > ----------<br>
>> ><br>
>> > Hi all.<br>
>> > As in subject.<br>
>> > SQUID server has its own dns resolver.<br>
>> ><br>
>> > Can SQUID change the destination address from ip to hostname?<br>
>> ><br>
>> > CLIENT > SQUID > DESTINATION<br>
>> ><br>
>> > 192.168.178.2 TCP_TUNNEL/200 4120 CONNECT <a href="http://api.myip.com:443" rel="noreferrer noreferrer" target="_blank">api.myip.com:443</a> - HIER_DIRECT/<a href="http://104.26.8.59" rel="noreferrer noreferrer" target="_blank">104.26.8.59</a><br>
>> ><br>
>> > CLIENT > SOCKS5 PROXY > SQUID > DESTINATION<br>
>> ><br>
>> > 192.168.178.50 TCP_TUNNEL/200 4126 CONNECT <a href="http://104.26.9.59:443" rel="noreferrer noreferrer" target="_blank">104.26.9.59:443</a> - HIER_DIRECT/<a href="http://104.26.9.59" rel="noreferrer noreferrer" target="_blank">104.26.9.59</a><br>
>> ><br>
>> > I would need,<br>
>> ><br>
>> > CLIENT > SOCKS5 PROXY > SQUID > DESTINATION<br>
>> ><br>
>> > 192.168.178.50 TCP_TUNNEL/200 4126 CONNECT <a href="http://api.myip.com:443" rel="noreferrer noreferrer" target="_blank">api.myip.com:443</a> - HIER_DIRECT/<a href="http://104.26.9.59" rel="noreferrer noreferrer" target="_blank">104.26.9.59</a><br>
<br>
-- <br>
Matus UHLAR - fantomas, <a href="mailto:uhlar@fantomas.sk" target="_blank" rel="noreferrer">uhlar@fantomas.sk</a> ; <a href="http://www.fantomas.sk/" rel="noreferrer noreferrer" target="_blank">http://www.fantomas.sk/</a><br>
Warning: I wish NOT to receive e-mail advertising to this address.<br>
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.<br>
The early bird may get the worm, but the second mouse gets the cheese.<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank" rel="noreferrer">squid-users@lists.squid-cache.org</a><br>
<a href="https://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer noreferrer" target="_blank">https://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>