Opened 7 years ago

Closed 7 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:

Description

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/http_body_length.py -u http://lowes.com/

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 7 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: https://github.com/evilaliv3/ooni-probe/commit/302628ce1eaf9758fdaf5d3b271d4bf2d4a5279d

comment:2 Changed 7 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: https://gitweb.torproject.org/ooni-probe.git/commit/47d61ebfa76d87c4ca071bbfea728454b4be888b

Note: See TracTickets for help on using tickets.