TCP TProxy implementation, no UDP or ACL support yet

This commit is contained in:
Toby
2021-04-24 02:56:17 -07:00
parent 444bb5daec
commit 787ed14c4d
7 changed files with 138 additions and 3 deletions

21
pkg/tproxy/tcp_stub.go Normal file
View File

@@ -0,0 +1,21 @@
// +build !linux
package tproxy
import (
"errors"
"github.com/tobyxdd/hysteria/pkg/core"
"net"
"time"
)
type TCPTProxy struct{}
func NewTCPTProxy(hyClient *core.Client, listen string, timeout time.Duration,
connFunc func(addr, reqAddr net.Addr), errorFunc func(addr, reqAddr net.Addr, err error)) (*TCPTProxy, error) {
return nil, errors.New("not supported on the current system")
}
func (r *TCPTProxy) ListenAndServe() error {
return nil
}