2024-08-16 20:54:19 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
nixosTests,
|
2024-08-21 10:43:53 +02:00
|
|
|
nix-update-script,
|
2024-08-21 10:41:56 +02:00
|
|
|
versionCheckHook,
|
2024-06-06 23:31:04 +02:00
|
|
|
}:
|
|
|
|
|
2024-06-13 10:18:57 +02:00
|
|
|
let
|
2024-09-04 15:33:05 +02:00
|
|
|
version = "10.1.1";
|
2024-06-13 10:18:57 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage {
|
2024-06-06 23:31:04 +02:00
|
|
|
pname = "wstunnel";
|
2024-06-13 10:18:57 +02:00
|
|
|
inherit version;
|
2024-06-06 23:31:04 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "erebe";
|
2024-06-13 10:18:57 +02:00
|
|
|
repo = "wstunnel";
|
2024-06-06 23:31:04 +02:00
|
|
|
rev = "v${version}";
|
2024-09-04 15:33:05 +02:00
|
|
|
hash = "sha256-qEWIyQkLRrmTH40S96hj8JXFz/VJChIbg8qEQc938nI=";
|
2024-06-06 23:31:04 +02:00
|
|
|
};
|
|
|
|
|
2024-09-04 15:33:05 +02:00
|
|
|
cargoHash = "sha256-3b+pX/qQuhOY1OYr+CfT5wtiJcEJ8CJJsQZ4QOcYv74=";
|
2024-06-06 23:31:04 +02:00
|
|
|
|
2024-08-21 10:41:56 +02:00
|
|
|
nativeBuildInputs = [ versionCheckHook ];
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
|
2024-06-06 23:31:04 +02:00
|
|
|
checkFlags = [
|
2024-06-13 10:18:57 +02:00
|
|
|
# Tries to launch a test container
|
2024-06-06 23:31:04 +02:00
|
|
|
"--skip=tcp::tests::test_proxy_connection"
|
2024-08-16 20:55:50 +02:00
|
|
|
"--skip=protocols::tcp::server::tests::test_proxy_connection"
|
2024-06-06 23:31:04 +02:00
|
|
|
];
|
|
|
|
|
2024-08-21 10:43:53 +02:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests = {
|
|
|
|
nixosTest = nixosTests.wstunnel;
|
|
|
|
};
|
2024-06-15 16:32:52 +02:00
|
|
|
};
|
2024-06-13 10:18:57 +02:00
|
|
|
|
2024-06-06 23:31:04 +02:00
|
|
|
meta = {
|
2024-06-13 10:18:57 +02:00
|
|
|
description = "Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI";
|
|
|
|
homepage = "https://github.com/erebe/wstunnel";
|
2024-06-13 13:52:15 +02:00
|
|
|
changelog = "https://github.com/erebe/wstunnel/releases/tag/v${version}";
|
2024-06-13 10:18:57 +02:00
|
|
|
license = lib.licenses.bsd3;
|
2024-08-16 20:54:19 +02:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
rvdp
|
|
|
|
neverbehave
|
|
|
|
];
|
2024-06-06 23:31:04 +02:00
|
|
|
mainProgram = "wstunnel";
|
|
|
|
};
|
|
|
|
}
|