transport

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrType

type AddrType byte
const (
	IPv4   AddrType = 1
	IPv6   AddrType = 2
	Domain AddrType = 3
)

type ConnectionContinuationHandler

type ConnectionContinuationHandler interface {
	CreateConnection(accessAddr *SocketAddress) (net.Conn, error)
	ForwardConnection(srcRWC io.ReadWriteCloser, accessAddr *SocketAddress) error
}

type HTTPSOCKSAuthInfo added in v0.1.1

type HTTPSOCKSAuthInfo struct {
	Username string
	Password string
}

func (*HTTPSOCKSAuthInfo) IsEmpty added in v0.1.1

func (authInfo *HTTPSOCKSAuthInfo) IsEmpty() bool

func (*HTTPSOCKSAuthInfo) NotEqual added in v0.1.1

func (authInfo *HTTPSOCKSAuthInfo) NotEqual(anotherAuthInfo *HTTPSOCKSAuthInfo) bool

func (*HTTPSOCKSAuthInfo) NotEqual2 added in v0.1.1

func (authInfo *HTTPSOCKSAuthInfo) NotEqual2(username, password string) bool

type SocketAddress

type SocketAddress struct {
	IP     *netip.Addr
	Domain string
	Port   uint16

	AddrType AddrType
}

func NewSocketAddressByDomain

func NewSocketAddressByDomain(domain string, port uint16) *SocketAddress

func NewSocketAddressByIP

func NewSocketAddressByIP(ip *netip.Addr, port uint16) *SocketAddress

func ToSocketAddr

func ToSocketAddr(host string, requirePort bool, defaultPort uint16) (*SocketAddress, error)

func ToSocketAddrFromNetworkAddr

func ToSocketAddrFromNetworkAddr(network, host string) (*SocketAddress, error)

func (*SocketAddress) ToHostStr

func (addr *SocketAddress) ToHostStr() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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