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

Add UDP Broadcasts #10

Merged
merged 10 commits into from May 21, 2019
Merged

Add UDP Broadcasts #10

merged 10 commits into from May 21, 2019

Conversation

cryptix
Copy link
Member

@cryptix cryptix commented Feb 22, 2019

This makes the sbot send the advertisments out to local LAN to get connections.

@cryptix
Copy link
Member Author

cryptix commented Feb 22, 2019

@keks already did a review but maybe you want to have another look

@cryptix
Copy link
Member Author

cryptix commented Feb 22, 2019

tested this by hand and it's working. This only implements sending them, not listening so this depends on peers connecting back.

ps: also found ssbc/ssb-server#640 which might give an idea what to look out for

PragmaticCypher and others added 6 commits March 27, 2019 16:25
Advertise the scuttlebutt service to the local network.

Still needed:

  - Tests
  - Documentation
  - IPv6 support
Use the constant 'DefaultPort' to specify the default ScuttleButt to
improve legibility.
just more of my style tbh.

* some more error comments
* actualt multiaddr formatting case
* use DefaultPort more
* add send & receive test
* multiserver parser
* break import cycle by moving node to it's own package
* notify for incoming adverts
* go-sbot enable flag
* only connect to peers which aren't connected already
IPv6 addresses should be defined in brackets when including port numbers.
Expect the port to be specified entirely by the received Net Address.
Emit local network UDP advertisements on all local addresses when an
unspecified address such as '0.0.0.0' is given.
cryptix and others added 4 commits May 21, 2019 18:02
* skip lookpack addresses
* go-sbot: -dbgdir for writing logs to a dir instead of stderr
* multiserv: fallback to parsing hosts
* gossip.connect use multiserv
Add an integration test for the linux network stack using network
namespaces.  Test against a small set of IPv4 subnets, and IPv6, and
confirm the received advertisement.

For the test to work, changes to the SUDO file are suggested within the
integration test file.

Include, but comment out, a breaking test which requires fixing.
Properly handle DefaultPort as an int.

Fixes: 88e6c4
I think _node_ is a confusing enough term as it is in p2p stuff.
additionally so since the ref implementation of ssb is in nodejs.

move test code around and use discoverer:
the defered cleanups (to remove the netns and bridge) needs manual
intervention when a test fails (name exists on next run) so i moved the
remove before the create to just wipe the previous run.

also: split advertiser' listen portion into discoverer

on the multi-network test code:
i turned the cmd.Run of the sending into returning the cmd.

i start and wait it in a goroutine and sync it with the receive

this way there is only the sleep in TestSendAdvertisement and it's
network is not killed by the next test case before it's done.
@cryptix cryptix merged commit 2f0e0ff into master May 21, 2019
@cryptix cryptix deleted the add/udp-broadcast branch May 21, 2019 16:50
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.

None yet

2 participants