-
Notifications
You must be signed in to change notification settings - Fork 6
/
tor-gateway.sh
33 lines (26 loc) · 1.5 KB
/
tor-gateway.sh
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
#!/bin/bash
# install apt repos
sudo apt update && sudo apt install perl tor -y
echo .........................................................................................................
# Download
cd /opt || exit ; sudo git clone https://github.com/htrgouvea/nipe ; cd nipe || exit;
echo .........................................................................................................
# Install libs and dependencies
sudo cpan install Try::Tiny Config::Simple JSON
echo .........................................................................................................
# Nipe must be run as root
perl nipe.pl install
echo .........................................................................................................
# add launcher
echo cd /opt/nipe/ \|\| exit \; sudo perl /opt/nipe/nipe.pl \$1 | sudo tee nipe
echo .........................................................................................................
sudo chmod +x nipe.pl nipe
echo .........................................................................................................
# create symbolic link
echo "alias nipe=\"/opt/nipe/nipe\"" >> ~/.bashrc
echo "alias nipe=\"/opt/nipe/nipe\"" >> ~/.zshrc
echo .........................................................................................................
# start / stop / restart
nipe
echo .........................................................................................................
echo "just run nipe.pl start from terminal to start TOR"