test official zerotier-tcp-proxy
This commit is contained in:
parent
14a39f207d
commit
ed9bb9b9e9
|
@ -25,7 +25,9 @@
|
|||
serviceConfig = {
|
||||
Type = "simple";
|
||||
# imap port
|
||||
ExecStart = "${pkgs.callPackage ../../pkgs/zt-tcp-relay.nix {}}/bin/zt-tcp-relay --listen [::]:993";
|
||||
ExecStart = "${pkgs.callPackage ../../pkgs/zerotier-tcp-proxy.nix {
|
||||
zerotierProxyPort = 993;
|
||||
}}/bin/zerotier-tcp-proxy";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
DynamicUser = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, fetchpatch, zerotierone }:
|
||||
{ stdenv, fetchFromGitHub, fetchpatch, zerotierProxyPort ? 443 }:
|
||||
stdenv.mkDerivation {
|
||||
name = "zerotier-tcp-proxy";
|
||||
src = fetchFromGitHub {
|
||||
|
@ -15,6 +15,7 @@ stdenv.mkDerivation {
|
|||
];
|
||||
buildPhase = ''
|
||||
pushd tcp-proxy
|
||||
sed -i -e "s/ZT_TCP_PROXY_TCP_PORT.*443/ZT_TCP_PROXY_TCP_PORT ${toString zerotierProxyPort}/g" tcp-proxy.cpp
|
||||
cat tcp-proxy.cpp
|
||||
make -j $NIX_BUILD_CORES CXX=$CXX
|
||||
popd
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user