reloia 4fa25355e7 chore: refactor all docker logic files structure
- Implement compose.py with functions to find compose files, list services, and aggregate service info
- Add editor.py for changing service ports with backup support
- Define DockerService model in models.py
- Refactor ports.py to support new port mapping logic and helpers
- Expose Docker Compose utilities in __init__.py
4fa25355e7 · 2026-04-12 19:46:48 +00:00
25 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/login
  • POST /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

MitMProxy examples

S
Description
No description provided
Readme
1.1 MiB
Languages
Python 89.5%
Shell 9.5%
Dockerfile 1%