Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthFailed = fmt.Errorf("authentication failed")
ErrAuthFailed ...
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
Authenticator ...
type BasicAuthenticator ¶
BasicAuthenticator ...
func (BasicAuthenticator) Valid ¶
func (auth BasicAuthenticator) Valid(user, password string) bool
Valid ...
type CertLoader ¶
type CertLoader interface {
GetCertificate(*tls.ClientHelloInfo) (*tls.Certificate, error)
}
CertLoader ...
func NewFileCertLoader ¶
func NewFileCertLoader(certFile, keyFile string, logger *log.Logger) (CertLoader, error)
NewFileCertLoader returns a CertLoader that reads a certificate file and watches for updates
func NewGeneratedCertLoader ¶
func NewGeneratedCertLoader(name, org string) (CertLoader, error)
NewGeneratedCertLoader returns a CertLoader that supplies a generated certificate
type Client ¶
Client ...
func NewClient ¶
func NewClient(serverAddr string, conf *ClientConfig) (*Client, error)
NewClient returns a new Client
func (*Client) ListenAndServe ¶
ListenAndServe opens a local SOCKS5 port that listens to and transmits requests to the server
type ClientConfig ¶
type ClientConfig struct {
User string
Password string
SkipCertVerify bool
PromptSkipCertVerify func() bool
}
ClientConfig ...
type NilAuthenticator ¶
type NilAuthenticator struct{}
NilAuthenticator ...
func (NilAuthenticator) Valid ¶
func (auth NilAuthenticator) Valid(user, password string) bool
Valid ...
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC ...
func (*RPC) Auth ¶
func (rpc *RPC) Auth(req *AuthRequest, result *AuthResult) error
Auth is an RPC function to authenticate the client
type Server ¶
type Server struct {
Logger *log.Logger
ExternalDNS string
LAN bool
// contains filtered or unexported fields
}
Server ...
func NewServer ¶
func NewServer(auth Authenticator, certLoader CertLoader, logger *log.Logger) (*Server, error)
NewServer returns a new Server
func (*Server) ListenAndServe ¶
ListenAndServe starts listening and serving requests on a given network address
Source Files
¶
Click to show internal directories.
Click to hide internal directories.