feat(server/portforward): change route from /v1/openvpn/portforwarded to /v1/portforward

- This route has nothing to do with openvpn specifically
- Remove the `ed` in `portforwarded` to accomodate future routes such as changing the state of port forwarding
- maintaining retrocompatibility with `/v1/openvpn/portforwarded`
- maintaining retrocompatibility with `/openvpn/portforwarded`
- Moved to its own handler `/v1/portforward` instead of `/v1/vpn/portforward` to reduce the complexity of the vpn handler
This commit is contained in:
Quentin McGaw
2025-11-13 14:50:36 +00:00
parent 46ad576233
commit 3d1b6bc861
7 changed files with 81 additions and 45 deletions

View File

@@ -37,6 +37,7 @@ func New(settings Settings, debugLogger DebugLogger) (
http.MethodGet + " /v1/updater/status": {},
http.MethodPut + " /v1/updater/status": {},
http.MethodGet + " /v1/publicip/ip": {},
http.MethodGet + " /v1/portforward": {},
},
logger: debugLogger,
}