Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { ListeningProtocol string `json:"protocol" validate:"required"` //The protocol the agent uses to communicate to users ListeningAddress string `json:"address" validate:"required,ipv4"` //Address to listen on (127.0.0.1, 0.0.0.0, etc.) ListeningPort string `json:"port" validate:"required,number,gt=0,lt=65536"` //Port to listen on ForbiddenPagePath string `json:"forbiddenPagePath" validate:"required"` //Forbidden page location BlacklistUserAgentPath string `json:"blacklistUserAgentPath" validate:"required"` //Path to the wordlist of banned User-Agents ForwardServerProtocol string `json:"forwardServerProtocol" validate:"required"` //Protocol used when forwarding request to webserver ForwardServerAddress string `json:"forwardServerAddress" validate:"required,ipv4"` //Address of the webserver to send the request to ForwardServerPort string `json:"forwardServerPort" validate:"required,number,gt=0,lt=65536"` //Port to forward the request to APIProtocol string `json:"apiProtocol"` //API protocol APIIpAddress string `json:"apiIpAddress"` //API ip address APIPort string `json:"apiPort"` //API port UUID string `json:"uuid"` //The UUID of the agent, received after registration to the API RulesDirectory string `json:"rulesDirectory"` //The directory where rules can be found OperationMode string `json:"operationMode" validate:"required,oneof_insensitive=testing waf adaptive"` //The mode the agent will operate on (can be testing, waf, adaptive) - case insensitive }
Structure that will hold the configuration parameters of the proxy
func (*Configuration) FromJSON ¶
func (conf *Configuration) FromJSON(r io.Reader) error
Convert from json into the configuration structure
func (*Configuration) LoadConfigurationFromFile ¶
func (conf *Configuration) LoadConfigurationFromFile(filePath string) error
Load the configuration from a file
Click to show internal directories.
Click to hide internal directories.