feat: introduce a new robust approach to handle tproxy udp. (#389)

This commit is contained in:
Ovear
2023-02-17 16:31:15 +08:00
committed by GitHub
parent b2d1cea759
commit 8e4dfbd10d
10 changed files with 246 additions and 12 deletions

View File

@ -4,6 +4,7 @@ import (
"net"
"github.com/Dreamacro/clash/common/pool"
C "github.com/Dreamacro/clash/constant"
"github.com/Dreamacro/clash/transport/socks5"
)
@ -39,3 +40,11 @@ func (c *packet) Drop() {
func (c *packet) InAddr() net.Addr {
return c.pc.LocalAddr()
}
func (c *packet) SetNatTable(natTable C.NatTable) {
// no need
}
func (c *packet) SetUdpInChan(in chan<- C.PacketAdapter) {
// no need
}