From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C96C0138334 for ; Thu, 11 Oct 2018 08:30:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 89347E07FA; Thu, 11 Oct 2018 08:30:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4A245E07FA for ; Thu, 11 Oct 2018 08:30:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 19D35340D11 for ; Thu, 11 Oct 2018 08:30:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 87AEA431 for ; Thu, 11 Oct 2018 08:30:25 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1539245638.31847f8923c26e1df0410c8842834c63b543048e.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/trojan/files/, net-proxy/trojan/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-proxy/trojan/Manifest net-proxy/trojan/files/trojan.initd net-proxy/trojan/metadata.xml net-proxy/trojan/trojan-1.8.1.ebuild X-VCS-Directories: net-proxy/trojan/ net-proxy/trojan/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 31847f8923c26e1df0410c8842834c63b543048e X-VCS-Branch: master Date: Thu, 11 Oct 2018 08:30:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 056b494c-9981-4fc7-a77b-4df6f904efc3 X-Archives-Hash: f89c6d3c1348ca737cebf51021b93119 commit: 31847f8923c26e1df0410c8842834c63b543048e Author: YangMame icloud com> AuthorDate: Sun Oct 7 23:37:52 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Oct 11 08:13:58 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31847f89 net-proxy/trojan: new package Signed-off-by: Xin Yang icloud.com> Signed-off-by: Michał Górny gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/9776 net-proxy/trojan/Manifest | 1 + net-proxy/trojan/files/trojan.initd | 26 ++++++++++++++++++++ net-proxy/trojan/metadata.xml | 28 ++++++++++++++++++++++ net-proxy/trojan/trojan-1.8.1.ebuild | 46 ++++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+) diff --git a/net-proxy/trojan/Manifest b/net-proxy/trojan/Manifest new file mode 100644 index 00000000000..958dea17ea5 --- /dev/null +++ b/net-proxy/trojan/Manifest @@ -0,0 +1 @@ +DIST trojan-1.8.1.tar.gz 37199 BLAKE2B be93a119ca95e5f4151db6ab58ffaa123d5bd304247d7835ca34ba870808d7e246d551c204d60ffb2a982f2fcb2c35ada1d9823e7f931b36377f99ebd0f48bd6 SHA512 1e2b8e2ddb02b2009181a980781574e6e6375c98475bda4096b70a9c00e61c5ca445f28730e195a5179b85bf5464a6dcb1bcb6ba8dc841d95c9a111f8f87c511 diff --git a/net-proxy/trojan/files/trojan.initd b/net-proxy/trojan/files/trojan.initd new file mode 100755 index 00000000000..f525eefe74d --- /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 00000000000..9b97efd6cb4 --- /dev/null +++ b/net-proxy/trojan/metadata.xml @@ -0,0 +1,28 @@ + + + + + yangmame@icloud.com + Xin Yang + + + proxy-maint@gentoo.org + Proxy Maintainers + + + 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. + + + build with MySQL support + + + trojan-gfw/trojan + + 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 00000000000..b6c8edf97d8 --- /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 +}