2023-01-11 07:51:40 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, Security, CoreServices }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "shadowsocks-rust";
|
2024-09-26 11:04:55 +00:00
|
|
|
version = "1.21.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "shadowsocks";
|
|
|
|
repo = pname;
|
2024-09-26 11:04:55 +00:00
|
|
|
hash = "sha256-B4RufyxqcKd5FJulKRV+33sos+cYrL2/QPmKEYw3aTU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
cargoHash = "sha256-2uYLrYFuzvaOZxw2hN4DcrEbwW5rnXxqKoI2q6yZaGU=";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ Security CoreServices ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
buildFeatures = [
|
2023-02-09 11:40:11 +00: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-10 19:12:11 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# all of these rely on connecting to www.example.com:80
|
|
|
|
checkFlags = [
|
|
|
|
"--skip=http_proxy"
|
|
|
|
"--skip=tcp_tunnel"
|
2023-10-09 19:29:22 +00:00
|
|
|
"--skip=tcprelay"
|
2021-12-06 16:07:01 +00:00
|
|
|
"--skip=udp_tunnel"
|
|
|
|
"--skip=udp_relay"
|
|
|
|
"--skip=socks4_relay_connect"
|
|
|
|
"--skip=socks5_relay_aead"
|
|
|
|
"--skip=socks5_relay_stream"
|
2023-10-09 19:29:22 +00:00
|
|
|
"--skip=trust_dns_resolver"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# timeouts in sandbox
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Rust port of Shadowsocks";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/shadowsocks/shadowsocks-rust";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/shadowsocks/shadowsocks-rust/raw/v${version}/debian/changelog";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|