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

[WIP] net/wireguard: new plugin #779

Merged
merged 107 commits into from
Aug 11, 2018
Merged

[WIP] net/wireguard: new plugin #779

merged 107 commits into from
Aug 11, 2018

Conversation

mimugmail
Copy link
Member

As the name says, new plugin.

My current problem is that command

configctl wireguard genkey private returns just an OK, so the value in OK will be put in the config.xml (see ServerController.php).

When I execute the command from actions.conf it returns the correct value.

@AdSchellevis @fichtner any idea how to return the value and not the status via configd?

Copy link
Member

@fichtner fichtner left a comment

Choose a reason for hiding this comment

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

ok for 0.1 minus comments

@wget
Copy link

wget commented Aug 9, 2018

@fabianfrz Make sure you use English next time :)

@mimugmail
Copy link
Member Author

Ok, I think I got them all ... I also added pkill sind wg-quick down shuts down the interface and kill wireguard-go but not the wg-quick bash foo. @zx2c4 is this FreeBSD related?

@mimugmail
Copy link
Member Author

@fichtner removing a server instance leaves a stale wgX.conf on the file system. Can I add a rm -f *conf to wireguard folder in setup.sh?

@fichtner
Copy link
Member

no, you will purge active configs.... template generation -> setup.sh -> start service -> no configs ;)

@mimugmail
Copy link
Member Author

remove configs after init stop in actions.conf ?

@fichtner
Copy link
Member

No you have to generate a list of active configs in the rc.conf file. then you also don't have to use cd && ls / find to find them

@mimugmail
Copy link
Member Author

@fichtner semi-done :)

@fichtner @fabianfrz I could need a bit help with: https://github.com/mimugmail/plugins/blob/wg/net/wireguard/src/opnsense/service/templates/OPNsense/Wireguard/opnsense-wireguard#L12

It writes wireguard_config="0 1" .. but I need to prepend "wg" before instance number. No idea how to do it with Jinja

@fichtner
Copy link
Member

@mimugmail
Copy link
Member Author

Do you know the proper sytanx? I already tried do activeservers.append('wg'servers.instance) %} but got some errors from configd

@fichtner
Copy link
Member

fichtner commented Aug 10, 2018

+ or . I don't know it very well

@mimugmail
Copy link
Member Author

Ok, got it. Now it's able to merge .. or "stable" for 0.1 :)

@fabianfrz
Copy link
Member

@fichtner php is the only language I know with a dot for string concatenation. All others use only the plus or functions

@fichtner
Copy link
Member

fichtner commented Aug 10, 2018 via email

@fabianfrz fabianfrz added the feature Adding new functionality label Aug 11, 2018
@fabianfrz
Copy link
Member

@fichtner merge?

@fichtner fichtner merged commit 31a46df into opnsense:master Aug 11, 2018
@fichtner
Copy link
Member

Merged, thanks all!

@mimugmail mimugmail deleted the wg branch August 12, 2018 04:38
fichtner pushed a commit that referenced this pull request Aug 12, 2018
(cherry picked from commit 31a46df)
(cherry picked from commit 68a0b0b)
(cherry picked from commit afb93f5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

Successfully merging this pull request may close these issues.

7 participants