refraction-networking / conjure

Conjure Refraction Networking station code
https://refraction.network
Apache License 2.0
70 stars 21 forks source link

Decoy Registrar Troubleshooting #234

Closed jmwample closed 1 year ago

jmwample commented 1 year ago

investigating failing connections and unreasonable timeouts when using the decoy registrar

[13:58:35] Sending Reg: x.y.edu, 1.2.3.4:443
[13:58:47] dial tcp 1.2.3.4:443: i/o timeout
[13:58:47] Successfully sent registrations, sleeping for: 26.762s

when one of the registrations times out the entire timeout is considered to be the RTT. The RTT is then used for a sleep which can cause an unreasonably long sleep time.

Issues:


Now only the fastest successful connection writes to the RTT.

The maximum sleep after reading has also been reduced using a max RTT and more reasonable TLS timeouts.

Fixes issue with PrepareRegKeys() that was introduced by #202

jmwample commented 1 year ago

I added a whole TLS connetion mock to test the reverse encrypt and aes-gcm encoding of the fsp and vsp to ensure that the expected registration information is being sent. This test now passes consistently, HOWEVER, we found that - at least with pipes - golang uses a conservative MTU of 576. which is less than our application data packet size a decent percentage of the time. this is a problem because the station is not keeping state to handle the case where the application data packet containing a registration gets fragmented.

It is unclear if this issue effects normal traffic sent by golang.