diff --git a/pkg/tproxy/tcp_stub.go b/pkg/tproxy/tcp_stub.go index d27706b..0e1a326 100644 --- a/pkg/tproxy/tcp_stub.go +++ b/pkg/tproxy/tcp_stub.go @@ -6,13 +6,15 @@ import ( "errors" "github.com/tobyxdd/hysteria/pkg/acl" "github.com/tobyxdd/hysteria/pkg/core" + "github.com/tobyxdd/hysteria/pkg/transport" "net" "time" ) type TCPTProxy struct{} -func NewTCPTProxy(hyClient *core.Client, listen string, timeout time.Duration, aclEngine *acl.Engine, +func NewTCPTProxy(hyClient *core.Client, transport transport.Transport, listen string, timeout time.Duration, + aclEngine *acl.Engine, connFunc func(addr, reqAddr net.Addr, action acl.Action, arg string), errorFunc func(addr, reqAddr net.Addr, err error)) (*TCPTProxy, error) { return nil, errors.New("not supported on the current system") diff --git a/pkg/tproxy/udp_stub.go b/pkg/tproxy/udp_stub.go index 3788ce4..31ca612 100644 --- a/pkg/tproxy/udp_stub.go +++ b/pkg/tproxy/udp_stub.go @@ -6,6 +6,7 @@ import ( "errors" "github.com/tobyxdd/hysteria/pkg/acl" "github.com/tobyxdd/hysteria/pkg/core" + "github.com/tobyxdd/hysteria/pkg/transport" "net" "time" ) @@ -14,7 +15,8 @@ var ErrTimeout = errors.New("inactivity timeout") type UDPTProxy struct{} -func NewUDPTProxy(hyClient *core.Client, listen string, timeout time.Duration, aclEngine *acl.Engine, +func NewUDPTProxy(hyClient *core.Client, transport transport.Transport, listen string, timeout time.Duration, + aclEngine *acl.Engine, connFunc func(addr net.Addr), errorFunc func(addr net.Addr, err error)) (*UDPTProxy, error) { return nil, errors.New("not supported on the current system") }