socks

package
v0.0.0-...-75a46ef Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectCommand = uint8(1)

	NoAuth = uint8(0)
)

****** The following is from https://github.com/armon/go-socks5 *****

View Source
const (
	SuccessReply uint8 = iota
	ServerFailure
	RuleFailure
	NetworkUnreachable
	HostUnreachable
	ConnectionRefused
	TtlExpired
	CommandNotSupported
	AddrTypeNotSupported
)

Variables

This section is empty.

Functions

func Run

func Run(task structs.Task, fromMythicSocksChannel chan structs.SocksMsg, toMythicSocksChannel chan structs.SocksMsg)

func SendReply

func SendReply(w io.Writer, resp uint8, addr *AddrSpec) []byte

Types

type AddrSpec

type AddrSpec struct {
	FQDN string
	IP   net.IP
	Port int
}

func ReadAddrSpec

func ReadAddrSpec(r io.Reader) (*AddrSpec, error)

****** The following is from https://github.com/armon/go-socks5 *****

func (AddrSpec) Address

func (a AddrSpec) Address() string

type AuthContext

type AuthContext struct {
	// Provided auth method
	Method uint8
	// Payload provided during negotiation.
	// Keys depend on the used auth method.
	// For UserPassauth contains Username
	Payload map[string]string
}

type Request

type Request struct {
	// Protocol version
	Version uint8
	// Requested command
	Command uint8
	// AuthContext provided during negotiation
	AuthContext *AuthContext
	// AddrSpec of the the network that sent the request
	RemoteAddr *AddrSpec
	// AddrSpec of the desired destination
	DestAddr *AddrSpec
	BufConn  io.Reader
}

Jump to

Keyboard shortcuts

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