Skip to content

Commit

Permalink
feat: dark mode (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahradelahi authored Apr 26, 2024
1 parent 0fabc4a commit 66a1fe2
Show file tree
Hide file tree
Showing 18 changed files with 426 additions and 363 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-fireants-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 1,5 @@
---
"wireadmin": patch
---

feat: dark mode
59 changes: 36 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 1,7 @@
# WireGuard GUI (Easy Admin UI)
# WireGuard (Easy Admin UI)

[![CI](https://github.com/shahradelahi/wireadmin/actions/workflows/ci.yml/badge.svg)](https://github.com/shahradelahi/wireadmin/actions/workflows/ci.yml)
[![GPL-3.0 Licensed](https://img.shields.io/badge/License-GPL3.0-blue.svg?style=flat)](https://opensource.org/licenses/GPL-3.0)

![Screenshot](assets/screenshot-1.png)

Expand All @@ -8,11 11,14 @@

## Features

- Easy-to-use web-based admin UI
- Simple and friendly UI
- Support for multiple users and servers
- Support for **Tor for anonymized connections**
- Server connection statistics
- List, create, delete, or modify any server or user
- Scan QR codes or easily download the client configurations.
- Create QR codes
- Easily download the client configurations.
- Automatic Light/Dark Mode

## Installation

Expand All @@ -22,20 28,20 @@

### 2. Docker Image

#### Build from source
#### Build from source (recommended)

```bash
git clone https://github.com/shahradelahi/wireadmin
docker buildx build --tag litehex/wireadmin ./wireadmin
```

#### Pull from Docker Hub (recommended)
#### Pull from Docker Hub

```bash
docker pull litehex/wireadmin
docker pull litehex/wireadmin # OR ghcr.io/shahradelahi/wireadmin
```

### 4. Persistent Data
### 3. Persistent Data

WireAdmin store configurations at `/data`. It's important to mount a volume at this location to ensure that
your data is not lost during container restarts or updates.
Expand All @@ -46,18 52,19 @@ your data is not lost during container restarts or updates.
docker volume create wireadmin-data --driver local
```

### 4. Run
### 4. Run WireAdmin

When creating each server, ensure that you add the port exposure through Docker. In the below command, the port `51820`
is added for the WireGuard server.

**NOTE:** The port `3000` is for the WebUI, and can be changed with `PORT` environment variable, but for security
reasons, it's recommended to NOT expose **_any kind of WebUI_** to the public. It's up to you to remove it after
configuring
the Servers/Peers.
> 💡 The port `3000` is for the WebUI, and can be changed with `PORT` environment variable, but for security
> reasons, it's recommended to NOT expose **_any kind of WebUI_** to the public. It's up to you to remove it after
> configuring
> the Servers/Peers.
```bash
docker run --rm \
```shell
docker run --detach \
--name wireadmin \
-e WG_HOST=<YOUR_SERVER_IP> \
-e UI_PASSWORD=<ADMIN_PASSWORD> \
-p "3000:3000/tcp" \
Expand All @@ -70,18 77,24 @@ docker run --rm \
litehex/wireadmin
```

## Environment Options
> 💡 Replace `<YOUR_SERVER_IP>` with the IP address of your server.
> 💡 Replace `<ADMIN_PASSWORD>` with the password for the admin UI.
The Web UI will now be available on `http://0.0.0.0:3000`.

## Options

These options can be configured by setting environment variables using `-e KEY="VALUE"` in the `docker run` command.

| Option | Description | Optional |
| ----------------- | ------------------------------------------------------------------------------- | -------- |
| `WG_HOST` | The public IP address of the WireGuard server. | |
| `UI_PASSWORD` | The password for the admin UI. | |
| `HOST` | The hostname for the WebUI. (default: `127.0.0.1`) | ✔️ |
| `PORT` | The port for the WebUI. (default: `3000`) | ✔️ |
| `TOR_USE_BRIDGES` | Set this to `1` and then mount the bridges file at `/etc/torrc.d/bridges.conf`. | ✔️ |
| `TOR_*` | The `Torrc` proxy configuration. (e.g. `SocksPort` as `TOR_SOCKSPORT="9050"`) | ✔️ |
| Option | Description | Default | Optional |
| ----------------- | ------------------------------------------------------------------------------- | ------------------- | -------- |
| `WG_HOST` | The public IP address of the WireGuard server. | - | |
| `UI_PASSWORD` | The password for the admin UI. | `insecure-password` | |
| `HOST` | The hostname for the WebUI. | `127.0.0.1` | ✔️ |
| `PORT` | The port for the WebUI. | `3000` | ✔️ |
| `TOR_USE_BRIDGES` | Set this to `1` and then mount the bridges file at `/etc/torrc.d/bridges.conf`. | - | ✔️ |
| `TOR_*` | The `Torrc` proxy configuration. (e.g. `SocksPort` as `TOR_SOCKS_PORT="9050"`) | - | ✔️ |

## Reporting

Expand Down
Binary file modified assets/screenshot-1.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 modified assets/screenshot-2.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 modified assets/screenshot-3.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 modified assets/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 55,7 @@
"formsnap": "^1.0.0",
"jsonwebtoken": "^9.0.2",
"lucide-svelte": "^0.330.0",
"mode-watcher": "^0.3.0",
"node-netkit": "0.1.0-canary.2",
"pino": "^8.18.0",
"pino-pretty": "^10.3.1",
Expand Down
Loading

0 comments on commit 66a1fe2

Please sign in to comment.