NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.58k stars 13.74k forks source link

No support for `MapAddress` in `tor` #235460

Open cvengler opened 1 year ago

cvengler commented 1 year ago

Describe the bug

There is no NixOS option supporting the MapAddress feature as described in the torrc(5) manual page. This feature is required however, when trying to connect to the Libera.chat IRC network through Tor.

Steps To Reproduce

N/A

Expected behavior

An option for this feature.

Screenshots

N/A

Additional context

N/A

Notify maintainers

@thoughtpolice @joachifm @prusnak

Metadata

N/A

prusnak commented 1 year ago

@emilengler can you try coming up with a pull request?

cvengler commented 1 year ago

I happen to be busy until mid of July.

nixy commented 1 year ago

While a dedicated nixos option might be nice, you do not need one to accomplish your goals here.

The services.tor.settings set follows RFC 42 so you are able to specify the MapAddress option like so:

  services.tor = {
    enable = true;
    settings = {
      MapAddress = [
        "Test.com 2.2.2.2"
      ];
    };
  };

You can then check the generated torrc and should see something like this:

MapAddress Test.com 2.2.2.2

An option would be nicer and can add some type checking, but not having one shouldn't be a blocking obstacle on this.