I want to create a js challenge like the Cloudfler js challenge to prevent Ddos attacks. when a visitor open the address, he is first transferred to a server with a different IP, and if he confirms the js challenge, he returns to the address again and the contents of the site are executed for him. Can anyone help using with Nginx or anything else? I dont want use cloudflare.
As @user973254 mentioned you can use Nginx-Lua-Anti-DDoS. There is also ngx_http_js_challenge_module which faces some limitations.