mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 09:16:58 +08:00
Refactor: core.CreateStackWithOptions
This commit is contained in:
@@ -3,6 +3,12 @@ package adapter
|
||||
// Handler is a TCP/UDP connection handler that implements
|
||||
// HandleTCPConn and HandleUDPConn methods.
|
||||
type Handler interface {
|
||||
HandleTCPConn(TCPConn)
|
||||
HandleUDPConn(UDPConn)
|
||||
HandleTCP(TCPConn)
|
||||
HandleUDP(UDPConn)
|
||||
}
|
||||
|
||||
// TCPHandleFunc handles incoming TCP connection.
|
||||
type TCPHandleFunc func(TCPConn)
|
||||
|
||||
// UDPHandleFunc handles incoming UDP connection.
|
||||
type UDPHandleFunc func(UDPConn)
|
||||
|
Reference in New Issue
Block a user