summarylogtreecommitdiffstats
path: root/tor-router.install
diff options
context:
space:
mode:
authorEduard Toloza2018-12-16 21:08:56 -0500
committerEduard Toloza2018-12-16 21:08:56 -0500
commit7e82190aa28afbf6a59b19e8f345f7fcd5105b5e (patch)
tree62b4ccc0ceb81c935ce41d74564d2252ed85df7f /tor-router.install
downloadaur-7e82190aa28afbf6a59b19e8f345f7fcd5105b5e.tar.gz
tor-router: first commit.
Diffstat (limited to 'tor-router.install')
-rw-r--r--tor-router.install21
1 files changed, 21 insertions, 0 deletions
diff --git a/tor-router.install b/tor-router.install
new file mode 100644
index 000000000000..e5eb8873b38c
--- /dev/null
+++ b/tor-router.install
@@ -0,0 +1,21 @@
+#!/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 "BlackArch ==> tor-router is already configured in $torconfig"
+ else
+ echo -e "BlackArch ==> 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 "BlackArch ==> 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 5353" >> "$torconfig"
+ fi
+}
+
+post_upgrade() {
+ post_install
+}