注意:这些说明适用于将可插拔传输与 Tor 网络守护程序(即 little-t tor)一起使用。
有关在 Tor 浏览器中使用可插拔传输的说明,请参阅 Tor 浏览器用户手册。
有时可能会阻止直接访问 Tor 网络。
Tor 可以与称为可插拔传输的规避工具一起使用,以绕过这些阻止。
obfs4、Snowflake 和 WebTunnel 是一些可与 Tor 一起使用的可插拔传输。
可以通过修改 Tor 的配置文件(即 torrc)来配置 Tor 以使用可插拔传输。
配置 tor
以在不同操作系统中使用可插拔传输的步骤如下。
为您的操作系统下载和安装 tor
或 Tor 专家包。
如果 Tor Project 网站访问受阻,请使用 Tor Project 官方镜像。
如果已安装 tor
,可插拔传输二进制文件可作为 Tor 专家包的一部分下载。作为 Tor 专家包的一部分,可插拔传输二进制文件可以使用:
- lyrebird:实现了几种可插拔传输协议,包括 obfs4 和 WebTunnel。
- snowflake-client:实现了 Snowflake 可插拔传输。
将 Tor 专家包解压到您选择的目录中。
对于可插拔传输,obfs4 和 WebTunnel,可从网桥网站、通过电子邮件或 Telegram 获取网桥。
修改 Tor 的配置文件,即 torrc。
根据操作系统复制和修改以下示例 torrc
。
如果在 Linux 上安装了 little-t tor,则必须修改默认的 torrc
。
配置 tor
使用 obfs4 或 WebTunnel
UseBridges 1
# Uncomment the line below for Windows and include the path to the pluggable transport executable (Example: C:\Users\user\Downloads\tor\pluggable_transports\lyrebird.exe)
#ClientTransportPlugin meek_lite,obfs4,webtunnel exec <path-of-executable>
# Uncomment the line below for macOS and include the path to the pluggable transport executable (Example: /Users/user/Downloads/tor/pluggable_transports/lyrebird)
#ClientTransportPlugin meek_lite,obfs4,webtunnel exec <path-of-executable>
# 对于 Linux 取消下面一行的注释,并包括可插拔传输可执行文件的路径(例如:/home/user/Downloads/tor/pluggable_transports/lyrebird)
#ClientTransportPlugin meek_lite,obfs4,webtunnel exec <path-of-executable>
Bridge obfs4 <IP ADDRESS>:<PORT> <FINGERPRINT> cert=<CERTIFICATE> iat-mode=0
Bridge webtunnel <IP ADDRESS>:<PORT> <FINGERPRINT> url=<URL> ver=0.0.1
配置 tor
使用 Snowflake
UseBridges 1
# Uncomment the line below for Windows and include the path to the pluggable transport executable (Example: C:\username\Browser\TorBrowser\tor\pluggable_transports\snowflake-client.exe)
#ClientTransportPlugin snowflake exec <path-of-executable>
# Uncomment the line below for macOS and include the path to the pluggable transport executable (Example: /Users/user/Downloads/tor/pluggable_transports/snowflake-client)
#ClientTransportPlugin snowflake exec <path-of-executable>
# Uncomment the line below for Linux and include the path to the pluggable transport executable (Example: /home/user/Downloads/tor/pluggable_transports/snowflake-client)
#ClientTransportPlugin snowflake exec <path-of-executable>
Bridge snowflake 192.0.2.3:80 2B280B23E1107BB62ABFC40DDCC8824814F80A72 fingerprint=2B280B23E1107BB62ABFC40DDCC8824814F80A72 url=https://1098762253.rsc.cdn77.org front=www.phpmyadmin.net,cdn.zk.mk ice=stun:stun.antisip.com:3478,stun:stun.epygi.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.mixvoip.com:3478,stun:stun.nextcloud.com:3478,stun:stun.bethesda.net:3478,stun:stun.nextcloud.com:443 utls-imitate=hellorandomizedalpn
故障排除
- 如果 Tor 连接失败,请检查
torrc
文件的格式是否正确。
- 如果通过 Tor 专家包安装了
tor
,请确保 torrc
文件与 tor
二进制文件位于同一文件夹。
- 检查 Tor 日志中的错误。
- 在尝试完这些常见故障排除步骤后,如果连接仍然失败,您收到的网桥可能已离线或被屏蔽。
从网桥网站、通过电子邮件或 Telegram 获取一组新网桥。