|
@@ -33,6 +33,7 @@ export TEXTDOMAINDIR="/usr/share/locale"
|
33
|
33
|
|
34
|
34
|
CURR_USER=$USER
|
35
|
35
|
MESH_CLIENT_INSTALL=
|
|
36
|
+ENABLE_MONKEYSPHERE=
|
36
|
37
|
|
37
|
38
|
# Version number of this script
|
38
|
39
|
VERSION="1.01"
|
|
@@ -122,12 +123,18 @@ function configure_ssh_client {
|
122
|
123
|
echo 'Host *.onion' > ~/.ssh/config
|
123
|
124
|
echo ' ServerAliveInterval 60' >> ~/.ssh/config
|
124
|
125
|
echo ' ServerAliveCountMax 3' >> ~/.ssh/config
|
125
|
|
- echo " ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p" >> ~/.ssh/config
|
|
126
|
+ if [[ $ENABLE_MONKEYSPHERE == $'yes' || $ENABLE_MONKEYSPHERE == $'y' ]]; then
|
|
127
|
+ echo " ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; connect -R remote -5 -S 127.0.0.1:9050 %h %p'" >> ~/.ssh/config
|
|
128
|
+ else
|
|
129
|
+ echo " ProxyCommand connect -R remote -5 -S 127.0.0.1:9050 %h %p" >> ~/.ssh/config
|
|
130
|
+ fi
|
126
|
131
|
echo "# ProxyCommand sh -c 'monkeysphere ssh-proxycommand --no-connect %h %p ; connect -R remote -5 -S 127.0.0.1:9050 %h %p'" >> ~/.ssh/config
|
127
|
132
|
echo 'Host *' >> ~/.ssh/config
|
128
|
133
|
echo ' ServerAliveInterval 60' >> ~/.ssh/config
|
129
|
134
|
echo ' ServerAliveCountMax 3' >> ~/.ssh/config
|
130
|
|
- echo '# ProxyCommand monkeysphere ssh-proxycommand %h %p' >> ~/.ssh/config
|
|
135
|
+ if [[ $ENABLE_MONKEYSPHERE == $'yes' || $ENABLE_MONKEYSPHERE == $'y' ]]; then
|
|
136
|
+ echo ' ProxyCommand monkeysphere ssh-proxycommand %h %p' >> ~/.ssh/config
|
|
137
|
+ fi
|
131
|
138
|
|
132
|
139
|
echo ''
|
133
|
140
|
echo $'Copy the following into a file called /home/username/.ssh/authorized_keys on the Freedombone server'
|
|
@@ -143,7 +150,7 @@ function configure_monkeysphere {
|
143
|
150
|
|
144
|
151
|
function show_help {
|
145
|
152
|
echo ''
|
146
|
|
- echo $"${PROJECT_NAME}-client --mesh [yes|no]"
|
|
153
|
+ echo $"${PROJECT_NAME}-client --mesh [yes|no] --monkeysphere [yes|no]"
|
147
|
154
|
echo ''
|
148
|
155
|
exit 0
|
149
|
156
|
}
|
|
@@ -164,10 +171,14 @@ do
|
164
|
171
|
shift
|
165
|
172
|
WIFI_CHANNEL=${1}
|
166
|
173
|
;;
|
167
|
|
- --mesh)
|
|
174
|
+ -m|--mesh)
|
168
|
175
|
shift
|
169
|
176
|
MESH_CLIENT_INSTALL=${1}
|
170
|
177
|
;;
|
|
178
|
+ --monkeysphere|--ms|--monkey)
|
|
179
|
+ shift
|
|
180
|
+ ENABLE_MONKEYSPHERE=${1}
|
|
181
|
+ ;;
|
171
|
182
|
*)
|
172
|
183
|
# unknown option
|
173
|
184
|
;;
|