Browse Source

Fix the short write/large write detection being flipped. (Oops).

Yawning Angel 3 years ago
parent
commit
e616f74ca5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      padding_obfs4.go

+ 1 - 1
padding_obfs4.go

@@ -154,7 +154,7 @@ func (p *obfs4Padding) largeWrite(b []byte) (n int, err error) {
 }
 
 func (p *obfs4Padding) Write(b []byte) (n int, err error) {
-	if len(b) > p.conn.maxRecordSize {
+	if len(b) < p.conn.maxRecordSize {
 		n, err = p.shortWrite(b)
 	} else {
 		n, err = p.largeWrite(b)