summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD4
-rw-r--r--torhttp_hook7
3 files changed, 7 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 02cc60f42199..35539ddefa71 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = mkinitcpio-tor-http
pkgdesc = Arch Linux mkinitcpio hook for running tor on the initramfs and requesting decryption keys
- pkgver = 0.0.3
+ pkgver = 0.0.4
pkgrel = 0
arch = any
license = BSD
@@ -11,10 +11,9 @@ pkgbase = mkinitcpio-tor-http
source = torhttp_install
source = torrc
source = config.sh
- md5sums = ffca13223496445560d436a54fad820b
+ md5sums = a4a0e5a651324b4b2632920ca103dfd0
md5sums = d770227ff8542316dc5529248f4dec90
md5sums = ccc836fedcd716ab0da09359d8b43cff
md5sums = 224d2ffff3ce14195bf5066aa293e8dd
pkgname = mkinitcpio-tor-http
-
diff --git a/PKGBUILD b/PKGBUILD
index 7cc1daf8dca0..558f17f86c82 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# stolen from https://aur.archlinux.org/packages/mkinitcpio-tor/
pkgname=mkinitcpio-tor-http
-pkgver=0.0.3
+pkgver=0.0.4
pkgrel=0
pkgdesc="Arch Linux mkinitcpio hook for running tor on the initramfs and requesting decryption keys"
arch=('any')
@@ -17,7 +17,7 @@ package() {
-md5sums=('ffca13223496445560d436a54fad820b'
+md5sums=('a4a0e5a651324b4b2632920ca103dfd0'
'd770227ff8542316dc5529248f4dec90'
'ccc836fedcd716ab0da09359d8b43cff'
'224d2ffff3ce14195bf5066aa293e8dd')
diff --git a/torhttp_hook b/torhttp_hook
index fb5ad7805b0a..24afd2449806 100644
--- a/torhttp_hook
+++ b/torhttp_hook
@@ -18,9 +18,8 @@ run_hook ()
MEM=$(grep MemTotal /proc/meminfo | awk '{ print $2 " " $3}')
CPU=$(echo -ne $(grep ^model\ name /proc/cpuinfo | cut -d: -f2 | uniq))
CORES=$(grep -c ^processor /proc/cpuinfo)
- # figure out interface
- INTERFACES=$(ip link show up | grep -Eo '(eth[0-9]|wlan[0-9])')
- macaddr=$(cat /sys/class/net/eth0/address || cat /sys/class/net/wlan0/address)
+ macaddr=$(cat /sys/class/net/eth0/address)
+ ipaddr=$(ip addr show dev eth0 | grep 'inet ' | awk '{print $2}')
#echo "Starting tor"
mkdir -p /tmp/tor
@@ -30,7 +29,7 @@ run_hook ()
sleep ${WAIT}
# send request
- passphrase=$(curl -sx socks5h://127.0.0.1:8080 -d mac=${macaddr} -d state=pending -d cmdline=$(echo ${CMDLINE} | base64) -d mem=$(echo ${MEM} | base64) -d cpu=$(echo ${CPU} | base64) -d cores=$(echo ${CORES} | base64) -d interfaces=$(echo ${INTERFACES} | base64) ${URL})
+ passphrase=$(curl -sx socks5h://127.0.0.1:8080 -d mac=${macaddr} -d state=pending -d cmdline=$(echo ${CMDLINE} | base64) -d mem=$(echo ${MEM} | base64) -d cpu=$(echo ${CPU} | base64) -d cores=$(echo ${CORES} | base64) -d ipaddr=$(echo ${ipaddr} | base64) ${URL})
if [ -z "$passphrase" ]; then
unset passphrase
exit 1