Documentation ¶
Overview ¶
Package socks5 implements a socks5 proxy.
Index ¶
- Constants
- func NewSocks5Dialer(s string, d proxy.Dialer) (proxy.Dialer, error)
- func NewSocks5Server(s string, p proxy.Proxy) (proxy.Server, error)
- type PktConn
- type Socks5
- func (s *Socks5) Addr() string
- func (s *Socks5) Dial(network, addr string) (net.Conn, error)
- func (s *Socks5) DialUDP(network, addr string) (pc net.PacketConn, writeTo net.Addr, err error)
- func (s *Socks5) ListenAndServe()
- func (s *Socks5) ListenAndServeTCP()
- func (s *Socks5) ListenAndServeUDP()
- func (s *Socks5) Serve(c net.Conn)
Constants ¶
View Source
const Version = 5
Version is socks5 version number.
Variables ¶
This section is empty.
Functions ¶
func NewSocks5Dialer ¶
NewSocks5Dialer returns a socks5 proxy dialer.
Types ¶
type PktConn ¶
type PktConn struct { net.PacketConn // contains filtered or unexported fields }
PktConn .
func NewPktConn ¶
func NewPktConn(c net.PacketConn, writeAddr net.Addr, tgtAddr socks.Addr, tgtHeader bool, ctrlConn net.Conn) *PktConn
NewPktConn returns a PktConn
type Socks5 ¶ added in v0.8.1
type Socks5 struct {
// contains filtered or unexported fields
}
Socks5 is a base socks5 struct.
func NewSocks5 ¶ added in v0.8.1
NewSocks5 returns a Proxy that makes SOCKS v5 connections to the given address with an optional username and password. (RFC 1928)
func (*Socks5) Dial ¶ added in v0.8.1
Dial connects to the address addr on the network net via the SOCKS5 proxy.
func (*Socks5) ListenAndServe ¶ added in v0.8.1
func (s *Socks5) ListenAndServe()
ListenAndServe serves socks5 requests.
func (*Socks5) ListenAndServeTCP ¶ added in v0.8.1
func (s *Socks5) ListenAndServeTCP()
ListenAndServeTCP listen and serve on tcp port.
func (*Socks5) ListenAndServeUDP ¶ added in v0.8.1
func (s *Socks5) ListenAndServeUDP()
ListenAndServeUDP serves udp requests.
Click to show internal directories.
Click to hide internal directories.