ugated

package module
v0.0.0-...-8ac4b46 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 37 Imported by: 1

README

Conditional compilation modules

To plugin extra protocols, add a small adapter in this directory.

If it needs more code - a package with separate go.mod can be used.

If the integration has complex dependencies or is specific to a platform - it can just be imported from specialized main() apps. GVisor/LWIP for TUN support are examples.

Documentation

Index

Constants

View Source
const (
	PORT_IPTABLES    = 1
	PORT_IPTABLES_IN = 6
	PORT_SOCKS       = 5
	PORT_DNS         = 3
	// SNI and HTTP could share the same port - would also
	// reduce missconfig risks
	PORT_HTTP_PROXY = 2

	// TLS/SNI, HTTPS (no client certs)
	PORT_HTTPS = 4

	// H2, HTTPS, H2R
	PORT_BTS = 7

	// H2C
	PORT_BTSC = 8

	PORT_MQTT = 9
)

Variables

This section is empty.

Functions

func Init

func Init(ug *ugate.UGate)

Init will configure the core modules. Other files in this package may intialize optional modules

func InitHandlers

func InitHandlers(ug *ugate.UGate)

Types

type MqttServer

type MqttServer struct {
}

type UGateHandlers

type UGateHandlers struct {
	UGate *ugate.UGate
	// contains filtered or unexported fields
}

func (*UGateHandlers) HandleID

func (gw *UGateHandlers) HandleID(w http.ResponseWriter, r *http.Request)

HandleID is the first request in a MUX connection.

If the request is authenticated, we'll track the node. For QUIC, mTLS handshake completes after 0RTT requests are received, so JWT is needed.

func (*UGateHandlers) HttpH2R

func (gw *UGateHandlers) HttpH2R(w http.ResponseWriter, r *http.Request)

func (*UGateHandlers) HttpNodesFilter

func (gw *UGateHandlers) HttpNodesFilter(w http.ResponseWriter, r *http.Request)

HttpNodesFilter returns the list of directly connected nodes.

Optional 't' parameter is a timestamp used to filter recently seen nodes. Uses NodeByID table.

func (*UGateHandlers) HttpTCP

func (gw *UGateHandlers) HttpTCP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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