{"id":25853063,"url":"https://github.com/secshellnet/wpm-api-vyos","last_synced_at":"2025-03-01T14:31:54.362Z","repository":{"id":197607326,"uuid":"698976442","full_name":"secshellnet/wpm-api-vyos","owner":"secshellnet","description":"Wireguard Peer Manager: Router API for VyOS","archived":false,"fork":false,"pushed_at":"2024-02-04T12:12:11.000Z","size":316,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-02-05T11:56:42.007Z","etag":null,"topics":["debian-package","vyatta","vyos"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secshellnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-10-01T15:01:45.000Z","updated_at":"2024-02-05T11:56:42.008Z","dependencies_parsed_at":"2024-01-14T16:10:51.727Z","dependency_job_id":null,"html_url":"https://github.com/secshellnet/wpm-api-vyos","commit_stats":null,"previous_names":["secshellnet/wpm-api-vyos"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secshellnet%2Fwpm-api-vyos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secshellnet%2Fwpm-api-vyos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secshellnet%2Fwpm-api-vyos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secshellnet%2Fwpm-api-vyos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secshellnet","download_url":"https://codeload.github.com/secshellnet/wpm-api-vyos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241378124,"owners_count":19953228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian-package","vyatta","vyos"],"created_at":"2025-03-01T14:31:49.499Z","updated_at":"2025-03-01T14:31:54.340Z","avatar_url":"https://github.com/secshellnet.png","language":"Rust","readme":"# Wireguard Peer Manager: VyOS API\n\nWireguard Peer Manager is used for managing Road Warrior VPN endpoints and consists of two components. Users and \nadministrators utilize the Django app for graphical management of Wireguard peers. It communicates with the router's \nREST API (for VyOS [this project](https://github.com/secshellnet/wpm-api-vyos)) to apply the Wireguard configuration.\n\nAfter the user logs in, they can easily create new Wireguard peers (each device should have its own peer to enable \nsimultaneous connections) and view or delete the Wireguard configuration. Due to this abstraction layer, end-users don't\nneed access to the router to manage their peers but also don't have to open a ticket every time they want to make a new \ndevice VPN-enabled.\n\nWhen creating new peers, the browser generates an asymmetric key pair upon the user's request and also a pre-shared key\n(PSK), which needs to be set up on both sides for the tunnel to function. The private key is not sent to the server and \nnot stored in the browser, so the user must save it directly.\n\nAfterward, the user sees the newly created peer in the list of registered peers with a red status indicator. Once it\nchanges to green (usually taking no longer than 30 seconds), the peer is usable.\n\nAll clients connecting to the same router use the same Wireguard endpoint (in our case, the interface `wg100`), \ndiffering only in the IPv4 and IPv6 addresses used within the tunnel.\n\n## Specification\n- HTTP Authorization using Bearer Access Tokens.\n\n### Endpoints\n| HTTP Method | Endpoint                | Description                 | Returns (on success) |\n|-------------|-------------------------|-----------------------------|----------------------|\n| GET         | `/api/peer/:identifier` | Check the status of a peer  | `StatusResponse`     |\n| POST        | `/api/peer/`            | Create new peer             | `ApiResponse`        |\n| DELETE      | `/api/peer/:identifier` | Delete peer by identifier   | `ApiResponse`        |\n\n### Schemas\n#### AddPeerSchema\n```json\n{\n    \"user_identifier\": \"\",\n    \"peer_identifier\": \"\",\n    \"publicKey\": \"\",\n    \"psk\": \"\",\n    \"tunnelIpv4\": \"\",\n    \"tunnelIpv6\": \"\"\n}\n```\n\n#### ApiResponse\n```json\n{\n    \"status\": \"success\",\n    \"message\": \"...\"\n}\n```\n\n#### StatusResponse\n```json\n{\n    \"valid\": true\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecshellnet%2Fwpm-api-vyos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecshellnet%2Fwpm-api-vyos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecshellnet%2Fwpm-api-vyos/lists"}