mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-08-29 20:51:49 +00:00
feat: TProxy
This commit is contained in:
24
app/internal/tproxy/tcp_others.go
Normal file
24
app/internal/tproxy/tcp_others.go
Normal 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")
|
||||
}
|
Reference in New Issue
Block a user