feat: transport refactorization

This commit is contained in:
Toby
2022-01-23 17:00:02 -08:00
parent 013e44a9c5
commit 841810d6ca
26 changed files with 381 additions and 325 deletions

View File

@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package tproxy
@@ -5,7 +6,6 @@ package tproxy
import (
"errors"
"github.com/tobyxdd/hysteria/pkg/core"
"github.com/tobyxdd/hysteria/pkg/transport"
"net"
"time"
)
@@ -14,7 +14,7 @@ var ErrTimeout = errors.New("inactivity timeout")
type UDPTProxy struct{}
func NewUDPTProxy(hyClient *core.Client, transport transport.Transport, listen string, timeout time.Duration,
func NewUDPTProxy(hyClient *core.Client, listen string, timeout time.Duration,
connFunc func(addr net.Addr), errorFunc func(addr net.Addr, err error)) (*UDPTProxy, error) {
return nil, errors.New("not supported on the current system")
}