<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hey Alex,<br />
<br />
Thanks for the reply. <br />
<br />
Basically, I need to set up a cache_peer, and have all traffic to it be sent using CONNECT, and add an HTTP CONNECT header such as:<br />
CONNECT test1 HTTP/1.1\r\n\r\n .<br />
<br />
Is that possible with Squid?<br />
<br />
Thanks,</div>
</div>
<div name="messageSignatureSection"><br />
<img src="https://docs.google.com/uc?export=download&id=1ft83ddlqL6d7UF8aueOgekgfVNUgcr24&revid=0B66Dk5OfcIONZEtnbmhZeUhaN3p3Q0c0dWhoS3pqUHYwNm9RPQ" width="420" height="193" style="color: rgb(32, 33, 36); font-family: Arial, Helvetica, sans-serif; font-size: small; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial;" /></div>
<div name="messageReplySection">On 3 May 2022, 16:30 +0300, Alex Rousskov <rousskov@measurement-factory.com>, wrote:<br />
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;">On 5/3/22 06:12, roee klinger wrote:<br />
<blockquote type="cite">Hey,<br />
<br />
I am trying to use Squid with FTP server TCP Port Multiplexing, on the<br />
FRP documentation (https://github.com/fatedier/frp#tcp-port-multiplexing<br />
<https://github.com/fatedier/frp#tcp-port-multiplexing>), it says:<br />
<br />
frp supports receiving TCP sockets directed to different proxies on<br />
a single port on frps, similar to vhost_http_port and vhost_https_port.<br />
<br />
The only supported TCP port multiplexing method available at the<br />
moment is httpconnect - HTTP CONNECT tunnel.<br />
<br />
When setting tcpmux_httpconnect_port to anything other than 0 in<br />
frps under [common], frps will listen on this port for HTTP CONNECT<br />
requests.<br />
<br />
The host of the HTTP CONNECT request will be used to match the proxy<br />
in frps. Proxy hosts can be configured in frpc by configuring<br />
custom_domain and / or subdomain under type = tcpmux proxies, when<br />
multiplexer = httpconnect.<br />
<br />
In the above configuration - frps can be contacted on port 1337 with<br />
a HTTP CONNECT header such as:<br />
CONNECT test1 HTTP/1.1\r\n\r\n<br />
<br />
and the connection will be routed to proxy1.<br />
<br />
<br />
<br />
I have been struggling to find info about the use of CONNECT tunnels in<br />
Squid, the only page that seems to be talking about it is this:<br />
https://wiki.squid-cache.org/Features/HTTPS<br />
<https://wiki.squid-cache.org/Features/HTTPS>, and the link it points to<br />
is broken.<br />
<br />
My question is, how can I use this with Squid? Can I configure Squid to<br />
receive traffic and then send it out to FRP with a custom CONNECT header?<br />
<br />
I am not sure if this is only good for web servers, or if upstream proxy<br />
servers can use this method too.<br /></blockquote>
<br />
CONNECT is usually used for opening TCP tunnels through HTTP proxies.<br />
Squid uses CONNECT (only) when the HTTP protocol requires such use:<br />
Squid will send a CONNECT request if you configure Squid to talk to a<br />
configured cache_peer (without an originserver flag), provided Squid<br />
needs to open a TCP tunnel through that cache_peer.<br />
<br />
Squid uses TCP tunnels in several cases. The most common use case is<br />
when Squid is forwarding a received CONNECT request (or an intercepted<br />
TLS connection) through a cache_peer.<br />
<br />
I have not studied FRP documentation and do not know how it all maps to<br />
your specific use case, but if you can summarize your use case in basic<br />
FTP/HTTP/TLS terms (e.g. Squid receives FTP request X and should send<br />
HTTP request Y), we may be able to help you with Squid configuration.<br />
<br />
Alex.<br />
_______________________________________________<br />
squid-users mailing list<br />
squid-users@lists.squid-cache.org<br />
http://lists.squid-cache.org/listinfo/squid-users<br /></blockquote>
</div>
</body>
</html>