2025-02-19 00:08:36 +01:00
|
|
|
# Hai Wireguard Oauth VPN
|
2020-08-21 02:47:38 +02:00
|
|
|
|
2025-02-19 00:08:36 +01:00
|
|
|
This is a stub repository to try to develop a Rosenpass Wireguard VPN with Oauth second factor authentification.
|
2020-08-21 02:47:38 +02:00
|
|
|
|
|
|
|
|
## Getting started
|
|
|
|
|
|
|
|
|
|
1. Install [direnv](https://github.com/direnv/direnv) on your system by following the instructions
|
|
|
|
|
provided on the project page.
|
|
|
|
|
**Important**: you can skip this step if you do not intend to use direnv as it's optional.
|
|
|
|
|
|
2020-10-13 01:26:06 +02:00
|
|
|
`direnv` is a tool that setups your shell with the required environment variables (and tools in
|
2020-08-21 02:47:38 +02:00
|
|
|
the case of Nix) to hack on!
|
|
|
|
|
|
|
|
|
|
2. Clone the project
|
|
|
|
|
|
|
|
|
|
``` console
|
2025-02-19 00:08:36 +01:00
|
|
|
$ git clone git@forge.versia.pub:aprl/hai
|
|
|
|
|
Cloning into 'hai'...
|
2020-08-21 02:47:38 +02:00
|
|
|
direnv: error .envrc is blocked.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If you have `direnv` installed and configured for your shell you will see the following error message:
|
|
|
|
|
|
|
|
|
|
```
|
2025-02-19 00:08:36 +01:00
|
|
|
direnv: error /path/hai/.envrc is blocked.
|
2020-08-21 02:47:38 +02:00
|
|
|
Run `direnv allow` to approve its content
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
3. If you installed `direnv` then allow `direnv` to setup your shell with the required dependencies to develop
|
|
|
|
|
|
|
|
|
|
``` console
|
|
|
|
|
$ direnv allow
|
2025-02-19 00:08:36 +01:00
|
|
|
direnv: loading /path/hai/.envrc
|
2020-08-21 02:47:38 +02:00
|
|
|
direnv: using flake
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
|
|
Use `nix shell` to spawn a shell with `cargo` and all necessary dependencies.
|
|
|
|
|
|
|
|
|
|
Within this shell you can use `cargo` commands as you normally would.
|
|
|
|
|
|
2025-02-19 00:08:36 +01:00
|
|
|
If your project requires external dependencies (outside of `crates.io`) then use `nix run '.#'`
|
2020-08-21 02:47:38 +02:00
|
|
|
to build and run your project.
|
|
|
|
|
|