socks4

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Version is socks4 version number.
	Version = 4
	// ConnectCommand connect command byte
	ConnectCommand = 1
)

Variables

This section is empty.

Functions

func NewSocks4Dialer

func NewSocks4Dialer(s string, dialer proxy.Dialer) (proxy.Dialer, error)

NewSocks4Dialer returns a socks4 proxy dialer.

Types

type SOCKS4

type SOCKS4 struct {
	// contains filtered or unexported fields
}

SOCKS4 is a base socks4 struct.

func NewSOCKS4

func NewSOCKS4(s string, dialer proxy.Dialer) (*SOCKS4, error)

NewSOCKS4 returns a socks4 proxy.

func (*SOCKS4) Addr

func (s *SOCKS4) Addr() string

Addr returns forwarder's address.

func (*SOCKS4) Dial

func (s *SOCKS4) Dial(network, addr string) (net.Conn, error)

Dial connects to the address addr on the network net via the SOCKS4 proxy.

func (*SOCKS4) DialUDP

func (s *SOCKS4) DialUDP(network, addr string) (pc net.PacketConn, writeTo net.Addr, err error)

DialUDP connects to the given address via the proxy.

Jump to

Keyboard shortcuts

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