net-proxy/byedpi: add 0.16.2

Since version 0.16, byedpi can daemonize. Update the OpenRC service file
to support this.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova
2025-01-29 20:38:49 +05:00
parent 6032dc1c34
commit e73852212c
3 changed files with 66 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
DIST byedpi-0.14.1.tar.gz 37004 BLAKE2B c14af6c2e01bf5d8c1539b5417ca2bf7cdfd501f4f1927dd7d1f643db1b2c7e26cd4bd8e3f66d885903b9349fa10f802e44039f0fc08b28143ec382a64e096b1 SHA512 5ff1d5ce03b0c824a60272130b47ba5d8ded74fdace7000780b1fff014a33cd9e42778f006d903a0dee4ec204561cd025b4788aa9bbd55b39c72d64736d6309e
DIST byedpi-0.15.tar.gz 38376 BLAKE2B adceb3106c16d8aefe2040d8f12d9118107b23d2eac57f4a295f7800b655e889e6507f8800d1f0cc46e1365df2c987c764c68f6ab3df9a0dee3a226746e195c7 SHA512 bf6e7e4047263eb0e436b05ca40244439a232cd2b81d45ad7aad12b1f76e5796e4e5c913534599650b23d148bc2f07e98d2a2637db95106de014b303edbd1a38
DIST byedpi-0.16.1.tar.gz 42085 BLAKE2B f17555f8ca7e6b5d930a7c921eb3b1b4cb350876775cbc28cf8b8e5aa11e67c5e689dbfb6f6d18e41d929de571d0fd615c0b95b4973fcf194f3842be89b37360 SHA512 a0cd6e5cf5681f080afabb0d1541fd04d33100920de932e65975d6214e23268c6edfacc8880f25a79e9d49eb592215c935a05d6e7ca58924861e1c8faf7eca3e
DIST byedpi-0.16.2.tar.gz 42071 BLAKE2B 24f2fe7587245cf5fdc751637554f0cad6933ff445ecf2ceeb9e9612aa060353a6f856023a3bf35b61fa94ce5eeacaf9a384260b63c6aacc133d0d1877ad9ede SHA512 31ff2f0567efe65c41eae7058f492d9686a1bdcce4d4ef156c75b4e0e453916417ec2c738394fd9627487da847272747cb6239d7699e9eb16eca2699fc5edbe7
DIST byedpi-0.16.tar.gz 41690 BLAKE2B 7a80864864a736d68824596dbe086bb4a6f90661fd02a2231c7c023ab7b098e5b38f73fa8acb8adc5f73de16d328875d42bdd3fd5f4dd34f40d9d51fd8b22e5e SHA512 42652609fe6ea1d57cdf6d8d7df1472887372f4f9621cd5111f292aa3daa45bf952782c90ecf19df2631a88eccc7f30e3b34dcaf1186f8238c5433e453b3aea1

View File

@@ -0,0 +1,39 @@
# Copyright 2024-2025 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"
SRC_URI="https://github.com/hufrea/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="acct-user/byedpi"
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-r1 byedpi
newconfd "${FILESDIR}"/byedpi.confd byedpi
systemd_dounit "dist/linux/${PN}.service"
insinto /etc
newins "dist/linux/${PN}.conf" "${PN}.conf"
}

View File

@@ -0,0 +1,26 @@
#!/sbin/openrc-run
# shellcheck shell=sh
#
# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
: "${BYEDPI_USER:=byedpi}"
: "${BYEDPI_GROUP:=nobody}"
: "${BYEDPI_BIND_IP:=0.0.0.0}"
: "${BYEDPI_BIND_PORT:=1080}"
: "${BYEDPI_OPTS:=--disorder 5 --auto=torst --tlsrec 6+s}"
command="/usr/bin/ciadpi"
pidfile="/run/byedpi/${RC_SVCNAME}.pid"
command_user="${BYEDPI_USER}:${BYEDPI_GROUP}"
command_args="--ip ${BYEDPI_BIND_IP} --port ${BYEDPI_BIND_PORT} ${BYEDPI_OPTS}"
command_args_background="--daemon --pidfile ${pidfile}"
depend() {
need net
}
start_pre() {
checkpath -q -do "${BYEDPI_USER}":root "$(dirname "${pidfile}")"
}