Files
.github
cmd
docs
pkg
acl
congestion
core
http
pmtud
redirect
relay
sockopt
socks5
tproxy
tcp_linux.go
tcp_stub.go
udp_linux.go
udp_stub.go
transport
tun
utils
.gitignore
CHANGELOG.md
Dockerfile
LICENSE.md
README.md
Taskfile.yaml
build.ps1
build.sh
docker-compose.yaml
go.mod
go.sum
install_server.sh
hysteria-dev/pkg/tproxy/udp_stub.go

27 lines
527 B
Go

//go:build !linux
// +build !linux
package tproxy
import (
"errors"
"net"
"time"
"github.com/HyNetwork/hysteria/pkg/core"
)
var ErrTimeout = errors.New("inactivity timeout")
type UDPTProxy struct{}
func NewUDPTProxy(hyClient *core.Client, listen string, timeout time.Duration,
connFunc func(addr, reqAddr net.Addr), errorFunc func(addr, reqAddr net.Addr, err error),
) (*UDPTProxy, error) {
return nil, errors.New("not supported on the current system")
}
func (r *UDPTProxy) ListenAndServe() error {
return nil
}