1{ lib
2, stdenv
3, async-timeout
4, attrs
5, buildPythonPackage
6, cryptography
7, fetchFromGitHub
8, pytest-aiohttp
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "snitun";
14 version = "0.31.0";
15
16 src = fetchFromGitHub {
17 owner = "NabuCasa";
18 repo = pname;
19 rev = version;
20 hash = "sha256-Ehafb35H462Ffn6omGh/MDJKQX5qJJZeiIBO3n0IGlA=";
21 };
22
23 propagatedBuildInputs = [
24 async-timeout
25 attrs
26 cryptography
27 ];
28
29 checkInputs = [
30 pytest-aiohttp
31 pytestCheckHook
32 ];
33
34 disabledTests = lib.optionals stdenv.isDarwin [
35 "test_multiplexer_data_channel_abort_full" # https://github.com/NabuCasa/snitun/issues/61
36 # port binding conflicts
37 "test_snitun_single_runner_timeout"
38 "test_snitun_single_runner_throttling"
39 # ConnectionResetError: [Errno 54] Connection reset by peer
40 "test_peer_listener_timeout"
41 ];
42
43 pythonImportsCheck = [ "snitun" ];
44
45 meta = with lib; {
46 homepage = "https://github.com/nabucasa/snitun";
47 description = "SNI proxy with TCP multiplexer";
48 license = licenses.gpl3Only;
49 maintainers = with maintainers; [ Scriptkiddi ];
50 platforms = platforms.linux;
51 };
52}