mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 09:16:58 +08:00
15 lines
355 B
Go
15 lines
355 B
Go
package adapter
|
|
|
|
// Handler is a TCP/UDP connection handler that implements
|
|
// HandleTCPConn and HandleUDPConn methods.
|
|
type Handler interface {
|
|
HandleTCP(TCPConn)
|
|
HandleUDP(UDPConn)
|
|
}
|
|
|
|
// TCPHandleFunc handles incoming TCP connection.
|
|
type TCPHandleFunc func(TCPConn)
|
|
|
|
// UDPHandleFunc handles incoming UDP connection.
|
|
type UDPHandleFunc func(UDPConn)
|