mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-10 19:31:46 +00:00
feat: TProxy
This commit is contained in:
26
app/internal/tproxy/udp_others.go
Normal file
26
app/internal/tproxy/udp_others.go
Normal 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")
|
||||
}
|
Reference in New Issue
Block a user