erplibre/script/todo/todo_example.json
Mathieu Benoit 315e45e5f0 [ADD] menu vpn : créer un profil, déposer les secrets, monter le tunnel
`vpn.py` savait tout faire en ligne de commande, mais il fallait écrire le
profil JSON à la main et déposer les secrets dans KeePassXC soi-même. Le menu
pose les questions que le pilote choisi déclare, et lui seul : ajouter une
technologie n'ajoute pas une ligne ici.

Le coffre est manipulé EN PROCESSUS — le mot de passe maître est déjà en
mémoire, le redemander à un sous-processus serait une saisie de plus à chaque
geste. Montage, démontage et diagnostic passent au contraire par `vpn.py` en
sous-processus : ils durent, ils parlent, et la sortie en direct est ce qui
rend une montée de tunnel suivable.
Vérifié : 37 tests sur le menu, aucune saisie réelle.

--- EN ---

`vpn.py` could already do everything from the command line, but the JSON
profile had to be written by hand and the secrets filed into KeePassXC by
hand. The menu asks the questions the chosen driver declares, and only those:
adding a technology adds no line here.

The vault is handled IN PROCESS — the master password is already in memory,
and asking a subprocess for it again would be one more entry at every step.
Raising, tearing down and diagnosing go through `vpn.py` as a subprocess
instead: they last, they talk, and live output is what makes a tunnel coming
up followable.
Checked: 37 tests on the menu, no real input.

Assisted-by: Claude Opus 5
2026-09-04 03:43:02 +00:00

82 lines
2.2 KiB
JSON

{
"kdbx": {
"path": "",
"password": ""
},
"kdbx_config": {
"openai": {
"kdbx_key": "OpenAI api"
}
},
"vpn": [
{
"name": "client-acme",
"driver": "l2tp_ipsec",
"server": "vpn.acme.example",
"ppp_user": "ACME\\user",
"routes": [
"10.20.0.0/16"
],
"default_route": false,
"mtu": 1280,
"use_peer_dns": true,
"dns_search": "acme.example",
"probe": "10.20.0.1"
},
{
"name": "client-beta",
"driver": "wireguard",
"server": "vpn.beta.example",
"port": 51820,
"wg_address": "10.7.0.2/32",
"wg_peer_key": "SGVsbG9Xb3JsZEV4YW1wbGVLZXkxMjM0NTY3ODkwYWI=",
"routes": [
"10.7.0.0/24",
"192.168.80.0/24"
],
"probe": "10.7.0.1"
},
{
"name": "bastion-gamma",
"driver": "sshuttle",
"server": "user@bastion.gamma.example",
"port": 22,
"ssh_dns": true,
"routes": [
"10.90.0.0/16"
],
"probe": "10.90.0.1"
}
],
"instance": [
{
"prompt_description": "Test - Instance de base minimale",
"makefile_cmd": "db_restore_erplibre_base_db_test",
"database": "test",
"kdbx_key": "default_user_odoo"
},
{
"prompt_description": "Test 2 - Instance de base minimale",
"makefile_cmd": "db_restore_erplibre_base_db_test",
"database": "test",
"user": "test",
"password": "test"
}
],
"function": [
{
"prompt_description": "Ouvrir ERPLibre avec TODO \uD83E\uDD16"
},
{
"prompt_description": "Ouvrir ERPLibre avec tous les utilisateurs",
"kdbx_key": [
"user 01prod",
"user 02 prod"
]
},
{
"prompt_description": "Rapport",
"command": "./script/selenium/selenium_test.py --test --scenario=rapport"
}
]
}