Turbo Tunnel client and server.

The client opts into turbotunnel mode by sending a magic token at the
beginning of each WebSocket connection (before sending even the
ClientID). The token is just a random byte string I generated. The
server peeks at the token and, if it matches, uses turbotunnel mode.
Otherwise, it unreads the token and continues in the old
one-session-per-WebSocket mode.
This commit is contained in:
David Fifield 2020-01-28 02:32:02 -07:00
parent 222ab3d85a
commit 70126177fb
6 changed files with 399 additions and 29 deletions

4
go.mod
View file

@ -1,7 +1,5 @@
module git.torproject.org/pluggable-transports/snowflake.git
go 1.13
require (
git.torproject.org/pluggable-transports/goptlib.git v1.1.0
github.com/golang/protobuf v1.3.1 // indirect
@ -9,6 +7,8 @@ require (
github.com/pion/sdp/v2 v2.3.4
github.com/pion/webrtc/v2 v2.2.2
github.com/smartystreets/goconvey v1.6.4
github.com/xtaci/kcp-go/v5 v5.5.12
github.com/xtaci/smux v1.5.12
golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa
golang.org/x/text v0.3.2 // indirect