Add ping proxy support
This commit is contained in:
parent
4a56d47035
commit
933bd2b2d5
16 changed files with 542 additions and 19 deletions
6
tun.go
6
tun.go
|
|
@ -18,11 +18,15 @@ import (
|
|||
)
|
||||
|
||||
type Handler interface {
|
||||
PrepareConnection(network string, source M.Socksaddr, destination M.Socksaddr) error
|
||||
PrepareConnection(network string, source M.Socksaddr, destination M.Socksaddr, routeContext DirectRouteContext) (DirectRouteDestination, error)
|
||||
N.TCPConnectionHandlerEx
|
||||
N.UDPConnectionHandlerEx
|
||||
}
|
||||
|
||||
type DirectRouteContext interface {
|
||||
WritePacket(packet []byte) error
|
||||
}
|
||||
|
||||
type Tun interface {
|
||||
io.ReadWriter
|
||||
Name() (string, error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue