protocol

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "0.3.0"

	AuthMethod         protocol.ID = "/awl/" + Version + "/auth/"
	GetStatusMethod    protocol.ID = "/awl/" + Version + "/status/"
	TunnelPacketMethod protocol.ID = "/awl/" + Version + "/tunnel/"
)

Variables

This section is empty.

Functions

func ReadUint64

func ReadUint64(stream io.Reader) (uint64, error)

func SendAuth

func SendAuth(stream io.Writer, authPeer AuthPeer) error

func SendAuthResponse

func SendAuthResponse(stream io.Writer, response AuthPeerResponse) error

func SendStatus

func SendStatus(stream io.Writer, statusInfo PeerStatusInfo) error

func WriteUint64

func WriteUint64(stream io.Writer, number uint64) error

Types

type AuthPeer

type AuthPeer struct {
	Name string
}

func ReceiveAuth

func ReceiveAuth(stream io.Reader) (AuthPeer, error)

type AuthPeerResponse

type AuthPeerResponse struct {
	Confirmed bool
	Declined  bool
}

func ReceiveAuthResponse

func ReceiveAuthResponse(stream io.Reader) (AuthPeerResponse, error)

type PeerStatusInfo

type PeerStatusInfo struct {
	Name                 string
	Declined             bool
	AllowUsingAsExitNode bool
}

func ReceiveStatus

func ReceiveStatus(stream io.Reader) (PeerStatusInfo, error)

Jump to

Keyboard shortcuts

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