proxy

package module
v0.0.0-...-2888410 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 12 Imported by: 3

README

SOCKS Proxy

SOCKS4, SOCKS4A, SOCKS5 proxy server and client

Features

  • SOCKS4
  • SOCKS4A
  • SOCKS5
  • SOCKS5 with TLS

References

https://www.openssh.com/txt/socks4.protocol

https://www.openssh.com/txt/socks4a.protocol

https://tools.ietf.org/html/rfc1928

https://tools.ietf.org/html/rfc1929

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSOCKS

func IsSOCKS(r io.Reader) bool

func Serve

func Serve(listener net.Listener, conf *SOCKSConf)

Types

type Client

type Client interface {
	Dial(network, address string) (net.Conn, error)
}

func NewClient

func NewClient(proxy *url.URL, conf *SOCKSConf) (client Client, err error)

type SOCKSConf

type SOCKSConf struct {
	Auth        func(username, password string) bool
	Dial        func(network, address string) (net.Conn, error)
	HandleError func(error)
	TLSConfig   *tls.Config
}

Jump to

Keyboard shortcuts

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