|
@@ -946,7 +946,12 @@ EOF
|
946
|
946
|
|
947
|
947
|
if [[ $VARIANT == "usb" ]]; then
|
948
|
948
|
# tor
|
949
|
|
- chroot "$rootdir" apt-get -y install tor
|
|
949
|
+ echo "deb $TOR_PACKAGE_UPSTREAM $DEBIAN_VERSION main" | sudo tee -a $rootdir/etc/apt/sources.list.d/tor.list
|
|
950
|
+ echo "deb-src $TOR_PACKAGE_UPSTREAM $DEBIAN_VERSION main" | sudo tee -a $rootdir/etc/apt/sources.list.d/tor.list
|
|
951
|
+ chroot "$rootdir" gpg --keyserver keys.gnupg.net --recv $TOR_GPG_KEY
|
|
952
|
+ chroot "$rootdir" gpg --export $TOR_GPG_KEY | sudo apt-key add -
|
|
953
|
+ chroot "$rootdir" apt-get update
|
|
954
|
+ chroot "$rootdir" apt-get -yq install tor deb.torproject.org-keyring
|
950
|
955
|
|
951
|
956
|
# xmpp client
|
952
|
957
|
chroot "$rootdir" echo "deb ftp://ftp.gajim.org/debian unstable main" > /etc/apt/sources.list.d/gajim.list
|
|
@@ -1069,9 +1074,17 @@ function image_setup_utils {
|
1069
|
1074
|
chroot "$rootdir" apt-get -yq install fail2ban vim-common python3 unattended-upgrades
|
1070
|
1075
|
|
1071
|
1076
|
# Tor and ssh over tor
|
1072
|
|
- chroot "$rootdir" apt-get -yq install tor connect-proxy
|
|
1077
|
+ echo "deb $TOR_PACKAGE_UPSTREAM $DEBIAN_VERSION main" | sudo tee -a $rootdir/etc/apt/sources.list.d/tor.list
|
|
1078
|
+ echo "deb-src $TOR_PACKAGE_UPSTREAM $DEBIAN_VERSION main" | sudo tee -a $rootdir/etc/apt/sources.list.d/tor.list
|
|
1079
|
+ chroot "$rootdir" gpg --keyserver keys.gnupg.net --recv $TOR_GPG_KEY
|
|
1080
|
+ chroot "$rootdir" gpg --export $TOR_GPG_KEY | sudo apt-key add -
|
|
1081
|
+ chroot "$rootdir" apt-get update
|
|
1082
|
+ chroot "$rootdir" apt-get -yq install tor deb.torproject.org-keyring connect-proxy
|
|
1083
|
+ chroot "$rootdir" connect-proxy
|
1073
|
1084
|
sed -i 's|#Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc
|
1074
|
1085
|
sed -i 's|Log notice file.*|Log notice file /dev/null|g' $rootdir/etc/tor/torrc
|
|
1086
|
+ sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" $rootdir/etc/tor/torrc
|
|
1087
|
+ sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_DAY_GB GBytes|g" $rootdir/etc/tor/torrc
|
1075
|
1088
|
if ! grep -q 'Host *.onion' $rootdir/root/.ssh/config; then
|
1076
|
1089
|
if [ ! -d $rootdir/root/.ssh ]; then
|
1077
|
1090
|
mkdir $rootdir/root/.ssh
|