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

Pass clientAddress to firewall #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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