Fix hysteria packet write

This commit is contained in:
世界 2023-08-30 17:39:03 +08:00
parent ea3731162b
commit 67deac6d44
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -526,11 +526,12 @@ func (c *PacketConn) NeedAdditionalReadDeadline() bool {
}
func (c *PacketConn) Read(b []byte) (n int, err error) {
return 0, os.ErrInvalid
n, _, err = c.ReadFrom(b)
return
}
func (c *PacketConn) Write(b []byte) (n int, err error) {
return 0, os.ErrInvalid
return c.WriteTo(b, c.destination)
}
func (c *PacketConn) Close() error {