Commit Graph

104 Commits

Author SHA1 Message Date
randomshell
4d0005fe00 Fix CLIENT BIT suggestion 2020-09-06 08:22:32 +00:00
randomshell
6188c4ee1d Fix substitution for the server IP
Previously it wouldn't work when the HOST BIT was more than 1 digit https://github.com/angristan/wireguard-install/pull/92#discussion_r460073438
2020-09-06 08:19:15 +00:00
randomshell
ee99d5b3c3 Clarify the client IP assignment 2020-08-23 10:05:49 +00:00
randomshell
be360d410b Allow headless user revokation by CLIENT_NAME 2020-08-23 09:59:27 +00:00
randomshell
8a97759803 Exit if the client IP is in use 2020-08-23 09:39:16 +00:00
randomshell
812ea87ca9 Merge client's IPv4 and IPv6 questions
The host bit would surely be the same for both IPv4 and IPv6.
2020-08-23 09:37:28 +00:00
randomshell
9d600fce15 Suggest the host bit of IPv4 when asking for the host bit of IPv6
The host bit would surely be the same for both IPv4 and IPv6.
2020-08-23 09:22:11 +00:00
randomshell
9a68ffa88b Exit if the client exists 2020-08-22 20:54:27 +00:00
randomshell
a193f5ad78 Allow a default IPv6 NIC
Missed to commit in the refactor PR
2020-08-22 20:35:36 +00:00
randomshell
7d4c11d507 Add headless documentation 2020-08-22 20:25:31 +00:00
randomshell
b94cc63601 Allow custom IP and NIC in headless mode
The default route shouldn't be forced
2020-08-22 20:25:19 +00:00
randomshell
fce88a38c5 Add headless support 2020-08-22 20:23:09 +00:00
Aleksander
2125b67cd7
Updated client name input restrictions and hint 2020-08-05 21:16:03 +03:00
Stanislas
2669e5af0c
Merge pull request #112 from randomshell/reboot
Fix reboot message
2020-08-04 14:09:22 +02:00
randomshell
d7523dc30e Fix reboot message 2020-08-04 10:50:59 +00:00
Stanislas Lange
2848ceefa5
Remove PPA removal for Ubuntu
An oversight from https://github.com/angristan/wireguard-install/pull/109
2020-08-04 12:20:27 +02:00
Stanislas Lange
2363b36735
Shellcheck: move excludes to action env 2020-08-03 17:47:31 +02:00
Stanislas
5a65e88667
Merge pull request #109 from angristan:ubuntu-no-ppa
Ubuntu: remove PPA, use native packages
2020-08-03 17:06:43 +02:00
Stanislas Lange
f147518050
Ubuntu: remove PPA, use native packages
Fix #108
2020-08-03 17:06:03 +02:00
Stanislas Lange
70b44989e6
Update README 2020-08-03 16:30:00 +02:00
Stanislas Lange
4138ada539
Format with shfmt 2020-08-03 16:26:29 +02:00
randomshell
1923aa17e6
Add clientRevoke() and improve addClient() (#94)
Added `clientRevoke()` based on openvpn-install repo, fixes #4 

Some other changes were required for this to work:
- client names aren't random anymore
- client names are saved above the `[Peer]` block of the server configuration file to keep track of them
- checks added for existing IPv4, IPv6 and client name. I used `until` to ask the user again if this is the case to not make him loose its work if, for example, the client name and IPv4 inserted are unique but not the IPv6.
  - using `until` instead of `exit` isn't idempotent but it's more user friendly. This will be a future goal.
- default options should be safe to use so the suggestion for the client IP is automatically incremented. The subnet of `SERVER_WG_IPV` is hard-coded inside `CLIENT_WG_IPV` for obvious reasons
2020-08-03 16:24:43 +02:00
Navratan Gupta
40cc13b1f4
Add uninstall feature (#88)
Fix #2 

Co-authored-by: Stanislas Lange <stanislas.lange@pm.me>
Co-authored-by: randomshell <randshell@protonmail.com>
2020-07-31 15:53:05 +02:00
Stanislas Lange
31bee45429
Format with shfmt 2020-07-31 15:02:26 +02:00
randomshell
5f82b76bc0
Refactor script (#92)
- cleaned some minor code
- use IPv6 if IPv4 isn't available
- add input validations, fixes #86 .
  - assign secondary DNS to primary DNS value if it's empty. Fixes #68 
- use `$SERVER_WG_IPV4` and `$SERVER_WG_IPV6` when suggesting the client IP
- save user DNS to `params` file and apply it to all clients, removing support for customizing DNS for individual clients. If this is a problem we can add again the code to allow customization but maybe use the sourced DNS as a suggestion for clients that need a different one
- add shellcheck ignores, needed for IDE that have shellcheck support
- escaped variables to `"${var}"` style
- updated README to reflect changes
- fixed the kernel mismatch issue on CentOS by updating the kernel https://github.com/angristan/wireguard-install/issues/95#issuecomment-653696198. Fedora might need this change too
- Use `firewall-cmd` only if `firewalld` is running. Fixes #95 
- Fix the client's subnet mask. Fixes #87 
- Save the client configuration in the correct `$HOME`. Fixes #96 

Co-authored-by: Chris Lewicki <chris@lewicki.dev>
Co-authored-by: Stanislas <angristan@pm.me>
2020-07-31 14:59:20 +02:00
Stanislas
c9b01e8d62
Merge pull request #106 from angristan/debian-backports
Fix Debian installation: use backports
2020-07-30 11:33:43 +02:00
Stanislas Lange
6e518633f3
Fix Debian installation: use backports
And limit to Debian 10. Fix #101
2020-07-29 12:24:22 +02:00
Stanislas
b6f09e7e87
Merge pull request #105 from angristan/dependabot/github_actions/ludeeus/action-shellcheck-0.5.0
Bump ludeeus/action-shellcheck from 0.4.1 to 0.5.0
2020-07-29 10:42:15 +02:00
dependabot[bot]
8464fc4ea2
Bump ludeeus/action-shellcheck from 0.4.1 to 0.5.0
Bumps [ludeeus/action-shellcheck](https://github.com/ludeeus/action-shellcheck) from 0.4.1 to 0.5.0.
- [Release notes](https://github.com/ludeeus/action-shellcheck/releases)
- [Commits](https://github.com/ludeeus/action-shellcheck/compare/0.4.1...c489c81f79527f818be72b97b918b06e75eaee6d)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-29 06:23:41 +00:00
Stanislas
746dbe4f7f
Merge pull request #104 from iandk/patch-2
Add colon
2020-07-27 12:48:59 +02:00
Ian
dfd7736a7d
Add colon 2020-07-27 11:54:06 +02:00
Stanislas
0af7427e85
Merge pull request #99 from robiiinos/misc/dependabot
Add Dependabot
2020-07-24 11:41:40 +02:00
Stanislas
66b1be42e4
Merge pull request #98 from robiiinos/misc/actions
Update GitHub Actions
2020-07-24 11:40:53 +02:00
robiiinos
13df507393 Update GitHub Actions 2020-07-18 21:49:19 +02:00
robiiinos
1ffbf87dc6 Add Dependabot 2020-07-18 21:32:09 +02:00
Stanislas
59570c786b
Merge pull request #85 from randomshell/patch-1
Change check for previously installed wireguard
2020-06-27 16:45:15 +02:00
randomshell
e04fa5356d
Change check for previously installed wireguard 2020-06-26 18:38:29 +00:00
Deface
7c6da8df0e
Arch: do not install wireguard-arch (#84) 2020-06-14 16:24:12 +02:00
Stanislas Lange
2e492d263a ci(workflow): refactor and add shmft 2020-04-28 15:13:14 +02:00
Stanislas Lange
efa9e5031a style(script) format with shfmt 2020-04-28 15:03:21 +02:00
Stanislas Lange
5b1ec52ac2 chore(args): rename add_client to add-client 2020-04-28 15:02:30 +02:00
Stanislas Lange
89258ba91d Mitigate Debian packaging issue
bc is missing as dependency: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956869

fix #70
2020-04-26 12:54:16 +02:00
Jelle Dekker
071466eccd
Generate unique pre-shared key for each client (#69) 2020-04-22 21:50:49 +02:00
Stanislas Lange
6e60d59ee4 Add add_client feature to README 2020-04-08 14:19:32 +02:00
Stanislas
f0891e7235
Add support for adding multiple clients (#58)
This commit puts the client creation logic into a function.
By running the script followed by `add_client`, the user will be asked a
few questions and a new peer will be added.
Removing client is **not** supported.
The client files have random names.

Fix for https://github.com/angristan/wireguard-install/issues/3
2020-04-08 14:09:22 +02:00
Stanislas Lange
7c2e299a02
Add missing colons to setup questions
Signed-off-by: Stanislas Lange <angristan@pm.me>
2020-04-03 18:33:36 +02:00
randomshell
3b342e531c
Prompt with random port during setup (#64) 2020-04-03 18:16:59 +02:00
Stanislas Lange
01bdb56b98 Make README more friendly 2020-03-27 22:21:57 +01:00
Stanislas Lange
8130dc7b70 Fix shellcheck 2020-03-21 21:53:06 +01:00
Andrew Prokhorenkov
a810f727dd
Use native WireGuard in Fedora >= 32 + support firewalld (#55) 2020-03-21 21:47:23 +01:00