feat: added mirrors for go and for golang image and change the name gate to proxy
This commit is contained in:
16
README.md
16
README.md
@@ -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 |
|
||||
|--------|------|-------------|
|
||||
|
||||
Reference in New Issue
Block a user