2023-01-03 05:20:00 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security, CoreServices }:
|
2019-03-02 01:59:49 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "shadowsocks-rust";
|
2024-04-21 16:46:24 +02:00
|
|
|
version = "1.18.3";
|
2019-03-02 01:59:49 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "shadowsocks";
|
|
|
|
repo = pname;
|
2024-04-21 16:46:24 +02:00
|
|
|
hash = "sha256-eqN6Qwq+ofQ9Ed7Viz+DoJQkVTvUTo1U5rVqO1YDp2w=";
|
2019-03-02 01:59:49 +01:00
|
|
|
};
|
|
|
|
|
2024-04-21 16:46:24 +02:00
|
|
|
cargoHash = "sha256-yJ2Ql6Fo2KaZRmvRB0C14fEcVwbBbsUlcqT3vFKHn58=";
|
2020-05-15 11:20:00 +02:00
|
|
|
|
2023-01-03 05:20:00 +01:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
|
2019-03-02 01:59:49 +01:00
|
|
|
|
2023-01-03 05:20:00 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ openssl ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Security CoreServices ];
|
2021-02-23 05:20:00 +01:00
|
|
|
|
2023-02-20 03:29:17 +01:00
|
|
|
buildFeatures = [
|
2023-02-02 08:50:55 +01:00
|
|
|
"trust-dns"
|
|
|
|
"local-http-native-tls"
|
|
|
|
"local-tunnel"
|
|
|
|
"local-socks4"
|
|
|
|
"local-redir"
|
|
|
|
"local-dns"
|
|
|
|
"local-tun"
|
|
|
|
"aead-cipher-extra"
|
|
|
|
"aead-cipher-2022"
|
|
|
|
"aead-cipher-2022-extra"
|
2022-03-07 16:45:09 +01:00
|
|
|
];
|
|
|
|
|
2021-11-01 06:18:57 +01:00
|
|
|
# all of these rely on connecting to www.example.com:80
|
|
|
|
checkFlags = [
|
|
|
|
"--skip=http_proxy"
|
|
|
|
"--skip=tcp_tunnel"
|
2023-08-27 06:20:00 +02:00
|
|
|
"--skip=tcprelay"
|
2021-11-01 06:18:57 +01:00
|
|
|
"--skip=udp_tunnel"
|
|
|
|
"--skip=udp_relay"
|
|
|
|
"--skip=socks4_relay_connect"
|
|
|
|
"--skip=socks5_relay_aead"
|
|
|
|
"--skip=socks5_relay_stream"
|
2023-08-27 06:20:00 +02:00
|
|
|
"--skip=trust_dns_resolver"
|
2021-11-01 06:18:57 +01:00
|
|
|
];
|
2019-03-02 01:59:49 +01:00
|
|
|
|
2023-08-27 06:20:00 +02:00
|
|
|
# timeouts in sandbox
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2023-01-03 05:20:00 +01:00
|
|
|
description = "A Rust port of Shadowsocks";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
|
2023-01-03 05:20:00 +01:00
|
|
|
changelog = "https://github.com/shadowsocks/shadowsocks-rust/raw/v${version}/debian/changelog";
|
2019-03-02 01:59:49 +01:00
|
|
|
license = licenses.mit;
|
2024-04-24 06:20:00 +02:00
|
|
|
maintainers = [ ];
|
2019-03-02 01:59:49 +01:00
|
|
|
};
|
|
|
|
}
|