proxy

package
v1.70.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 8 Imported by: 8

Documentation

Overview

Package proxy enables SOCKS5 proxy dialling

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPConnectDial added in v1.70.0

func HTTPConnectDial(network, addr string, proxyURL *url.URL, proxyDialer proxy.Dialer) (net.Conn, error)

HTTPConnectDial connects using HTTP CONNECT via proxyDialer

It will read the HTTP proxy address from the environment in the standard way.

It optionally takes a proxyDialer to dial the HTTP proxy server. If nil is passed, it will use the default net.Dialer.

func SOCKS5Dial

func SOCKS5Dial(network, addr, socks5Proxy string, proxyDialer proxy.Dialer) (net.Conn, error)

SOCKS5Dial dials a net.Conn using a SOCKS5 proxy server. The socks5Proxy address can be in the form of [user:password@]host:port, [user@]host:port or just host:port if no auth is required. It will optionally take a proxyDialer to dial the SOCKS5 proxy server. If nil is passed, it will use the default net.Dialer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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