summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-proxy/obfsproxy/obfsproxy-0.2.3.ebuild')
-rw-r--r--net-proxy/obfsproxy/obfsproxy-0.2.3.ebuild34
1 files changed, 33 insertions, 1 deletions
diff --git a/net-proxy/obfsproxy/obfsproxy-0.2.3.ebuild b/net-proxy/obfsproxy/obfsproxy-0.2.3.ebuild
index 97c4128..02ee94e 100644
--- a/net-proxy/obfsproxy/obfsproxy-0.2.3.ebuild
+++ b/net-proxy/obfsproxy/obfsproxy-0.2.3.ebuild
@@ -14,8 +14,40 @@ SRC_URI="mirror://pypi/o/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="daemon"
DOCS=( ChangeLog INSTALL README TODO doc/HOWTO.txt )
RDEPEND="dev-python/pyptlib"
+
+src_install() {
+ distutils-r1_src_install
+ if use daemon; then
+ newconfd "${FILESDIR}"/obfsproxy.confd obfsproxy
+ newinitd "${FILESDIR}"/obfsproxy.initd obfsproxy
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ einfo "To run ${PN} with a tor bridge, add the following to your torrc file:"
+ einfo
+ einfo " SocksPort 0"
+ einfo " ORPort 443 # or some other port if you already run a webserver/skype"
+ einfo " BridgeRelay 1"
+ einfo " ExitPolicy reject *:*"
+ einfo " Nickname CHANGEME_1"
+ einfo " ContactInfo CHANGEME_2"
+ einfo " ServerTransportPlugin obfs2,obfs3 exec /usr/bin/${PN} managed"
+ einfo
+ einfo "Obviously, change CHANGEME_1 and CHANGEME_2 to appropriate values. When you"
+ einfo "start tor, you should see a message similar to the following in its logs:"
+ einfo
+ einfo " Oct 05 20:00:41.000 [notice] Registered server transport 'obfs2' at '0.0.0.0:26821"
+ einfo " Oct 05 20:00:42.000 [notice] Registered server transport 'obfs3' at '0.0.0.0:40172"
+ einfo
+ einfo "Note the port numbers, 26821 and 40172 in this case, and report it, along with"
+ einfo "your IP address, to your bridge clients. If you are behind a NAT firewall, you"
+ einfo "you need to do port forwarding on those ports."
+ einfo
+}