Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasTJdev committed Feb 22, 2024
1 parent 6934999 commit 50a043b
Show file tree
Hide file tree
Showing 26 changed files with 1,943 additions and 106 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
nim:
- '1.6.14'
- 'stable'
name: Nim ${{ matrix.nim }} sample
steps:
- uses: actions/checkout@v3
- name: Setup nim
uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ matrix.nim }}
- run: nimble build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
nimcache/
nimblecache/
htmldocs/

wireguardmanager
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
# nim_wireguardmanager
# wireguardmanager

Simple manager for wireguard.

Create server and peer configurations, and manage them.

Supports 1 wireguard server.

## Installation

```bash
curl https://nim-lang.org/choosenim/init.sh -sSf | sh
git clone https://github.com/ThomasTJdev/nim_wireguardmanager.git
cd nim_wireguardmanager
nimble build
sudo ./wireguardmanager
# http://127.0.0.1:8080
```

## Requirements

1) Linux machine
2) You have wireguard (wg) installed
3) You run it as root (or with sudo)

## Screenshots

**Status**

![alt text](screenshots/status.png)

**Server**

![alt text](screenshots/server.png)
3 changes: 3 additions & 0 deletions config.nims
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
switch("mm", "orc")
switch("d", "ssl")
switch("threads", "on")
Binary file added screenshots/server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/globals.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@



const
defaultPath* = "/etc/wireguard"
defaultKeyPath* = defaultPath & "/keys"
defaultConfigPath* = defaultPath & "/configs"
defaultBackupPath* = defaultPath & "/backups"

defaultWgInstance* = "wg0"
defaultWgInstancePath* = defaultPath & "/" & defaultWgInstance & ".conf"

const
defaultPort* = "51820"
interfaceName* = "eth0"
defaultDns* = "8.8.8.8"
defaultIpStart* = "10.6.0."
peerAllowedIPs* = "0.0.0.0/0"
104 changes: 0 additions & 104 deletions src/nim_wireguardmanager.nim

This file was deleted.

Loading

0 comments on commit 50a043b

Please sign in to comment.