mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2025-02-22 11:45:39 +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">
|
||||
<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>
|
||||
<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>
|
||||
</p>
|
||||
[](https://gitlab.127-0-0-1.fr/vx3r/wg-gen-web/commits/master)
|
||||
[](https://goreportcard.com/report/github.com/vx3r/wg-gen-web)
|
||||

|
||||
[](http://www.wtfpl.net/about/)
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Whay another one ?
|
||||
|
||||
@ -96,6 +100,12 @@ while inotifywait -e modify -e create /etc/wireguard; do
|
||||
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
|
||||
|
||||
* Generation or application of any `iptables` or `nftables` rules
|
||||
|
@ -171,6 +171,7 @@
|
||||
v-on="on"
|
||||
color="success"
|
||||
v-model="client.enable"
|
||||
v-on:change="updateClient(client)"
|
||||
/>
|
||||
</template>
|
||||
<span>Enable or disable this client</span>
|
||||
@ -297,7 +298,7 @@
|
||||
<v-btn
|
||||
:disabled="!valid"
|
||||
color="success"
|
||||
@click="updateClient()"
|
||||
@click="updateClient(clientToEdit)"
|
||||
>
|
||||
Submit
|
||||
</v-btn>
|
||||
@ -376,6 +377,9 @@
|
||||
});
|
||||
},
|
||||
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.notify('success', "Server successfully updated");
|
||||
this.getData()
|
||||
@ -414,9 +418,9 @@
|
||||
return `${base}/client/${id}/config`
|
||||
}
|
||||
},
|
||||
updateClient() {
|
||||
updateClient(client) {
|
||||
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.getData()
|
||||
}).catch((e) => {
|
||||
|
Loading…
Reference in New Issue
Block a user