proxy

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHttpPort   uint16 = 8080
	DefaultHttpsPort  uint16 = 443
	DefaultSocks5Port uint16 = 1080
)

Variables

View Source
var SchemeDefaultPortMap = map[string]uint16{
	"http":    DefaultHttpPort,
	"https":   DefaultHttpsPort,
	"socks5":  DefaultSocks5Port,
	"socks5h": DefaultSocks5Port,
}

Functions

func DialHttps

func DialHttps(conn net.Conn, host string, port uint16, creds *Creds) error

func DialSocks5

func DialSocks5(conn net.Conn, host string, port uint16, creds *Creds) (net.Addr, error)

func WithAuthHeader

func WithAuthHeader(header *specs.Header, username, password string) *specs.Header

Types

type Creds

type Creds struct {
	Username string
	Password string
}

type ResolvedAddr

type ResolvedAddr struct {
	Net    string
	Domain string
	IP     net.IP
	Port   int
}

func (*ResolvedAddr) Network

func (a *ResolvedAddr) Network() string

func (*ResolvedAddr) String

func (a *ResolvedAddr) String() string

Jump to

Keyboard shortcuts

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