Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/etc/torrc.d -> /etc/torrc.d/95_whonix.conf #19

Merged
merged 6 commits into from Feb 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -75,10 +75,10 @@ class Common:
'''
command_useBridges = 'UseBridges 1'
command_use_custom_bridge = '# Custom Bridge is used:'
command_obfs3 = 'ClientTransportPlugin obfs2,obfs3 exec /usr/bin/obfsproxy managed'
command_obfs3 = 'ClientTransportPlugin obfs2,obfs3 exec /usr/bin/obfs4proxy'
command_obfs4 = 'ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy'
command_fte = 'ClientTransportPlugin fte exec /usr/bin/fteproxy --managed'
command_scramblesuit = 'ClientTransportPlugin obfs2,obfs3,scramblesuit exec /usr/bin/obfsproxy managed'
command_scramblesuit = 'ClientTransportPlugin scramblesuit exec /usr/bin/obfs4proxy'
command_meek_lite = 'ClientTransportPlugin meek_lite exec /usr/bin/obfs4proxy'
command_meek_amazon_address = 'a0.awsstatic.com\n'
command_meek_azure_address = 'ajax.aspnetcdn.com\n'
Expand Down Expand Up @@ -262,6 +262,8 @@ def __init__(self):
'meek-azure (works in China)'
# The following will be uncommented as soon as being implemented.
# 'fte'
# The following is deprecated
# 'scramblesuit'
]

self.layout = QtWidgets.QVBoxLayout(self)
Expand Down Expand Up @@ -437,7 +439,7 @@ def nextId(self):
bridge_type = 'meek-amazon'
elif bridge_type.startswith('meek-azure'):
bridge_type = 'meek-azure'
# elif bridge_type.selftartswith('scramblesuit'):
# elif bridge_type.startswith('scramblesuit'):
# bridge_type = 'scramblesuit'
''' TODO: Other options can be implemented once there are supported.
elif bridge_type.startswith('fte'):
Expand Down
Expand Up @@ -3,9 +3,9 @@
import fileinput, os, shutil

'''repair_torrc() function will be called when we want to gurantee the existence of:
1. /etc/torrc.d/
1. /etc/torrc.d/95_whonix.conf
2. /etc/tor/torrc
3. "%include /etc/torrc.d" line in /etc/tor/torrc file
3. "%include /etc/torrc.d/95_whonix.conf" line in /etc/tor/torrc file
'''

if os.path.exists('/usr/share/anon-gw-base-files/gateway'):
Expand All @@ -16,9 +16,16 @@
def repair_torrc():
repair_torrc_d()

if not os.path.exists('/etc/torrc.d/95_whonix.conf'):
with open('/etc/torrc.d/95_whonix.conf', "w+") as f:
f.write("%include /usr/local/etc/torrc.d/40_anon_connection_wizard.conf")
f.write('\n')
f.write("%include /usr/local/etc/torrc.d/50_user.conf")
f.write('\n')

if not os.path.exists('/etc/tor/torrc'):
with open('/etc/tor/torrc', "w+") as f:
f.write("%include /etc/torrc.d")
f.write("%include /etc/torrc.d/95_whonix.conf")
f.write('\n')
else:
with open('/etc/tor/torrc', "r") as f:
Expand All @@ -28,16 +35,16 @@ def repair_torrc():
torrcd_line_exists = False
for line in lines:
str = line.strip()
if (str == '%include /etc/torrc.d'):
if (str == '%include /etc/torrc.d/95_whonix.conf'):
torrcd_line_exists = True

if not torrcd_line_exists:
with open('/etc/tor/torrc', "a") as f:
f.write("%include /etc/torrc.d\n")
f.write("%include /etc/torrc.d/95_whonix.conf\n")
f.write('\n')


'''repair_torrc_d() will gurantee the existence of /etc/torrc.d
'''repair_torrc_d() will gurantee the existence of /etc/torrc.d/
and if anon-connection-wizard is in Whonix,
then also gurantee the existence of /usr/local/etc/torrc.d/
'''
Expand Down
5 changes: 0 additions & 5 deletions usr/share/anon-connection-wizard/bridges_default
Expand Up @@ -38,11 +38,6 @@
"obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0"
]
,
"scramblesuit":
[
"scramblesuit 188.226.213.208:54278 AA5A86C1490296EF4FACA946CC5A182FCD1C5B1E password=MD2VRP7WXAMSG7MKIGMHI4CB4BMSNO7T",
"scramblesuit 83.212.101.3:443 A09D536DD1752D542E1FBB3C9CE4449D51298239 password=XTCXLG2JAMJKZW2POLBAOWOQETQSMASH"
],
"meek-amazon":
[
"meek_lite 0.0.2.0:2 B9E7141C594AF25699E0079C1F0146F409495296 url=https://d2cly7j4zqgua7.cloudfront.net/ front=a0.awsstatic.com"
Expand Down