Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/defguard/client
Best WireGuard desktop client with Multi-Factor Authentication
https://github.com/defguard/client
Last synced: 6 days ago
JSON representation
Best WireGuard desktop client with Multi-Factor Authentication
- Host: GitHub
- URL: https://github.com/defguard/client
- Owner: DefGuard
- License: other
- Created: 2023-08-28T09:35:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-20T17:38:03.000Z (22 days ago)
- Last Synced: 2024-12-29T17:09:33.909Z (13 days ago)
- Language: TypeScript
- Size: 15.2 MB
- Stars: 139
- Watchers: 5
- Forks: 14
- Open Issues: 54
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- awesome-tauri - Defguard - WireGuard VPN destkop client with Two-factor (2FA) authentication. (Applications / Security)
README
# Defguard desktop client
Desktop client for managing WireGuard VPN connections (any WireGuard server and [defguard](https://github.com/DefGuard/defguard) instances).
![defguard desktop client](https://defguard.net/images/product/client/main-screen.png)
## Features
- Supports any WireGuard server
- Multi-platform - Linux, macOS & Windows
- Detailed network overview - see all details of your connection history and statistics with real-time charts and logs
- Multi-Factor Authentication with TOTP/Email & WireGuard PSK - Since WireGuard protocol doesn't support 2FA, most (if not all) available WireGuard clients use 2FA authorization to the "application" itself (not Wireguard tunnel). When using this client with [defguard VPN & SSO server](https://github.com/DefGuard/defguard) (which is free & open source) you will get real Multi-Factor Authentication using TOTP/Email codes + WireGuard Pre-shared session keys.
- Multiple instances & locations - When combining with [defguard](https://github.com/DefGuard/defguard) VPN & SSO you can have multiple defguard instances (sites/installations) and multiple Locations (VPN tunnels in that location/site) in one client! If you are an admin/devops - all your customers (instances) and all their tunnels (locations) can be in one place!
- Fast! - Built with Rust, [tauri](https://tauri.app/) and [React.js](https://react.dev/).To learn more about the system see our [documentation](https://docs.defguard.net).
## Development
### Tauri requirements
Make sure to install prerequisites from [tauri](https://tauri.app/v1/guides/getting-started/prerequisites/).
### Proto submodule
Make sure you have cloned, and up to date, proto submodule in `src-tauri/proto`
### Protoc compiler
Make sure you have [protoc](https://grpc.io/docs/protoc-installation/) available.
### Install pnpm and node deps
```bash
pnpm install
```### Sqlx and local database file
To work with sqlx on a local db file, you'll have to set `DATABASE_URL` env variable.
It's best to set it to absolute path since `pnpm tauri dev` runs with weird paths.Init the file with:
```bash
export DATABASE_URL=sqlite:///dev.db`
sqlx db create
sqlx migrate run --source src-tauri/migrations/
```Then keep the `$DATABASE_URL` set during development (use direnv etc.)
### Dev server command
```bash
pnpm tauri dev
```### Build command
```bash
pnpm tauri build
```Built packages are available after in `src-tauri/target/release/bundle`.
### Windows
Remove `default-run` line from `[package]` section in `Cargo.toml` to build the project.
# Built and sponsored by
# Legal
WireGuard® is [registered trademarks](https://www.wireguard.com/trademark-policy/) of Jason A. Donenfeld.
# Known issues
## Failed to bundle project
`pnpm tauri build` may fail with error: `Error failed to bundle project: error running appimage.sh`. To
fix this set the NO_STRIP environment variable:```
NO_STRIP=1 pnpm tauri build
```## Blank screen
The app launches but the window is blank. Set the `WEBKIT_DISABLE_DMABUF_RENDERER` environment variable:
```
WEBKIT_DISABLE_DMABUF_RENDERER=1 defguard-client
```## Failed to run `pnpm tauri dev`
`pnpm tauri dev` command may result in the following error:
```
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/jck/workspace/work/teonite/defguard/client/node_modules/.pnpm/[email protected]/node_modules/path-type/index.js from /home/jck/workspace/work/teonite/defguard/client/node_modules/.pnpm/[email protected]/node_modules/read-pkg/index.js not supported.
Instead change the require of /home/jck/workspace/work/teonite/defguard/client/node_modules/.pnpm/[email protected]/node_modules/path-type/index.js in /home/jck/workspace/work/teonite/defguard/client/node_modules/.pnpm/[email protected]/node_modules/read-pkg/index.js to a dynamic import() which is available in all CommonJS modules.
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at Object. (/home/jck/workspace/work/teonite/defguard/client/node_modules/.pnpm/[email protected]/node_modules/read-pkg/index.js:4:18) {
code: 'ERR_REQUIRE_ESM'
}Node.js v22.7.0
ELIFECYCLE Command failed with exit code 1.
Error The "beforeDevCommand" terminated with a non-zero status code.
ELIFECYCLE Command failed with exit code 1.
```To fix this remove node_modules and rerun `pnpm install`.