diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2014-05-23 04:04:31 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2014-05-23 04:04:31 +0000 |
commit | 272fb852e72ac282144fe8608fea62ab74b9549c (patch) | |
tree | ed5afd35f72cc3739caf75395674b612f812ce76 /obfs4.go | |
parent | fd4e3c7c74ad4d1acb37c43fde8d18786616846a (diff) |
Change the maximm handshake length to 8192 bytes.
* handhake_ntor_test now is considerably more comprehensive.
* The padding related constants in the spec were clarified.
This breaks wireprotocol compatibility.
Diffstat (limited to 'obfs4.go')
-rw-r--r-- | obfs4.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -48,7 +48,7 @@ const ( headerLength = framing.FrameOverhead + packetOverhead connectionTimeout = time.Duration(30) * time.Second - maxCloseDelayBytes = framing.MaximumSegmentLength * 5 + maxCloseDelayBytes = maxHandshakeLength maxCloseDelay = 60 ) @@ -181,7 +181,7 @@ func (c *Obfs4Conn) clientHandshake(nodeID *ntor.NodeID, publicKey *ntor.PublicK } // Consume the server handshake. - var hsBuf [serverMaxHandshakeLength]byte + var hsBuf [maxHandshakeLength]byte for { var n int n, err = c.conn.Read(hsBuf[:]) @@ -235,7 +235,7 @@ func (c *Obfs4Conn) serverHandshake(nodeID *ntor.NodeID, keypair *ntor.Keypair) } // Consume the client handshake. - var hsBuf [clientMaxHandshakeLength]byte + var hsBuf [maxHandshakeLength]byte for { var n int n, err = c.conn.Read(hsBuf[:]) |