Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
/* user name to authenticate. If empty, no authentication */
Username string `json:"username"`
/* hash of the password. Use revproxyhashry to hash it */
PasswordHash string `json:"password_hash"`
}
Auth represents an authentication by a tuple (username, password hash).
type Config ¶
type Config struct {
Auths map[string]*Auth `json:"auths"`
Domain string `json:"domain"`
Routes []Route `json:"routes"`
SslKeyPath string `json:"ssl_key_path"`
SslCertPath string `json:"ssl_cert_path"`
LetsencryptDir string `json:"letsencrypt_dir"`
HttpAddress string `json:"http_address"`
HttpsAddress string `json:"https_address"`
}
Config represents a parsed config JSON file.
type Route ¶
type Route struct {
/* Route prefix */
Prefix string `json:"prefix"`
/*
path to the target.
If a directory, everything beneath it will be served beneath the prefix.
If an URL, redirects to that URL after stripping the prefix.
*/
Target string `json:"target"`
AuthIDs []string `json:"auths"`
}
Route represents a route of a reverse proxy.
Click to show internal directories.
Click to hide internal directories.