test official zerotier-tcp-proxy
This commit is contained in:
parent
14a39f207d
commit
ed9bb9b9e9
|
@ -25,7 +25,9 @@
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
# imap port
|
# 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";
|
Restart = "always";
|
||||||
RestartSec = 5;
|
RestartSec = 5;
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchFromGitHub, fetchpatch, zerotierone }:
|
{ stdenv, fetchFromGitHub, fetchpatch, zerotierProxyPort ? 443 }:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "zerotier-tcp-proxy";
|
name = "zerotier-tcp-proxy";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
@ -15,6 +15,7 @@ stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
pushd tcp-proxy
|
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
|
cat tcp-proxy.cpp
|
||||||
make -j $NIX_BUILD_CORES CXX=$CXX
|
make -j $NIX_BUILD_CORES CXX=$CXX
|
||||||
popd
|
popd
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user