mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-04 00:06:18 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cafa97f502 | ||
|
0d858493d5 | ||
|
99fb07c6b3 | ||
|
eaad971c0a | ||
|
377abd87fd | ||
|
af71176296 | ||
|
69737177ef |
29
README.md
29
README.md
@@ -115,7 +115,7 @@
|
|||||||
1. Download WGDashboard
|
1. Download WGDashboard
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone -b v3.0.1 https://github.com/donaldzou/WGDashboard.git wgdashboard
|
git clone -b v3.0.5 https://github.com/donaldzou/WGDashboard.git wgdashboard
|
||||||
|
|
||||||
2. Open the WGDashboard folder
|
2. Open the WGDashboard folder
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ Since version 2.0, WGDashboard will be using a configuration file called `wg-das
|
|||||||
| `app_ip` | IP address the dashboard will run with | `0.0.0.0` | Yes |
|
| `app_ip` | IP address the dashboard will run with | `0.0.0.0` | Yes |
|
||||||
| `app_port` | Port the the dashboard will run with | `10086` | Yes |
|
| `app_port` | Port the the dashboard will run with | `10086` | Yes |
|
||||||
| `auth_req` | Does the dashboard need authentication to access, if `auth_req = false` , user will not be access the **Setting** tab due to security consideration. **User can only edit the file directly in system**. | `true` | **No** |
|
| `auth_req` | Does the dashboard need authentication to access, if `auth_req = false` , user will not be access the **Setting** tab due to security consideration. **User can only edit the file directly in system**. | `true` | **No** |
|
||||||
| `version` | Dashboard Version | `v3.0.1` | **No** |
|
| `version` | Dashboard Version | `v3.0.5` | **No** |
|
||||||
| `dashboard_refresh_interval` | How frequent the dashboard will refresh on the configuration page | `60000ms` | Yes |
|
| `dashboard_refresh_interval` | How frequent the dashboard will refresh on the configuration page | `60000ms` | Yes |
|
||||||
| `dashboard_sort` | How configuration is sorting | `status` | Yes |
|
| `dashboard_sort` | How configuration is sorting | `status` | Yes |
|
||||||
| | | | |
|
| | | | |
|
||||||
@@ -348,15 +348,34 @@ Endpoint = 0.0.0.0:51820
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
#### Update Method 1 (For `v3.0` or above)
|
||||||
|
|
||||||
|
1. Change your directory to `wgdashboard/src`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd wgdashboard/src
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Update the dashboard with the following
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./wgd.sh update
|
||||||
|
```
|
||||||
|
|
||||||
|
> If this doesn't work, please use the method below. Sorry about that :(
|
||||||
|
|
||||||
|
#### Update Method 2
|
||||||
|
|
||||||
|
|
||||||
1. Change your directory to `wgdashboard`
|
1. Change your directory to `wgdashboard`
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd wgdashboard
|
cd wgdashboard/src
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update the dashboard
|
2. Update the dashboard
|
||||||
```shell
|
```shell
|
||||||
git pull https://github.com/donaldzou/WGDashboard.git v3.0.1 --force
|
git pull https://github.com/donaldzou/WGDashboard.git v3.0.5 --force
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Install
|
3. Install
|
||||||
@@ -365,6 +384,8 @@ Endpoint = 0.0.0.0:51820
|
|||||||
./wgd.sh install
|
./wgd.sh install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Starting with `v3.0`, you can simply do `./wgd.sh update` !! (I hope, lol)
|
Starting with `v3.0`, you can simply do `./wgd.sh update` !! (I hope, lol)
|
||||||
|
|
||||||
## 🥘 Experimental Functions
|
## 🥘 Experimental Functions
|
||||||
|
@@ -31,7 +31,7 @@ from util import regex_match, check_DNS, check_Allowed_IPs, check_remote_endpoin
|
|||||||
check_IP_with_range, clean_IP_with_range
|
check_IP_with_range, clean_IP_with_range
|
||||||
|
|
||||||
# Dashboard Version
|
# Dashboard Version
|
||||||
DASHBOARD_VERSION = 'v3.0.1'
|
DASHBOARD_VERSION = 'v3.0.5'
|
||||||
# WireGuard's configuration path
|
# WireGuard's configuration path
|
||||||
WG_CONF_PATH = None
|
WG_CONF_PATH = None
|
||||||
# Dashboard Config Name
|
# Dashboard Config Name
|
||||||
|
@@ -171,6 +171,17 @@
|
|||||||
return String.fromCharCode.apply(null, base64);
|
return String.fromCharCode.apply(null, base64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function base64ToKey(base64) {
|
||||||
|
let binary_string = window.atob(base64);
|
||||||
|
let len = binary_string.length;
|
||||||
|
let bytes = new Uint8Array(len);
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
bytes[i] = binary_string.charCodeAt(i);
|
||||||
|
}
|
||||||
|
let uint8 = new Uint8Array(bytes.buffer);
|
||||||
|
return uint8;
|
||||||
|
}
|
||||||
|
|
||||||
function putU32(b, n)
|
function putU32(b, n)
|
||||||
{
|
{
|
||||||
b.push(n & 0xff, (n >>> 8) & 0xff, (n >>> 16) & 0xff, (n >>> 24) & 0xff);
|
b.push(n & 0xff, (n >>> 8) & 0xff, (n >>> 16) & 0xff, (n >>> 24) & 0xff);
|
||||||
@@ -282,7 +293,8 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
generatePublicKey: function (privateKey){
|
generatePublicKey: function (privateKey){
|
||||||
return keyToBase64(generatePublicKey(privateKey))
|
privateKey = base64ToKey(privateKey);
|
||||||
|
return keyToBase64(generatePublicKey(privateKey));
|
||||||
},
|
},
|
||||||
|
|
||||||
generateZipFiles: function(res){
|
generateZipFiles: function(res){
|
||||||
|
2
src/static/js/wireguard.min.js
vendored
2
src/static/js/wireguard.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -37,18 +37,20 @@
|
|||||||
{% include "footer.html" %}
|
{% include "footer.html" %}
|
||||||
<script>
|
<script>
|
||||||
$("button").on("click", function(e){
|
$("button").on("click", function(e){
|
||||||
let req = $("input[required]");
|
e.preventDefault();
|
||||||
|
let $password = $("#password");
|
||||||
|
let $username = $("#username");
|
||||||
|
let req = [$password, $username];
|
||||||
let check = true
|
let check = true
|
||||||
for (let i = 0; i < req.length; i++){
|
for (let i = 0; i < req.length; i++){
|
||||||
if ($(req[i]).val().length === 0){
|
if ($(req[i]).val().length === 0){
|
||||||
$("button").html("Sign In");
|
$("button").html("Sign In");
|
||||||
check = false;
|
check = false;
|
||||||
$("input[required]").addClass("is-invalid");
|
$(req[i]).addClass("is-invalid");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (check){
|
if (check){
|
||||||
e.preventDefault();
|
|
||||||
$(this).html("Signing In...").attr("disabled", "disabled");
|
$(this).html("Signing In...").attr("disabled", "disabled");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/auth",
|
url: "/auth",
|
||||||
|
Reference in New Issue
Block a user