Commit Graph

11 Commits

Author SHA1 Message Date
44961e91dc
cli: allow generating private key on startup
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-18 01:17:02 +03:00
78b61aede4
feat: store a wglink endpoint string
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-18 00:58:17 +03:00
c9b5e56f14
api: add node info
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-15 23:48:22 +03:00
79463c18b9
main: move root and node UUID checks to setup():
to prevent log messages on 'hvpn-node --help'

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-15 00:29:08 +03:00
5d6a69806a
feat: Read stdin for commands to exit
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-15 00:18:41 +03:00
0c703465af feat: node UUID 2024-03-14 02:28:36 +03:00
eb97d49d1f feat: Add, Check, Get, and Delete peers 2024-03-14 01:46:05 +03:00
4a1039e5b1 setup: add and remove peer on setup as runtime test 2024-03-13 00:26:19 +03:00
defd32b3c8 slog: use the slog.LevelVar unmarshal to parse log level flag 2024-03-13 00:03:14 +03:00
a9ad981137 Reorg and add host flag, and catch error when not root:
- A previous workaround done to recover from a panic on nil
    ref is now not needed and removed. The issue was that I assumed
    cli.Exit(err, int) was a way to exit; i.e. it uses os.Exit()
    under the hood. However, it only constructs a struct that implements
    error. Hence, we should return it, not just execute it.

    - Also warn on root and Windows

    - Move IPPool init to setup rather than run
2024-03-12 23:35:57 +03:00
1a611616bd
init:
- Working basic wg controls
    - Working ip_pool allocation
    - Working basic HTTP API

Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-11 17:34:06 +03:00