WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@gmaclennan
Copy link

Pass through the clientAddress (from @hyperswarm.dht) to the opts.firewall function.

@gmaclennan
Copy link
Author

@mafintosh any chance of merging this?

@mafintosh
Copy link
Contributor

Can you explain the use case when its only for remote connections?

@gmaclennan
Copy link
Author

We use mdns for discovery on the local network (and cases where there is no internet connectivity). We advertise a different port on mdns (which doesn't connect through hyperswarm, but uses secretStream directly).

In order to avoid duplicate connections we want to block connections through hyperswarm from local IPs. It seems like the firewall is the best place to do this?

@mafintosh
Copy link
Contributor

Ok, we can add it to fix your immediate use case - will land local discovery at some point, but as a middle ground don't document it so its not guaranteed to be there in the future.

@gmaclennan
Copy link
Author

Want me to remove the README change in this PR?

@mafintosh
Copy link
Contributor

ya

@gmaclennan
Copy link
Author

Force-pushed to remove README changes

@sethvincent
Copy link
Contributor

It looks like this method call may also need to be updated. Is that right?

if (this._handleFirewall(peerInfo.publicKey, null)) {

@gmaclennan

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.

3 participants