mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-12-18 00:13:23 +00:00
Readme existing conf. Ui parse int
This commit is contained in:
parent
e6c562c51d
commit
28c3c405c7
18
README.md
18
README.md
@ -4,10 +4,14 @@ Simple Web based configuration generator for [WireGuard](https://wireguard.com).
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<p align="left">
|
[![pipeline status](https://gitlab.127-0-0-1.fr/vx3r/wg-gen-web/badges/master/pipeline.svg)](https://gitlab.127-0-0-1.fr/vx3r/wg-gen-web/commits/master)
|
||||||
<a href="https://goreportcard.com/report/github.com/vx3r/wg-gen-web"><img src="https://goreportcard.com/badge/github.com/vx3r/wg-gen-web" alt="Go Report Card"></a>
|
[![Go Report Card](https://goreportcard.com/badge/github.com/vx3r/wg-gen-web)](https://goreportcard.com/report/github.com/vx3r/wg-gen-web)
|
||||||
<a href="https://gitlab.127-0-0-1.fr/vx3r/wg-gen-web/commits/master"><img src="https://gitlab.127-0-0-1.fr/vx3r/wg-gen-web/badges/master/pipeline.svg" alt="Gitlab CI / CD"></a>
|
![Gitlab pipeline status (self-hosted)](https://img.shields.io/gitlab/pipeline/vx3r/wg-gen-web?gitlab_url=https%3A%2F%2Fgitlab.127-0-0-1.fr%2F)
|
||||||
</p>
|
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/)
|
||||||
|
![GitHub last commit](https://img.shields.io/github/last-commit/vx3r/wg-gen-web)
|
||||||
|
![Docker Pulls](https://img.shields.io/docker/pulls/vx3r/wg-gen-web)
|
||||||
|
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vx3r/wg-gen-web)
|
||||||
|
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/vx3r/wg-gen-web)
|
||||||
|
|
||||||
## Whay another one ?
|
## Whay another one ?
|
||||||
|
|
||||||
@ -96,6 +100,12 @@ while inotifywait -e modify -e create /etc/wireguard; do
|
|||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How to use with existing WireGuard configuration
|
||||||
|
|
||||||
|
After first run Wg Gen Web will create `server.json` in data directory with alla server informations.
|
||||||
|
|
||||||
|
Fill free to modify this file in order to use your existing keys
|
||||||
|
|
||||||
## What is out of scope
|
## What is out of scope
|
||||||
|
|
||||||
* Generation or application of any `iptables` or `nftables` rules
|
* Generation or application of any `iptables` or `nftables` rules
|
||||||
|
@ -171,6 +171,7 @@
|
|||||||
v-on="on"
|
v-on="on"
|
||||||
color="success"
|
color="success"
|
||||||
v-model="client.enable"
|
v-model="client.enable"
|
||||||
|
v-on:change="updateClient(client)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<span>Enable or disable this client</span>
|
<span>Enable or disable this client</span>
|
||||||
@ -297,7 +298,7 @@
|
|||||||
<v-btn
|
<v-btn
|
||||||
:disabled="!valid"
|
:disabled="!valid"
|
||||||
color="success"
|
color="success"
|
||||||
@click="updateClient()"
|
@click="updateClient(clientToEdit)"
|
||||||
>
|
>
|
||||||
Submit
|
Submit
|
||||||
</v-btn>
|
</v-btn>
|
||||||
@ -376,6 +377,9 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateServer () {
|
updateServer () {
|
||||||
|
// convert int values
|
||||||
|
this.server.listenPort = parseInt(this.server.listenPort, 10);
|
||||||
|
this.server.persistentKeepalive = parseInt(this.server.persistentKeepalive, 10);
|
||||||
this.$patch('/server', this.server).then((res) => {
|
this.$patch('/server', this.server).then((res) => {
|
||||||
this.notify('success', "Server successfully updated");
|
this.notify('success', "Server successfully updated");
|
||||||
this.getData()
|
this.getData()
|
||||||
@ -414,9 +418,9 @@
|
|||||||
return `${base}/client/${id}/config`
|
return `${base}/client/${id}/config`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateClient() {
|
updateClient(client) {
|
||||||
this.dialogEditClient = false;
|
this.dialogEditClient = false;
|
||||||
this.$patch(`/client/${this.clientToEdit.id}`, this.clientToEdit).then((res) => {
|
this.$patch(`/client/${client.id}`, client).then((res) => {
|
||||||
this.notify('success', "Client successfully updated");
|
this.notify('success', "Client successfully updated");
|
||||||
this.getData()
|
this.getData()
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user