Opened 8 years ago

Closed 8 years ago

#7586 closed defect (fixed)

Strangeness in keep-alive handling in txagentwithsocks

Reported by: hellais Owned by: hellais
Priority: Medium Milestone:
Component: Archived/Ooni Version:
Severity: Keywords:
Cc: aagbsn, evilaliv3 Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


When performing requests over a socks proxy towards a HTTP site that sets the keep-alive header field connections wrapped with the SOCKS5ClientEndpoint stay hanging.

I am also not fully sure that this bug only happens with HTTP servers that set keep alive, but this is what has happened a few times while running some scans. It would always get stuck on sites that have the keep-alive flag set.

What I fear is that txagentwithsocks' monkey patching is creating some issues in treating keep-alive.

Steps to reproduce:

./bin/ooniprobe nettests/blocking/ -u

This will perform a request over the network and via the Tor SOCKS proxy bound to localhost. The one over Tor will stay hanging.

Child Tickets

Change History (2)

comment:1 Changed 8 years ago by evil

from what i've seen the bug is not related to keepalive.
after the socks setup and after the client has sent the request we got no response from the socket.

by the way here are some important corrections i've done related to the sock state machine and to the TrueHeader:

comment:2 Changed 8 years ago by hellais

Resolution: fixed
Status: newclosed

This ended up not being a problem in txagentwithsocks, but in how we where not taking into account the content-length field. More details on this can be found in this commit:

Note: See TracTickets for help on using tickets.