93ba8e9ac2 · 2026-05-04 23:59:48 +02:00
36 Commits
2026-05-04 23:59:48 +02:00
2026-05-04 23:59:48 +02:00
2026-05-04 23:59:48 +02:00
2026-05-04 23:59:48 +02:00
2026-05-04 23:59:48 +02:00
2026-05-04 23:59:48 +02:00
2026-05-04 23:59:48 +02:00
2026-05-04 23:59:48 +02:00

thePlug

Wrapper web per gestire proxy mitmdump davanti ai servizi di una competizione CTF attack/defense.

Struttura

backend/   FastAPI, MongoDB, Redis, mitmdump manager
frontend/  Vue 3, Vite, Monaco editor

Setup rapido

./setup.sh

Lo script crea backend/.env, genera le credenziali mancanti e avvia lo stack Docker completo:

Frontend  http://localhost:5173
Backend   http://localhost:3671

Per installare anche il servizio systemd user:

./setup.sh service

Dev backend

cp backend/.env.example backend/.env
docker compose --env-file backend/.env up -d mongodb redis
npm run dev:backend

Docs FastAPI in dev: http://localhost:3671/docs.

Dev frontend

cd frontend
npm install
npm run dev

Il dev server usa /api come proxy verso http://127.0.0.1:3671.

Test

npm run test

Equivalente a:

cd backend && uv run ruff check . && uv run pytest
cd frontend && npm run build

API principali

  • POST /auth/login
  • POST /auth/logout
  • GET /proxy
  • POST /proxy
  • POST /proxy/{port}/start
  • POST /proxy/{port}/stop
  • POST /proxy/{port}/restart
  • GET /proxy/{port}/health
  • GET /proxy/{port}/logs
  • GET /proxy/mitmproxy/options
  • GET /proxy/mitmproxy/examples

Riferimenti

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