feat: TProxy

This commit is contained in:
Toby
2023-08-10 22:06:46 -07:00
parent 4060bcb806
commit ceb3c7f6a8
10 changed files with 473 additions and 71 deletions

View File

@@ -0,0 +1,24 @@
//go:build !linux
package tproxy
import (
"errors"
"net"
"github.com/apernet/hysteria/core/client"
)
type TCPTProxy struct {
HyClient client.Client
EventLogger TCPEventLogger
}
type TCPEventLogger interface {
Connect(addr, reqAddr net.Addr)
Error(addr, reqAddr net.Addr, err error)
}
func (r *TCPTProxy) ListenAndServe(laddr *net.TCPAddr) error {
return errors.New("not supported on this platform")
}