Commit Graph

134 Commits

Author SHA1 Message Date
Matthew Nickson bc6f0f491f
Added MySQL as a datastore
The specific datastore backend to use can now be set by using
command line options or by using environment variables. The default
datastore backend is still jsondb but mysql can now also be used as a
backend. Environment variables have also been added to control settings
relevant to the database. SQL queries are made by directly accessing the
database/sql API. TLS is also supported.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-03-16 22:49:18 +00:00
Matthew Nickson 4a28486f73
Changed to flatfile schema
The DB schema has been changed to use a flatfile design in order to
reduce the complexity of queries and data processing. As no relational
features are required there is no point in using a relational schema.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-03-14 18:01:52 +00:00
Matthew Nickson 228d434405
Changed GetAllocatedIPs to use IStore
Previously the GetAllocatedIPs function used it's own database
connection. It now uses a pointer with the store.IStore interface to
access the DB.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-03-13 23:21:00 +00:00
Matthew Nickson 25588b5000
Changed datatypes for some fields
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-03-13 22:28:48 +00:00
Matthew Nickson 71ff13b085
Created database schema
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-03-13 11:37:13 +00:00
Computroniks 45b5a1f0d5
Added DB command line flags
Flags relating to databases

Signed-off-by: Computroniks <mnickson@sidingsmedia.com>
2022-03-07 20:56:39 +00:00
Radu Radu 4be3a65691
Change info box render size on large screens (#155) 2022-02-12 19:52:50 +01:00
Radu Radu ef552aaed4
Remove From prefix from SMTP (#154) 2022-02-12 19:52:42 +01:00
Matt3o12 71ede02e1c
PresharedKey is now only included if set (#141)
PresharedKey is now only set in the server and client config if the key
is set and not null (or empty).

I added this feature because I was importing old config files from
clients that did not have a preshared key set. Clients can be created
without preshared keys when editing db/client/ files manually. If the
field is not set, wireguard-ui creates invalid configs by producing:

PresharedKey =

This patch remvoes this behavior and just skips the preshared key if not
set.

Co-authored-by: Khanh Ngo <k@ndk.name>
2022-01-29 09:11:50 +01:00
Tagada af62be378f
SMTP support (#146) 2022-01-29 09:01:37 +01:00
Luke Lambert da99259f55
QR code behind button and faster modal loading (#144) 2022-01-29 08:53:56 +01:00
brittondodd 341f9b6a42
Allow passing extra allowed subnets (#114) 2022-01-29 08:45:00 +01:00
Khanh Ngo f3a788e3a4
Create Jenkinsfile 2021-12-05 14:02:07 +01:00
Khanh Ngo 65db3671a6 Merge branch 'master' of github.com:ngoduykhanh/wireguard-ui 2021-12-04 09:04:18 +01:00
Max Pedraza 1da9b8418e
I've modify the place where I inserted code to minimize the number of files touched. (#131) 2021-12-04 09:03:56 +01:00
Khanh Ngo edba46d2e1
Update Dockerfile 2021-12-04 09:02:29 +01:00
Khanh Ngo e74a3a808f
Dynamic year in footer page (#126) 2021-11-21 21:55:43 +01:00
Khanh Ngo 7f37d5f03b
chore: update stale.yml 2021-11-21 21:46:51 +01:00
Khanh Ngo 29c7d9e20a
chore: update buttons 2021-11-21 20:00:12 +01:00
Khanh Ngo ab533c7b59
chore: update stale.yml 2021-11-21 19:21:51 +01:00
Khanh Ngo d6959d3f2c
chore: update stale.yml 2021-11-21 19:21:21 +01:00
Khanh Ngo bf2b74fe84
Update healthcheck (#124) 2021-11-21 10:31:27 +01:00
Khanh Ngo 2d9eeb08e8
Make MTU and PersistentKeepalive optional (#123) 2021-11-20 21:02:23 +01:00
Khanh Ngo 3c1d894b44
Make client email input optional (#122) 2021-11-20 16:08:24 +01:00
Giannis Mathioudakis 1d29af3239
Bring back e-mail button in clients view (#120) 2021-11-13 10:49:07 +01:00
Luke Lambert abc0f74551
Fix flag to disable login (#119) 2021-11-12 21:17:18 +01:00
Giannis Mathioudakis d1507726a4
Fix form submit, preventing login. (#118) 2021-11-12 21:12:17 +01:00
Khanh Ngo 80ce35b133
Adjust datetime format in UI (#117) 2021-11-12 14:29:52 +01:00
Yumin Wu 4829dd3cfd
fix:Convenient to use the enter key on the keyboard (#116) 2021-11-12 13:39:50 +01:00
Hoang Nguyen 93e3e847f2
Update helper.js (#66) 2021-11-09 11:06:19 +01:00
Seubpong Monsar 4093722926
Fixed typo (#113) 2021-11-09 11:01:42 +01:00
Daniel Scrivano cb6dd3cef1
fix typo (#104) 2021-11-06 13:15:24 +01:00
Lukáš Kasič c1d541b78f
Fix generating IPv6 address (#105) 2021-11-06 13:15:14 +01:00
dan 59abd1506f
Expand env vars and flags (#84) 2021-08-29 20:26:12 +02:00
Khanh Ngo 630d62f3eb
Fix missing bottom_js from base template 2021-08-28 15:58:23 +02:00
Khanh Ngo 29277d5b86
Update release.yml 2021-08-28 15:41:56 +02:00
Georgios Komninos b7c0990dcb
Abstracts database storage & Status page UI (#88) 2021-08-28 15:10:30 +02:00
n4v41 7bb80c0c2e
fix issue when updating clients and send mail (#92) 2021-08-25 07:38:04 +02:00
Robin Horton acbe5b48e9
consume variables to set username and password otherwise use defaults (#90) 2021-08-24 21:41:52 +02:00
Georgios Komninos 1711530dda
Fixes security issue & Adds support to sent configuration via email (#83) 2021-08-08 19:55:59 +02:00
Khanh Ngo 7edcd1b80c
Fix release workflows 2021-08-05 20:46:23 +02:00
Alan Scherger 854a9fdde9
remove maxchars for copy+paste (#58) 2021-08-05 20:07:42 +02:00
Gerwim 2aa042b919
Added UseServerDNS option for clients who do not have to use the DNS specified in the server configuration. (#79) 2021-08-05 19:58:01 +02:00
Elijah Pavkin de0c9fd26b
Port forwarding for server (#69) 2021-08-05 19:50:31 +02:00
Gerwim 2fa4ca32ab
Updated README (#80) 2021-08-05 19:46:11 +02:00
dependabot[bot] 024aadbfd2
Bump ssri from 8.0.0 to 8.0.1 (#51)
Bumps [ssri](https://github.com/npm/ssri) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-26 20:02:02 +01:00
dependabot[bot] 872f0fbed5
Bump jquery-validation from 1.19.1 to 1.19.3 (#48)
Bumps [jquery-validation](https://github.com/jquery-validation/jquery-validation) from 1.19.1 to 1.19.3.
- [Release notes](https://github.com/jquery-validation/jquery-validation/releases)
- [Changelog](https://github.com/jquery-validation/jquery-validation/blob/master/changelog.md)
- [Commits](https://github.com/jquery-validation/jquery-validation/compare/1.19.1...1.19.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-26 20:01:48 +01:00
dependabot[bot] e482fa0988
Bump ini from 1.3.5 to 1.3.8 (#44)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-12 22:10:41 +01:00
Khanh Ngo 68058a356e
Update stale.yml 2020-10-12 22:50:55 +02:00
Khanh Ngo 1fad3a6d07
Create stale.yml 2020-10-12 22:49:42 +02:00