socksproxy

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SOCKS4 = iota
	SOCKS4A
	SOCKS5
)

Constants to choose which version of SOCKS protocol to use.

Variables

This section is empty.

Functions

func Dial

func Dial(proxyURI string) func(string, string) (net.Conn, error)

Dial returns the dial function to be used in http.Transport object. Argument proxyURI should be in the format: "socks5://user:password@127.0.0.1:1080?timeout=5s". The protocol could be socks5, socks4 and socks4a.

func DialSocksProxy

func DialSocksProxy(socksType int, proxy string, username string, password string) func(string, string) (net.Conn, error)

DialSocksProxy returns the dial function to be used in http.Transport object. Argument socksType should be one of SOCKS4, SOCKS4A and SOCKS5. Argument proxy should be in this format "127.0.0.1:1080".

Types

This section is empty.

Jump to

Keyboard shortcuts

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