Documentation
¶
Overview ¶
This is the whole configurations needed for the server-manager to run. It includes the servers, and variables.
Index ¶
Constants ¶
View Source
const ( // SessionCookieName is the name of the cookie, the session id will be stored in. // Using this to make sure the cookies are not named explicitly to avoid from adavasaries // attempt of stealing cookies. SessionCookieName string = "lothoneId" // SessionPublic is the value of the values that is stored as the public session used for // logining in for and such. Value of NaN is consider public session for session id keys. SessionPublic string = "NaN" // Name of the form field the csrf token will be. CSRFFormFieldName string = "token" // Name of the header the csrf token will be stored in. // Using this to make sure the cookies are not named explicityly to avoid from advasaries // attempt of stealing cookies. CSRFHeaderFieldName string = "token" // Maximum allowed failed attempts for user authentications. MaxFailedAttempts int = 5 // version number of this server. Version string = "v0.4.3-beta" )
Variables ¶
View Source
var ( WebHost *string WebHostRegion *string WebHostIP *string Admins *string WebPort *string WebCert *string WebKey *string V2rayPort *string UserFile *string ConfigFile *string SessionDuration *int LockOutDuration *int GotifyServer *string GotifyAPIKeys []string TemplateBasePath string = "web/templates/" CsrfSecret string CsrfSecretBytes []byte )
Functions ¶
func InitEmbedTemplates ¶
Initialize templates from embedded filesystem
func InitHTTPSServer ¶
InitServer initizlie the HTTPS server returning a multiplexor and the server
func InitHTTPServer ¶
InitServer initizlie the HTTP server returning a multiplexor and the server that will run on port 80
func InitStaticServer ¶
Initialize static file server from embedded filesystem
func InitTemplates ¶
initTemplates function is for initializing the configured templates and storing it inside a map and return it
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.