diff options
Diffstat (limited to 'net-proxy/trojan')
-rw-r--r-- | net-proxy/trojan/Manifest | 6 | ||||
-rwxr-xr-x | net-proxy/trojan/files/trojan.initd | 26 | ||||
-rw-r--r-- | net-proxy/trojan/metadata.xml | 28 | ||||
-rw-r--r-- | net-proxy/trojan/trojan-1.8.1.ebuild | 46 | ||||
-rw-r--r-- | net-proxy/trojan/trojan-1.9.0.ebuild | 46 |
5 files changed, 152 insertions, 0 deletions
diff --git a/net-proxy/trojan/Manifest b/net-proxy/trojan/Manifest new file mode 100644 index 000000000000..901e192ea21b --- /dev/null +++ b/net-proxy/trojan/Manifest @@ -0,0 +1,6 @@ +AUX trojan.initd 542 BLAKE2B 2e5597381353f1aa8da392027b9a4179da08bb387a776f584bd508f9e7d20747317d78ed7506e97047eb809e0e9726f3f52a9f75a2aacf26d349ec8628b23acb SHA512 1e1f230c96c1d7f8c6f0dc23c40eb8895d004448d802c85d62b34e186bea964753e28e90978075dcbe9fbc2e73074564303f6e28cf12633e424230a2d415910e +DIST trojan-1.8.1.tar.gz 37199 BLAKE2B be93a119ca95e5f4151db6ab58ffaa123d5bd304247d7835ca34ba870808d7e246d551c204d60ffb2a982f2fcb2c35ada1d9823e7f931b36377f99ebd0f48bd6 SHA512 1e2b8e2ddb02b2009181a980781574e6e6375c98475bda4096b70a9c00e61c5ca445f28730e195a5179b85bf5464a6dcb1bcb6ba8dc841d95c9a111f8f87c511 +DIST trojan-1.9.0.tar.gz 37704 BLAKE2B 5ddfab3408c0f665e0c43e1f23d4d5df6c2222d38f3525b524b6689e5b25603f928f718bcba7bbd077b7db1c241aea629d01c8dbefc1d35c3dc3d29757c04885 SHA512 3d671d1944bf79879bde8ba74d9c3270e475ff1c5d35ff1ef367391fdce223bd24e4c1072ae8506002e5ee10944bfbe10cfb434e8908c9670535c38b275293fa +EBUILD trojan-1.8.1.ebuild 966 BLAKE2B 1f2463f68e2064c9f66b0fb9c9c2a5bb0a7253d4b45c55eb44b4a0a0020590673d871dd4bc2b45af5b081720f4157985155336f606bc03304af8c025de1bdef7 SHA512 205b38ffac20f40e55b03c567dcb21e2451c94d2c1cecfae5f4a84494ee287dbddd26a91991f48837bc293529baa61983b50eb9e1db23cd68d0bd731b2fadbf5 +EBUILD trojan-1.9.0.ebuild 966 BLAKE2B 1f2463f68e2064c9f66b0fb9c9c2a5bb0a7253d4b45c55eb44b4a0a0020590673d871dd4bc2b45af5b081720f4157985155336f606bc03304af8c025de1bdef7 SHA512 205b38ffac20f40e55b03c567dcb21e2451c94d2c1cecfae5f4a84494ee287dbddd26a91991f48837bc293529baa61983b50eb9e1db23cd68d0bd731b2fadbf5 +MISC metadata.xml 1023 BLAKE2B cea392d59eea944198e523e0dfdab0325180568d9f3f39e40fc7c94c43a1c8b9811e787da5174f4f0b85d932778b34dcf4a07afccc4cf02972de57e7a3004ad4 SHA512 b1a1a6bdb8ea7d62bce25a439753c85e5e340be804ac8a71a3fbbd4f671270c174f9db77b72c2d00cdc1ede7cea6f7a86d2401e6cb8c8f9e395573c9216dfa4b diff --git a/net-proxy/trojan/files/trojan.initd b/net-proxy/trojan/files/trojan.initd new file mode 100755 index 000000000000..f525eefe74df --- /dev/null +++ b/net-proxy/trojan/files/trojan.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +TJ_CONFIG="/etc/trojan/config.json" +TJ_PIDFILE="/run/trojan.pid" +TJ_LOG="/var/log/trojan.log" + +depend() { + need net +} + +start() { + ebegin "Starting Trojan, Log File: ${TJ_LOG}" + start-stop-daemon --start -b \ + -1 "${TJ_LOG}" -2 "${TJ_LOG}" \ + -m -p "${TJ_PIDFILE}" \ + --exec /usr/bin/trojan -- "${TJ_CONFIG}" + eend $? +} + +stop() { + ebegin "Stopping Trojan" + start-stop-daemon --stop -p "${TJ_PIDFILE}" + eend $? +} diff --git a/net-proxy/trojan/metadata.xml b/net-proxy/trojan/metadata.xml new file mode 100644 index 000000000000..9b97efd6cb49 --- /dev/null +++ b/net-proxy/trojan/metadata.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>yangmame@icloud.com</email> + <name>Xin Yang</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + An unidentifiable mechanism that helps you bypass GFW. + Trojan features multiple protocols over TLS to avoid both + active/passive detections and ISP QoS limitations. + Trojan is not a fixed program or protocol. It's an idea, + an idea that imitating the most common service, to an extent + that it behaves identically, could help you get across the + Great FireWall permanently, without being identified ever. + We are the GreatER Fire; we ship Trojan Horses. + </longdescription> + <use> + <flag name="mysql">build with MySQL support</flag> + </use> + <upstream> + <remote-id type="github">trojan-gfw/trojan</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-proxy/trojan/trojan-1.8.1.ebuild b/net-proxy/trojan/trojan-1.8.1.ebuild new file mode 100644 index 000000000000..b6c8edf97d81 --- /dev/null +++ b/net-proxy/trojan/trojan-1.8.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{3_4,3_5,3_6,3_7} ) + +inherit cmake-utils python-any-r1 + +DESCRIPTION="An unidentifiable mechanism that helps you bypass GFW" +HOMEPAGE="https://github.com/trojan-gfw/${PN}" +SRC_URI="https://github.com/trojan-gfw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="mysql test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/boost-1.54.0:= + >=dev-libs/openssl-1.0.2:= + mysql? ( dev-db/mysql-connector-c:= ) +" +DEPEND=" + ${RDEPEND} + test? ( net-misc/curl ${PYTHON_DEPS} ) +" + +src_configure() { + local mycmakeargs=( + -DENABLE_MYSQL=$(usex mysql) + -DSYSTEMD_SERVICE=ON + -DCMAKE_INSTALL_DOCDIR=share/doc/${PF} + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + newinitd "${FILESDIR}/trojan.initd" trojan +} + +src_test() { + cmake-utils_src_test -j1 +} diff --git a/net-proxy/trojan/trojan-1.9.0.ebuild b/net-proxy/trojan/trojan-1.9.0.ebuild new file mode 100644 index 000000000000..b6c8edf97d81 --- /dev/null +++ b/net-proxy/trojan/trojan-1.9.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{3_4,3_5,3_6,3_7} ) + +inherit cmake-utils python-any-r1 + +DESCRIPTION="An unidentifiable mechanism that helps you bypass GFW" +HOMEPAGE="https://github.com/trojan-gfw/${PN}" +SRC_URI="https://github.com/trojan-gfw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="mysql test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/boost-1.54.0:= + >=dev-libs/openssl-1.0.2:= + mysql? ( dev-db/mysql-connector-c:= ) +" +DEPEND=" + ${RDEPEND} + test? ( net-misc/curl ${PYTHON_DEPS} ) +" + +src_configure() { + local mycmakeargs=( + -DENABLE_MYSQL=$(usex mysql) + -DSYSTEMD_SERVICE=ON + -DCMAKE_INSTALL_DOCDIR=share/doc/${PF} + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + newinitd "${FILESDIR}/trojan.initd" trojan +} + +src_test() { + cmake-utils_src_test -j1 +} |