Documentation
¶
Index ¶
- Constants
- type Config
- type PacketConn
- func (nm *PacketConn) Add(id uint64, addr netip.AddrPort)
- func (nm *PacketConn) Close() error
- func (nm *PacketConn) Del(id uint64)
- func (nm *PacketConn) Firewall() bool
- func (nm *PacketConn) GetAddr(id uint64) (netip.AddrPort, bool)
- func (nm *PacketConn) GetContextID(addr netip.AddrPort) (uint64, bool)
- func (pc *PacketConn) ReadPacket(buf []byte) ([]byte, uint64, error)
- func (nm *PacketConn) SetFirewall(ok bool) error
- func (pc *PacketConn) SetReadDeadline(time time.Time) error
- func (pc *PacketConn) WriteToUDPAddrPort(b []byte, raddr netip.AddrPort) (int, error)
- type Server
Constants ¶
View Source
const ( RequestProtocol = "connect-udp" CapsuleProtocolHeader = "Capsule-Protocol" ConnectUDPBindHeader = "Connect-Udp-Bind" ProxyAuthorizationHeader = "Proxy-Authorization" ProxyPublicAddressHeader = "Proxy-Public-Address" CapsuleProtocolHeaderValue = "?1" ConnectUDPBindHeaderValue = "?1" CompressionAssignValue = 0x1C0FE323 CompressionCloseValue = 0x1C0FE324 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PacketConn ¶
type PacketConn struct {
datagram.DatagramSender
Conn net.Conn
ContextID uint64
ContextMap sync.Map
AddrMap sync.Map
// contains filtered or unexported fields
}
func (*PacketConn) Close ¶ added in v0.3.0
func (nm *PacketConn) Close() error
func (*PacketConn) Del ¶
func (nm *PacketConn) Del(id uint64)
func (*PacketConn) Firewall ¶ added in v0.3.0
func (nm *PacketConn) Firewall() bool
func (*PacketConn) GetContextID ¶
func (nm *PacketConn) GetContextID(addr netip.AddrPort) (uint64, bool)
func (*PacketConn) ReadPacket ¶ added in v0.3.0
func (pc *PacketConn) ReadPacket(buf []byte) ([]byte, uint64, error)
func (*PacketConn) SetFirewall ¶ added in v0.3.0
func (nm *PacketConn) SetFirewall(ok bool) error
func (*PacketConn) SetReadDeadline ¶ added in v0.3.0
func (pc *PacketConn) SetReadDeadline(time time.Time) error
func (*PacketConn) WriteToUDPAddrPort ¶
type Server ¶
type Server struct {
Config
Dialer proxy.Dialer
Host string
Port string
BasicAuth string
// contains filtered or unexported fields
}
func (*Server) ServeHTTP ¶ added in v0.5.0
func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (Server) ServeTProxyTCP ¶
func (Server) ServeTProxyUDP ¶
Click to show internal directories.
Click to hide internal directories.