diff options
author | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2024-08-23 10:42:42 +0500 |
---|---|---|
committer | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2024-08-23 10:42:42 +0500 |
commit | 47168855f8d0abba636127074aa8b5bdd54e34f2 (patch) | |
tree | 9a393fb47c5ce2f1ccbf365f47e3b34536e5e6e7 /net-proxy | |
parent | x11-themes/pop-icon-theme: drop ALLARCHES (diff) | |
download | guru-47168855f8d0abba636127074aa8b5bdd54e34f2.tar.gz guru-47168855f8d0abba636127074aa8b5bdd54e34f2.tar.bz2 guru-47168855f8d0abba636127074aa8b5bdd54e34f2.zip |
net-proxy/byedpi: add 0.13, sync live
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/byedpi/Manifest | 1 | ||||
-rw-r--r-- | net-proxy/byedpi/byedpi-0.13.ebuild | 40 | ||||
-rw-r--r-- | net-proxy/byedpi/byedpi-9999.ebuild | 30 | ||||
-rw-r--r-- | net-proxy/byedpi/files/byedpi.confd | 8 | ||||
-rw-r--r-- | net-proxy/byedpi/files/byedpi.initd | 19 |
5 files changed, 90 insertions, 8 deletions
diff --git a/net-proxy/byedpi/Manifest b/net-proxy/byedpi/Manifest index 663329128..df7081a7f 100644 --- a/net-proxy/byedpi/Manifest +++ b/net-proxy/byedpi/Manifest @@ -1 +1,2 @@ DIST byedpi-0.12.tar.gz 33283 BLAKE2B da1d9bbc80c868fb16c4f6e24c3fe00d5d03d5bb0a6d71dac16999b652e81fc9c2a5f0f57e350260b9295d953cb0c3fe316440279dd26b09ee895bf81771cc2b SHA512 9f15afc821b53bd1fba71ab9a37640c8f35f22efcfc6cd079800f9abd4286232fb29850aebe9168e54396f912362e012448940d32471bfe0586600fcd2591e22 +DIST byedpi-0.13.tar.gz 35108 BLAKE2B 502202e8ed76942522d551b41b9057e9dd617c8b67029c00c7c2be391907b9c853f4ebc678eff32d122bf4546375dc8839edab8bc3d7c031859fae7e10ce807c SHA512 4c9c692fc2d7f328bb9bec823aed2d733adfecf03953e1e669fa4fc55aaa6234e86a768abc690c876a47c58e374fa909e8132794adabd2f24081abb8fa7ba2d6 diff --git a/net-proxy/byedpi/byedpi-0.13.ebuild b/net-proxy/byedpi/byedpi-0.13.ebuild new file mode 100644 index 000000000..9151a2144 --- /dev/null +++ b/net-proxy/byedpi/byedpi-0.13.ebuild @@ -0,0 +1,40 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs + +DESCRIPTION="Bypass DPI SOCKS proxy" +HOMEPAGE="https://github.com/hufrea/byedpi/" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hufrea/byedpi.git" +else + SRC_URI="https://github.com/hufrea/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="MIT" +SLOT="0" + +src_prepare() { + default + + # respect optimization level + sed -i 's/ -O.\b/ /' Makefile || die +} + +src_configure() { + tc-export CC +} + +src_install() { + dobin ciadpi + einstalldocs + + newinitd "${FILESDIR}"/byedpi.initd byedpi + newconfd "${FILESDIR}"/byedpi.confd byedpi + systemd_dounit "${FILESDIR}"/byedpi.service +} diff --git a/net-proxy/byedpi/byedpi-9999.ebuild b/net-proxy/byedpi/byedpi-9999.ebuild index aedab7b2d..9151a2144 100644 --- a/net-proxy/byedpi/byedpi-9999.ebuild +++ b/net-proxy/byedpi/byedpi-9999.ebuild @@ -2,25 +2,39 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit git-r3 systemd toolchain-funcs + +inherit systemd toolchain-funcs DESCRIPTION="Bypass DPI SOCKS proxy" HOMEPAGE="https://github.com/hufrea/byedpi/" -EGIT_REPO_URI="https://github.com/hufrea/byedpi.git" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hufrea/byedpi.git" +else + SRC_URI="https://github.com/hufrea/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi LICENSE="MIT" SLOT="0" -src_compile() { - tc-export CC - export CFLAGS LDFLAGS +src_prepare() { + default + + # respect optimization level sed -i 's/ -O.\b/ /' Makefile || die +} - default +src_configure() { + tc-export CC } src_install() { dobin ciadpi - systemd_dounit "${FILESDIR}/${PN}.service" -} + einstalldocs + newinitd "${FILESDIR}"/byedpi.initd byedpi + newconfd "${FILESDIR}"/byedpi.confd byedpi + systemd_dounit "${FILESDIR}"/byedpi.service +} diff --git a/net-proxy/byedpi/files/byedpi.confd b/net-proxy/byedpi/files/byedpi.confd new file mode 100644 index 000000000..e25b7a426 --- /dev/null +++ b/net-proxy/byedpi/files/byedpi.confd @@ -0,0 +1,8 @@ +# IP address SOCKS proxy will listen on +#BYEDPI_BIND_IP="0.0.0.0" + +# Port number SOCKS proxy will listen on +#BYEDPI_BIND_PORT=1080 + +# Additional command-line options for ciadpi +#BYEDPI_OPTS="--disorder 1 --auto=torst --tlsrec 1+s" diff --git a/net-proxy/byedpi/files/byedpi.initd b/net-proxy/byedpi/files/byedpi.initd new file mode 100644 index 000000000..979beea39 --- /dev/null +++ b/net-proxy/byedpi/files/byedpi.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# shellcheck shell=sh +# +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +: "${BYEDPI_BIND_IP:=0.0.0.0}" +: "${BYEDPI_BIND_PORT:=1080}" +: "${BYEDPI_OPTS:=--disorder 1 --auto=torst --tlsrec 1+s}" + +command="/usr/bin/ciadpi" +command_args="--ip ${BYEDPI_BIND_IP} --port ${BYEDPI_BIND_PORT} ${BYEDPI_OPTS}" +command_user="nobody:nobody" +command_background=1 +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net +} |