Project-Faster / qpep

A working version of qpep standalone go client/server, designed to accelerate high-latency connections, like those provided by geostationary satellites.
https://docs.projectfaster.org
Other
3 stars 1 forks source link

Force server to use -listenaddress for the api connections #16

Closed mfoxworthy closed 1 year ago

mfoxworthy commented 2 years ago

When the client connects to the server api it is using the gateway IP address as the destination. When the connection comes out of the tunnel it goes to that IP. If that IP is not on the server the api connection fails. We should be using the IP address that the server uses in the -listenaddress command line option. Basically, a NAT is a way.

A workaround for now is to use a iptables command to do this for us.

sudo iptables -t nat -A OUTPUT -p tcp -d --dport 444 -j DNAT --to-destination <ip of server Ethernet interface:444

parvit commented 2 years ago

@mfoxworthy @bizzbyster The PR for this change is ready for testing

mfoxworthy commented 2 years ago

@mfoxworthy @bizzbyster The PR for this change is ready for testing

I tested the server and it appears that the connection is going to the correct IP but I am seeing this from the client: Screen Shot 2022-08-16 at 10 51 34 AM Screen Shot 2022-08-16 at 10 43 04 AM

parvit commented 2 years ago

@mfoxworthy For the first image, the new messages (not actually new they were just delayed to the server closure) you see are actually the result of a fix from the status-gui branch that allows the quic streams coming from the client to be closed when the connection is terminated (applies only to the quic->tcp direction of the connection, the other half was correctly closed on time).

For the second image:

EDIT: Pushed the change, please test with the updated tray icon

parvit commented 1 year ago

Feature tested positively and merged.