Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sandydoo/mullvadconfigs

Generate Wireguard™ configurations for Mullvad.
https://github.com/sandydoo/mullvadconfigs

haskell mullvad wireguard

Last synced: 16 days ago
JSON representation

Generate Wireguard™ configurations for Mullvad.

Awesome Lists containing this project

README

        


Mullvad Configs




Generate
Wireguard™ configurations for
Mullvad.








Mullvad’s list of available servers is constantly changing. That’s fine if you’re using their own client, but with a third-party client, like Wireguard’s own clients, it becomes a nuisance. Is my network down or is the server I’m connecting to down for maintenance? Who knows!

This Haskell program downloads the current server list, generates the configuration files, and outputs a ZIP archive.


#### Disclaimer❗

> **I created this for personal use, without any intention of supporting end-users.**

> **I am releasing this code for educational purposes, specifically because it’s written in Haskell and nobody writes mundane stuff like this in Haskell.**


## Usage

### Configuration

Create a JSON file called `.peers.json` in the same directory following this format:

```json
[
{
"name": "",
"public_key": "",
"private_key": "",
"ipv4_address": "",
"ipv6_address": "",
"ports": [
""
]
},
]
```

The IP addresses are specific to your peer. The easiest way to find out yours is by looking at the [configuration generated on the Mullvad website.][wireguard-config-generator]

### Building

There are no pre-built binaries, so you’ll have to build it yourself.

#### Build with Nix

```sh
nix-build release.nix
./result/bin/create-mullvad-configs
```

Or using Nix flakes:

```sh
nix build --system x86_64-darwin
```

#### Build with Stack

```sh
stack run
```

#### Build with Cabal

Cabal can’t automatically install some of the external dependencies.

If you’re using this method, make sure to install:
- zlib
- bzip2

```sh
cabal run
```

## License

[BSD-3-Clause][license-url] © [Sander Melnikov][maintainer-url].

[wireguard-url]: https://www.wireguard.com/
[mullvad-url]: https://mullvad.net/
[wireguard-config-generator]: https://mullvad.net/en/account/#/wireguard-config/
[stack-url]: https://docs.haskellstack.org/en/stable/README/

[license-url]: https://github.com/sandydoo/MullvadConfigs/blob/main/LICENSE
[maintainer-url]: https://github.com/sandydoo/