The Tor Project maintains its own Debian package repository. Since Debian provides the LTS version of Tor that this might not always give you the latest stable Tor version, it's recommended to install tor from our repository.

如果您需要在您的基于 Debian 的系统中添加 Tor 软件包仓库,请遵循以下指示:

1. 安装 apt-transport-https

To enable all package managers using the libapt-pkg library to access metadata and packages available in sources accessible over https (Hypertext Transfer Protocol Secure).

   # apt install apt-transport-https

2. 将以下条目加到 "/etc/apt/sources.list" 后,或者 “/etc/apt/sources.list.d/” 中的一个新文件中。

   deb https://deb.torproject.org/torproject.org <DISTRIBUTION> main
   deb-src https://deb.torproject.org/torproject.org <DISTRIBUTION> main

如果您想尝试实验性版本:

   deb https://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-<DISTRIBUTION> main
   deb-src https://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-<DISTRIBUTION> main

或是每晚构建:

   deb https://deb.torproject.org/torproject.org tor-nightly-master-<DISTRIBUTION> main
   deb-src https://deb.torproject.org/torproject.org tor-nightly-master-<DISTRIBUTION> main

Replace <DISTRIBUTION> with your Operating System codename. Run lsb_release -c or cat /etc/debian_version to discover.

3. 然后,在命令窗口中运行下面的命令来添加用于签名软件包的 gpg 公钥:

   # wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
   # gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -

4. 安装 tor 和 tor debian 密钥串

我们提供一个 Debian 软件包,以帮助您保持我们的密钥为最新状态。推荐您使用这个软件包。用下列命令安装它:

   # apt update
   # apt install tor deb.torproject.org-keyring