decoy

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package decoy is the neutral static site shown to everyone who is not a Hysteria2 client (or an admin): HTTP/3 masquerade, HTTPS on TCP 443, later the panel's public listener.

It is a plain http.Handler with no state and no Server header. "/" answers 200 with a tiny page; every other path and every method other than GET/HEAD answers the identical 404, so probing cannot tell "unknown path" from "wrong method" from "auth failed".

One fixed page for every install (recognisable across installs). A per-install site bundle pushed from the panel replaces this handler later (engine.Env.Masquerade already takes any http.Handler).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler serves the built-in page on "/" and the identical 404 everywhere else.

func NotFound

func NotFound() http.Handler

NotFound answers every request with the same 404 page (masquerade "none").

Types

This section is empty.

Jump to

Keyboard shortcuts

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