Browse Source

Enable the read jitter on both sides of the link for the Obfs4 methods.

This might be better for certain HS use cases...
Yawning Angel 3 years ago
parent
commit
521641f3a8
1 changed files with 4 additions and 5 deletions
  1. 4 5
      padding_obfs4.go

+ 4 - 5
padding_obfs4.go

@@ -202,11 +202,10 @@ func newObfs4Padding(conn *commonConn, m PaddingMethod, seed []byte) (paddingImp
 	// IAT delay dist between 0 to 25 ms.
 	// Note: This is always needed due to the short write obfsucation strategy.
 	p.delayDist = discretedist.NewUniform(r, 0, 5*1000, 100, false)
-	if !p.conn.isClient {
-		// Add random [0, 2 * tau) read delay to mask timings on data
-		// fed to the upstream as well.
-		p.conn.enableReadDelay = true
-	}
+
+	// Add random [0, 2 * tau) read delay to mask timings on data
+	// fed to the upstream as well.
+	p.conn.enableReadDelay = true
 
 	if m == PaddingObfs4PacketIAT {
 		// The packetized padding will never send large writes, and thus