feat: added mirrors for go and for golang image and change the name gate to proxy

This commit is contained in:
db123-test
2026-05-04 10:49:44 +03:30
parent b094c78318
commit 7a2bd72311
11 changed files with 62 additions and 58 deletions

View File

@@ -1,6 +1,6 @@
# auth-gate
# auth-proxy
A lightweight Go auth gateway that sits in front of sensitive services (phpMyAdmin, Gitea,
A lightweight Go auth proxyway that sits in front of sensitive services (phpMyAdmin, Gitea,
uptime kuma) and provides:
- IP-based whitelisting (permanent and temporary via REST API with TTL, stored in SQLite)
@@ -9,22 +9,22 @@ uptime kuma) and provides:
## Architecture
```
Client ──NGINX auth_request──► auth-gate ──► allow / deny
Client ──NGINX auth_request──► auth-proxy ──► allow / deny
```
NGINX calls auth-gate as an internal subrequest. On 200 the original request proceeds.
NGINX calls auth-proxy as an internal subrequest. On 200 the original request proceeds.
On 401/403 NGINX returns the response to the client. Whitelisted IPs never see auth.
## Build
```bash
go build -o auth-gate .
go build -o auth-proxy .
```
## Docker
```bash
docker build -t yejayekhoob/auth-gate:latest .
docker build -t yejayekhoob/auth-proxy:latest .
```
## Quick start
@@ -35,12 +35,12 @@ cp .env.example .env
vim .env
# Start
./auth-gate
./auth-proxy
```
## API
The API requires a bearer token set via `AUTH_GATE_API_TOKEN`. All endpoints return `401 Unauthorized` if the token is missing or invalid.
The API requires a bearer token set via `AUTH_PROXY_API_TOKEN`. All endpoints return `401 Unauthorized` if the token is missing or invalid.
| Method | Path | Description |
|--------|------|-------------|