webteleport

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmailContext = "webteleport"
View Source
var EmailName = "btwiuse"
View Source
var EmailSuffix = "gmail.com"

Functions

func IsWebTeleportRequest

func IsWebTeleportRequest(r *http.Request) bool

IsWebTeleportRequest tells if the incoming request should be treated as UFO request

An UFO request must meet all criteria:

- r.Proto == "webtransport" - r.Method == "CONNECT" - origin (r.Host without port) matches HOST

if all true, it will be upgraded into a webtransport session otherwise the request will be handled by DefaultSessionManager

func NewServer

func NewServer(next http.Handler) *webtransport.Server

func NewServerTLS added in v0.1.10

func NewServerTLS(next http.Handler, tlsConfig *tls.Config) *webtransport.Server

func ParseDomainCandidates

func ParseDomainCandidates(p string) []string

ParseDomainCandidates splits a path string like /a/b/cd/😏 into a list of subdomains: [a, b, cd, 😏]

when result is empty, a random subdomain will be assigned by the server

Types

type WebTeleportServer

type WebTeleportServer struct {
	*webtransport.Server
	Next http.Handler
}

WebTeleport is a HTTP/3 server that handles: - UFO client registration (CONNECT HOST) - requests over HTTP/3 (others)

func (*WebTeleportServer) ServeHTTP

func (s *WebTeleportServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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