handler

package
v0.4.3-beta Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountCreatePOST

func AccountCreatePOST(w http.ResponseWriter, r *http.Request)

AccountCreatePOST is to create an new user account and add it to the v2ray server configuration file.

func AccountDeletePOST

func AccountDeletePOST(w http.ResponseWriter, r *http.Request)

func AccountEditPOST

func AccountEditPOST(w http.ResponseWriter, r *http.Request)

func AdminDashboardGET

func AdminDashboardGET(w http.ResponseWriter, r *http.Request)

AdminDashboardGET is to show the admin dashboard.

func AdminLoginGET

func AdminLoginGET(sessionStore data.SessionStore) http.HandlerFunc

AdminLoginGET is to show the admin login page.

func AdminLoginPOST

func AdminLoginPOST(sessionStore data.SessionStore, userLocker *utils.LockedOutRateLimiter) http.HandlerFunc

AdminLoginPOST is a handler for logging into the admin dashboard.

func ApologyHandler

func ApologyHandler(w http.ResponseWriter, r *http.Request)

ApologyHandler is to handle for the undefind paths with an apology.

func DefaultHandler

func DefaultHandler(w http.ResponseWriter, r *http.Request)

DefaultHandler is to handle all routes and redirect to the main page.

func Hello

func Hello(w http.ResponseWriter, r *http.Request)

added easter egg

func RedirectToHTTPSHandler

func RedirectToHTTPSHandler(w http.ResponseWriter, r *http.Request)

func ServerIPHandlerGET

func ServerIPHandlerGET(w http.ResponseWriter, r *http.Request)

func ServerRestartPOST

func ServerRestartPOST(w http.ResponseWriter, r *http.Request)

ServerRestartPOST handles to restart the v2ray server when invoked with correct password.

Types

type RestartRequest

type RestartRequest struct {
	AdminUsername string `json:"adminUsername"`
	AdminPassword string `json:"adminPassword"`
}

Request body structure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳