Files
nixpkgs/pkgs/by-name/ph/phantomsocks/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

44 lines
1.2 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
libpcap,
# Can't be build with both pcap and rawsocket tags
withPcap ? (!stdenv.hostPlatform.isLinux && !withRawsocket),
withRawsocket ? (stdenv.hostPlatform.isLinux && !withPcap),
}:
buildGoModule {
pname = "phantomsocks";
version = "0-unstable-2025-08-07";
src = fetchFromGitHub {
owner = "macronut";
repo = "phantomsocks";
rev = "c52f1bde25ed5df07eb4cd010a3d508c5cf023e0";
hash = "sha256-V9XBCHih409IqKx3TM37fvxYzP0bv46M0DgKgj64RFg=";
};
vendorHash = "sha256-0MJlz7HAhRThn8O42yhvU3p5HgTG8AkPM0ksSjWYAC4=";
ldflags = [
"-s"
"-w"
];
buildInputs = lib.optional withPcap libpcap;
tags = lib.optional withPcap "pcap" ++ lib.optional withRawsocket "rawsocket";
meta = with lib; {
homepage = "https://github.com/macronut/phantomsocks";
description = "Cross-platform proxy client/server for Linux/Windows/macOS";
longDescription = ''
A cross-platform proxy tool that could be used to modify TCP packets
to implement TCB desync to bypass detection and censoring.
'';
license = licenses.lgpl3Only;
maintainers = with maintainers; [ oluceps ];
mainProgram = "phantomsocks";
};
}