templating - init work on generic settings management
This commit is contained in:
parent
6645632846
commit
698ae17c49
|
@ -0,0 +1,35 @@
|
|||
import json, re
|
||||
|
||||
class Settings :
|
||||
|
||||
def __init__(self) :
|
||||
self.settings = {}
|
||||
self.variables = {}
|
||||
|
||||
def load_settings(self, path) :
|
||||
with open(path, "r") as f :
|
||||
data = json.loads(f.read())
|
||||
for cat in data :
|
||||
for param in data[cat]["params"] :
|
||||
if param["type"] == "multiple" :
|
||||
real_params = param["params"]
|
||||
else :
|
||||
real_params = [param]
|
||||
for real_param in real_params :
|
||||
self.settings[real_param["env"]] = real_param
|
||||
self.settings[real_param["env"]]["category"] = cat
|
||||
|
||||
def load_variables(self, vars, multisite_only=False) :
|
||||
for var, value in vars.items() :
|
||||
if self.__check_var(var, value) :
|
||||
self.variables[var] = value
|
||||
else :
|
||||
print("Problem with " + var + "=" + value)
|
||||
|
||||
def __check_var(self, var, value, multisite_only=False) :
|
||||
real_var = ""
|
||||
if var in self.settings :
|
||||
real_var = var
|
||||
elif var[len(var.split("_")[0])+1:] in self.settings :
|
||||
real_var = var[len(var.split("_")[0])+1:]
|
||||
return real_var != "" and re.search(self.settings[real_var]["regex"], value) and (not multisite_only or self.settings[real_var]["context"] == "multisite")
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from Settings import Settings
|
||||
|
||||
if __name__ == "__main__" :
|
||||
|
||||
my_settings = Settings()
|
||||
my_settings.load_settings("../settings.json")
|
||||
variables = {}
|
||||
variables["MULTISITE"] = "yes"
|
||||
variables["BLOCK_PROXIES"] = "no"
|
||||
variables["omg"] = "lol"
|
||||
my_settings.load_variables(variables)
|
|
@ -0,0 +1,972 @@
|
|||
{
|
||||
"Antibot": {
|
||||
"id": "Antibot",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_ANTIBOT",
|
||||
"id": "use-antibot",
|
||||
"label": "Use antibot",
|
||||
"regex": "^(no|cookie|javascript|captcha|recaptcha)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "/challenge",
|
||||
"env": "ANTIBOT_URI",
|
||||
"id": "antibot-uri",
|
||||
"label": "Antibot uri",
|
||||
"regex": "^/([A-Za-z0-9\\-]/?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "random",
|
||||
"env": "ANTIBOT_SESSION_SECRET",
|
||||
"id": "antibot-session-secret",
|
||||
"label": "Antibot session secret",
|
||||
"regex": "^([\\S]+)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "ANTIBOT_RECAPTCHA_SITEKEY",
|
||||
"id": "antibot-recaptcha-sitekey",
|
||||
"label": "Antibot recaptcha sitekey",
|
||||
"regex": "^([\\S]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "ANTIBOT_RECAPTCHA_SECRET",
|
||||
"id": "antibot-recaptcha-secret",
|
||||
"label": "Antibot recaptcha secret",
|
||||
"regex": "^([\\S]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "0.7",
|
||||
"env": "ANTIBOT_RECAPTCHA_SCORE",
|
||||
"id": "antibot-recaptcha-score",
|
||||
"label": "Antibot recaptcha score",
|
||||
"regex": "^0\\.\\d$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Basic auth": {
|
||||
"id": "auth-basic",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_AUTH_BASIC",
|
||||
"id": "use-auth-basic",
|
||||
"label": "Use auth basic",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "sitewide",
|
||||
"env": "AUTH_BASIC_LOCATION",
|
||||
"id": "auth-basic-location",
|
||||
"label": "Auth basic location",
|
||||
"regex": "^(sitewide|/[A-Za-z0-9/]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "changeme",
|
||||
"env": "AUTH_BASIC_USER",
|
||||
"id": "auth-basic-user",
|
||||
"label": "Auth basic user",
|
||||
"regex": "^([A-Za-z0-9\\-_]+)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "changeme",
|
||||
"env": "AUTH_BASIC_PASSWORD",
|
||||
"id": "auth-basic-password",
|
||||
"label": "Auth basic password",
|
||||
"regex": "^([\\S]+)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "Restricted area",
|
||||
"env": "AUTH_BASIC_TEXT",
|
||||
"id": "auth-basic-text",
|
||||
"label": "Auth basic text",
|
||||
"regex": "^([\\S ]+)$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Blacklist": {
|
||||
"id": "blacklist",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_BLACKLIST_IP",
|
||||
"id": "use-blacklist-ip",
|
||||
"label": "Use blacklist ip",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "BLACKLIST_IP_LIST",
|
||||
"id": "blacklist-ip-list",
|
||||
"label": "Blacklist ip list",
|
||||
"regex": "^(\\d+.\\d+.\\d+.\\d+(/\\d+)? ?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_BLACKLIST_REVERSE",
|
||||
"id": "use-blacklist-reverse",
|
||||
"label": "Use blacklist reverse",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": ".shodan.io",
|
||||
"env": "BLACKLIST_REVERSE_LIST",
|
||||
"id": "blacklist-reverse-list",
|
||||
"label": "Blacklist reverse list",
|
||||
"regex": "^([a-z\\-0-9\\.]+ ?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "global",
|
||||
"default": "",
|
||||
"env": "BLACKLIST_COUNTRY",
|
||||
"id": "blacklist-country",
|
||||
"label": "Blacklist country",
|
||||
"regex": "^([A-Z]{2} ?)*$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Block": {
|
||||
"id": "block",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "BLOCK_USER_AGENT",
|
||||
"id": "block-user-agent",
|
||||
"label": "Block user agent",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "BLOCK_TOR_EXIT_NODE",
|
||||
"id": "block-tor-exit-node",
|
||||
"label": "Block tor exit node",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "BLOCK_PROXIES",
|
||||
"id": "block-proxies",
|
||||
"label": "Block proxies",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "BLOCK_ABUSERS",
|
||||
"id": "block-abusers",
|
||||
"label": "Block abusers",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "BLOCK_REFERRER",
|
||||
"id": "block-referrer",
|
||||
"label": "Block referrer",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Cache": {
|
||||
"id": "cache",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_CLIENT_CACHE",
|
||||
"id": "use-client-cache",
|
||||
"label": "Use client cache",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "jpg|jpeg|png|bmp|ico|svg|tif|css|js|otf|ttf|eot|woff|woff2",
|
||||
"env": "CLIENT_CACHE_EXTENSIONS",
|
||||
"id": "client-cache-extensions",
|
||||
"label": "Client cache extensions",
|
||||
"regex": "^([a-z0-9]\\|?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "public, max-age=15552000",
|
||||
"env": "CLIENT_CACHE_CONTROL",
|
||||
"id": "client-cache-control",
|
||||
"label": "Client cache control",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "on",
|
||||
"env": "CLIENT_CACHE_ETAG",
|
||||
"id": "client-cache-etag",
|
||||
"label": "Client cache etag",
|
||||
"regex": "^(on|off)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_OPEN_FILE_CACHE",
|
||||
"id": "use-open-file-cache",
|
||||
"label": "Use open file cache",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "max=1000 inactive=20s",
|
||||
"env": "OPEN_FILE_CACHE",
|
||||
"id": "open-file-cache",
|
||||
"label": "Open file cache",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "on",
|
||||
"env": "OPEN_FILE_CACHE_ERRORS",
|
||||
"id": "open-file-cache-errors",
|
||||
"label": "Open file cache errors",
|
||||
"regex": "^(on|off)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "2",
|
||||
"env": "OPEN_FILE_CACHE_MIN_USES",
|
||||
"id": "open-file-cache-min-uses",
|
||||
"label": "Open file cache min uses",
|
||||
"regex": "^([1-9]+)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "30s",
|
||||
"env": "OPEN_FILE_CACHE_VALID",
|
||||
"id": "open-file-cache-valid",
|
||||
"label": "Open file cache valid",
|
||||
"regex": "^\\d+(ms|s|m|h|d|w|M|y)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_PROXY_CACHE",
|
||||
"id": "use-proxy-cache",
|
||||
"label": "Use proxy cache",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "10m",
|
||||
"env": "PROXY_CACHE_PATH_ZONE_SIZE",
|
||||
"id": "proxy-cache-path-zone-size",
|
||||
"label": "Proxy cache path zone size",
|
||||
"regex": "^[0-9]+(k|K|m|M|g|G)?$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "max_size=100m",
|
||||
"env": "PROXY_CACHE_PATH_PARAMS",
|
||||
"id": "proxy-cache-path-params",
|
||||
"label": "Proxy cache path params",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "GET HEAD",
|
||||
"env": "PROXY_CACHE_METHODS",
|
||||
"id": "proxy-cache-methods",
|
||||
"label": "Proxy cache methods",
|
||||
"regex": "^((GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|TRACE) ?)+$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "2",
|
||||
"env": "PROXY_CACHE_MIN_USES",
|
||||
"id": "proxy-cache-min-uses",
|
||||
"label": "Proxy cache min uses",
|
||||
"regex": "^([1-9]+)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "\\$scheme\\$host\\$request_uri",
|
||||
"env": "PROXY_CACHE_KEY",
|
||||
"id": "proxy-cache-key",
|
||||
"label": "Proxy cache key",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "200=10m 301=10m 302=1h",
|
||||
"env": "PROXY_CACHE_VALID",
|
||||
"id": "proxy-cache-valid",
|
||||
"label": "Proxy cache valid",
|
||||
"regex": "^(\\d{3}=\\d+(ms|s|m|h|d|w|M|y) ?)+$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "\\$http_authorization",
|
||||
"env": "PROXY_NO_CACHE",
|
||||
"id": "proxy-no-cache",
|
||||
"label": "Proxy no cache",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "\\$http_authorization",
|
||||
"env": "PROXY_CACHE_BYPASS",
|
||||
"id": "proxy-cache-bypass",
|
||||
"label": "Proxy cache bypass",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ClamAV": {
|
||||
"id": "clamav",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_CLAMAV_UPLOAD",
|
||||
"id": "use-clamav-upload",
|
||||
"label": "Use clamav upload",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Compression": {
|
||||
"id": "compression",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_GZIP",
|
||||
"id": "use-gzip",
|
||||
"label": "Use gzip",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "5",
|
||||
"env": "GZIP_COMP_LEVEL",
|
||||
"id": "gzip-comp-level",
|
||||
"label": "Gzip comp level",
|
||||
"regex": "^[1-9]$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "1000",
|
||||
"env": "GZIP_MIN_LENGTH",
|
||||
"id": "gzip-min-length",
|
||||
"label": "Gzip min length",
|
||||
"regex": "^[0-9]+$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml",
|
||||
"env": "GZIP_TYPES",
|
||||
"id": "gzip-types",
|
||||
"label": "Gzip types",
|
||||
"regex": "^([a-z/\\+\\-\\.] ?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_BROTLI",
|
||||
"id": "use-brotli",
|
||||
"label": "Use brotli",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "6",
|
||||
"env": "BROTLI_COMP_LEVEL",
|
||||
"id": "brotli-comp-level",
|
||||
"label": "Brotli comp level",
|
||||
"regex": "^[1-9]$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "1000",
|
||||
"env": "BROTLI_MIN_LENGTH",
|
||||
"id": "brotli-min-length",
|
||||
"label": "Brotli min length",
|
||||
"regex": "^[0-9]+$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml",
|
||||
"env": "BROTLI_TYPES",
|
||||
"id": "brotli-types",
|
||||
"label": "Brotli types",
|
||||
"regex": "^([a-z/\\+\\-\\.] ?)*$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CrowdSec": {
|
||||
"id": "use-crowdsec",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_CROWDSEC",
|
||||
"id": "use-crowdsec",
|
||||
"label": "Use crowdsec",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
}
|
||||
{
|
||||
"context": "global",
|
||||
"default": "",
|
||||
"env": "CROWDSEC_HOST",
|
||||
"id": "crowdsec-host",
|
||||
"label": "CrowdSec host",
|
||||
"regex": "^(https?://[\\S]+:?\\d*)?$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "global",
|
||||
"default": "",
|
||||
"env": "CROWDSEC_KEY",
|
||||
"id": "crowdsec-key",
|
||||
"label": "CrowdSec key",
|
||||
"regex": "^([\\S])*$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DNSBL": {
|
||||
"id": "dnsbl",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_DNSBL",
|
||||
"id": "use-dnsbl",
|
||||
"label": "Use dnsbl",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "bl.blocklist.de problems.dnsbl.sorbs.net sbl.spamhaus.org xbl.spamhaus.org",
|
||||
"env": "DNSBL_LIST",
|
||||
"id": "dnsbl-list",
|
||||
"label": "dnsbl list",
|
||||
"regex": "^([a-z\\-0-9\\.]+ ?)*$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"HTTPS": {
|
||||
"id": "https",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "AUTO_LETS_ENCRYPT",
|
||||
"id": "auto-lets-encrypt",
|
||||
"label": "Auto lets encrypt",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "EMAIL_LETS_ENCRYPT",
|
||||
"id": "email-lets-encrypt",
|
||||
"label": "Email lets encrypt",
|
||||
"regex": "^([a-z0-9\\-\\.]+@([a-z\\-0-9]+\\.?)|.{0})$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "REDIRECT_HTTP_TO_HTTPS",
|
||||
"id": "redirect-http-to-https",
|
||||
"label": "Redirect http to https",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "HTTP2",
|
||||
"id": "http2",
|
||||
"label": "HTTP2",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "TLSv1.2 TLSv1.3",
|
||||
"env": "HTTPS_PROTOCOLS",
|
||||
"id": "https-protocols",
|
||||
"label": "HTTPS protocols",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "LISTEN_HTTP",
|
||||
"id": "listen-http",
|
||||
"label": "Listen http",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Headers": {
|
||||
"id": "headers",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "DENY",
|
||||
"env": "X_FRAME_OPTIONS",
|
||||
"id": "x-frame-options",
|
||||
"label": "X frame options",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "1; mode=block",
|
||||
"env": "X_XSS_PROTECTION",
|
||||
"id": "x-xss-protection",
|
||||
"label": "X xss protection",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "nosniff",
|
||||
"env": "X_CONTENT_TYPE_OPTIONS",
|
||||
"id": "x-content-type-options",
|
||||
"label": "X content type options",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no-referrer",
|
||||
"env": "REFERRER_POLICY",
|
||||
"id": "referrer-policy",
|
||||
"label": "Referrer policy",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vibrate 'none'; vr 'none'",
|
||||
"env": "FEATURE_POLICY",
|
||||
"id": "feature-policy",
|
||||
"label": "Feature policy",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "accelerometer=(), ambient-light-sensor=(), autoplay=(), camera=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), speaker=(), sync-xhr=(), usb=(), vibrate=(), vr=()",
|
||||
"env": "PERMISSIONS_POLICY",
|
||||
"id": "permissions-policy",
|
||||
"label": "Permissions policy",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "* HttpOnly SameSite=Lax",
|
||||
"env": "COOKIE_FLAGS",
|
||||
"id": "cookie-flags",
|
||||
"label": "Cookie flags",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "COOKIE_AUTO_SECURE_FLAG",
|
||||
"id": "cookie-auto-secure-flag",
|
||||
"label": "Cookie auto secure flag",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "max-age=31536000",
|
||||
"env": "STRICT_TRANSPORT_SECURITY",
|
||||
"id": "strict-transport-security",
|
||||
"label": "Strict transport security",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "object-src 'none'; frame-ancestors 'self'; form-action 'self'; block-all-mixed-content; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';",
|
||||
"env": "CONTENT_SECURITY_POLICY",
|
||||
"id": "content-security-policy",
|
||||
"label": "Content security policy",
|
||||
"regex": "^([\\S ]*)$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Info leak": {
|
||||
"id": "info-leak",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "Server X-Powered-By X-AspNet-Version X-AspNetMvc-Version",
|
||||
"env": "REMOVE_HEADERS",
|
||||
"id": "remove-headers",
|
||||
"label": "Remove headers",
|
||||
"regex": "^([A-Za-z0-9\\-] ?)*$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Limit conn": {
|
||||
"id": "limit-conn",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_LIMIT_CONN",
|
||||
"id": "use-limit-conn",
|
||||
"label": "Use limit conn",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "40",
|
||||
"env": "LIMIT_CONN_MAX",
|
||||
"id": "limit-conn-max",
|
||||
"label": "Limit conn max",
|
||||
"regex": "^\\d+$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Limit req": {
|
||||
"id": "limit-req",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_LIMIT_REQ",
|
||||
"id": "use-limit-req",
|
||||
"label": "Use limit req",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "20r/s",
|
||||
"env": "LIMIT_REQ_RATE",
|
||||
"id": "limit-req-rate",
|
||||
"label": "Limit req rate",
|
||||
"regex": "^\\d+r/(ms|s|m|h|d)$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "40",
|
||||
"env": "LIMIT_REQ_BURST",
|
||||
"id": "limit-req-burst",
|
||||
"label": "Limit req burst",
|
||||
"regex": "^\\d+$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Misc": {
|
||||
"id": "misc",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "www.bunkerity.com",
|
||||
"env": "SERVER_NAME",
|
||||
"id": "server-name",
|
||||
"label": "Server name",
|
||||
"regex": "^([a-z\\-0-9]+\\.?)+$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "10m",
|
||||
"env": "MAX_CLIENT_SIZE",
|
||||
"id": "max-client-size",
|
||||
"label": "Max client size",
|
||||
"regex": "^[0-9]+(k|K|m|M|g|G)?$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "GET|POST|HEAD",
|
||||
"env": "ALLOWED_METHODS",
|
||||
"id": "allowed-methods",
|
||||
"label": "Allowed methods",
|
||||
"regex": "^((GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|TRACE)\\|?)+$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "SERVE_FILES",
|
||||
"id": "serve-files",
|
||||
"label": "Serve files",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ModSecurity": {
|
||||
"id": "modsecurity",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_MODSECURITY",
|
||||
"id": "use-modsecurity",
|
||||
"label": "Use modsecurity",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_MODSECURITY_CRS",
|
||||
"id": "use-modsecurity-crs",
|
||||
"label": "Use modsecurity crs",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PHP": {
|
||||
"id": "php",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "REMOTE_PHP",
|
||||
"id": "remote-php",
|
||||
"label": "Remote php",
|
||||
"regex": "^([a-z\\-0-9]+\\.?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "/app",
|
||||
"env": "REMOTE_PHP_PATH",
|
||||
"id": "remote-php-path",
|
||||
"label": "Remote php path",
|
||||
"regex": "^/([A-Za-z0-9\\-]/?)*$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Reverse proxy": {
|
||||
"id": "reverse-proxy",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "USE_REVERSE_PROXY",
|
||||
"id": "use-reverse-proxy",
|
||||
"label": "Use reverse proxy",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"id": "reverse-proxy-params",
|
||||
"label": "Reverse proxy",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "REVERSE_PROXY_URL",
|
||||
"id": "reverse-proxy-url",
|
||||
"label": "Reverse proxy url",
|
||||
"multiple": "Reverse proxy",
|
||||
"regex": ".*",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "REVERSE_PROXY_HOST",
|
||||
"id": "reverse-proxy-host",
|
||||
"label": "Reverse proxy host",
|
||||
"multiple": "Reverse proxy",
|
||||
"regex": ".*",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "REVERSE_PROXY_WS",
|
||||
"id": "reverse-proxy-ws",
|
||||
"label": "Reverse proxy ws",
|
||||
"multiple": "Reverse proxy",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "REVERSE_PROXY_HEADERS",
|
||||
"id": "reverse-proxy-headers",
|
||||
"label": "Reverse proxy custom headers",
|
||||
"multiple": "Reverse proxy",
|
||||
"regex": ".*",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "multiple"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "no",
|
||||
"env": "PROXY_REAL_IP",
|
||||
"id": "proxy-real-ip",
|
||||
"label": "Proxy real ip",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "192.168.0.0/16 172.16.0.0/12 10.0.0.0/8",
|
||||
"env": "PROXY_REAL_IP_FROM",
|
||||
"id": "proxy-real-ip-from",
|
||||
"label": "Proxy real ip from",
|
||||
"regex": "^(\\d+.\\d+.\\d+.\\d+(/\\d+)? ?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "X-Forwarded-For",
|
||||
"env": "PROXY_REAL_IP_HEADER",
|
||||
"id": "proxy-real-ip-header",
|
||||
"label": "Proxy real ip header",
|
||||
"regex": "^([A-Za-z0-9\\-])+$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "on",
|
||||
"env": "PROXY_REAL_IP_RECURSIVE",
|
||||
"id": "proxy-real-ip-recursive",
|
||||
"label": "Proxy real ip recursive",
|
||||
"regex": "^(on|off)$",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Whitelist": {
|
||||
"id": "whitelist",
|
||||
"params": [
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_WHITELIST_IP",
|
||||
"id": "use-whitelist-ip",
|
||||
"label": "Use whitelist ip",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "yes",
|
||||
"env": "USE_WHITELIST_REVERSE",
|
||||
"id": "use-whitelist-reverse",
|
||||
"label": "Use whitelist reverse",
|
||||
"regex": "^(yes|no)$",
|
||||
"type": "checkbox"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "WHITELIST_COUNTRY",
|
||||
"id": "whitelist-country",
|
||||
"label": "Whitelist country",
|
||||
"regex": "^([A-Z]{2} ?)*$",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"env": "WHITELIST_USER_AGENT",
|
||||
"id": "whitelist-user-agent",
|
||||
"label": "Whitelist user agent",
|
||||
"regex": ".*",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
820
ui/config.json
820
ui/config.json
|
@ -1,820 +0,0 @@
|
|||
{
|
||||
"Misc":{
|
||||
"id":"misc",
|
||||
"params":[
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Server name",
|
||||
"env":"SERVER_NAME",
|
||||
"regex":"^([a-z\\-0-9]+\\.?)+$",
|
||||
"id":"server-name",
|
||||
"default":"www.bunkerity.com"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Max client size",
|
||||
"env":"MAX_CLIENT_SIZE",
|
||||
"regex":"^[0-9]+(k|K|m|M|g|G)?$",
|
||||
"id":"max-client-size",
|
||||
"default":"10m"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Allowed methods",
|
||||
"env":"ALLOWED_METHODS",
|
||||
"regex":"^((GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|TRACE)\\|?)+$",
|
||||
"id":"allowed-methods",
|
||||
"default":"GET|POST|HEAD"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Serve files",
|
||||
"env":"SERVE_FILES",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"serve-files",
|
||||
"default":"yes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Info leak":{
|
||||
"id":"info-leak",
|
||||
"params":[
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Remove headers",
|
||||
"env":"REMOVE_HEADERS",
|
||||
"regex":"^([A-Za-z0-9\\-] ?)*$",
|
||||
"id":"remove-headers",
|
||||
"default":"Server X-Powered-By X-AspNet-Version X-AspNetMvc-Version"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Basic auth":{
|
||||
"id":"auth-basic",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use auth basic",
|
||||
"env":"USE_AUTH_BASIC",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-auth-basic",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Auth basic location",
|
||||
"env":"AUTH_BASIC_LOCATION",
|
||||
"regex":"^(sitewide|/[A-Za-z0-9/]*)$",
|
||||
"id":"auth-basic-location",
|
||||
"default":"sitewide"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Auth basic user",
|
||||
"env":"AUTH_BASIC_USER",
|
||||
"regex":"^([A-Za-z0-9\\-_]+)$",
|
||||
"id":"auth-basic-user",
|
||||
"default":"changeme"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Auth basic password",
|
||||
"env":"AUTH_BASIC_PASSWORD",
|
||||
"regex":"^([\\S]+)$",
|
||||
"id":"auth-basic-password",
|
||||
"default":"changeme"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Auth basic text",
|
||||
"regex":"^([\\S ]+)$",
|
||||
"env":"AUTH_BASIC_TEXT",
|
||||
"id":"auth-basic-text",
|
||||
"default":"Restricted area"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Reverse proxy":{
|
||||
"id":"reverse-proxy",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use reverse proxy",
|
||||
"env":"USE_REVERSE_PROXY",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-reverse-proxy",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"multiple",
|
||||
"label":"Reverse proxy",
|
||||
"id":"reverse-proxy-params",
|
||||
"params":[
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Reverse proxy url",
|
||||
"env":"REVERSE_PROXY_URL",
|
||||
"regex":".*",
|
||||
"id":"reverse-proxy-url",
|
||||
"multiple":"Reverse proxy",
|
||||
"default":""
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Reverse proxy host",
|
||||
"env":"REVERSE_PROXY_HOST",
|
||||
"regex":".*",
|
||||
"id":"reverse-proxy-host",
|
||||
"multiple":"Reverse proxy",
|
||||
"default":""
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Reverse proxy ws",
|
||||
"env":"REVERSE_PROXY_WS",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"reverse-proxy-ws",
|
||||
"multiple":"Reverse proxy",
|
||||
"default":""
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Reverse proxy custom headers",
|
||||
"env":"REVERSE_PROXY_HEADERS",
|
||||
"regex":".*",
|
||||
"id":"reverse-proxy-headers",
|
||||
"multiple":"Reverse proxy",
|
||||
"default":""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Proxy real ip",
|
||||
"env":"PROXY_REAL_IP",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"proxy-real-ip",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy real ip from",
|
||||
"env":"PROXY_REAL_IP_FROM",
|
||||
"regex":"^(\\d+.\\d+.\\d+.\\d+(/\\d+)? ?)*$",
|
||||
"id":"proxy-real-ip-from",
|
||||
"default":"192.168.0.0/16 172.16.0.0/12 10.0.0.0/8"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy real ip header",
|
||||
"env":"PROXY_REAL_IP_HEADER",
|
||||
"regex":"^([A-Za-z0-9\\-])+$",
|
||||
"id":"proxy-real-ip-header",
|
||||
"default":"X-Forwarded-For"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy real ip recursive",
|
||||
"env":"PROXY_REAL_IP_RECURSIVE",
|
||||
"regex":"^(on|off)$",
|
||||
"id":"proxy-real-ip-recursive",
|
||||
"default":"on"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Compression":{
|
||||
"id":"compression",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use gzip",
|
||||
"env":"USE_GZIP",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-gzip",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Gzip comp level",
|
||||
"env":"GZIP_COMP_LEVEL",
|
||||
"regex":"^[1-9]$",
|
||||
"id":"gzip-comp-level",
|
||||
"default":"5"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Gzip min length",
|
||||
"env":"GZIP_MIN_LENGTH",
|
||||
"regex":"^[0-9]+$",
|
||||
"id":"gzip-min-length",
|
||||
"default":"1000"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Gzip types",
|
||||
"env":"GZIP_TYPES",
|
||||
"regex":"^([a-z/\\+\\-\\.] ?)*$",
|
||||
"id":"gzip-types",
|
||||
"default":"application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use brotli",
|
||||
"env":"USE_BROTLI",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-brotli",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Brotli comp level",
|
||||
"env":"BROTLI_COMP_LEVEL",
|
||||
"regex":"^[1-9]$",
|
||||
"id":"brotli-comp-level",
|
||||
"default":"6"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Brotli min length",
|
||||
"env":"BROTLI_MIN_LENGTH",
|
||||
"regex":"^[0-9]+$",
|
||||
"id":"brotli-min-length",
|
||||
"default":"1000"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Brotli types",
|
||||
"env":"BROTLI_TYPES",
|
||||
"regex":"^([a-z/\\+\\-\\.] ?)*$",
|
||||
"id":"brotli-types",
|
||||
"default":"application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Cache":{
|
||||
"id":"cache",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use client cache",
|
||||
"env":"USE_CLIENT_CACHE",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-client-cache",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Client cache extensions",
|
||||
"env":"CLIENT_CACHE_EXTENSIONS",
|
||||
"regex":"^([a-z0-9]\\|?)*$",
|
||||
"id":"client-cache-extensions",
|
||||
"default":"jpg|jpeg|png|bmp|ico|svg|tif|css|js|otf|ttf|eot|woff|woff2"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Client cache control",
|
||||
"env":"CLIENT_CACHE_CONTROL",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"client-cache-control",
|
||||
"default":"public, max-age=15552000"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Client cache etag",
|
||||
"env":"CLIENT_CACHE_ETAG",
|
||||
"regex":"^(on|off)$",
|
||||
"id":"client-cache-etag",
|
||||
"default":"on"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use open file cache",
|
||||
"env":"USE_OPEN_FILE_CACHE",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-open-file-cache",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Open file cache",
|
||||
"env":"OPEN_FILE_CACHE",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"open-file-cache",
|
||||
"default":"max=1000 inactive=20s"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Open file cache errors",
|
||||
"env":"OPEN_FILE_CACHE_ERRORS",
|
||||
"regex":"^(on|off)$",
|
||||
"id":"open-file-cache-errors",
|
||||
"default":"on"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Open file cache min uses",
|
||||
"env":"OPEN_FILE_CACHE_MIN_USES",
|
||||
"regex":"^([1-9]+)$",
|
||||
"id":"open-file-cache-min-uses",
|
||||
"default":"2"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Open file cache valid",
|
||||
"env":"OPEN_FILE_CACHE_VALID",
|
||||
"regex":"^\\d+(ms|s|m|h|d|w|M|y)$",
|
||||
"id":"open-file-cache-valid",
|
||||
"default":"30s"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use proxy cache",
|
||||
"env":"USE_PROXY_CACHE",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-proxy-cache",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy cache path zone size",
|
||||
"env":"PROXY_CACHE_PATH_ZONE_SIZE",
|
||||
"regex":"^[0-9]+(k|K|m|M|g|G)?$",
|
||||
"id":"proxy-cache-path-zone-size",
|
||||
"default":"10m"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy cache path params",
|
||||
"env":"PROXY_CACHE_PATH_PARAMS",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"proxy-cache-path-params",
|
||||
"default":"max_size=100m"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy cache methods",
|
||||
"env":"PROXY_CACHE_METHODS",
|
||||
"regex":"^((GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|TRACE) ?)+$",
|
||||
"id":"proxy-cache-methods",
|
||||
"default":"GET HEAD"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy cache min uses",
|
||||
"env":"PROXY_CACHE_MIN_USES",
|
||||
"regex":"^([1-9]+)$",
|
||||
"id":"proxy-cache-min-uses",
|
||||
"default":"2"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy cache key",
|
||||
"env":"PROXY_CACHE_KEY",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"proxy-cache-key",
|
||||
"default":"\\$scheme\\$host\\$request_uri"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy cache valid",
|
||||
"env":"PROXY_CACHE_VALID",
|
||||
"regex":"^(\\d{3}=\\d+(ms|s|m|h|d|w|M|y) ?)+$",
|
||||
"id":"proxy-cache-valid",
|
||||
"default":"200=10m 301=10m 302=1h"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy no cache",
|
||||
"env":"PROXY_NO_CACHE",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"proxy-no-cache",
|
||||
"default":"\\$http_authorization"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Proxy cache bypass",
|
||||
"env":"PROXY_CACHE_BYPASS",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"proxy-cache-bypass",
|
||||
"default":"\\$http_authorization"
|
||||
}
|
||||
]
|
||||
},
|
||||
"HTTPS":{
|
||||
"id":"https",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Auto lets encrypt",
|
||||
"env":"AUTO_LETS_ENCRYPT",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"auto-lets-encrypt",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Email lets encrypt",
|
||||
"env":"EMAIL_LETS_ENCRYPT",
|
||||
"regex":"^([a-z0-9\\-\\.]+@([a-z\\-0-9]+\\.?)|.{0})$",
|
||||
"id":"email-lets-encrypt",
|
||||
"default":""
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Redirect http to https",
|
||||
"env":"REDIRECT_HTTP_TO_HTTPS",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"redirect-http-to-https",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"HTTP2",
|
||||
"env":"HTTP2",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"http2",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"HTTPS protocols",
|
||||
"env":"HTTPS_PROTOCOLS",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"https-protocols",
|
||||
"default":"TLSv1.2 TLSv1.3"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Listen http",
|
||||
"env":"LISTEN_HTTP",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"listen-http",
|
||||
"default":"yes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ModSecurity":{
|
||||
"id":"modsecurity",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use modsecurity",
|
||||
"env":"USE_MODSECURITY",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-modsecurity",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use modsecurity crs",
|
||||
"env":"USE_MODSECURITY_CRS",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-modsecurity-crs",
|
||||
"default":"yes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Headers":{
|
||||
"id":"headers",
|
||||
"params":[
|
||||
{
|
||||
"type":"text",
|
||||
"label":"X frame options",
|
||||
"env":"X_FRAME_OPTIONS",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"x-frame-options",
|
||||
"default":"DENY"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"X xss protection",
|
||||
"env":"X_XSS_PROTECTION",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"x-xss-protection",
|
||||
"default":"1; mode=block"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"X content type options",
|
||||
"env":"X_CONTENT_TYPE_OPTIONS",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"x-content-type-options",
|
||||
"default":"nosniff"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Referrer policy",
|
||||
"env":"REFERRER_POLICY",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"referrer-policy",
|
||||
"default":"no-referrer"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Feature policy",
|
||||
"env":"FEATURE_POLICY",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"feature-policy",
|
||||
"default":"accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; display-capture 'none'; document-domain 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vibrate 'none'; vr 'none'"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Permissions policy",
|
||||
"env":"PERMISSIONS_POLICY",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"permissions-policy",
|
||||
"default":"accelerometer=(), ambient-light-sensor=(), autoplay=(), camera=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), speaker=(), sync-xhr=(), usb=(), vibrate=(), vr=()"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Cookie flags",
|
||||
"env":"COOKIE_FLAGS",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"cookie-flags",
|
||||
"default":"* HttpOnly SameSite=Lax"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Cookie auto secure flag",
|
||||
"env":"COOKIE_AUTO_SECURE_FLAG",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"cookie-auto-secure-flag",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Strict transport security",
|
||||
"env":"STRICT_TRANSPORT_SECURITY",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"strict-transport-security",
|
||||
"default":"max-age=31536000"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Content security policy",
|
||||
"env":"CONTENT_SECURITY_POLICY",
|
||||
"regex":"^([\\S ]*)$",
|
||||
"id":"content-security-policy",
|
||||
"default":"object-src 'none'; frame-ancestors 'self'; form-action 'self'; block-all-mixed-content; sandbox allow-forms allow-same-origin allow-scripts allow-popups; base-uri 'self';"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Antibot":{
|
||||
"id":"Antibot",
|
||||
"params":[
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Use antibot",
|
||||
"env":"USE_ANTIBOT",
|
||||
"regex":"^(no|cookie|javascript|captcha|recaptcha)$",
|
||||
"id":"use-antibot",
|
||||
"default":"no"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Antibot uri",
|
||||
"env":"ANTIBOT_URI",
|
||||
"regex":"^/([A-Za-z0-9\\-]/?)*$",
|
||||
"id":"antibot-uri",
|
||||
"default":"/challenge"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Antibot session secret",
|
||||
"env":"ANTIBOT_SESSION_SECRET",
|
||||
"regex":"^([\\S]+)$",
|
||||
"id":"antibot-session-secret",
|
||||
"default":"random"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Antibot recaptcha score",
|
||||
"env":"ANTIBOT_RECAPTCHA_SCORE",
|
||||
"regex":"^0\\.\\d$",
|
||||
"id":"antibot-recaptcha-score",
|
||||
"default":"0.7"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Block":{
|
||||
"id":"block",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Block user agent",
|
||||
"env":"BLOCK_USER_AGENT",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"block-user-agent",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Block tor exit node",
|
||||
"env":"BLOCK_TOR_EXIT_NODE",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"block-tor-exit-node",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Block proxies",
|
||||
"env":"BLOCK_PROXIES",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"block-proxies",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Block abusers",
|
||||
"env":"BLOCK_ABUSERS",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"block-abusers",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Block referrer",
|
||||
"env":"BLOCK_REFERRER",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"block-referrer",
|
||||
"default":"yes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"DNSBL":{
|
||||
"id":"dnsbl",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use dnsbl",
|
||||
"env":"USE_DNSBL",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-dnsbl",
|
||||
"default":"yes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CrowdSec":{
|
||||
"id":"use-crowdsec",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use crowdsec",
|
||||
"env":"USE_CROWDSEC",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-crowdsec",
|
||||
"default":"no"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Whitelist":{
|
||||
"id":"whitelist",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use whitelist ip",
|
||||
"env":"USE_WHITELIST_IP",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-whitelist-ip",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use whitelist reverse",
|
||||
"env":"USE_WHITELIST_REVERSE",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-whitelist-reverse",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Whitelist country",
|
||||
"env":"WHITELIST_COUNTRY",
|
||||
"regex":"^([A-Z]{2} ?)*$",
|
||||
"id":"whitelist-country",
|
||||
"default":""
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Whitelist user agent",
|
||||
"env":"WHITELIST_USER_AGENT",
|
||||
"regex":".*",
|
||||
"id":"whitelist-user-agent",
|
||||
"default":""
|
||||
}
|
||||
]
|
||||
},
|
||||
"Blacklist":{
|
||||
"id":"blacklist",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use blacklist ip",
|
||||
"env":"USE_BLACKLIST_IP",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-blacklist-ip",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use blacklist reverse",
|
||||
"env":"USE_BLACKLIST_REVERSE",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-blacklist-reverse",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Blacklist country",
|
||||
"env":"BLACKLIST_COUNTRY",
|
||||
"regex":"^([A-Z]{2} ?)*$",
|
||||
"id":"blacklist-country",
|
||||
"default":""
|
||||
}
|
||||
]
|
||||
},
|
||||
"Limit conn":{
|
||||
"id":"limit-conn",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use limit conn",
|
||||
"env":"USE_LIMIT_CONN",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-limit-conn",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Limit conn max",
|
||||
"env":"LIMIT_CONN_MAX",
|
||||
"regex":"^\\d+$",
|
||||
"id":"limit-conn-max",
|
||||
"default":"40"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Limit req":{
|
||||
"id":"limit-req",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use limit req",
|
||||
"env":"USE_LIMIT_REQ",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-limit-req",
|
||||
"default":"yes"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Limit req rate",
|
||||
"env":"LIMIT_REQ_RATE",
|
||||
"regex":"^\\d+r/(ms|s|m|h|d)$",
|
||||
"id":"limit-req-rate",
|
||||
"default":"20r/s"
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Limit req burst",
|
||||
"env":"LIMIT_REQ_BURST",
|
||||
"regex":"^\\d+$",
|
||||
"id":"limit-req-burst",
|
||||
"default":"40"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PHP":{
|
||||
"id":"php",
|
||||
"params":[
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Remote php",
|
||||
"env":"REMOTE_PHP",
|
||||
"regex":"^([a-z\\-0-9]+\\.?)*$",
|
||||
"id":"remote-php",
|
||||
"default":""
|
||||
},
|
||||
{
|
||||
"type":"text",
|
||||
"label":"Remote php path",
|
||||
"env":"REMOTE_PHP_PATH",
|
||||
"regex":"^/([A-Za-z0-9\\-]/?)*$",
|
||||
"id":"remote-php-path",
|
||||
"default":"/app"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ClamAV":{
|
||||
"id":"clamav",
|
||||
"params":[
|
||||
{
|
||||
"type":"checkbox",
|
||||
"label":"Use clamav upload",
|
||||
"env":"USE_CLAMAV_UPLOAD",
|
||||
"regex":"^(yes|no)$",
|
||||
"id":"use-clamav-upload",
|
||||
"default":"yes"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue