Documentation ¶
Index ¶
- Constants
- func Init(ug *ugate.UGate)
- func InitHandlers(ug *ugate.UGate)
- type MqttServer
- type UGateHandlers
- func (gw *UGateHandlers) HandleID(w http.ResponseWriter, r *http.Request)
- func (gw *UGateHandlers) HttpH2R(w http.ResponseWriter, r *http.Request)
- func (gw *UGateHandlers) HttpNodesFilter(w http.ResponseWriter, r *http.Request)
- func (gw *UGateHandlers) HttpTCP(w http.ResponseWriter, r *http.Request)
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 ¶
Init will configure the core modules. Other files in this package may intialize optional modules
func InitHandlers ¶
Types ¶
type MqttServer ¶
type MqttServer struct { }
type UGateHandlers ¶
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)
Click to show internal directories.
Click to hide internal directories.