mirror of
https://github.com/SagerNet/sing-shadowsocks.git
synced 2025-04-05 21:07:44 +03:00
Update headroom usage
This commit is contained in:
parent
a91eacdd01
commit
7e47fd1a99
8 changed files with 45 additions and 13 deletions
|
@ -310,10 +310,22 @@ func (c *clientPacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error) {
|
|||
return len(p), nil
|
||||
}
|
||||
|
||||
func (c *clientPacketConn) Headroom() int {
|
||||
func (c *clientPacketConn) FrontHeadroom() int {
|
||||
return c.keySaltLength + M.MaxSocksaddrLength
|
||||
}
|
||||
|
||||
func (c *clientPacketConn) RearHeadroom() int {
|
||||
return Overhead
|
||||
}
|
||||
|
||||
func (c *clientPacketConn) ReaderMTU() int {
|
||||
return MaxPacketSize
|
||||
}
|
||||
|
||||
func (c *clientPacketConn) WriterMTU() int {
|
||||
return MaxPacketSize
|
||||
}
|
||||
|
||||
func (c *clientPacketConn) Upstream() any {
|
||||
return c.Conn
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue