mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-11-22 02:31:57 +01: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>
|
||||
[![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)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/vx3r/wg-gen-web)](https://goreportcard.com/report/github.com/vx3r/wg-gen-web)
|
||||
![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)
|
||||
[![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 ?
|
||||
|
||||
@ -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