relay

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IoCopyBidirectionalForPacket

func IoCopyBidirectionalForPacket(srcConn, dstConn net.PacketConn, serverAddr string,
	udpReadFromSrc udpProxyReadFromSrcFunc, udpWriteToSrc udpProxyWriteToSrcFunc) error

func IoCopyBidirectionalForStream

func IoCopyBidirectionalForStream(dst, src io.ReadWriteCloser) error

Types

type NatmapUDPRelayer

type NatmapUDPRelayer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewNatmapUDPRelayer

func NewNatmapUDPRelayer(inbound, outbound transport.UdpConnBound) *NatmapUDPRelayer

func (*NatmapUDPRelayer) DirectRelayToServer

func (r *NatmapUDPRelayer) DirectRelayToServer(conn net.PacketConn, remoteAddr string) error

func (*NatmapUDPRelayer) RelayToServer

func (r *NatmapUDPRelayer) RelayToServer(conn net.PacketConn) error

type ProxyTCPRelayer

type ProxyTCPRelayer struct {
	transport.Dialer
	// contains filtered or unexported fields
}

func NewProxyTCPRelayer

func NewProxyTCPRelayer(proxyServerAddr string, typ transport.Type, opts options.Options,
	inbound, outbound transport.TcpConnBound) *ProxyTCPRelayer

func (*ProxyTCPRelayer) RelayToProxyServer

func (r *ProxyTCPRelayer) RelayToProxyServer(conn net.Conn, remoteServerAddr string) error

func (*ProxyTCPRelayer) RelayToServer

func (r *ProxyTCPRelayer) RelayToServer(conn net.Conn) error

type ProxyUDPRelayer

type ProxyUDPRelayer struct {
	// contains filtered or unexported fields
}

func NewProxyUDPRelayer

func NewProxyUDPRelayer(proxyServerAddr string, inbound, outbound transport.UdpConnBound) *ProxyUDPRelayer

func (*ProxyUDPRelayer) RelayToProxyServer

func (r *ProxyUDPRelayer) RelayToProxyServer(conn net.PacketConn, remoteServerAddr string) error

type TCPDirectRelayer

type TCPDirectRelayer struct{ transport.Dialer }

func NewTCPDirectRelayer

func NewTCPDirectRelayer() *TCPDirectRelayer

func (*TCPDirectRelayer) RelayToServer

func (r *TCPDirectRelayer) RelayToServer(conn net.Conn, remoteServerAddr string) error

type UDPDirectRelayer

type UDPDirectRelayer struct{}

func NewUDPDirectRelayer

func NewUDPDirectRelayer() *UDPDirectRelayer

func (*UDPDirectRelayer) RelayToServer

func (r *UDPDirectRelayer) RelayToServer(conn net.PacketConn, remoteServerAddr string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL