deb.torproject.org is also served through via an Onion Service: http://sdscoq7snqtznauu.onion/
Note: The symbol # refers to running the code as root. This means you should have access to a user account with system administration privileges, e.g your user should be in the sudo group.
To use Apt over Tor, the apt transport needs to be installed:
# apt install apt-transport-tor
Then you need to add the following entries to
/etc/apt/sources.list or a new file in
# For the stable version.
deb tor://sdscoq7snqtznauu.onion/torproject.org <DISTRIBUTION> main
# For the unstable version.
deb tor://sdscoq7snqtznauu.onion/torproject.org tor-nightly-master-<DISTRIBUTION> main
<DISTRIBUTION> with your Operating System codename. Run
lsb_release -c or
cat /etc/debian_version to check the Operating System version.
Now refresh your sources and try to install tor again:
# apt update
# apt install tor