socks

package
v1.8.20230922 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPProxy

type TCPProxy struct {
	Config  config.Config
	Session *smux.Session
	Lock    sync.Mutex
}

The tcp proxy struct

func (*TCPProxy) Proxy

func (t *TCPProxy) Proxy(conn net.Conn, data []byte)

Proxy is a function to proxy data

type TCPWorker

type TCPWorker struct {
	Config   config.Config
	TCPProxy *TCPProxy
	UDPProxy *UDPProxy
	UDPConn  *net.UDPConn
	Listener net.Listener
}

func (*TCPWorker) Start

func (t *TCPWorker) Start()

type UDPProxy

type UDPProxy struct {
	Config config.Config
}

The UDPProxy struct

func (*UDPProxy) Proxy

func (u *UDPProxy) Proxy(tcpConn net.Conn, udpConn *net.UDPConn)

Proxy handles the udp connection

type UDPWorker

type UDPWorker struct {
	UDPConn *net.UDPConn
	Config  config.Config

	Session *smux.Session
	Lock    sync.Mutex
	// contains filtered or unexported fields
}

func (*UDPWorker) Start

func (u *UDPWorker) Start() *net.UDPConn

Start the UDP server

Jump to

Keyboard shortcuts

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