ooni / minivpn

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

refactor: introduce data channel layer #53

Closed ainghazal closed 6 months ago

ainghazal commented 6 months ago

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

In this commit, we introduce the datachannel package. This layer is above TLS and it communicates with TLS, the Packet Muxer and TUN. It is also the last layer below the TUN interface.

datachannel has two channels to communicate with the muxer, two channels to move cleartext bytes to the TUN interface, and one channel to receive keys from TLS.

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