f9e33e2847a26f61810fb948b9956a66e1e40e38
Build and Push to Registry / build (push) Successful in 29s
- Rename DockerService to DockerContainer and add folder attribute - Move proxy-related modules (models, validator) to services.mitmproxy - Update imports and references to new module locations - Refactor Docker utilities to use DockerContainer and improve service discovery - Add manager.py with create_proxy utility stub - Initialize discovered Docker services at app startup and warn if none found
f9e33e2847
·
2026-04-13 00:24:20 +02:00
30 Commits
thePlug - plugger/proxy Barese
icona di una presa della spina idk
Architettura
FastAPI + MongoDB + Redis
Setup Dev
imposta le variabili d'ambiente
cp .env.example .env
# modifica le variabili
nano .env
variabili auth richieste in .env:
JWT_SECRET_KEY=change-this-secret
JWT_ALGORITHM=HS256
JWT_EXPIRE_MINUTES=30
AUTH_USERNAME=admin
AUTH_PASSWORD=change-this-password
avvia i servizi e il server locale
docker compose up -d mongodb redis
fastapi dev app/main.py
accedi a FastAPI su: FastAPI docs
Auth API
Gli endpoint auth disponibili sono solo:
POST /auth/loginPOST /auth/logout
Esempio login:
curl -X POST http://localhost:3671/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"change-this-password"}'
L'access token ottenuto va inviato come bearer token:
curl http://localhost:3671/proxy \
-H "Authorization: Bearer <ACCESS_TOKEN>"
Esempio logout (revoca server-side del token):
curl -X POST http://localhost:3671/auth/logout \
-H "Authorization: Bearer <ACCESS_TOKEN>"
Documentazione per Sviluppo
Languages
Python
89.5%
Shell
9.5%
Dockerfile
1%