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

[TASK] add WireGuard #198

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Conversation

AiyionPrime
Copy link
Contributor

Description

This implements basic support for WireGuard in accordance of the fastd-related paragraphs in code.

Motivation and Context

We, @freifunkh are currently building up our WireGuard infrastructure;
and giving back something to yanic after using it for years seemed appropriate.

Furthermore this resolves #183 and could bring new momentum to the discussion of #66.

Checklist:

  • My code follows the code style of this project.
  • I have added also tests for my new code.

I do not think fastd is documented either; so I'm unsure whether this is matter to document, or not.

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

replaces #187 in order to use correct branches

@AiyionPrime
Copy link
Contributor Author

@genofire genofire mentioned this pull request Mar 25, 2021
4 tasks
@AiyionPrime
Copy link
Contributor Author

We spoke about this yesterday in hackint#ffhb:
This is currently blocked by freifunk-gluon/gluon#2163 and freifunk-gluon/gluon#2168.

@AiyionPrime
Copy link
Contributor Author

Update:
This is currently blocked by freifunk-gluon/gluon#2168.

@AiyionPrime
Copy link
Contributor Author

This PR is currently not explicitly reflecting gluon-mesh-vpn-wireguards statistics-provider.
https://github.com/freifunk-gluon/gluon/blob/98664fdcb4dc90f5be33e8c9e17b87ffa4cfb80b/package/gluon-mesh-vpn-wireguard/src/respondd.c#L204

It basically wraps ubus call wgpeerselector.wg_mesh status, which returns:

{
	"peers": {
		"sn03": false,
		"sn02": false,
		"sn01": false,
		"sn10": false,
		"sn04": false,
		"sn09": false,
		"sn06": false,
		"sn07": false,
		"sn08": false,
		"sn05": {
			"established": 2635
		}
	}
}

Which in turn is put below statistics.mesh_vpn.
Yanic does currently have groups or peers there:

Groups map[string]*MeshVPNPeerGroup `json:"groups,omitempty"`

As the wireguard-statistics-struct mimics the fastd-response, this should be fine.
I think this is good to go. @lemoer do you have objections?

@AiyionPrime
Copy link
Contributor Author

@lemoer and I just agreed, this looks about right.

@AiyionPrime
Copy link
Contributor Author

@genofire Please let me know when you find time to look over this; preferably before Wednesday noon, then I'll be gone for a week.

@genofire
Copy link
Member

On first look, there is missing statistics

@genofire genofire merged commit bb0b23b into FreifunkBremen:main Sep 22, 2021
@genofire
Copy link
Member

open issue for it #206 - @AiyionPrime maybe you could make an PR for this too

@AiyionPrime AiyionPrime deleted the feature_wireguard branch September 22, 2021 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recognize WireGuard
2 participants