ooni / minivpn

A minimalistic OpenVPN implementation in Go
GNU General Public License v3.0
38 stars 6 forks source link

refactor: introduce reliable transport layer #50

Closed ainghazal closed 8 months ago

ainghazal commented 8 months ago

This is the third commit in the series of incremental refactoring of the current minivpn tree.

In this commit, we introduce the reliabletransport package, which is the layer between packetmuxer and control channel.

Reliable transport adds a reliability layer on top of UDP (but it's also used in TCP mode).

This first implementation of the reliability layer implements only a naive strategy to get the TLS handshake working on an optimal environment (i.e., no packet loss). We ACK any incoming packet, and we assume all packets arrive in order.

After merging all the components in the new architecture, we will revisit the reliability layer to follow the OpenVPN design more closely.

Reference issue: https://github.com/ooni/minivpn/issues/47