mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2026-04-22 15:57:28 +08:00
68308ae9bd
Co-authored-by: Jason Lyu <xjasonlyu@gmail.com>
15 lines
348 B
Go
15 lines
348 B
Go
package adapter
|
|
|
|
// TransportHandler is a TCP/UDP connection handler that implements
|
|
// HandleTCP and HandleUDP methods.
|
|
type TransportHandler interface {
|
|
HandleTCP(TCPConn)
|
|
HandleUDP(UDPConn)
|
|
}
|
|
|
|
// NetworkHandler is a L3/network packet handler that implements
|
|
// HandlePacket method.
|
|
type NetworkHandler interface {
|
|
HandlePacket(Packet) bool
|
|
}
|