Skip to content

net.socks #

fn new_socks5_dialer #

fn new_socks5_dialer(base net.Dialer, proxy_address string, username string, password string) net.Dialer

new_socks5_dialer creates a dialer that will use a SOCKS5 proxy server to initiate connections. An underlying dialer is required to initiate the connection to the proxy server. Most users should use either net.default_tcp_dialer or ssl.create_ssl_dialer.

fn socks5_dial #

fn socks5_dial(proxy_url string, host string, username string, password string) !&net.TcpConn

socks5_dial create new instance of &net.TcpConn

fn socks5_ssl_dial #

fn socks5_ssl_dial(proxy_url string, host string, username string, password string) !&ssl.SSLConn

socks5_ssl_dial create new instance of &ssl.SSLConn

struct SOCKS5Dialer #

struct SOCKS5Dialer {
pub:
	dialer        net.Dialer
	proxy_address string
	username      string
	password      string
}

SOCKS5Dialer implements the Dialer interface initiating connections through a SOCKS5 proxy.

fn (SOCKS5Dialer) dial #

fn (sd SOCKS5Dialer) dial(address string) !net.Connection

dial initiates a new connection through the SOCKS5 proxy.