2022-11-29 04:20:00 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitLab, installShellFiles }:
|
2019-04-30 01:04:17 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "obfs4";
|
2023-06-20 19:22:38 +00:00
|
|
|
version = "0.1.0";
|
2019-04-30 01:04:17 +00:00
|
|
|
|
2022-11-29 04:20:00 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.torproject.org";
|
|
|
|
group = "tpo";
|
|
|
|
owner = "anti-censorship/pluggable-transports";
|
2023-06-20 19:22:38 +00:00
|
|
|
# We don't use pname = lyrebird and we use the old obfs4 name as the first
|
|
|
|
# will collide with lyrebird Gtk3 program.
|
|
|
|
repo = "lyrebird";
|
|
|
|
rev = "lyrebird-${version}";
|
|
|
|
hash = "sha256-2qBSmAsaR3hfxuoR5U5UAFQAepUOEUnIGoxc/GZ5LmY=";
|
2019-04-30 01:04:17 +00:00
|
|
|
};
|
|
|
|
|
2023-06-20 19:22:38 +00:00
|
|
|
vendorHash = "sha256-O8CsvpwL9cfipl4M0BquSnG9tBrt/+i+i80OYk2mNiI=";
|
2022-11-29 04:20:00 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
2019-04-30 01:04:17 +00:00
|
|
|
|
2022-11-29 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage doc/obfs4proxy.1
|
2023-06-20 19:22:38 +00:00
|
|
|
ln -s $out/share/man/man1/{obfs4proxy,lyrebird}.1
|
2022-11-29 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
2020-03-27 07:33:21 +00:00
|
|
|
meta = with lib; {
|
2022-11-11 20:01:44 +00:00
|
|
|
description = "Circumvents censorship by transforming Tor traffic between clients and bridges";
|
|
|
|
longDescription = ''
|
|
|
|
Obfs4proxy is a tool that attempts to circumvent censorship by
|
|
|
|
transforming the Tor traffic between the client and the bridge.
|
|
|
|
This way censors, who usually monitor traffic between the client
|
|
|
|
and the bridge, will see innocent-looking transformed traffic
|
|
|
|
instead of the actual Tor traffic. obfs4proxy implements the
|
|
|
|
obfsucation protocols obfs2, obfs3, and obfs4. It is written in
|
|
|
|
Go and is compliant with the Tor pluggable transports
|
|
|
|
specification, and its modular architecture allows it to support
|
|
|
|
multiple pluggable transports.
|
|
|
|
'';
|
2023-06-20 19:22:38 +00:00
|
|
|
homepage = "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird";
|
2021-12-18 09:25:46 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2023-06-20 19:22:38 +00:00
|
|
|
mainProgram = "lyrebird";
|
|
|
|
changelog = "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/-/raw/${src.rev}/ChangeLog";
|
2022-11-11 20:01:44 +00:00
|
|
|
license = with lib.licenses; [ bsd2 bsd3 gpl3 ];
|
2019-04-30 01:04:17 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|