back
Package Update Over Tor for Debian
If you want to hide what packages you are downloading, this is a nice way to do that.
#install required packages
apt update && apt-get install tor apt-transport-tor -y
After installing, edit all repositories listings (/etc/apt.sources.list , /etc/apt/sources.list.d/* , etc.) adding “tor+” before “http://”. Example below.
deb tor+https://deb.debian.org/debian bullseye main
deb-src tor+https://deb.debian.org/debian bullseye main
deb tor+https://deb.debian.org/debian bullseye-updates main
deb-src tor+https://deb.debian.org/debian bullseye-updates main
deb tor+https://security.debian.org/debian-security/ bullseye-security main
deb-src tor+https://security.debian.org/debian-security/ bullseye-security main
If you would like to change the repositories to updating from a hidden service, you can do that too. For the debian repositories, you can find them all at onion.debian.org Tor. Third party repos you are using may also have an onion address so try look them up. Add tor+ at the beginning like the other example. If they are not using HTTPS for their onion address, you need to remove the the “S”. Example below.
deb tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian/ bullseye main
deb-src tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian/ bullseye main
deb tor+http://5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion/debian-security bullseye-security main
deb-src tor+http://5ajw6aqf3ep7sijnscdzw77t7xq4xjpsy335yb2wiwgouo7yfxtjlmid.onion/debian-security bullseye-security main
deb tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian/ bullseye-updates main
deb-src tor+http://2s4yqjx5ul6okpp3f2gaunr2syex5jgbfpfvhxxbbjwnrsvbk5v3qbid.onion/debian/ bullseye-updates main