[feature] Added parser for Wireguard #100#103
Conversation
c50919c to
2a5dd77
Compare
50ff9e2 to
e48a281
Compare
nemesifier
left a comment
There was a problem hiding this comment.
The list of available parsers need to be updated: https://github.com/openwisp/netdiff#parsers, we need to add at least the information of the command that needs to be executed to get wireguard info.
nemesifier
left a comment
There was a problem hiding this comment.
In order to improve the deafult readability a bit we could set the NetJSON label to the allowed IPs.
nemesifier
left a comment
There was a problem hiding this comment.
Let's change also the detection of down links as discussed: looking at latest handshake, it's zero or older than 5 minutes (use unix timestamp to calculate these to avoid time zone issues) we can consider the link down.
nemesifier
left a comment
There was a problem hiding this comment.
Can you please add assertions which make sure that changes of the status of the links from up to down are noticed by the parser? We'll need to have at least two wg-data.txt files with different links and make sure the parser can notice differences when going from one state to the other and vices versa.
At the moment in my testing I have noticed the parser cannot detect links which should be flagged as down, it seems to me those links are simply ignored right now which is not correct.
Yes because if it is not up, ignoring it will remove it from diff of old and new wireguard parse and will show it as down in topology graph. In openwisp-network-topology, I tested it by creating topology using the fetch strategy and after 5 minutes without updating the url I ran the fetch strategy again and it showed as down. I have added a diff test for the same. |
nemesifier
left a comment
There was a problem hiding this comment.
One request: can we make sure we do not save the private key?
It's a security concern.
425c5d8 to
32ee9d2
Compare
nemesifier
left a comment
There was a problem hiding this comment.
We're almost there!
Please update the README section which lists parsers:
https://github.com/openwisp/netdiff#parsers.
See also my comments below.
Closes #100