package
Version:
v1.5.1
Opens a new window with list of versions in this module.
Published: Apr 22, 2023
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
GetIP returns the real visitor IP for the request.
type Client struct {
ID string `toml:"id"`
Secret string `toml:"secret"`
Hostname string `toml:"hostname"`
}
type Config struct {
Server Server `toml:"server"`
Clients []Client `toml:"clients"`
Network Network `toml:"network"`
BaseURL string `toml:"base_url"`
BasePath string `toml:"base_path"`
}
LoadConfig loads the configuration.
type Network struct {
Subnets []string `toml:"subnets"`
}
type Server struct {
Host string `toml:"host"`
WriteTimeout int `toml:"write_timeout"`
ReadTimeout int `toml:"read_timeout"`
TLS bool `toml:"tls"`
TLSCert string `toml:"tls_cert"`
TLSKey string `toml:"tls_key"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.