ufo

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 12 Imported by: 0

README

ufo

go.dev reference License Visitors

$ go install github.com/webteleport/ufo/cmd/ufo@latest

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTimeout = 5 * time.Second
View Source
var WWW embed.FS

Functions

func Serve

func Serve(stationURL string, handler http.Handler) error

func WellKnownHealthMiddleware added in v0.1.4

func WellKnownHealthMiddleware(next http.Handler) http.Handler

Types

type AugmentedHandler added in v0.0.3

type AugmentedHandler interface {
	http.Handler
	PkgPath() string
}

type LoginMiddleware

type LoginMiddleware struct {
	// set login password
	// empty value removes password check
	Password string
	// optional, fallback to "UFOSID" if empty
	SessionKey string
	// optional, fallback to "password" if empty
	PasswordKey string
	// contains filtered or unexported fields
}

func (*LoginMiddleware) AddSessionId

func (lm *LoginMiddleware) AddSessionId(id string)

func (*LoginMiddleware) HasSessionId

func (lm *LoginMiddleware) HasSessionId(id string) bool

func (*LoginMiddleware) IsLocalhost

func (lm *LoginMiddleware) IsLocalhost(r *http.Request) bool

func (*LoginMiddleware) IsPasswordRequired

func (lm *LoginMiddleware) IsPasswordRequired() bool

func (*LoginMiddleware) IsValidLogin

func (lm *LoginMiddleware) IsValidLogin(r *http.Request) bool

func (*LoginMiddleware) IsValidSession

func (lm *LoginMiddleware) IsValidSession(r *http.Request) bool

func (*LoginMiddleware) RedirectToLogin

func (lm *LoginMiddleware) RedirectToLogin(w http.ResponseWriter, r *http.Request)

func (*LoginMiddleware) SetCookiesAndRedirect

func (lm *LoginMiddleware) SetCookiesAndRedirect(w http.ResponseWriter, r *http.Request)

func (*LoginMiddleware) Wrap

func (lm *LoginMiddleware) Wrap(next http.Handler) http.Handler

PrecheckAccessToken returns a bool that indicates whether the caller should continue

Directories

Path Synopsis
apps
dl
gos
hdr
nc
so
it doesn't work:
it doesn't work:
sows
$ websocat tcp-listen:0.0.0.0:3000 --binary wss://35.ufo.k0s.io -E $ export HTTP_PROXY=http://127.0.0.1:3000 HTTPS_PROXY=http://127.0.0.1:3000 $ curl -v http://google.com $ curl -v https://google.com
$ websocat tcp-listen:0.0.0.0:3000 --binary wss://35.ufo.k0s.io -E $ export HTTP_PROXY=http://127.0.0.1:3000 HTTPS_PROXY=http://127.0.0.1:3000 $ curl -v http://google.com $ curl -v https://google.com
sse
who
only works when using curl.
only works when using curl.
cmd
ufo command

Jump to

Keyboard shortcuts

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