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

proxychains-ng: default to dyld hooking method #375602

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions pkgs/by-name/pr/proxychains-ng/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
# "dlsym" for OSX version < 12
darwinHookMethod ? "dyld",
}:

stdenv.mkDerivation rec {
Expand All @@ -18,6 +21,16 @@ stdenv.mkDerivation rec {
patches = [
# https://github.com/NixOS/nixpkgs/issues/136093
./swap-priority-4-and-5-in-get_config_path.patch
# The fix is not present in v4.17; remove the patch next version update.
# https://github.com/rofl0r/proxychains-ng/issues/557
(fetchpatch {
url = "https://github.com/rofl0r/proxychains-ng/commit/fffd2532ad34bdf7bf430b128e4c68d1164833c6.patch";
hash = "sha256-l3qSFUDMUfVDW1Iw+R2aW/wRz4CxvpR4eOwx9KzuAAo=";
})
];

configureFlags = lib.optionals stdenv.isDarwin [
"--hookmethod=${darwinHookMethod}"
];

installFlags = [
Expand All @@ -29,7 +42,11 @@ stdenv.mkDerivation rec {
description = "Preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies";
homepage = "https://github.com/rofl0r/proxychains-ng";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ zenithal ];
platforms = platforms.linux ++ [ "aarch64-darwin" ];
maintainers = with maintainers; [
zenithal
usertam
];
platforms = platforms.unix;
mainProgram = "proxychains4";
};
}