2024-06-24 18:47:55 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2024-06-20 14:57:18 +00:00
|
|
|
, rustPlatform
|
2024-06-24 18:47:55 +00:00
|
|
|
, testers
|
|
|
|
, wstunnel
|
|
|
|
, nixosTests
|
2024-06-20 14:57:18 +00:00
|
|
|
}:
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
let
|
|
|
|
version = "9.7.0";
|
|
|
|
in
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage {
|
2024-06-20 14:57:18 +00:00
|
|
|
pname = "wstunnel";
|
2024-06-24 18:47:55 +00:00
|
|
|
inherit version;
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "erebe";
|
2024-06-24 18:47:55 +00:00
|
|
|
repo = "wstunnel";
|
2024-06-20 14:57:18 +00:00
|
|
|
rev = "v${version}";
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-8bLccR6ZmldmrvjlZKFHEa4PoLzyUcLkyQbwSrJjoyY=";
|
2024-06-20 14:57:18 +00:00
|
|
|
};
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
cargoHash = "sha256-IAq7Fyr6Ne1Bq18WfqBoppel9FOWSs8PkiXKMwcJ26c=";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
checkFlags = [
|
2024-06-24 18:47:55 +00:00
|
|
|
# Tries to launch a test container
|
2024-06-20 14:57:18 +00:00
|
|
|
"--skip=tcp::tests::test_proxy_connection"
|
|
|
|
];
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion { package = wstunnel; };
|
|
|
|
nixosTest = nixosTests.wstunnel;
|
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
2024-06-24 18:47:55 +00:00
|
|
|
description = "Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI";
|
|
|
|
homepage = "https://github.com/erebe/wstunnel";
|
|
|
|
changelog = "https://github.com/erebe/wstunnel/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ rvdp neverbehave ];
|
2024-06-20 14:57:18 +00:00
|
|
|
mainProgram = "wstunnel";
|
|
|
|
};
|
|
|
|
}
|