Compare commits

...

7 Commits

Author SHA1 Message Date
Donald Cheng Hong Zou
cafa97f502 Changed version number 2022-01-31 16:09:50 -05:00
Donald Cheng Hong Zou
0d858493d5 Update README.md 2022-01-31 09:56:38 -05:00
Donald Cheng Hong Zou
99fb07c6b3 Fixed public key error with existed private key 2022-01-31 09:38:05 -05:00
Donald Zou
eaad971c0a Update README.md 2022-01-24 22:06:38 -05:00
Donald Cheng Hong Zou
377abd87fd Commit 2022-01-24 20:11:35 -05:00
Donald Zou
af71176296 Merge pull request #133 from donaldzou/v3.0.3-pr
v3.0.3
2022-01-23 19:34:06 -05:00
Donald Cheng Hong Zou
69737177ef Changed version number to v3.0.3 2022-01-23 19:30:43 -05:00
5 changed files with 45 additions and 10 deletions

View File

@@ -115,7 +115,7 @@
1. Download WGDashboard
```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
@@ -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_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** |
| `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_sort` | How configuration is sorting | `status` | Yes |
| | | | |
@@ -348,15 +348,34 @@ Endpoint = 0.0.0.0:51820
<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`
```shell
cd wgdashboard
cd wgdashboard/src
```
2. Update the dashboard
```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
@@ -365,6 +384,8 @@ Endpoint = 0.0.0.0:51820
./wgd.sh install
```
Starting with `v3.0`, you can simply do `./wgd.sh update` !! (I hope, lol)
## 🥘 Experimental Functions

View File

@@ -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
# Dashboard Version
DASHBOARD_VERSION = 'v3.0.1'
DASHBOARD_VERSION = 'v3.0.5'
# WireGuard's configuration path
WG_CONF_PATH = None
# Dashboard Config Name

View File

@@ -171,6 +171,17 @@
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)
{
b.push(n & 0xff, (n >>> 8) & 0xff, (n >>> 16) & 0xff, (n >>> 24) & 0xff);
@@ -282,7 +293,8 @@
};
},
generatePublicKey: function (privateKey){
return keyToBase64(generatePublicKey(privateKey))
privateKey = base64ToKey(privateKey);
return keyToBase64(generatePublicKey(privateKey));
},
generateZipFiles: function(res){

File diff suppressed because one or more lines are too long

View File

@@ -37,18 +37,20 @@
{% include "footer.html" %}
<script>
$("button").on("click", function(e){
let req = $("input[required]");
e.preventDefault();
let $password = $("#password");
let $username = $("#username");
let req = [$password, $username];
let check = true
for (let i = 0; i < req.length; i++){
if ($(req[i]).val().length === 0){
$("button").html("Sign In");
check = false;
$("input[required]").addClass("is-invalid");
$(req[i]).addClass("is-invalid");
break;
}
}
if (check){
e.preventDefault();
$(this).html("Signing In...").attr("disabled", "disabled");
$.ajax({
url: "/auth",