commit:     42992f2982ef856a1d8a17e3dd76831d2cb2e70b
Author:     Michael Zavertkin <misha.zavertkin <AT> mail <DOT> ru>
AuthorDate: Sat Aug 10 14:00:43 2024 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Sat Aug 10 14:01:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=42992f29

net-proxy/byedpi: new package, add 0.12, 9999

Closes: https://github.com/gentoo/guru/pull/225
Signed-off-by: Michael Zavertkin <misha.zavertkin <AT> mail.ru>

 net-proxy/byedpi/Manifest             |  1 +
 net-proxy/byedpi/byedpi-0.12.ebuild   | 30 ++++++++++++++++++++++++++++++
 net-proxy/byedpi/byedpi-9999.ebuild   | 26 ++++++++++++++++++++++++++
 net-proxy/byedpi/files/byedpi.service | 10 ++++++++++
 net-proxy/byedpi/metadata.xml         | 11 +++++++++++
 5 files changed, 78 insertions(+)

diff --git a/net-proxy/byedpi/Manifest b/net-proxy/byedpi/Manifest
new file mode 100644
index 000000000..663329128
--- /dev/null
+++ b/net-proxy/byedpi/Manifest
@@ -0,0 +1 @@
+DIST byedpi-0.12.tar.gz 33283 BLAKE2B 
da1d9bbc80c868fb16c4f6e24c3fe00d5d03d5bb0a6d71dac16999b652e81fc9c2a5f0f57e350260b9295d953cb0c3fe316440279dd26b09ee895bf81771cc2b
 SHA512 
9f15afc821b53bd1fba71ab9a37640c8f35f22efcfc6cd079800f9abd4286232fb29850aebe9168e54396f912362e012448940d32471bfe0586600fcd2591e22

diff --git a/net-proxy/byedpi/byedpi-0.12.ebuild 
b/net-proxy/byedpi/byedpi-0.12.ebuild
new file mode 100644
index 000000000..d78b1e46f
--- /dev/null
+++ b/net-proxy/byedpi/byedpi-0.12.ebuild
@@ -0,0 +1,30 @@
+# 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/";
+SRC_URI="https://github.com/hufrea/byedpi/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_compile() {
+       tc-export CC
+       export CFLAGS
+       sed -i 's/ -O.\b/ /' Makefile
+       # workaround for compiling without -O2
+       # 
https://github.com/hufrea/byedpi/commit/3fee8d5aed122f34ec13637f5f4b1502d13cc923
+       sed -i 's/inline bool check_port/static inline bool check_port/' 
extend.c
+
+       default
+}
+
+src_install() {
+       dobin ciadpi
+       systemd_dounit "${FILESDIR}/${PN}.service"
+}
+

diff --git a/net-proxy/byedpi/byedpi-9999.ebuild 
b/net-proxy/byedpi/byedpi-9999.ebuild
new file mode 100644
index 000000000..03efb727c
--- /dev/null
+++ b/net-proxy/byedpi/byedpi-9999.ebuild
@@ -0,0 +1,26 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit git-r3 systemd toolchain-funcs
+
+DESCRIPTION="Bypass DPI SOCKS proxy"
+HOMEPAGE="https://github.com/hufrea/byedpi/";
+EGIT_REPO_URI="https://github.com/hufrea/byedpi.git";
+
+LICENSE="MIT"
+SLOT="0"
+
+src_compile() {
+       tc-export CC
+       export CFLAGS LDFLAGS
+       sed -i 's/ -O.\b/ /' Makefile
+
+       default
+}
+
+src_install() {
+       dobin ciadpi
+       systemd_dounit "${FILESDIR}/${PN}.service"
+}
+

diff --git a/net-proxy/byedpi/files/byedpi.service 
b/net-proxy/byedpi/files/byedpi.service
new file mode 100644
index 000000000..8f8063711
--- /dev/null
+++ b/net-proxy/byedpi/files/byedpi.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Bypass DPI SOCKS proxy
+Documentation=https://github.com/hufrea/byedpi/blob/main/readme.txt
+After=network-online.target
+
+[Service]
+ExecStart=/usr/bin/ciadpi --disorder 1 --auto=torst --tlsrec 1+s
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-proxy/byedpi/metadata.xml b/net-proxy/byedpi/metadata.xml
new file mode 100644
index 000000000..23e292b1f
--- /dev/null
+++ b/net-proxy/byedpi/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Misha Zavertkin</name>
+       </maintainer>
+       <upstream>
+               <remote-id type="github">hufrea/byedpi</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to