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,26 @@
//go:build !linux
package tproxy
import (
"errors"
"net"
"time"
"github.com/apernet/hysteria/core/client"
)
type UDPTProxy struct {
HyClient client.Client
Timeout time.Duration
EventLogger UDPEventLogger
}
type UDPEventLogger interface {
Connect(addr, reqAddr net.Addr)
Error(addr, reqAddr net.Addr, err error)
}
func (r *UDPTProxy) ListenAndServe(laddr *net.UDPAddr) error {
return errors.New("not supported on this platform")
}