mirror of
https://github.com/SagerNet/sing-shadowsocks.git
synced 2025-04-03 20:07:40 +03:00
Add headroom interface
This commit is contained in:
parent
91d2780bfc
commit
a91eacdd01
8 changed files with 65 additions and 3 deletions
|
@ -325,6 +325,10 @@ func (c *clientPacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error) {
|
|||
return len(p), nil
|
||||
}
|
||||
|
||||
func (c *clientPacketConn) Headroom() int {
|
||||
return c.saltLength + M.MaxSocksaddrLength
|
||||
}
|
||||
|
||||
func (c *clientPacketConn) Upstream() any {
|
||||
return c.Conn
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue