go-shadowsocks2: init at 0.0.11 (#67516)

go-shadowsocks2: init at 0.0.11
This commit is contained in:
Silvan Mosberger 2019-10-30 01:05:59 +01:00 committed by GitHub
commit 90e30394f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 87 additions and 0 deletions

View File

@ -603,6 +603,7 @@
./services/networking/gdomap.nix
./services/networking/git-daemon.nix
./services/networking/gnunet.nix
./services/networking/go-shadowsocks2.nix
./services/networking/gogoclient.nix
./services/networking/gvpe.nix
./services/networking/hans.nix

View File

@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.go-shadowsocks2.server;
in {
options.services.go-shadowsocks2.server = {
enable = mkEnableOption "go-shadowsocks2 server";
listenAddress = mkOption {
type = types.str;
description = "Server listen address or URL";
example = "ss://AEAD_CHACHA20_POLY1305:your-password@:8488";
};
};
config = mkIf cfg.enable {
systemd.services.go-shadowsocks2-server = {
description = "go-shadowsocks2 server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.go-shadowsocks2}/bin/go-shadowsocks2 -s '${cfg.listenAddress}'";
DynamicUser = true;
};
};
};
}

View File

@ -0,0 +1,24 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "go-shadowsocks2";
version = "0.0.11";
goPackagePath = "github.com/shadowsocks/go-shadowsocks2";
src = fetchFromGitHub {
owner = "shadowsocks";
repo = "go-shadowsocks2";
rev = "v${version}";
sha256 = "1dprz84gmcp6xcsk873lhj32wm8b55vnqn0s984ggvwf1rjqw00c";
};
goDeps = ./deps.nix;
meta = with stdenv.lib; {
description = "Fresh implementation of Shadowsocks in Go";
homepage = "https://github.com/shadowsocks/go-shadowsocks2/";
license = licenses.asl20;
maintainers = with maintainers; [ geistesk ];
};
}

View File

@ -0,0 +1,30 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
[
{
goPackagePath = "github.com/aead/chacha20";
fetch = {
type = "git";
url = "https://github.com/aead/chacha20";
rev = "8b13a72661dae6e9e5dea04f344f0dc95ea29547";
sha256 = "0gbmgq5kbqmbyrsav57ql4jzbvqvp1q7yvcd5fl3wf5g94iyv56r";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "60c769a6c58655dab1b9adac0d58967dd517cfba";
sha256 = "1wy2pg38dz29vf1h48yfqf8m3jqvwnbdw8vkk3ldlj5d8fbbbmv8";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "fb81701db80f1745f51259b1f286de3fe2ec80c8";
sha256 = "1cgvyzkmsbvgyp75nxp10fpnpy08scz6ak60s9w0mkgibw7irhz3";
};
}
]

View File

@ -6149,6 +6149,8 @@ in
shadowsocks-libev = callPackage ../tools/networking/shadowsocks-libev { };
go-shadowsocks2 = callPackage ../tools/networking/go-shadowsocks2 { };
shabnam-fonts = callPackage ../data/fonts/shabnam-fonts { };
shadowsocks-rust = callPackage ../tools/networking/shadowsocks-rust {