samtunnelhandler

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: AGPL-3.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCSS

func DefaultCSS() string

func DefaultJS

func DefaultJS() string

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

func GenerateRandomString

func GenerateRandomString(s int) (string, error)

func ReadFile

func ReadFile(filename string) (string, error)

Types

type Credentials

type Credentials struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

Create a struct that models the structure of a user, both in the request body, and in the DB

type TunnelHandlerMux

type TunnelHandlerMux struct {
	http.Server
	// contains filtered or unexported fields
}

func NewTunnelHandlerMux

func NewTunnelHandlerMux(host, port, user, password, css, javascript string) *TunnelHandlerMux

func (*TunnelHandlerMux) Append

func (*TunnelHandlerMux) CSS

func (*TunnelHandlerMux) CheckCookie

func (m *TunnelHandlerMux) CheckCookie(w http.ResponseWriter, r *http.Request) bool

func (*TunnelHandlerMux) ClientTunnels

func (t *TunnelHandlerMux) ClientTunnels() []*VPNTunnelHandler

func (*TunnelHandlerMux) ColorHeader

func (m *TunnelHandlerMux) ColorHeader(h http.Handler, r *http.Request, w http.ResponseWriter)

func (*TunnelHandlerMux) HandlerWrapper

func (m *TunnelHandlerMux) HandlerWrapper(h http.Handler) http.Handler

func (*TunnelHandlerMux) Home

func (*TunnelHandlerMux) JS

func (*TunnelHandlerMux) ListenAndServe

func (m *TunnelHandlerMux) ListenAndServe()

func (*TunnelHandlerMux) ServerTunnels

func (t *TunnelHandlerMux) ServerTunnels() []*VPNTunnelHandler

func (*TunnelHandlerMux) Signin

func (m *TunnelHandlerMux) Signin(w http.ResponseWriter, r *http.Request)

func (*TunnelHandlerMux) Tunnels

func (t *TunnelHandlerMux) Tunnels() []*VPNTunnelHandler

type VPNTunnelHandler

type VPNTunnelHandler struct {
	*samtunnelhandler.TunnelHandler
}

func NewTunnelHandler

func NewTunnelHandler(ob samtunnel.SAMTunnel, err error) (*VPNTunnelHandler, error)

func (*VPNTunnelHandler) Printdivf

func (t *VPNTunnelHandler) Printdivf(id, key, value string, rw http.ResponseWriter, req *http.Request)

func (*VPNTunnelHandler) ServeHTTP

func (t *VPNTunnelHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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