diff options
author | Florian Schmaus <flow@gentoo.org> | 2024-11-22 19:52:17 +0100 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2024-11-22 19:58:39 +0100 |
commit | da3e2c75f7d0b1088766c70ff9b861902d50d874 (patch) | |
tree | 60e9a99ae54b9a892b36a19b3b8616de97bea7bb /net-vpn | |
parent | dev-ml/lablgtk: remove unused patch(es) (diff) | |
download | gentoo-da3e2c75f7d0b1088766c70ff9b861902d50d874.tar.gz gentoo-da3e2c75f7d0b1088766c70ff9b861902d50d874.tar.bz2 gentoo-da3e2c75f7d0b1088766c70ff9b861902d50d874.zip |
net-vpn/gsocket: add 1.4.43-r1 with gs-socks-proxy.service
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r-- | net-vpn/gsocket/files/gs-socks-proxy.service | 22 | ||||
-rw-r--r-- | net-vpn/gsocket/gsocket-1.4.43-r1.ebuild | 68 |
2 files changed, 90 insertions, 0 deletions
diff --git a/net-vpn/gsocket/files/gs-socks-proxy.service b/net-vpn/gsocket/files/gs-socks-proxy.service new file mode 100644 index 000000000000..ce9d180641b3 --- /dev/null +++ b/net-vpn/gsocket/files/gs-socks-proxy.service @@ -0,0 +1,22 @@ +[Unit] +Description=Global Socket Socks Proxy +After=network-online.target +Wants=network-online.target + +[Service] +Restart=always +RestartSec=10 +RestartSteps=10 +RestartMaxDelaySec=30m + +DynamicUser=yes +RuntimeDirectory=gs-socks-proxy + +ExecStartPre=+gs-init-secret /etc/gsocket/gs-socks-proxy-key +ExecStartPre=+install --owner %u /etc/gsocket/gs-socks-proxy-key /run/gs-socks-proxy/key + +ExecStart=gs-netcat -k /run/gs-socks-proxy/key -lS + + +[Install] +WantedBy=multi-user.target diff --git a/net-vpn/gsocket/gsocket-1.4.43-r1.ebuild b/net-vpn/gsocket/gsocket-1.4.43-r1.ebuild new file mode 100644 index 000000000000..74426aaafe23 --- /dev/null +++ b/net-vpn/gsocket/gsocket-1.4.43-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd + +DESCRIPTION="Allow firewalled/NATed host to establish a secure connection" +HOMEPAGE="https://www.gsocket.io/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hackerschoice/gsocket.git" +else + SRC_URI="https://github.com/hackerschoice/gsocket/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~riscv" +fi + +LICENSE="BSD-2" +SLOT="0" + +IUSE="test" +RESTRICT="!test? ( test )" + +COMMON_DEPEND="dev-libs/openssl:=" +DEPEND=" + ${COMMON_DEPEND} + test? ( + net-analyzer/netcat + net-misc/socat + ) +" +RDEPEND="${COMMON_DEPEND}" + +PATCHES=( + # https://github.com/hackerschoice/gsocket/pull/104 + "${FILESDIR}"/gsocket-1.4.43-gs-init-secret.patch +) + +src_prepare() { + default + + # Patch in the correct libdir + sed -i \ + "s;arrayContains \"/usr/lib\".*;DL+=(\"${EPREFIX}/usr/$(get_libdir)\");" \ + tools/gs_funcs || die "Failed to patch libdir in gs_funcs" + + eautoreconf +} + +src_configure() { + econf $(use_enable test tests) +} + +src_test() { + cd tests || die + + ./run_ft_tests.sh || die + # Most of the "gs_tests" seem to fail (probably due the sandbox). + ./run_gs_tests.sh 4.1 || die +} + +src_install() { + default + + systemd_dounit examples/systemd-root-shell/gs-root-shell.service + systemd_dounit "${FILESDIR}"/gs-socks-proxy.service +} |