64880261c2
fix: some http status error codes are not sent to client du to order
2024-03-28 21:56:36 +03:00
8e798706e3
WIP: create new peers server-side
...
Creates a new peer server-side.
- Gen keys
- Allocate IP
- Add to WG Link
- Respond with a read wg config for the client to use
2024-03-27 09:28:13 +03:00
a9c728355b
mon cycle and uptime
2024-03-24 18:13:26 +03:00
ed0fcb59eb
feat: monitor peers in logs, README, Status
...
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-19 02:56:52 +03:00
4bab068c10
fix: Assign IP to wg device
...
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-19 02:55:31 +03:00
ca29b792fb
feat: add API Key Auth middleware
...
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-19 02:54:24 +03:00
77c41ce3f3
Update README
...
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-18 23:23:39 +03:00
82d6ac96e4
set_cap: helper script to set CAP_NET_ADMIN for the binary
...
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-18 23:03:18 +03:00
da0b1c720e
feat: implement optional mTLS and helper scripts
...
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-18 23:02:22 +03:00
4c6e251247
refactor: do cli.Exit in top level
...
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-18 01:43:07 +03:00
e5e4641264
feat: Do not quit when keyfile can not be opened, create key
...
- Refactor AddTestPeer
Signed-off-by: HeshamTB <hishaminv@gmail.com>
2024-03-18 01:35:37 +03:00
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