diff options
author | Eduard Toloza | 2018-12-16 21:08:56 -0500 |
---|---|---|
committer | Eduard Toloza | 2018-12-16 21:08:56 -0500 |
commit | 7e82190aa28afbf6a59b19e8f345f7fcd5105b5e (patch) | |
tree | 62b4ccc0ceb81c935ce41d74564d2252ed85df7f | |
download | aur-7e82190aa28afbf6a59b19e8f345f7fcd5105b5e.tar.gz |
tor-router: first commit.
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | tor-router.install | 21 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bf57cfbf69c7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = tor-router + pkgdesc = A tool that allow you to make TOR your default gateway and send all internet connections under TOR (as transparent proxy) for increase privacy/anonymity without extra unnecessary code. + pkgver = 1.1 + pkgrel = 1 + url = https://gitlab.com/edu4rdshl/tor-router + install = tor-router.install + arch = any + groups = blackarch + groups = blackarch-defensive + license = GPL3 + depends = tor + depends = systemd + optdepends = curl: to verify if the script run sucessfully. + source = https://gitlab.com/edu4rdshl/tor-router/-/archive/v1.1/tor-router-v1.1.tar.gz + source = tor-router.install + sha512sums = 35cd616127e3b8671afe7761666ab3761540373bd6da2b3503047a279f1969cc60b16cb770f2648f7daf787103658952dfe99955b5bdf34fb5a0c347cba10ede + sha512sums = 2a0393f2f2c5603b3c9f59c14510121a2e57392b701ba5be9336bd93624ff4e6e50d2338a4f0eeadf07ad1d0d50d8646d1418e418b593baea09a418f9972fac1 + +pkgname = tor-router + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b393d726b75e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: edu4rdshl + +pkgname=tor-router +pkgver=1.1 +pkgrel=1 +pkgdesc='A tool that allow you to make TOR your default gateway and send all internet connections under TOR (as transparent proxy) for increase privacy/anonymity without extra unnecessary code.' +arch=('any') +groups=('blackarch' 'blackarch-defensive') +url='https://gitlab.com/edu4rdshl/tor-router' +license=('GPL3') +depends=('tor' 'systemd') +optdepends=('curl: to verify if the script run sucessfully.') +install=tor-router.install +source=("https://gitlab.com/edu4rdshl/$pkgname/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz" + 'tor-router.install') +sha512sums=('35cd616127e3b8671afe7761666ab3761540373bd6da2b3503047a279f1969cc60b16cb770f2648f7daf787103658952dfe99955b5bdf34fb5a0c347cba10ede' + '2a0393f2f2c5603b3c9f59c14510121a2e57392b701ba5be9336bd93624ff4e6e50d2338a4f0eeadf07ad1d0d50d8646d1418e418b593baea09a418f9972fac1' + ) + +package() { + cd "$pkgname-v$pkgver/files" + + install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname" + install -Dm 644 $pkgname.service "$pkgdir/etc/systemd/system/$pkgname.service" + install -Dm 644 ../README.md "$pkgdir/usr/share/doc/$pkgname/README" + install -Dm 644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + 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 +} |