From 54108e13e72e61e7839e811a5ffb8ff0e83048f9 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Mon, 28 Nov 2022 10:14:11 +0100 Subject: [PATCH] udp2raw: init at 20200818.0 --- pkgs/tools/networking/udp2raw/default.nix | 41 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/tools/networking/udp2raw/default.nix diff --git a/pkgs/tools/networking/udp2raw/default.nix b/pkgs/tools/networking/udp2raw/default.nix new file mode 100644 index 000000000000..fdb95b121f2d --- /dev/null +++ b/pkgs/tools/networking/udp2raw/default.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper +, iptables +}: + +stdenv.mkDerivation rec { + pname = "udp2raw"; + version = "20200818.0"; + + src = fetchFromGitHub { + owner = "wangyu-"; + repo = "udp2raw"; + rev = version; + hash = "sha256-TkTOfF1RfHJzt80q0mN4Fek3XSFY/8jdeAVtyluZBt8="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + makeFlags = [ "dynamic" ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp udp2raw_dynamic $out/bin/udp2raw + wrapProgram $out/bin/udp2raw --prefix PATH : "${lib.makeBinPath [ iptables ]}" + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/wangyu-/udp2raw"; + description = "A tunnel which turns UDP traffic into encrypted UDP/FakeTCP/ICMP traffic by using a raw socket"; + license = licenses.mit; + changelog = "https://github.com/wangyu-/udp2raw/releases/tag/${version}"; + maintainers = with maintainers; [ chvp ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc604ffd5989..3779de26dcb7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12665,6 +12665,8 @@ with pkgs; udftools = callPackage ../tools/filesystems/udftools {}; + udp2raw = callPackage ../tools/networking/udp2raw { }; + udpreplay = callPackage ../tools/networking/udpreplay { }; udpt = callPackage ../servers/udpt { };