Fix: ss: block if server send first(like mysql)

This commit is contained in:
Yang.Liu 2019-07-12 18:28:33 +08:00
parent 7b8bf24e40
commit 28279673cf
No known key found for this signature in database
GPG Key ID: 2DF89F5618CF3E9E

5
ss.go
View File

@ -64,9 +64,8 @@ func (c *shadowConnector) Connect(conn net.Conn, addr string, options ...Connect
sc := &shadowConn{
Conn: ss.NewConn(conn, cipher),
}
sc.wbuf.Write(rawaddr) // cache the header
return sc, nil
_, err = sc.Write(rawaddr)
return sc, err
}
type shadowHandler struct {