Send a toolbox through an encrypted link
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 20m39s
Validate and deploy Sokko G / deploy (push) Successful in 12s

Sharing a toolbox meant exporting a JSON file and passing it around by
hand. A toolbox can now be sent from the site while staying local first:
the browser compresses and encrypts the v2 export with AES-GCM, and the
key lives only in the link fragment, so the server keeps for at most
24 hours a copy it cannot read.

- Add the /api/shares service: upload, metadata, download and revoke,
  with files in SHARES_DIR, a purge every 10 minutes, and single-use
  links (the default) deleted only once fully downloaded.
- Cap the server load: 50 MiB per share, total storage, free disk
  space, daily volume, concurrent and stalled uploads, reads per link,
  plus a wide per-connection cap kept in memory without storing IPs.
- Limit each browser to 2 shares and 100 MiB per day and 2 active
  links, and show the existing link of a toolbox already shared.
- Add the send dialog (card and game drawer) and the /receive page,
  which previews or directly imports through the existing import path.
- Move shared HTTP helpers to services/http.js for both APIs.
- Document the format, delivery, server layout and privacy wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-11 16:26:05 +01:00
parent 957bfdc86f
commit bec9ea5b2f
43 changed files with 2349 additions and 59 deletions

View file

@ -321,3 +321,11 @@
{"id":"int-c17c3702be7114f750b1f97592c4142c","kind":"field_change","created_at":"2026-11-09T12:23:33.595084433Z","actor":"Shinuwa","issue_id":"sokko-g-3ijw","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
{"id":"int-e910f5b4c041480fb8e708c515e62f6d","kind":"field_change","created_at":"2026-11-11T14:02:45.210027976Z","actor":"Shinuwa","issue_id":"sokko-g-0ku7","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Associations orphelines écartées au chargement, à l'export et à l'import global ; le fichier .local/sokkog-global-2026-11-11.json s'importe (3 toolboxes, 24 outils)."}}
{"id":"int-f91a8b7bc318291bfa072ad6cff3b328","kind":"field_change","created_at":"2026-11-11T14:11:39.343142458Z","actor":"Shinuwa","issue_id":"sokko-g-ocss","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"mutateToolboxStorage retire dans la même transaction toute association vers une toolbox absente ; removeOrphanLinks nettoie la base au chargement ; linkToolboxToGame ignore une toolbox absente. Test e2e deux onglets : échoue sans la correction, passe avec."}}
{"id":"int-d28de3131c42a520f06d321263a669ec","kind":"field_change","created_at":"2026-11-11T14:50:18.862876421Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf.1","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Service /api/shares, plafonds globaux et par IP, 12 tests Node verts"}}
{"id":"int-6378b76c98c8bdcfa2f74fdea06bba39","kind":"field_change","created_at":"2026-11-11T14:51:24.312207352Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf.2","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"shareCrypto + 4 tests"}}
{"id":"int-004298093967fbc8b05fc840955c975c","kind":"field_change","created_at":"2026-11-11T14:52:24.919381848Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf.3","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"shareQuota + 6 tests"}}
{"id":"int-6f72aff4d5cec2ce43f5e59904b90bd1","kind":"field_change","created_at":"2026-11-11T14:56:46.772990114Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf.4","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Modale d'envoi, actions, bouton Envoyer (carte + panneau), icône send"}}
{"id":"int-7bd1e13eb668bac356b7db8ff45ece93","kind":"field_change","created_at":"2026-11-11T15:03:48.107906893Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf.5","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Page /receive/<id>, aperçu, usage unique, erreurs"}}
{"id":"int-9661c05d4303c503386906be9e7bfe2e","kind":"field_change","created_at":"2026-11-11T15:05:17.423843268Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf.6","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Textes, confidentialité, README, STORAGE_SCHEMA, DELIVERY, SERVER, FEATURE_CHECKLIST, TEST_STRATEGY, .env.example"}}
{"id":"int-b0f7c0738ccd020c2119804114729180","kind":"field_change","created_at":"2026-11-11T15:16:40.162652313Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf.7","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"E2E dev (4 parcours) et production (CSP) verts ; npm run check:full vert"}}
{"id":"int-86fb8c17d94b19eb047cad4b1ba58585","kind":"field_change","created_at":"2026-11-11T15:16:56.520484817Z","actor":"Shinuwa","issue_id":"sokko-g-dfyf","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Envoi de toolbox par lien chiffré livré en local, validé par check:full ; mise en production à faire par l'utilisateur"}}