tyVpnProtocol

package
v0.0.0-...-f254aa5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Mtu = 1460 - (overheadEncrypt + overheadVpnHeader + overheadIpHeader + overheadUdpHeader)
	Mss = Mtu - (overheadTcpHeaderMax - overheadUdpHeader)
)
View Source
const (
	CmdData      byte = 1
	CmdForward   byte = 2
	CmdHandshake byte = 3
	CmdPing      byte = 4
	CmdKeepAlive byte = 5
)
View Source
const Debug = false
View Source
const DebugInternalConnection = false
View Source
const PublicRouteServerAddr = "35.223.105.46:24587"
View Source
const VpnPort = 29444

Variables

This section is empty.

Functions

func GetClientId

func GetClientId(index int) uint64

func NewInternalConnectionDual

func NewInternalConnectionDual(closeFnLeft func(), closeFnRight func()) (rBwA net.Conn, rAwB net.Conn)

Types

type VpnPacket

type VpnPacket struct {
	Cmd              byte
	ClientIdSender   uint64
	ClientIdReceiver uint64
	Data             []byte
}

func (*VpnPacket) Decode

func (packet *VpnPacket) Decode(buf []byte) error

func (*VpnPacket) Encode

func (packet *VpnPacket) Encode(buf *udwBytes.BufWriter) (n int)

func (*VpnPacket) Reset

func (packet *VpnPacket) Reset()

Jump to

Keyboard shortcuts

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