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

Failed to create AutoNAT service with LIBP2P_FORCE_PNET=1 #6250

Closed
requilence opened this issue Apr 24, 2019 · 0 comments
Closed

Failed to create AutoNAT service with LIBP2P_FORCE_PNET=1 #6250

requilence opened this issue Apr 24, 2019 · 0 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@requilence
Copy link
Contributor

requilence commented Apr 24, 2019

Version information:

0.4.19, 0.4.20 and master

Type:

bug

Description:

  • EnableAutoNATService=true in the config
  • LIBP2P_FORCE_PNET=1 in the env
  • swarm.key is in the place

I got:

p2p-config: tried to create a libp2p node with no Private Network Protector but usage of Private Networks is forced by the enviroment
error creating online ipfs node: privnet: private network was not configured but is enforced by the environment

The reason is that we don't pass libp2p.PrivateNetwork option to the autonat.NewAutoNATService() so the check is failed in the libp2p: https://github.com/libp2p/go-libp2p/blob/master/config/config.go#L78

  • As I understand we still need to pass the private network option for the autonat service(server) so only the clients from the same private network will be able to connect to it
  • I made the PR but not sure if I made it right as I not familiar with the new go.uber.org/fx approach implemented after 0.4.20
@magik6k magik6k added the kind/bug A bug in existing code (including security flaws) label Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

3 participants