bug-httptunnel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTTPtunnel hangs on Apache proxy


From: Robert Eckardt
Subject: HTTPtunnel hangs on Apache proxy
Date: Sat, 12 Jun 2004 10:18:55 +0200

Hi,

httptunnel hangs on Apache proxies.
Although it is nowhere stated that it works for Apache it is not
mentioned that it doesn't.

I reduced the problem to the following situation:
telnet 127.0.0.1 2023
  |
  htc -F 2023 -P 127.0.0.1:80 127.0.0.1:8023
     ||
     httpd (Apache as the proxy and at least my Netscape is happy)
        ||
        hts -F 127.0.0.1:23 8023
           |
           telnetd

I tested with httptunnel-3.0.5 and -3.3, apache-1.3.22 and -2.0.48,
under FreeBSD-4.5-R, -5.2.1-R and Solaris-8.

When I substitute httpd [on 80] by squid (2.4) [on port 3128] it
works without problems.

What I found from analyzing tcpdumps and debug-logs is:
I can send a CR from telnet to htc, where it simply sits around.
All connections are in state ESTABLISHED, only the one to telnetd
does not exist at that time.

htc waits in a read for reply from the proxy, while hts at the same
time also waits for data from the proxy on the first of two connections.
The proxy has two connections open to either htc and hts, but in
the log of hts there is only the first of them noted. (htc sent a POST
and a GET and waits now for the reply to the GET. The proxy, however,
sent the GET to hts on the second connection, whereas hts waits
in a read in the first one.)

Playing with parameters proxy-buffer-size and keep-alive did not change
anything. Setting content-length to 4 on htc and to 8 on hts lets packets
flow between htc via proxy to hts and vica versa.
But, no data is send from telnetd to telnet. (It seems to get lost in
htc.) I have a 22MB hts-log and 5MB htc-log around after just a few
seconds. Hundreds of new connections are in TIME_WAIT state, e.g.:
tcp4   0   0  127.0.0.1.8023     127.0.0.1.1231     TIME_WAIT
tcp4   0   0  127.0.0.1.8023     127.0.0.1.1218     TIME_WAIT
tcp4   0   0  127.0.0.1.8023     127.0.0.1.1213     TIME_WAIT
tcp4   0   0  127.0.0.1.8023     127.0.0.1.1211     TIME_WAIT
They are remains of new connections from proxy to hts.

So, what is so different in Apache's behaviour versus Squid's?
Where can I tweak htc/hts to work with Apache?
It seems part of the problems (blocked read, tunnel_write writes all
data) are already recognized in the TODOs. How can I help to make
httptunnel more HTTP-proxy compliant?
However, I did not want to dive so deep as to write my own tunnel-solution.

Regards,
Robert





reply via email to

[Prev in Thread] Current Thread [Next in Thread]