Merge pull request #20620 from rnhmjoj/fakeroute

fakeroute: init at 0.3

authored by Franz Pletz and committed by GitHub e394c305 7b561950

+87
+1
nixos/modules/module-list.nix
··· 358 358 ./services/networking/dnsmasq.nix 359 359 ./services/networking/ejabberd.nix 360 360 ./services/networking/fan.nix 361 + ./services/networking/fakeroute.nix 361 362 ./services/networking/ferm.nix 362 363 ./services/networking/firefox/sync-server.nix 363 364 ./services/networking/firewall.nix
+63
nixos/modules/services/networking/fakeroute.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + cfg = config.services.fakeroute; 7 + routeConf = pkgs.writeText "route.conf" (concatStringsSep "\n" cfg.route); 8 + 9 + in 10 + 11 + { 12 + 13 + ###### interface 14 + 15 + options = { 16 + 17 + services.fakeroute = { 18 + 19 + enable = mkOption { 20 + type = types.bool; 21 + default = false; 22 + description = '' 23 + Whether to enable the fakeroute service. 24 + ''; 25 + }; 26 + 27 + route = mkOption { 28 + type = types.listOf types.str; 29 + default = []; 30 + example = [ 31 + "216.102.187.130" 32 + "4.0.1.122" 33 + "198.116.142.34" 34 + "63.199.8.242" 35 + ]; 36 + description = '' 37 + Fake route that will appear after the real 38 + one to any host running a traceroute. 39 + ''; 40 + }; 41 + 42 + }; 43 + 44 + }; 45 + 46 + 47 + ###### implementation 48 + 49 + config = mkIf cfg.enable { 50 + systemd.services.fakeroute = { 51 + description = "Fakeroute Daemon"; 52 + after = [ "network.target" ]; 53 + wantedBy = [ "multi-user.target" ]; 54 + serviceConfig = { 55 + Type = "forking"; 56 + User = "root"; 57 + ExecStart = "${pkgs.fakeroute}/bin/fakeroute -f ${routeConf}"; 58 + }; 59 + }; 60 + 61 + }; 62 + 63 + }
+21
pkgs/tools/networking/fakeroute/default.nix
··· 1 + { stdenv, fetchurl }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "fakeroute-${version}"; 5 + version = "0.3"; 6 + 7 + src = fetchurl { 8 + url = "https://moxie.org/software/fakeroute/${name}.tar.gz"; 9 + sha256 = "1sp342rxgm1gz4mvi5vvz1knz7kn9px9s39ii3jdjp4ks7lr5c8f"; 10 + }; 11 + 12 + meta = with stdenv.lib; { 13 + description = '' 14 + Makes your machine appear to be anywhere on the internet 15 + to any host running a (UDP) unix traceroute 16 + ''; 17 + homepage = https://moxie.org/software/fakeroute/; 18 + license = licenses.bsd3; 19 + platform = platforms.linux; 20 + }; 21 + }
+2
pkgs/top-level/all-packages.nix
··· 1617 1617 1618 1618 fakeroot = callPackage ../tools/system/fakeroot { }; 1619 1619 1620 + fakeroute = callPackage ../tools/networking/fakeroute { }; 1621 + 1620 1622 fakechroot = callPackage ../tools/system/fakechroot { }; 1621 1623 1622 1624 fast-neural-doodle = callPackage ../tools/graphics/fast-neural-doodle {