Commit Graph

123 Commits

Author SHA1 Message Date
Björn Bohman ffeb822a21 Set name and label at creation of client. Fixes #48 (#49)
* Set name and label at creation of client. Fixes #48

Changes behaviour of the add button from directly creating an
configuration to directing the user to an "create configuration" view.

If no name is given the default name is used same way as before.
This means that the go backend works with the old frontend as well with the new.

* Follow best practice in writing json.

Also handle err.

* 2 Bug fixes.

1. Fix bug introduced in last commit.
Don't try to json encode data that is already encoded.

2. Honor --max-number-client-config
When the creation moved from Clients.svelte to NewClient.svelte the
check in returned json for errors got lost. Now it is back.
2020-04-14 15:26:34 +02:00
Björn Bohman fb5cf90751 Add limit in how many configurations each user may have. (#47)
* Add limit in how many configurations each user may have.

If the option max-number-client-config is more than 0 this number is the
maximum number of clients a user can create.

The setting only limits creation. If a user had created more
configurations before this setting is enforced or lowered the user may
user the service as before, just cant create any more configurations.

* Fix spelling and fmt as suggested by @luna-duclos

* Alert user when limit is reached.

When the user tries to create more configurations than are allow an
alert will pop up.

* Change http status as discussed with @freddd

http 400 seems a better fit than 429 as a more generic error.
2020-03-20 15:09:01 +01:00
dependabot[bot] 005b2413b7 Bump acorn from 5.7.3 to 5.7.4 in /ui (#45)
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-16 09:25:05 +01:00
Björn Bohman f412ebbd94 Add timestamp to config (#44)
* Add 'Created' ad an timestamp when the config is created.

* Add field 'Modified' on ClientConfig

This field updates when the user changes name or label on their config.
2020-03-16 08:25:04 +01:00
Luna Duclos 9bcd558e0c Add --no-nat flag to disable NAT, NAT remains on by default (#41) 2020-03-11 16:17:15 +01:00
Markus Viitamäki 3f24fb2122 Merge pull request #35 from sclem/ui_client_list_race
ui: avoid "async race" with new client POST
2020-01-17 20:46:26 +01:00
sclem e176ae04c2 ui: avoid "async race" with new client POST
The getClients() and POST request were being issued one after another
(not waiting for the POST to return). This can cause the GET /clients to
return the old list before the user config is updated. Waiting for the
POST to return before retrieving the new client list fixes the race.

This behavior can be reproduced by adding a time.Sleep(time.Second) to
the CreateClient server handler.
2020-01-17 11:22:26 -05:00
Markus Viitamäki 8fc4378316 Merge pull request #31 from eest/enable_ip_forward_if_disabled
Only enable IP forwarding if it is disabled
2019-12-27 15:36:10 +02:00
Patrik Lundin e62b6121d1 Only enable IP forwarding if it is disabled
Any value other than 0 is considered enabled:
https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

Fixes #30
2019-12-26 11:17:26 +01:00
Fredrik Grönqvist 0bc3c3bc58 Update README.md 2019-12-20 13:35:30 +01:00
Fredrik Grönqvist 82c45bd349 Update push_master.yaml 2019-12-19 15:44:41 +01:00
Fredrik Grönqvist fe9ab83ac9 reverted to dockerhub 2019-12-19 15:36:55 +01:00
Fredrik Grönqvist 4a5c38b71b Update push_master.yaml 2019-12-19 15:22:25 +01:00
Fredrik Grönqvist da0bdb2a5f Update push_master.yaml 2019-12-19 15:07:52 +01:00
Fredrik Grönqvist 44ccd065ac Upload to dockerhub instead (#29) 2019-12-19 14:49:42 +01:00
Fredrik Grönqvist 5fafa92046 org name should be lowercase (#28)
* org name should be lowercase

* also added case for pull request
2019-12-19 13:22:39 +01:00
Fredrik Grönqvist b471f3dff5 Github actions & clean up to be able to do linting (#27)
* Github actions & clean up to be able to do linting

* renamed user

* pushing images to github packages

* Fixed tags
2019-12-19 13:03:03 +01:00
Fredrik Grönqvist a127e67720 Merge pull request #26 from EmbarkStudios/fix-go-sec
Fixing issues detected by gosec
2019-12-16 08:22:08 +01:00
Fredrik Grönqvist dcec3d8067 Fixed import 2019-12-13 14:33:35 +01:00
Fredrik Grönqvist 8413219dec gosec: added error handling & path cleaning 2019-12-13 12:51:22 +01:00
Fredrik Grönqvist bf2c550334 Merge pull request #25 from EmbarkStudios/buildkite-artifact-upload-remove
Removes uploading artifact using buildkite agent
2019-12-13 10:41:39 +01:00
Fredrik Grönqvist 301b1b4a5a Removes uploading artifact to buildkite 2019-12-13 10:32:38 +01:00
Fredrik Grönqvist e8a6da52dc Merge pull request #24 from EmbarkStudios/buildah-dockerfile
make buildah use dockerfile
2019-12-13 10:19:39 +01:00
Fredrik Grönqvist aa5f76c6cb make buildah use dockerfile 2019-12-13 09:51:47 +01:00
Markus Viitamäki e854d7960f Merge pull request #23 from EmbarkStudios/temp-fix-build
Separated master & !master
2019-12-12 11:04:58 +01:00
Fredrik Grönqvist a8fd12a147 Separated master & !master 2019-12-12 11:01:42 +01:00
Fredrik Grönqvist 42f535e2fe Merge pull request #22 from EmbarkStudios/add-wait-buildkite
Added wait
2019-12-12 10:45:53 +01:00
Fredrik Grönqvist 90bbeae731 Added wait 2019-12-12 10:41:57 +01:00
Fredrik Grönqvist ec5da5449b Merge pull request #21 from EmbarkStudios/only-push-master
Added a branch-filter to only push image on master
2019-12-12 10:34:40 +01:00
Fredrik Grönqvist 1963cb5691 Added a branch-filter to only push image on master 2019-12-12 09:20:15 +01:00
Markus Viitamäki b867a0b99b Merge pull request #18 from EmbarkStudios/upgrade-webpack
Upgraded webpack
2019-12-10 14:57:32 +01:00
Fredrik Grönqvist c34711ebc0 Upgraded webpack 2019-12-10 14:46:17 +01:00
Markus Viitamäki 6f8fac9157 Update documentation for docker. Should work better for everyone now! :)
Thank you @djarbz for the solution.
2019-11-22 18:28:42 +01:00
Markus Viitamäki 2268babc90 Generated config invalid with DNS. Fixes #9 2019-11-22 17:29:14 +01:00
Markus Viitamäki 39e7728791 172.72.72.0/24 => 172.31.255.0/24, Fixes #14 2019-11-13 12:50:09 -05:00
Daniel Lundin 9ac27d4bb8 Push image with docker manifest format 2019-10-17 16:01:13 +02:00
Daniel Lundin b27670b83d Add script to build separate binary artifact 2019-10-12 16:44:38 +02:00
Daniel Lundin db46cbe333 Ensure only alphanumerics in generated config file name v1.0.0 2019-10-12 14:02:43 +02:00
Daniel Lundin 8fae238166 Set content-type for config to avoid .txt suffixes on some devices 2019-10-09 13:17:22 +02:00
Daniel Lundin 2c046634ff Update screenshot 2019-10-09 13:12:09 +02:00
Daniel Lundin 21816558f3 Proper captilization of WireGuard 2019-10-09 13:02:48 +02:00
Daniel Lundin 0aeff20c97 Hide end nav section on small screens 2019-10-09 12:54:36 +02:00
Daniel Lundin c2acb485c7 Add footer with link + copyright notice 2019-10-09 12:45:43 +02:00
Daniel Lundin f5e41c937e Add some basic instructions 2019-10-09 12:31:38 +02:00
Daniel Lundin 9d62d3a9c5 Set image format to docker so it works with docker pull 2019-10-07 17:28:55 +02:00
Daniel Lundin 1c5fe35333 Add screenshot 2019-10-03 21:53:51 +02:00
Daniel Lundin 19fbecc6d5 Update documentation 2019-10-03 21:45:07 +02:00
Daniel Lundin e0361cd5a5 Fix wrong arg order in config 2019-10-03 21:13:23 +02:00
Daniel Lundin f1b8498748 Add optional flag for DNS config. Remove hard-coded google dns. 2019-10-03 21:09:06 +02:00
Daniel Lundin 2706f183a6 Remove unnecessary newline at the beginning of the config 2019-10-03 21:05:22 +02:00