socks4

package
v0.0.0-...-4392c52 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package socks4 provides SOCKS4/SOCKS4A client functionalities.

Index

Constants

View Source
const Version = 0x04

Variables

View Source
var (
	ErrRequestRejected         = errors.New("request rejected or failed")
	ErrRequestIdentdFailed     = errors.New("request rejected because SOCKS server cannot connect to identd on the client")
	ErrRequestIdentdMismatched = errors.New("request rejected because the client program and identd report different user-ids")
	ErrRequestUnknownCode      = errors.New("request failed with unknown code")
)

Functions

func ClientHandshake

func ClientHandshake(rw io.ReadWriter, addr string, command Command, userID string) (err error)

Types

type Code

type Code = uint8
const (
	RequestGranted          Code = 90
	RequestRejected         Code = 91
	RequestIdentdFailed     Code = 92
	RequestIdentdMismatched Code = 93
)

type Command

type Command = uint8
const (
	CmdConnect Command = 0x01
	CmdBind    Command = 0x02
)

Jump to

Keyboard shortcuts

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