No description
Find a file
2025-02-08 01:18:07 -05:00
tests Initial commit 2025-02-07 21:05:18 -05:00
.gitignore Initial commit 2025-02-07 21:05:18 -05:00
asn_blacklist sync asn_blacklist 2025-02-08 01:18:07 -05:00
auth.lua Initial commit 2025-02-07 21:05:18 -05:00
blacklist_asn blacklist_asn: Remove 'AS' prefix if present 2025-02-07 21:49:30 -05:00
config.example.lua Initial commit 2025-02-07 21:05:18 -05:00
init.lua Initial commit 2025-02-07 21:05:18 -05:00
LICENSE Add README and LICENSE 2025-02-07 21:35:40 -05:00
maxmind.lua Initial commit 2025-02-07 21:05:18 -05:00
README.md Add README and LICENSE 2025-02-07 21:35:40 -05:00
test.lua Initial commit 2025-02-07 21:05:18 -05:00

resty-whitelister

OpenResty scripts used at Computernewb to check if an IP is anonymous using various tests

Dependencies

Configuration

Copy config.example.lua to config.lua and fill out the necessary fields.

NGINX Configuration

http {
    # (...)

    # Needed for resty.http to work
    resolver 1.1.1.1;
    lua_ssl_trusted_certificate /etc/ssl/cert.pem;

    # Change if whitelister is not at /opt/lua/whitelister
    init_by_lua_file /opt/lua/whitelister/init.lua;

    server {
        # (...)
        location /whitelister/ {
            # Change if whitelister is not at /opt/lua/whitelister
         content_by_lua_file /opt/lua/whitelister/auth.lua;
        }

        location /protected/ {
            auth_request /whitelister/;
        }
    }

Credits

Written by Elijah R and Lily Tsuru