server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package server implements the otun tunnel server.

Index

Constants

View Source
const (
	// HeartbeatTimeout is how long to wait before considering a client dead.
	HeartbeatTimeout = 90 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the otun tunnel server.

func New

func New(controlAddr, httpsAddr, httpAddr, domain, certDir string, apiKeys []string) *Server

New creates a new tunnel server.

func (*Server) Run

func (s *Server) Run() error

Run starts the server and blocks until an error occurs.

func (*Server) ServeHTTP

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

ServeHTTP implements http.Handler to route incoming HTTP requests to tunnels.

Jump to

Keyboard shortcuts

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