"ddos challenge" style script #4

Open
luna wants to merge 20 commits from claude/ddos-protection-challenge-01CMAtrK6Dt24x9Q3v6Gz9fS into mistress
Showing only changes of commit 4cbd4e04ad - Show all commits

View file

@ -27,6 +27,9 @@ local function createMockSharedDict()
end
function TestDDoSProtectionChallenge:setup()
-- First reset ngx to get the base ngx object
resetNgx()
-- Create mock shared dictionaries
ngx.shared = {
aproxy_bans = createMockSharedDict(),
@ -206,6 +209,9 @@ end
TestDDoSProtectionChallengePaths = {}
function TestDDoSProtectionChallengePaths:setup()
-- First reset ngx to get the base ngx object
resetNgx()
-- Create mock shared dictionaries
ngx.shared = {
aproxy_bans = createMockSharedDict(),
@ -352,6 +358,9 @@ end
TestDDoSProtectionChallengeQuestion = {}
function TestDDoSProtectionChallengeQuestion:setup()
-- First reset ngx to get the base ngx object
resetNgx()
ngx.shared = {
aproxy_bans = createMockSharedDict(),
aproxy_tokens = createMockSharedDict()
@ -464,6 +473,9 @@ end
TestDDoSProtectionChallengePow = {}
function TestDDoSProtectionChallengePow:setup()
-- First reset ngx to get the base ngx object
resetNgx()
ngx.shared = {
aproxy_bans = createMockSharedDict(),
aproxy_tokens = createMockSharedDict()