A8DOG

A8DOG

随便写写,记录折腾过程!
telegram

Debian/Ubuntu搭建tor网桥教程

因为 tor 自带的网桥可能无法使用或者速度比较慢,自己搭建一个网桥说不定能提高访问速度。

https://img.a8dog.com/i/2023/01/03/immsjv.webp

好久没写作了,我也不讲究什么格式了。

1. 安装 Tor

apt update
apt install tor

2. 安装 obfs4proxy

进入 /etc/apt/preferences.d 编辑 obfs4proxy.pref 文件,如果没有就创建一个!

Explanation: tor meta, always run latest version of obfs4proxy
Package: obfs4proxy
Pin: release a=bullseye-backports
Pin-Priority: 500

然后执行:

sudo apt-get install obfs4proxy

3. 编辑 tor 配置文件

通常位于 /etc/tor/torrc 注意修改下面的端口!

# tor端口
ORPort 2222
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
# obfs4端口
ServerTransportListenAddr obfs4 0.0.0.0:3333
ExtORPort auto
# 邮箱
ContactInfo <[email protected]>
# 服务器名字
Nickname A8dog

4. 重新启动 Tor

启用并启动 tor:

systemctl enable --now tor.service

或者如果它已经在运行,请重新启动它,以便配置生效:

systemctl restart tor.service

5. 合成网桥

执行:

journalctl -e -u tor@default

找到开头为 Your Tor server's identity key fingerprint is 复制后面的 key。
然后打开 /var/lib/tor/pt_state/obfs4_bridgeline.txt 复制 cert = 开头到后面的内容。

完整的网桥就是:obfs4 ip端口 keyxxxx cert = 上面复制的内容

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.