summaryrefslogtreecommitdiff
blob: e2f7f5d45478861b98666cba48b6012193e0e679 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/yenc/yenc-0.4.0-r1.ebuild,v 1.3 2013/01/04 01:15:59 floppym Exp $

EAPI="5"
PYTHON_COMPAT=( python2_7 )

inherit distutils-r1

DESCRIPTION="An obfuscating proxy using Tor's pluggable transport protocol"
HOMEPAGE="https://www.torproject.org/projects/obfsproxy.html"
SRC_URI="mirror://pypi/o/${PN}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"

PATCHES=( "${FILESDIR}"/${PN}-remove-argparse.patch )
DOCS=( ChangeLog INSTALL README TODO doc/HOWTO.txt )

DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"

RDEPEND=">=dev-python/pyptlib-0.0.5[${PYTHON_USEDEP}]
	>=dev-python/pycrypto-2.6-r2[${PYTHON_USEDEP}]
	dev-python/twisted-core[${PYTHON_USEDEP}]"

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
}