2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, async-timeout
|
|
|
|
, attrs
|
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytestCheckHook
|
2023-04-12 12:48:02 +00:00
|
|
|
, pythonAtLeast
|
2023-03-15 16:39:30 +00:00
|
|
|
, pythonOlder
|
2020-05-03 17:38:23 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "snitun";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.36.1";
|
2023-03-15 16:39:30 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NabuCasa";
|
|
|
|
repo = pname;
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-ViFAPAA6uU5MQNHCTIw0OTR8eZPgF34GqRP+py6L6RU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
async-timeout
|
|
|
|
attrs
|
|
|
|
cryptography
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabledTests = [
|
|
|
|
# broke after aiohttp 3.8.5 upgrade
|
|
|
|
"test_client_stop_no_wait"
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-05-03 17:38:23 +00:00
|
|
|
"test_multiplexer_data_channel_abort_full" # https://github.com/NabuCasa/snitun/issues/61
|
|
|
|
# port binding conflicts
|
|
|
|
"test_snitun_single_runner_timeout"
|
|
|
|
"test_snitun_single_runner_throttling"
|
2021-04-12 18:23:04 +00:00
|
|
|
# ConnectionResetError: [Errno 54] Connection reset by peer
|
|
|
|
"test_peer_listener_timeout"
|
2023-04-29 16:46:19 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.11") [
|
2023-04-12 12:48:02 +00:00
|
|
|
# TypeError: Passing coroutines is forbidden, use tasks explicitly.
|
|
|
|
"test_snitun_runner_updown"
|
2020-05-03 17:38:23 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
pythonImportsCheck = [ "snitun" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/NabuCasa/snitun/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/nabucasa/snitun";
|
|
|
|
description = "SNI proxy with TCP multiplexer";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ Scriptkiddi ];
|
2021-06-28 23:13:55 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|