Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor script #92

Merged
merged 38 commits into from
Jul 31, 2020
Merged

Refactor script #92

merged 38 commits into from
Jul 31, 2020

Conversation

randshell
Copy link
Contributor

@randshell randshell commented Jul 1, 2020

I followed the style of the openvpn-install repository and used some of its code. Thanks to everyone that contributed there.

The other additions are:

Tested on Debian 10

@randshell randshell mentioned this pull request Jul 1, 2020
4 tasks
The sed command is easier to understand than multiple grep

If IPv4 isn't available use IPv6
@randshell randshell changed the title Refactor script in functions Refactor script Jul 2, 2020
@randshell randshell marked this pull request as ready for review July 2, 2020 13:09
angristan#95 (comment)

Fedora might need this change too.
The server configuration has `$CLIENT_WG_IPV4/32,$CLIENT_WG_IPV6/128` and it is inconsistent with the client configuration `$CLIENT_WG_IPV4/24,$CLIENT_WG_IPV6/64`.

We only want 1 IP for the peer, so the fix is changing clients subnets to /32 and /128.
@randshell randshell mentioned this pull request Jul 4, 2020
Copy link

@wormi4ok wormi4ok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactoring looks like a step forward in terms of maintainability of the script. I hope it will be merged soon.

wireguard-install.sh Outdated Show resolved Hide resolved
wireguard-install.sh Outdated Show resolved Hide resolved
wireguard-install.sh Outdated Show resolved Hide resolved
randshell and others added 3 commits July 30, 2020 21:16
Remove OS condition. It also happen on Debian now, because we update the kernel from the backports, so we need to reboot
@angristan
Copy link
Owner

Great! Thank you very much for this

@angristan angristan merged commit 5f82b76 into angristan:master Jul 31, 2020
@randshell randshell deleted the functions branch July 31, 2020 19:12
randshell added a commit to randshell/wireguard-install that referenced this pull request Sep 6, 2020
Previously it wouldn't work when the HOST BIT was more than 1 digit angristan#92 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants