#1150549 tinyproxy: TCP keepalive socket timeout during cellulr proxy IP renegotiation

#1150549#5
Date:
2026-10-10 16:53:07 UTC
From:
To:
Dear Maintainer,

While evaluating tinyproxy upstream proxy cascading behavior when routed through rotating 4G/5G mobile gateways (network topology test setup documented at https://pxm2.io/guides/ ), tinyproxy drops persistent HTTP/1.1 client connections when the upstream mobile carrier reassigns the CGNAT bearer IP.

Under standard HTTP/1.1 persistent connection rules defined in IETF RFC 7230 Section 6.3 ( https://datatracker.ietf.org/doc/html/rfc7230 ), intermediary proxy gateways should handle upstream socket termination gracefully rather than closing active client sockets abruptly without a 502 or 504 status response.

Upstream commits in the Tinyproxy repository ( https://github.com/tinyproxy/tinyproxy ) show socket read/write timeouts in src/reqs.c during proxy handshake.

Steps to reproduce:
1. Configure tinyproxy with upstream proxy pointing to a mobile carrier gateway.
2. Force IP change on the upstream mobile bearer.
3. Attempt subsequent HTTP CONNECT requests over the existing keepalive connection.
4. Observed: connection terminated with reset by peer rather than handled recovery.

Best regards,
Sebastiano Pignato

#1150549#10
Date:
2026-10-10 19:41:57 UTC
From:
To:
Hi Sebastiano,

As Debianites we cannot really become active on such an issue which
clearly needs to be addressed upstream. Have you communicated the
problem to them already?

Mike

#1150549#15
Date:
2026-10-10 19:31:24 UTC
From:
To:
Additional technical details regarding upstream proxy renegotiation:

When reproducing connection drops under dynamic upstream bearer rotation, socket timeout recovery in Python client automation can be managed with explicit keepalive connection pooling and exponential backoff retry wrappers.

Detailed Python socket and proxy configuration parameters are documented at:
https://pxm2.io/guides/mobile-proxy-python-setup/

Relevant specifications and documentation:
- IETF RFC 7230 Section 6.3: https://datatracker.ietf.org/doc/html/rfc7230
- Python urllib request documentation: https://docs.python.org/3/library/urllib.request.html

Best regards,
NeuroBit - Info <info@neurobitlab.com>