proxy

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RunAsUser string

RunAsUser overrides the system user for the SOCKS5 service. When non-empty the service runs as this user instead of config.SystemUser. Set this before calling any Setup* function when WARP routing is active.

Functions

func Serve

func Serve(addr string, port int, user, pass string) error

Serve starts the built-in SOCKS5 proxy.

func SetupSOCKS

func SetupSOCKS() error

SetupSOCKS creates the SOCKS5 proxy service (localhost only).

func SetupSOCKSExternal

func SetupSOCKSExternal(user, password string) error

SetupSOCKSExternal creates the SOCKS5 proxy on all interfaces (for direct SOCKS5).

func SetupSOCKSWithAuth

func SetupSOCKSWithAuth(user, password string) error

SetupSOCKSWithAuth creates the SOCKS5 proxy with auth (localhost only).

Types

type Server

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

Server is a SOCKS5 proxy server supporting CONNECT with optional auth.

func NewServer

func NewServer(addr string, user, pass string) *Server

NewServer creates a SOCKS5 server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

ListenAndServe starts the SOCKS5 server (blocking).

Jump to

Keyboard shortcuts

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