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/tor: add hiddenServices.<name>.authorizeClient #34690

Merged
merged 2 commits into from Feb 8, 2018

Conversation

dotlambda
Copy link
Member

Motivation for this change

This is useful for restricting access to a hidden service, preventing DOS, ...
See https://tor.stackexchange.com/a/13418 for a nice explanation.
I initially discovered this over at the Home Assistant documentation: https://home-assistant.io/docs/ecosystem/tor/
The official documentation for HiddenServiceAuthorizeClient can be found here: https://www.torproject.org/docs/tor-manual.html.en

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) Sadly, there is no Tor test rigt now. Maybe I'll add one in the future.
  • 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.

authType = mkOption {
type = types.enum [ "basic" "stealth" ];
description = ''
Eeither <literal>"basic"</literal> for a general-purpose authorization protocol
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: "Eeither"

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@dotlambda
Copy link
Member Author

dotlambda commented Feb 7, 2018

Should I maybe add types.nonEmptyListOf in types.nix?
I implemented types.nonEmptyListOf and used it in the Tor module.

@dotlambda
Copy link
Member Author

/cc @offlinehacker

@joachifm
Copy link
Contributor

joachifm commented Feb 8, 2018

Makes sense to me. Thank you.

@dotlambda dotlambda deleted the tor branch February 8, 2018 17:20
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