非公开网桥telegram @GetBridgesBot
yum install epel-release
vi /etc/yum.repos.d/Tor.repo
add following contents:
[tor]
name=Tor for Enterprise Linux $releasever - $basearch
baseurl=https://rpm.torproject.org/centos/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://rpm.torproject.org/centos/public_gpg.key
cost=100
yum install tor
yum install git golang policycoreutils-python-utils
export GOPATH='mktemp -d'
go install gitlab.com/yawning/obfs4.git/obfs4proxy
sudo cp $GOPATH/bin/obfs4proxy /usr/local/bin/
# chcon --reference=/usr/bin/tor /usr/local/bin/obfs4proxy
Edit your Tor config file, usually located at /etc/tor/torrc
and replace its content with:
Log notice file /var/log/tor/notices.log
RunAsDaemon 1
ORPort 4443
Exitpolicy reject *:*
BridgeRelay 1
ServerTransportPlugin obfs4 exec /usr/local/bin/obfs4proxy
ExtORPort auto
PublishServerDescriptor 0
systemctl enable --now tor
systemctl restart tor
systemctl status tor
output following means success, log file:
[notice] Your Tor server's identity key fingerprint is '<NICKNAME> <FINGERPRINT>'
[notice] Your Tor bridge's hashed identity key fingerprint is '<NICKNAME> <HASHED FINGERPRINT>'
[notice] Registered server transport 'obfs4' at '[::]:46396'
[notice] Tor has successfully opened a circuit. Looks like client functionality is working.
[notice] Bootstrapped 100%: Done
[notice] Now checking whether ORPort <redacted>:3818 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)
[notice] Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
vi /var/lib/tor/pt_state/obfs4_bridgeline.txt
Bridge obfs4 <IP ADDRESS>:<PORT> <FINGERPRINT> cert=k27hqWApaAmlRzDdkekpXnRcLGI3XJQgGh6PvSfPV8ejWWQqkXmZxO37yYe5HzLvMuJ0dg iat-mode=0
New control connection opened from 127.0.0.1.
卸载重装好了