Documentation
¶
Overview ¶
Package configuration implements plugin Config, default Config values and validation param functions.
Index ¶
Constants ¶
View Source
const ( AloneMode = "alone" StreamMode = "stream" LiveMode = "live" NoneMode = "none" AppsecMode = "appsec" HTTPS = "https" HTTP = "http" HcaptchaProvider = "hcaptcha" RecaptchaProvider = "recaptcha" TurnstileProvider = "turnstile" )
Enums for crowdsec mode.
Variables ¶
This section is empty.
Functions ¶
func GetHTMLTemplate ¶
GetHTMLTemplate get compiled HTML template.
func GetTLSConfigCrowdsec ¶
GetTLSConfigCrowdsec get TLS config from Config.
func GetVariable ¶
GetVariable get variable from file and after in the variables gave by user.
func ValidateParams ¶
ValidateParams validate all the param gave by user.
Types ¶
type Config ¶
type Config struct { Enabled bool `json:"enabled,omitempty"` LogLevel string `json:"logLevel,omitempty"` CrowdsecMode string `json:"crowdsecMode,omitempty"` CrowdsecAppsecEnabled bool `json:"crowdsecAppsecEnabled,omitempty"` CrowdsecAppsecHost string `json:"crowdsecAppsecHost,omitempty"` CrowdsecAppsecPath string `json:"crowdsecAppsecPath,omitempty"` CrowdsecAppsecFailureBlock bool `json:"crowdsecAppsecFailureBlock,omitempty"` CrowdsecAppsecUnreachableBlock bool `json:"crowdsecAppsecUnreachableBlock,omitempty"` CrowdsecLapiScheme string `json:"crowdsecLapiScheme,omitempty"` CrowdsecLapiHost string `json:"crowdsecLapiHost,omitempty"` CrowdsecLapiKey string `json:"crowdsecLapiKey,omitempty"` CrowdsecLapiKeyFile string `json:"crowdsecLapiKeyFile,omitempty"` CrowdsecLapiTLSInsecureVerify bool `json:"crowdsecLapiTlsInsecureVerify,omitempty"` CrowdsecLapiTLSCertificateAuthority string `json:"crowdsecLapiTlsCertificateAuthority,omitempty"` CrowdsecLapiTLSCertificateAuthorityFile string `json:"crowdsecLapiTlsCertificateAuthorityFile,omitempty"` CrowdsecLapiTLSCertificateBouncer string `json:"crowdsecLapiTlsCertificateBouncer,omitempty"` CrowdsecLapiTLSCertificateBouncerFile string `json:"crowdsecLapiTlsCertificateBouncerFile,omitempty"` CrowdsecLapiTLSCertificateBouncerKey string `json:"crowdsecLapiTlsCertificateBouncerKey,omitempty"` CrowdsecLapiTLSCertificateBouncerKeyFile string `json:"crowdsecLapiTlsCertificateBouncerKeyFile,omitempty"` CrowdsecCapiMachineID string `json:"crowdsecCapiMachineId,omitempty"` CrowdsecCapiMachineIDFile string `json:"crowdsecCapiMachineIdFile,omitempty"` CrowdsecCapiPassword string `json:"crowdsecCapiPassword,omitempty"` CrowdsecCapiPasswordFile string `json:"crowdsecCapiPasswordFile,omitempty"` CrowdsecCapiScenarios []string `json:"crowdsecCapiScenarios,omitempty"` UpdateIntervalSeconds int64 `json:"updateIntervalSeconds,omitempty"` UpdateMaxFailure int `json:"updateMaxFailure,omitempty"` DefaultDecisionSeconds int64 `json:"defaultDecisionSeconds,omitempty"` HTTPTimeoutSeconds int64 `json:"httpTimeoutSeconds,omitempty"` RemediationHeadersCustomName string `json:"remediationHeadersCustomName,omitempty"` ForwardedHeadersCustomName string `json:"forwardedHeadersCustomName,omitempty"` ForwardedHeadersTrustedIPs []string `json:"forwardedHeadersTrustedIps,omitempty"` ClientTrustedIPs []string `json:"clientTrustedIps,omitempty"` RedisCacheEnabled bool `json:"redisCacheEnabled,omitempty"` RedisCacheHost string `json:"redisCacheHost,omitempty"` RedisCachePassword string `json:"redisCachePassword,omitempty"` RedisCachePasswordFile string `json:"redisCachePasswordFile,omitempty"` RedisCacheDatabase string `json:"redisCacheDatabase,omitempty"` BanHTMLFilePath string `json:"banHtmlFilePath,omitempty"` CaptchaHTMLFilePath string `json:"captchaHtmlFilePath,omitempty"` CaptchaProvider string `json:"captchaProvider,omitempty"` CaptchaSiteKey string `json:"captchaSiteKey,omitempty"` CaptchaSiteKeyFile string `json:"captchaSiteKeyFile,omitempty"` CaptchaSecretKey string `json:"captchaSecretKey,omitempty"` CaptchaSecretKeyFile string `json:"captchaSecretKeyFile,omitempty"` CaptchaGracePeriodSeconds int64 `json:"captchaGracePeriodSeconds,omitempty"` }
Config the plugin configuration.
Click to show internal directories.
Click to hide internal directories.