Update headroom usage

This commit is contained in:
世界 2022-08-11 21:58:26 +08:00
parent a91eacdd01
commit 7e47fd1a99
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
8 changed files with 45 additions and 13 deletions

View file

@ -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
}