summaryrefslogtreecommitdiff
path: root/net-proxy
diff options
context:
space:
mode:
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/Manifest.gzbin6211 -> 6372 bytes
-rw-r--r--net-proxy/http-replicator/Manifest2
-rw-r--r--net-proxy/http-replicator/http-replicator-4.0_alpha2-r6.ebuild (renamed from net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild)51
-rw-r--r--net-proxy/tinyproxy/Manifest12
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd40
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.10.0.service9
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd2
-rw-r--r--net-proxy/tinyproxy/metadata.xml20
-rw-r--r--net-proxy/tinyproxy/tinyproxy-1.10.0-r1.ebuild71
-rw-r--r--net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild2
-rw-r--r--net-proxy/tinyproxy/tinyproxy-1.8.4.ebuild80
-rw-r--r--net-proxy/trojan/Manifest6
-rwxr-xr-xnet-proxy/trojan/files/trojan.initd26
-rw-r--r--net-proxy/trojan/metadata.xml28
-rw-r--r--net-proxy/trojan/trojan-1.8.1.ebuild46
-rw-r--r--net-proxy/trojan/trojan-1.9.0.ebuild46
16 files changed, 402 insertions, 39 deletions
diff --git a/net-proxy/Manifest.gz b/net-proxy/Manifest.gz
index 02865ee65a77..8c39e99f49d1 100644
--- a/net-proxy/Manifest.gz
+++ b/net-proxy/Manifest.gz
Binary files differ
diff --git a/net-proxy/http-replicator/Manifest b/net-proxy/http-replicator/Manifest
index 20e26bf43643..f689f67ca705 100644
--- a/net-proxy/http-replicator/Manifest
+++ b/net-proxy/http-replicator/Manifest
@@ -13,5 +13,5 @@ AUX http-replicator.service.conf 164 BLAKE2B 28006ec4c4b27eb1f75276432e30c0f9b33
DIST http-replicator_3.0.tar.gz 39291 BLAKE2B a97d8b6b32f5d4ca4feefa9abaa7da7cb6570f76566c79d7371134c0edd74b2333a02480deff02fa1bf5b6cd6f2bfbfe4aaa649633d70bd2efbdd22701422651 SHA512 d98a608c38201db6f2d8ba809a4777ab5588f5ed395882bdf542c2788df1770c61a2de160604c09297d847f2c73463ba0530d7f2c2e482467f8e8f35be068d57
DIST http-replicator_4.0alpha2.tgz 27575 BLAKE2B 48138bc8fa9695ddb31ce89c4638adda4a1d1b58c904cd98d0ee1dbab006f79ef7d19495db8eb4de0113f8e45da425950524c48ec9e3e864d8595ccdef9f7cfa SHA512 437e0cc881af0cb8f84bfd1366bb6edeee4f76112c4b2ac2af4bcb8809462852b96e9c99e04c8f370492c9e1eb33ddc68a85c4f09b073694242cd6c05b4d3a6c
EBUILD http-replicator-3.0-r7.ebuild 3443 BLAKE2B 6b68836ebc6bb27f6ad76c9619b6b00069b9ea676ec9abf0b6b81a75d40e00062d650c3fdff1e8022b33ba5a517f590a440c7e159e498fa63379c6cdbb664996 SHA512 f2fca6973f801d66755cc5f79d19e44cab08d70211739d5cf0e8f4d25c66893afe79ca9126a8091477dbca75cfa797b334b6e11d236396c4505060ddbcf8a538
-EBUILD http-replicator-4.0_alpha2-r5.ebuild 1992 BLAKE2B fd9fb9eedab0f1e453fbcdb05ce951162a6de5709264140cde66e346b30954540ea1e901361e5251d47355e02a26fbefafd55047241bba17d93f78ca6cf1538e SHA512 2ced4476b701ddb536ec732f7623d22bd921510828706f25872411e26371ed9382836b24e49664bfff95725d9419228c25cccd28149dfcccb4c216db0d45faa5
+EBUILD http-replicator-4.0_alpha2-r6.ebuild 1995 BLAKE2B d8986ffdba23c817e7e4d84dd6f3d62889413db418944dd4fa1983b7b1d82eb94c63fa21e9cfc13d91ff26d684f12a52f09f579ac7981e4be387015f419abeaf SHA512 0a2ee980380061b5c3bdd82efe8003391ea78b3526c2a98608cb87b67571319d49d3217da927c1cf87a9a06e7fcd00a4a92fe7ae80a634b6533950b54b81957e
MISC metadata.xml 252 BLAKE2B 5386635b038f2498cadf1730fa7ae823427900b961296f4acca678ea12eb7c66ed7ad6cbca15afd26042c7af8d687958c702a9c48fc00856b460e2b49e55b2ac SHA512 ffd7c4cd77545f753618c9e9cfeba05b557044879ce332c01deaad820e184329cf383c8488ba777e9653029d3f75e5c99936ca225ebc4a5fb9b4d4e257ba8e7d
diff --git a/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r6.ebuild
index 6810108b67b9..67f093d09fef 100644
--- a/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild
+++ b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r6.ebuild
@@ -1,11 +1,10 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-
+EAPI=7
PYTHON_COMPAT=( python2_7 )
-inherit eutils python-r1 systemd
+inherit python-r1 readme.gentoo-r1 systemd
MY_P="${PN}_${PV/_/}"
@@ -16,9 +15,12 @@ SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-RDEPEND="${PYTHON_DEPS}"
+RDEPEND="${PYTHON_DEPS}
+ sys-apps/portage[${PYTHON_USEDEP}]
+"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_P}"
@@ -26,9 +28,24 @@ S="${WORKDIR}/${MY_P}"
# Tests downloads files as well as breaks, should be turned into local tests.
RESTRICT="test"
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-4.0_alpha2-r3-pid.patch
-}
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Before starting ${PN}, please follow the next few steps:
+
+- Modify /etc/conf.d/${PN} if required.
+- Run \`repcacheman\` to set up the cache.
+- Add HTTP_PROXY=\"http://serveraddress:8080\" to make.conf on
+the server as well as on the client machines.
+- Make sure GENTOO_MIRRORS in /etc/portage/make.conf
+starts with several good HTTP mirrors.
+
+For more information please refer to the following forum thread:
+https://forums.gentoo.org/viewtopic-t-173226.html
+
+Starting with 4.x releases, the conf.d parameters have changed.
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.0_alpha2-r3-pid.patch )
src_test() {
./unit-test && die
@@ -50,23 +67,9 @@ src_install() {
systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf
dodoc README.user README.devel RELNOTES
+ readme.gentoo_create_doc
}
pkg_postinst() {
- echo
- einfo "Before starting ${PN}, please follow the next few steps:"
- einfo
- einfo "- Modify /etc/conf.d/${PN} if required."
- einfo "- Run \`repcacheman\` to set up the cache."
- einfo "- Add HTTP_PROXY=\"http://serveraddress:8080\" to make.conf on"
- einfo " the server as well as on the client machines."
- einfo "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf"
- einfo " starts with several good HTTP mirrors."
- einfo
- einfo "For more information please refer to the following forum thread:"
- einfo
- einfo " https://forums.gentoo.org/viewtopic-t-173226.html"
- einfo
- einfo "Starting with 4.x releases, the conf.d parameters have changed."
- echo
+ readme.gentoo_print_elog
}
diff --git a/net-proxy/tinyproxy/Manifest b/net-proxy/tinyproxy/Manifest
index a706a1440214..5ec53991871e 100644
--- a/net-proxy/tinyproxy/Manifest
+++ b/net-proxy/tinyproxy/Manifest
@@ -1,9 +1,15 @@
+AUX tinyproxy-1.10.0.initd 855 BLAKE2B 4bd9a260a930958ea449a08edce1f9e8633429a5222a3ea7254b4bdc03808c5f9f87d9b33556f345e305d28e155834b33ff2a952c041af582cae3bedbae2034d SHA512 cd440ed686e8128ed46441ca29da8376c4d28e9e34ae9b85c18eb2f1681d60c0c04b79401a7368f917eeab6768965d6c867d0ac6578a7858557c11b356446c02
+AUX tinyproxy-1.10.0.service 181 BLAKE2B 1e5c14f607d0c54d215a6ffe5656bac288e48ca809aca67b658bb13917869e5203d66730f52670fb9030dd9f6cf249d09f357bbdd143436f6b358377d8f78036 SHA512 7721b986326f82b03d79983be33047fdf4b37b5c63992645a321bf8bd3edea63680a2bf81b2d51fbeab2a5884773a0598dba14f9d597d3db0eea7c7f6b4c79d3
AUX tinyproxy-1.8.1-ldflags.patch 306 BLAKE2B 2a21760a37ccb0bff53cf1c89c220363d32cbca7f4738f65ab3e99b0609edba6796473600919b8ecd8537d57ca40fdb55ae40e213605ab008b3fe9958e1795f7 SHA512 d9daf50c1fcd2237ec59e7701adce76ba09347193439a1940c24e942600ab10bfc192e6c30a3fbcc3e1194f52b7aaab2fe5ef69468c01041f1a9d5fc6deacc8b
AUX tinyproxy-1.8.1-minimal.patch 109 BLAKE2B 8ff9e2678150bcbef92c3e83a8e2b9996cfcce7aee50cddd2f61bed75af5e12e2694f5574df8f8fcbb54decdb4f791532df5ff9b6dad9bf0e47cb31a4f310a8f SHA512 56126f4e315dfade7983a9961ab3a30687e5fb575d9fd0964f081cb1e4be718f54b3999f69f769832717ebae1dd832aaff5e60289b465976b2f95325af48d79d
AUX tinyproxy-1.8.3-r2-DoS-Prevention.patch 6100 BLAKE2B 81ee5fdbba35d02fc03d20b145a455ea0349bb03360b8fe7f797d9bde5c1cee188f1bb82e1d7a5535ff1566197ba3c22d1bf2885d666bc848cdf8602038fcfcd SHA512 ea023535ecf5fc9b0ab63d5e3ab4fe6222a54218de43894699ae742ff89e38ba65ea2a601f17de130e1169f37b0b7189ec55af471074222aecd827104d8f4ce0
-AUX tinyproxy-1.8.3-r2.initd 848 BLAKE2B 8c00d28e4c2a7731043e26b47bbd08fff21f92519dbd7beae0a8a4ffd6fae224a56be89bb1e97daea24a68b20bbdb35c548784d0405ebcb33792362cd4218c4f SHA512 424533167e6c50f6061190123203121f46d9e4e725de779ecb09a8695a8d3a22adb9b966de427cc9100a541ec0f12862323233af5a5b04dcb53357d332335098
+AUX tinyproxy-1.8.3-r2.initd 845 BLAKE2B 476c8e1b6ab41c42c65429fc031f8c58a2baa3298103b5d0550acec2d7b5909e6f4007d0a243042101a95e83aea49954dd19351527dad8e993ddc1c3768774e2 SHA512 b9baebf7d718b0acd3ee0c824c93cab836ae3233113b07d53e6aae204418992a9e9db83d8fceae949f36a72d000c6521efe3b0698421ee1561bb9201cd18d5e3
AUX tinyproxy.service 172 BLAKE2B d2e6199bfee2bac52e08d4c5506131f19e2630ebe1d9ed12f71d575cef37454c229e9e08b1fc89d9e26052a1192913289ed3602d69686d6894eb68b8639e7a5a SHA512 4c4cd36a7e34d9ee27c05475b72d1b61f90592ccb44c9deb96a1375bb681b7901702f078ed24b7c633074c83e450275a4a66829f3b270f75fc786a50d1ef393f
AUX tinyproxy.tmpfiles.conf 48 BLAKE2B f2cd35878580eb198920f5db8493e3e266b4325160a9590a0b59bef1cf0577d0129bb636d99442cdb2154b444a8cdc1c6d01b4850b57df774be00338c61902e4 SHA512 24440cdaed0af6cbdb191acb1769e0a17871ef95e03e62a6621a413a2616e5d90d748d909bb5d18c029b25d7bf91485dbe46ee11e8703a1cb9008be470536715
+DIST tinyproxy-1.10.0.tar.xz 176060 BLAKE2B 58f9b443c731de6b74d689a80ebd422d3b6f51f643546ee144b37fb3262725246f6a5fa1015267a94f192f8715eaf71ffc078ead75e6225a210f58ec28ee8fcf SHA512 8d82598c5f9c89bc672f4632139ac52696d5c7788963de51688a8aeb576c69004f8338fe1e1897bf704a21dfd25ab1effb092003b6afaa9a88c2b5d0608310f5
DIST tinyproxy-1.8.3.tar.bz2 202430 BLAKE2B 1f85d6eb3a1b2cebe752f15e51869882c58f7dcafb2518511dd8c83c44a010a1cdac93e40e2c1f177a7687b126925258c79ff56011a42addd710b2009d546313 SHA512 69f1262b39d37f44a42621a0d25985632cdb790c8d9b49335a49a68c0f5237b97b111252856cba119895ac066770645560d2d7cd2de31f02103fa55fb4b3290c
-EBUILD tinyproxy-1.8.3-r4.ebuild 1968 BLAKE2B 8cf139adefc20e033e4678a9a97b38e9ff054d8271ee18e168d5944e73a70e7ceb88098a6fdf7a426fb982707d5635224024e6c75a0e9c883bf67419edf1d06e SHA512 63f04e0b44a85b1ba26275ddf72ce1a752702349a28da8ca01ff5fb014a45fbbd2abb0097403eec9f8e2d39b41fed2a89b39ba0183b2bf6be87f0fc76bf3d554
-MISC metadata.xml 567 BLAKE2B 2ba501cca993b35f40a39e8935c57d622760d4c9dee07868723b112595411475cf24c612ef8b3a0ed1fb07c0f8d374cbd758e95c8d034d5c3e03f4940a64bded SHA512 58a7a1bb222e94bc0104bcbda8860a3cff2b6e4f3036c3e797188396e0f55e7b2314d5df77009898c478a933fe17b372c1b656fa8728fe5161e4e9b18fc54c6f
+DIST tinyproxy-1.8.4.tar.xz 192300 BLAKE2B bc425ab40d5d5fb49111d74d67e7ac848d77ad4be87039b34543a118df317839aa529c6b9ca52f1eafe933e7d344e09770a76ed0184181591483c6b3f1d79243 SHA512 23398a2c8a6d926b371086ba96032d0fd8dd06d114edf24950b868f53bb6b4235cd0f5d6b9a0131879fcc16bbe6b71142a6855de593a937ef7b0c323b50e0aec
+EBUILD tinyproxy-1.10.0-r1.ebuild 1665 BLAKE2B bf45228833548cb2b1c72aac45b7ad639721af0cded7f6e5b6c88c153d01d7ea09cb409d37da2d4f8820b4bbcdb33c1f0f51618323dc12b8d42d41724e5acf64 SHA512 919ba85f49262335636e06a017707386c761795c71425daace940fbabcce614f2569d1912a4b3a06a15753f799fc172374f524f6a7ff510e7ac6bdbf4304b98a
+EBUILD tinyproxy-1.8.3-r4.ebuild 1965 BLAKE2B ff4e4b323dd7873329f8a0aeb13eec050a4f0ff1064faefb3da3dd58ed09650f1a889994c761a8d39bbc148e9efbc8fca3a474c16bb952040382d69a9e219081 SHA512 254ff872b2a6b0b837b6c43b83edcabf521d3bbf18f1cfdd45fd7f8e17f2202c35c4f8d7b365a9438a7eefd284f946df501c46df662c3d3e19847209bce69e8b
+EBUILD tinyproxy-1.8.4.ebuild 1847 BLAKE2B 16a1971bdd5c8f0f0304e217baccb189129d4e7bb2aa2ef0093304f079db567cb7a3321d2b41b95e34070a8338815bc2e06c88738e517eec229607df565ea414 SHA512 f5025431d4a18e1c5ee5e5012306651bed8ebce5bef193d254be55414aa30119c03122c321dfbbe7c5b3ce09ef141436c6408921adfca74aa5e899f18864d82f
+MISC metadata.xml 627 BLAKE2B 3acd13c1d7a698ad83efa30c8471d5241533d66c09c103cda58c20d420d3bec2de5fcd42535d6b0b8197ae1d1aea445674e563177237ee20c348beeaf44aaf2d SHA512 96b439d626b40c45952059c1e3599a0e1743e50644c605e1519e685337a3eff806c73a8e1b3fd13920908d44eb256bc39657c9c76535a8806193581053e7a657
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd
new file mode 100644
index 000000000000..48688a2c19c5
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.initd
@@ -0,0 +1,40 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+get_config() {
+ res=$(awk '$1 == "'$1'" { s=$2 } END { print s }' "$CONFFILE")
+
+ if [ "x$res" = "x" ]; then
+ echo "$2"
+ else
+ eval echo "$res"
+ fi
+}
+
+: ${CONFFILE:="/etc/${SVCNAME}/${SVCNAME}.conf"}
+
+command=/usr/bin/tinyproxy
+command_args="-c ${CONFFILE}"
+pidfile=$(get_config PidFile /run/tinyproxy/${SVCNAME}.pid)
+
+depend() {
+ config "$CONFFILE"
+
+ use dns
+
+ [ "$(get_config Syslog Off)" = "On" ] && \
+ use logger
+}
+
+start_pre() {
+ piddir=$(dirname ${pidfile})
+
+ if [ "${piddir}" = "/run" ]; then
+ eerror "Please change your PidFile settings to be within the"
+ eerror "/run/tinyproxy directory"
+ eend 1
+ else
+ checkpath -d -o $(get_config User tinyproxy):$(get_config Group tinyproxy) ${piddir}
+ fi
+}
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.10.0.service b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.service
new file mode 100644
index 000000000000..e78310098778
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.10.0.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Tinyproxy Web Proxy Server
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd
index 9df4ef5046d7..0d6618b69a9a 100644
--- a/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
get_config() {
diff --git a/net-proxy/tinyproxy/metadata.xml b/net-proxy/tinyproxy/metadata.xml
index b2a94affab61..228ebe4e18a0 100644
--- a/net-proxy/tinyproxy/metadata.xml
+++ b/net-proxy/tinyproxy/metadata.xml
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
-<longdescription>A lightweight HTTP/SSL proxy</longdescription>
-<use>
- <flag name="filter-proxy">Enable filtering of domains/URLS</flag>
- <flag name="reverse-proxy">Enable reverse proxying</flag>
- <flag name="transparent-proxy">Enable transparent proxying</flag>
- <flag name="upstream-proxy">Enable upstream proxying</flag>
- <flag name="xtinyproxy-header">Include the X-Tinyproxy header</flag>
-</use>
+ <maintainer type="person">
+ <email>bkohler@gentoo.org</email>
+ </maintainer>
+ <longdescription>A lightweight HTTP/SSL proxy</longdescription>
+ <use>
+ <flag name="filter-proxy">Enable filtering of domains/URLS</flag>
+ <flag name="reverse-proxy">Enable reverse proxying</flag>
+ <flag name="transparent-proxy">Enable transparent proxying</flag>
+ <flag name="upstream-proxy">Enable upstream proxying</flag>
+ <flag name="xtinyproxy-header">Include the X-Tinyproxy header</flag>
+ </use>
</pkgmetadata>
diff --git a/net-proxy/tinyproxy/tinyproxy-1.10.0-r1.ebuild b/net-proxy/tinyproxy/tinyproxy-1.10.0-r1.ebuild
new file mode 100644
index 000000000000..16669d50efc5
--- /dev/null
+++ b/net-proxy/tinyproxy/tinyproxy-1.10.0-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd tmpfiles user
+
+DESCRIPTION="A lightweight HTTP/SSL proxy"
+HOMEPAGE="https://github.com/tinyproxy/tinyproxy/"
+SRC_URI="https://github.com/tinyproxy/tinyproxy/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+
+IUSE="test debug +filter-proxy reverse-proxy transparent-proxy
++upstream-proxy +xtinyproxy-header"
+
+REQUIRED_USE="test? ( xtinyproxy-header )"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} "" "" "" ${PN}
+}
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s|nobody|${PN}|g" \
+ etc/${PN}.conf.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable filter-proxy filter) \
+ $(use_enable reverse-proxy reverse) \
+ $(use_enable transparent-proxy transparent) \
+ $(use_enable upstream-proxy upstream) \
+ $(use_enable xtinyproxy-header xtinyproxy) \
+ --disable-silent-rules \
+ --localstatedir=/var
+}
+
+src_test() {
+ # The make check target does not run the test suite
+ emake test
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ diropts -m0775 -o ${PN} -g ${PN}
+ keepdir /var/log/${PN}
+
+ newinitd "${FILESDIR}"/${PN}-1.10.0.initd tinyproxy
+ systemd_newunit "${FILESDIR}"/${PN}-1.10.0.service tinyproxy.service
+ systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf
+}
+
+pkg_postinst() {
+ tmpfiles_process ${PN}.tmpfiles.conf
+
+ elog "For filtering domains and URLs, enable filter option in the configuration"
+ elog "file and add them to the filter file (one domain or URL per line)."
+}
diff --git a/net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild b/net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild
index 9f8aa70a55f5..c371c7b1b9ea 100644
--- a/net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild
+++ b/net-proxy/tinyproxy/tinyproxy-1.8.3-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
diff --git a/net-proxy/tinyproxy/tinyproxy-1.8.4.ebuild b/net-proxy/tinyproxy/tinyproxy-1.8.4.ebuild
new file mode 100644
index 000000000000..6c165306197c
--- /dev/null
+++ b/net-proxy/tinyproxy/tinyproxy-1.8.4.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd tmpfiles user
+
+DESCRIPTION="A lightweight HTTP/SSL proxy"
+HOMEPAGE="https://github.com/tinyproxy/tinyproxy/"
+SRC_URI="https://github.com/tinyproxy/tinyproxy/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+
+IUSE="test debug +filter-proxy minimal reverse-proxy
+ transparent-proxy +upstream-proxy +xtinyproxy-header"
+
+REQUIRED_USE="test? ( xtinyproxy-header )"
+
+DEPEND="!minimal? ( app-text/asciidoc )"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} "" "" "" ${PN}
+}
+
+src_prepare() {
+ use minimal && PATCHES+=( "${FILESDIR}/${PN}-1.8.1-minimal.patch" )
+
+ default
+
+ sed -i \
+ -e "s|nobody|${PN}|g" \
+ etc/${PN}.conf.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ if use minimal; then
+ ln -s /bin/true "${T}"/a2x
+ export PATH="${T}:${PATH}"
+ fi
+
+ econf \
+ $(use_enable debug) \
+ $(use_enable filter-proxy filter) \
+ $(use_enable reverse-proxy reverse) \
+ $(use_enable transparent-proxy transparent) \
+ $(use_enable upstream-proxy upstream) \
+ $(use_enable xtinyproxy-header xtinyproxy) \
+ --disable-silent-rules \
+ --localstatedir=/var
+}
+
+src_test() {
+ # The make check target does not run the test suite
+ emake test
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ diropts -m0775 -o ${PN} -g ${PN}
+ keepdir /var/log/${PN}
+
+ newinitd "${FILESDIR}"/${PN}-1.8.3-r2.initd tinyproxy
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf
+}
+
+pkg_postinst() {
+ tmpfiles_process ${PN}.tmpfiles.conf
+
+ elog "For filtering domains and URLs, enable filter option in the configuration"
+ elog "file and add them to the filter file (one domain or URL per line)."
+}
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
+}