Documentation
¶
Index ¶
- Variables
- func Serve(stationURL string, handler http.Handler) error
- type AugmentedHandler
- type LoginMiddleware
- func (lm *LoginMiddleware) AddSessionId(id string)
- func (lm *LoginMiddleware) HasSessionId(id string) bool
- func (lm *LoginMiddleware) IsLocalhost(r *http.Request) bool
- func (lm *LoginMiddleware) IsPasswordRequired() bool
- func (lm *LoginMiddleware) IsValidLogin(r *http.Request) bool
- func (lm *LoginMiddleware) IsValidSession(r *http.Request) bool
- func (lm *LoginMiddleware) RedirectToLogin(w http.ResponseWriter, r *http.Request)
- func (lm *LoginMiddleware) SetCookiesAndRedirect(w http.ResponseWriter, r *http.Request)
- func (lm *LoginMiddleware) Wrap(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTimeout = 5 * time.Second
View Source
var WWW embed.FS
Functions ¶
Types ¶
type AugmentedHandler ¶ added in v0.0.3
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)
Directories
¶
| Path | Synopsis |
|---|---|
|
apps
|
|
|
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 |
|
cmd
|
|
|
ufo
command
|
Click to show internal directories.
Click to hide internal directories.