mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
Merge pull request #20620 from rnhmjoj/fakeroute
fakeroute: init at 0.3
This commit is contained in:
commit
e394c305a8
4 changed files with 87 additions and 0 deletions
|
@ -358,6 +358,7 @@
|
||||||
./services/networking/dnsmasq.nix
|
./services/networking/dnsmasq.nix
|
||||||
./services/networking/ejabberd.nix
|
./services/networking/ejabberd.nix
|
||||||
./services/networking/fan.nix
|
./services/networking/fan.nix
|
||||||
|
./services/networking/fakeroute.nix
|
||||||
./services/networking/ferm.nix
|
./services/networking/ferm.nix
|
||||||
./services/networking/firefox/sync-server.nix
|
./services/networking/firefox/sync-server.nix
|
||||||
./services/networking/firewall.nix
|
./services/networking/firewall.nix
|
||||||
|
|
63
nixos/modules/services/networking/fakeroute.nix
Normal file
63
nixos/modules/services/networking/fakeroute.nix
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.fakeroute;
|
||||||
|
routeConf = pkgs.writeText "route.conf" (concatStringsSep "\n" cfg.route);
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.fakeroute = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to enable the fakeroute service.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
route = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
example = [
|
||||||
|
"216.102.187.130"
|
||||||
|
"4.0.1.122"
|
||||||
|
"198.116.142.34"
|
||||||
|
"63.199.8.242"
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Fake route that will appear after the real
|
||||||
|
one to any host running a traceroute.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.services.fakeroute = {
|
||||||
|
description = "Fakeroute Daemon";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "forking";
|
||||||
|
User = "root";
|
||||||
|
ExecStart = "${pkgs.fakeroute}/bin/fakeroute -f ${routeConf}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
21
pkgs/tools/networking/fakeroute/default.nix
Normal file
21
pkgs/tools/networking/fakeroute/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ stdenv, fetchurl }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "fakeroute-${version}";
|
||||||
|
version = "0.3";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://moxie.org/software/fakeroute/${name}.tar.gz";
|
||||||
|
sha256 = "1sp342rxgm1gz4mvi5vvz1knz7kn9px9s39ii3jdjp4ks7lr5c8f";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = ''
|
||||||
|
Makes your machine appear to be anywhere on the internet
|
||||||
|
to any host running a (UDP) unix traceroute
|
||||||
|
'';
|
||||||
|
homepage = https://moxie.org/software/fakeroute/;
|
||||||
|
license = licenses.bsd3;
|
||||||
|
platform = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1617,6 +1617,8 @@ in
|
||||||
|
|
||||||
fakeroot = callPackage ../tools/system/fakeroot { };
|
fakeroot = callPackage ../tools/system/fakeroot { };
|
||||||
|
|
||||||
|
fakeroute = callPackage ../tools/networking/fakeroute { };
|
||||||
|
|
||||||
fakechroot = callPackage ../tools/system/fakechroot { };
|
fakechroot = callPackage ../tools/system/fakechroot { };
|
||||||
|
|
||||||
fast-neural-doodle = callPackage ../tools/graphics/fast-neural-doodle {
|
fast-neural-doodle = callPackage ../tools/graphics/fast-neural-doodle {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue