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

[#9] Add pre-shared keys generation #17

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

sancho20021
Copy link
Contributor

Description

  • Add a map in Wireguard Networkinfo that contains
    pre-shared keys for each pair of hosts.
  • Add command that generates keys on demand.

Fixes #9

Notes

Serialization

I didn't manage to serialize map of tuples to

{
  "1:2" : "secret"
}

Warnings

How to fix this?

WARN rustc_metadata::locator no metadata found: incompatible metadata version found: '/home/sancho20021/Documents/dev/serokell/wg-bond/target/debug/deps/libserde_derive-e6e6f80c4117187a.so'
WARN rustc_metadata::locator no metadata found: incompatible metadata version found: '/home/sancho20021/Documents/dev/serokell/wg-bond/target/debug/deps/libserde_derive-e6e6f80c4117187a.so'
WARN rustc_metadata::locator no metadata found: incompatible metadata version found: '/home/sancho20021/Documents/dev/serokell/wg-bond/target/debug/deps/libserde_derive-e6e6f80c4117187a.so'
WARN rustc_metadata::locator no metadata found: incompatible metadata version found: '/home/sancho20021/Documents/dev/serokell/wg-bond/target/debug/deps/libserde_derive-e6e6f80c4117187a.so'

sancho20021 and others added 11 commits June 5, 2022 11:51
Problem: No functionality to avoid specific IPs when generating
IPs for peers.

Solution: Add `ignore` command (only IPv4 for now).
Problem: `ignore` command was implemented only for IPv4.

Solution: implement for IPv6.
Problem: Current implementation is quite hard to understand.

Solution: Store reserved peer IPs in hashmap.
Problem: Ignored ranges and multiple IP networks introduced
difficulties in Peer ID -> IP mapping.

Solution: Allocate new peer IPs without using id and store them
in PeerInfo.
Problem: no tests for ignoring ip ranges.

Solution: add tests. Find bugs and fix them.
Problem: IP range is allowed to be ignored even if it contains
assigned IPs.

Solution: Abort ignore operation if necessary.
Problem: Sometimes it's more convenient to ignore everything
except specific IP range.

Solution: Implement `unignore` command by using already implemented
networks subtraction.
Solution: Add a map in Wireguard Networkinfo that contains
pre-shared keys for each pair of hosts.
Add command that generates keys on demand.
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.

Preshared keys
2 participants