road to swarm support - needs a lot of testing

This commit is contained in:
bunkerity
2021-03-12 15:17:45 +01:00
parent 816fa47cbb
commit 95f7ca5b2d
19 changed files with 204 additions and 75 deletions

View File

@@ -6,7 +6,6 @@ access_by_lua_block {
local use_whitelist_ip = %USE_WHITELIST_IP%
local use_whitelist_reverse = %USE_WHITELIST_REVERSE%
local use_user_agent = %USE_USER_AGENT%
local whitelist_useragent_list = { %WHITELIST_USERAGENT_LIST% }
local use_referrer = %USE_REFERRER%
local use_country = %USE_COUNTRY%
local use_blacklist_ip = %USE_BLACKLIST_IP%
@@ -19,6 +18,7 @@ local use_antibot_captcha = %USE_ANTIBOT_CAPTCHA%
local use_antibot_recaptcha = %USE_ANTIBOT_RECAPTCHA%
-- include LUA code
local whitelist = require "whitelist"
local blacklist = require "blacklist"
local dnsbl = require "dnsbl"
@@ -27,8 +27,9 @@ local javascript = require "javascript"
local captcha = require "captcha"
local recaptcha = require "recaptcha"
-- antibot
local antibot_uri = "%ANTIBOT_URI%"
-- user variables
local antibot_uri = "%ANTIBOT_URI%"
local whitelist_useragent_list = {%WHITELIST_USERAGENT_LIST%}
-- check if already in whitelist cache
if use_whitelist_ip and whitelist.ip_cached_ok() then