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

nixos/ipfs: Add option to disable local port scanning for ipfs daemon #40879

Merged
merged 2 commits into from May 24, 2018

Conversation

seppeljordan
Copy link
Contributor

@seppeljordan seppeljordan commented May 21, 2018

Motivation for this change

Hi, some hosting services really don't like port scanning. Unfortunately ipfs does this by default. This patch introduces a new option that disables this behavior.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@srhb srhb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest this phrasing for the first paragraph:

Whether to enable local discovery for the ipfs daemon. This will allow ipfs to scan ports on your local network. Some hosting services will ban you if you do this.

For the second paragraph, can you expand on what this means? It's not clear to me whether this means that I'd have to manually take action on some of the files in the dataDir.

@srhb
Copy link
Contributor

srhb commented May 23, 2018

(Essentially, the second paragraph should explain what the user should do in order to change the option after initializing ipfs, at the very least.)

@seppeljordan
Copy link
Contributor Author

@srhb thanks for your feedback. i'll change the phrasing, because I also like yours better. Also, I found a way to get around the issue mentioned in the second paragraph.

It is no longer required to change the config your ipfs repo manually if you change
localDiscovery option in nixos configuration after ipfs repository initialization.
@srhb
Copy link
Contributor

srhb commented May 24, 2018

Great, this is a much better solution. :)

@srhb srhb merged commit e27a450 into NixOS:master May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants