httpredirect

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger func(string, ...interface{})

Logger is a function interface that can be used for logging

type RedirectServer

type RedirectServer struct {
	Status             int
	Destination        string
	IncludeRequest     bool
	BlockOCSP          bool
	FakeInternetAccess bool
	Logger             Logger
	// contains filtered or unexported fields
}

RedirectServer is a simple HTTP server that is used for serving captive portal or https redirects

func NewHTTPRedirect

func NewHTTPRedirect() *RedirectServer

NewHTTPRedirect creates a new RedirectServer

func (*RedirectServer) ListenAndServe

func (s *RedirectServer) ListenAndServe(addr string) error

ListenAndServe starts the redirect server

Jump to

Keyboard shortcuts

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