socks

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package socks offers socks parsing operations.

Index

Constants

View Source
const (
	CONNECT      byte = 1
	BIND         byte = 2
	UDPASSOCIATE byte = 3
)

SOCKS request commands as defined in rfc1928.

Variables

This section is empty.

Functions

func ToPacketPort

func ToPacketPort(s string) ([]byte, error)

ToPacketPort converts a port string to integer in packet byte order.

Types

type Packet

type Packet []byte

Packet type represents the raw data.

func (Packet) ReadIPv4

func (p Packet) ReadIPv4(i int) string

ReadIPv4 reads a IPv4 string from the packet.

func (Packet) ReadIPv6

func (p Packet) ReadIPv6(i int) string

ReadIPv6 reads a IPv6 string from the packet.

func (Packet) ReadPort

func (p Packet) ReadPort(i int) string

ReadPort reads the port into a string.

func (Packet) ReadString4a

func (p Packet) ReadString4a(i int) (string, int)

ReadString4a reads a string from the socket4a packet.

func (Packet) ReadString5

func (p Packet) ReadString5(i int) string

ReadString5 reads a string from the socket5 packet.

Jump to

Keyboard shortcuts

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