Skip to content

Ensure that only legitimate users can access the API

Notifications You must be signed in to change notification settings

iquping/SecureAPIProxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureAPIProxy

SecureAPIProxy is an efficient and reliable API protection system designed to prevent malicious attacks and ensure that only legitimate users can access your API.

Features

  • User Authentication: Authenticate users using UUID and token stored in Redis.
  • Request Verification: Check the request token; if invalid, return 403 and log the failure. After three failures, add the IP to the Redis blacklist for 24 hours.
  • IP Blacklisting: Add IPs with repeated failures to a Redis blacklist, blocking them for 24 hours.
  • Secure Forwarding: Forward valid requests to the real API with a specific OAuth header.
  • Real-time Sync: Use MySQL Binlog to sync user data to Redis in real-time.

Project Structure

SecureAPIProxy/
├── README.md
├── docker-compose.yml
├── nginx/
│   ├── Dockerfile
│   ├── nginx.conf
│   └── lua/
│       └── check_token.lua
├── sync/
│   ├── Dockerfile
│   └── binlog_to_redis.go
└── init/
    ├── init.sql
    └── Dockerfile

Getting Started

  1. Clone the Repository
git clone https://github.com/yourusername/SecureAPIProxy.git
cd SecureAPIProxy
  1. Build and Start the Services
docker-compose up --build

About

Ensure that only legitimate users can access the API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published