Both the client and the server are behind NAT (Network Address Translation) firewalls.
You listed:
Client: tcp6 0 0 192.168.0.111:35129 51.74.132.142:8080
Server: tcp6 0 0 172.34.10.158:8080 121.71.171.152:28301
Your client has an IP of 192.168.0.111
on your local network, and wants to talk to a server at 51.74.132.142
on port 8080
, so it allocates a dynamic port for the conversation (port 35129
).
The TCP/IP packets leave the local network through a firewall with source-NAT, which maps the source IP:Port to 121.71.171.152
:28301
.
That is the external IP of your office/home. You can confirm that at http://www.whatsmyip.org/.
The TCP/IP packets arrive at the firewall protecting the server network, which is configured with destination-NAT, so it maps the destination IP:Port to 172.34.10.158
:8080
.
The server receives the packet and establishes a connection.
Packets flowing the other way are then un-mapped by the firewalls. The firewalls maintain state to remember how to reverse the mapping. To conserve resources, the state has a timeout, so if the server is really slow and takes longer to respond than the timeout, the response will get lost even if the client is still waiting. The network admin controls the timeout. I've seen them as low as 5 minutes, so any response time > 5 mins never arrived back at client.
Moral: Setting client timeout higher than firewall NAT timeout just delays the inevitable.
Recap
Network Source Destination
YourPC --lan--> Firewall 192.168.0.111:35129 51.74.132.142:8080
Firewall --web--> Firewall 121.71.171.152:28301 51.74.132.142:8080
Firewall --lan--> Server 121.71.171.152:28301 172.34.10.158:8080