blob: 3bc2774f32bc8bb4dce02d06974885c2708205f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/sh
# tor-router configuration in /etc/tor/torrc
post_install() {
#Defining variables
torconfig="/etc/tor/torrc"
torconfigbackup="/etc/tor/torrc.backup"
if grep -iq "# Seting up TOR transparent proxy for tor-router" "$torconfig" ; then
echo -e "tor-router is already configured in $torconfig"
else
echo -e "Making a backup of your torrc file, if you have problems with the new configuration, delete $torconfig and move $torconfigbackup to $torconfig"
cp "$torconfig" "$torconfigbackup"
echo -e "Configuring the torrc file to use TOR as a transparent proxy..."
echo -e "\n# Seting up TOR transparent proxy for tor-router\nVirtualAddrNetwork 10.192.0.0/10\nAutomapHostsOnResolve 1\nTransPort 9040\nDNSPort 6669" >> "$torconfig"
fi
}
post_upgrade() {
post_install
}
|