# ip-manager **Repository Path**: dsdasun/ip-manager ## Basic Information - **Project Name**: ip-manager - **Description**: ip 黑白名单管理 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-24 - **Last Updated**: 2026-06-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # IP Manager IP Blacklist/Whitelist Manager for OpenResty + Redis. A Flask-based web admin panel for managing IP access control lists. ## Project Structure ``` ip-manager/ ├── app.py # App entry point ├── config/ # Configuration ├── extensions/ # Extensions (logging) ├── middleware/ # Middleware (access log) ├── routes/ # Route handlers ├── services/ # Business logic (Redis) ├── utils/ # Utilities (IP validation) ├── templates/ # HTML templates ├── deploy/ # Docker & deployment files ├── logs/ # Log output directory └── Jenkinsfile # CI/CD pipeline ``` ## Quick Start ```bash cd deploy docker compose up -d ``` Open `http://localhost:8888`, login with `admin` / password from `.env`. ## OpenResty Integration Place `deploy/ip_acl.lua` in your OpenResty instance: ```nginx access_by_lua_file /path/to/ip_acl.lua; ``` The Lua script calls `/api/internal/check?ip=x` to check each request. ## API Endpoints | Method | Path | Description | Auth | |--------|------|-------------|------| | GET | `/` | Admin panel | Session | | POST | `/api/login` | Get token | - | | GET | `/api/list?type=blacklist` | List IPs | Token | | POST | `/api/add` | Add IP | Token | | POST | `/api/delete` | Delete IP | Token | | POST | `/api/check` | Query IP status | Token | | GET | `/api/internal/check?ip=x` | OpenResty lookup | - | | GET | `/api/health` | Health check | - | ## CI/CD Jenkinsfile included for automated deployment pipeline.