{"id":14044672,"url":"https://github.com/brsyuksel/wghttp","last_synced_at":"2025-10-24T05:56:31.771Z","repository":{"id":65956066,"uuid":"570178418","full_name":"brsyuksel/wghttp","owner":"brsyuksel","description":"a web server manages wireguard devices and peers","archived":false,"fork":false,"pushed_at":"2023-11-06T08:32:18.000Z","size":99,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T03:03:22.485Z","etag":null,"topics":["wireguard"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brsyuksel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2022-11-24T14:12:54.000Z","updated_at":"2024-08-26T23:13:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"a51ad976-b59a-45ca-9525-74b379801860","html_url":"https://github.com/brsyuksel/wghttp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsyuksel%2Fwghttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsyuksel%2Fwghttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsyuksel%2Fwghttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsyuksel%2Fwghttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brsyuksel","download_url":"https://codeload.github.com/brsyuksel/wghttp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227822323,"owners_count":17825025,"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":["wireguard"],"created_at":"2024-08-12T09:02:46.548Z","updated_at":"2025-10-24T05:56:31.687Z","avatar_url":"https://github.com/brsyuksel.png","language":"Rust","funding_links":[],"categories":["Projects"],"sub_categories":["User Interface"],"readme":"# wghttp\n\n**wghttp** is a zero-log, lightweight, and opinionated HTTP server for managing WireGuard devices and peers.\n\nIt’s particularly useful when you need to control your WireGuard setup remotely.  \nIt also simplifies the process of adding devices or peers — allowing you to do it with a single HTTP call.  \n`wghttp` saves time, especially when adding new peers to your VPN server without needing to SSH in.\n\n\n## Features\n\n- RESTful HTTP API for managing WireGuard interfaces and peers\n- Runs on **Unix domain socket** by default (`/var/run/wghttp.sock`)\n- Can be configured to run over TCP (`--tcp ip:port`)\n- Swagger UI available at `/swagger-ui/` for API exploration\n\n## Usage\n\n```bash\ncargo build --release\n./target/release/wghttp --help\n```\n\n### Launch Examples\n\n#### Using Unix domain socket (recommended):\n\n```bash\nsudo ./wghttp\n```\n\n#### Using TCP:\n\n```bash\nsudo ./wghttp --tcp 127.0.0.1:8080\n```\n\n\u003e **Note:** Unix domain socket is preferred since it delegates authentication to the system. Users cannot send curl requests without `sudo`.\n\n### Permissions\n\n`wghttp` interacts with networking interfaces and requires elevated privileges.\n\n- The application **must be run with `sudo`** unless the `CAP_NET_ADMIN` capability is explicitly granted.\n- **Granting `CAP_NET_ADMIN` is not recommended** due to potential security implications.\n\n```bash\nsudo setcap cap_net_admin+ep ./target/release/wghttp\n```\n\n### Authentication \u0026 TLS (via Caddy)\n\nTo secure `wghttp` behind HTTPS and add basic authentication, you can use [Caddy](https://caddyserver.com/) as a reverse proxy.\n\nBelow is an example `Caddyfile` that:\n\n- Listens on port 443 with HTTPS\n- Applies HTTP Basic Auth\n- Uses a self-signed TLS certificate\n- Proxies traffic to `wghttp` over a Unix domain socket\n\n```caddyfile\nhttps://[::]:443, https://:443 {\n\treverse_proxy unix//var/run/wghttp.sock\n\n\tbasic_auth {\n\t\tyour_username $2a$14$zBNAL8oUW/m3vpTIjm2ts.M64u2JKRvZJkd2bw/kKDSV3tniHWPuW\n\t}\n\n\ttls /path/to/self-signed.crt /path/to/self-signed.key\n}\n```\n\n\u003e You can generate a bcrypt hash for your password using `caddy hash-password` interactive command.\n\n## Swagger UI\n\nTo explore the API and send test requests:\n\n```\nhttp://localhost/swagger-ui/\n```\n\n\u003e The interface uses OpenAPI 3.0 specification.\n\n## Tests\n\nSome tests require access to system commands:\n\n### Dependencies\n\n- `ip` command (via `iproute2` package)\n- `wg` command (via `wireguard-tools` package)\n\n### Installation Examples by Distribution\n\n| Distribution | Install Command |\n|--------------|------------------|\n| Arch Linux   | `sudo pacman -S iproute2 wireguard-tools` |\n| Ubuntu/Debian | `sudo apt install iproute2 wireguard-tools` |\n| Fedora       | `sudo dnf install iproute wireguard-tools` |\n\n### Running Tests\n\n#### HTTP route tests:\n\n```bash\ncargo test -p wghttp\n```\n\n#### `netdev` tests (requires root):\n\n```bash\nsudo -E $(which cargo) test -p netdev\n```\n\n\u003e `netdev` tests depend on `ip`\n\n#### `wgshim` tests (should run single-threaded):\n\n```bash\nsudo -E $(which cargo) test -p wgshim -- --test-threads 1\n```\n\n\u003e `wgshim` tests depend on both `ip` and `wg` commands.\n\n## License\n\nThis project includes components from the WireGuard embedding library (wireguard.c and wireguard.h), which are licensed under the LGPL-2.1+ license. All other parts of this project are licensed under the MIT License.\n\nSee `LICENSE` and individual source files for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsyuksel%2Fwghttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrsyuksel%2Fwghttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsyuksel%2Fwghttp/lists"}