proxy

package
v0.0.0-...-feb5578 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SocksLocalRouter

type SocksLocalRouter struct {
	sync.Mutex // Mutex to synchronize access to shared resources.
	*A.NdisApi // API instance for interacting with the NDIS API.
	// contains filtered or unexported fields
}

SocksLocalRouter handles the routing of SOCKS traffic locally.

func NewSocksLocalRouter

func NewSocksLocalRouter(api *A.NdisApi) (*SocksLocalRouter, error)

NewSocksLocalRouter creates a new instance of SocksLocalRouter.

func (*SocksLocalRouter) AddSocks5Proxy

func (s *SocksLocalRouter) AddSocks5Proxy(endpoint *string, protocol SupportedProtocols, start bool, login *string, password *string) (int, error)

AddSocks5Proxy adds a new SOCKS5 proxy to the router.

func (*SocksLocalRouter) AssociateProcessNameToProxy

func (s *SocksLocalRouter) AssociateProcessNameToProxy(processName string, proxyID int) error

AssociateProcessNameToProxy associates a process name with a proxy ID.

func (*SocksLocalRouter) Close

func (s *SocksLocalRouter) Close() error

Close stops the router and resets the static filter.

func (*SocksLocalRouter) GetProxyPortTCP

func (s *SocksLocalRouter) GetProxyPortTCP(process *N.NetworkProcess) uint16

GetProxyPortTCP retrieves the TCP proxy port for a given process.

func (*SocksLocalRouter) IsDriverLoaded

func (s *SocksLocalRouter) IsDriverLoaded() bool

IsDriverLoaded checks if the NDIS driver is loaded.

func (*SocksLocalRouter) IsTCPProxyPort

func (s *SocksLocalRouter) IsTCPProxyPort(port uint16) bool

IsTCPProxyPort checks if a given port is used by any TCP proxy.

func (*SocksLocalRouter) Start

func (s *SocksLocalRouter) Start() error

Start activates the router and its proxy servers.

func (*SocksLocalRouter) Stop

func (s *SocksLocalRouter) Stop() error

Stop deactivates the router and its proxy servers.

type SupportedProtocols

type SupportedProtocols int

SupportedProtocols defines the supported protocols for the proxy.

const (
	TCP SupportedProtocols = iota
	UDP
	Both
)

type TransparentProxy

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

TransparentProxy represents a transparent proxy server.

func NewTransparentProxy

func NewTransparentProxy(localProxyPort uint16, socksEndpoint string, socksUsername, socksPassword string, queryRemotePeer queryRemotePeer) *TransparentProxy

NewTransparentProxy creates a new instance of TransparentProxy.

func (*TransparentProxy) GetLocalProxyPort

func (tp *TransparentProxy) GetLocalProxyPort() uint16

GetLocalProxyPort returns the local proxy port.

func (*TransparentProxy) Start

func (tp *TransparentProxy) Start(ctx context.Context) error

Start starts the transparent proxy server.

func (*TransparentProxy) Stop

func (tp *TransparentProxy) Stop()

Stop stops the transparent proxy server.

Jump to

Keyboard shortcuts

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