Open gmaclennan opened 1 year ago
@mafintosh any chance of merging this?
Can you explain the use case when its only for remote connections?
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?
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.
Want me to remove the README change in this PR?
ya
Force-pushed to remove README changes
It looks like this method call may also need to be updated. Is that right? https://github.com/holepunchto/hyperswarm/blob/80ea460c2e2774c6aaa043009150893df6dc8489/index.js#L139 @gmaclennan
Pass through the
clientAddress
(from@hyperswarm.dht
) to theopts.firewall
function.