server

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: AGPL-3.0 Imports: 47 Imported by: 0

Documentation

Overview

Package server implements the public-facing masquerade router and the hidden admin panel mounted under the secret path.

Request routing (first match wins):

  • /<secret>/... → admin panel (login + authed API + SPA)
  • everything else → decoy site (identical 404 for unknown paths)

The only observable difference in the whole surface is gated behind the ~128-bit secret segment, compared in constant time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(mgr *core.Manager, secret, decoyTemplate, dataDir string) (http.Handler, error)

New builds the masquerade router for the given secret path and decoy template.

Types

type Router

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

Router is the top-level HTTP handler. The secret path, SPA shell and decoy can be swapped at runtime (from the settings page) without restarting.

func (*Router) ServeHTTP

func (rt *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP routes by the first path segment: the secret unlocks the panel, anything else falls through to the decoy.

Jump to

Keyboard shortcuts

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