How to Use a Webtunnel Bridge in Debian 12

Webtunnel is a new bridge from the Tor Project that allows your Tor traffic to appear like HTTP traffic. This makes it easier to bypass censorship. Use it with Tor, the Tor Browser or Tails OS. In this article, we will guide you through the steps to set up Webtunnel with Tor on Debian 12.

1. Install Required Packages

Before building Webtunnel, make sure you have the necessary tools installed. Run the following commands to install Git, Go, and Tor:

sudo apt update
sudo apt install golang git tor
    

2. Clone and Build Webtunnel

Clone the Webtunnel repository from GitLab and build it using Go:

git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel
cd webtunnel/main/client/
go build
sudo cp client /usr/bin/webtunnel
    

This will build the Webtunnel client and copy it to the system's binary directory so it can be used by Tor.

3. Allow Webtunnel in AppArmor

Edit the AppArmor profile to allow Tor to execute Webtunnel. Open the file using your preferred text editor:

sudo nano /etc/apparmor.d/system_tor
    

Add the following line to allow Tor to use Webtunnel:

/usr/bin/webtunnel ix,
    

Save the file and exit the editor. Then, reload the AppArmor profile to apply the changes:

sudo apparmor_parser -r /etc/apparmor.d/system_tor
    

4. Configure Tor to Use Webtunnel

Edit the Tor configuration file to enable Webtunnel. Open the file using your preferred text editor:

sudo nano /etc/tor/torrc
    

Add the following lines to the end of the file:

UseBridges 1
ClientTransportPlugin webtunnel exec /usr/bin/webtunnel
Bridge webtunnel [XXX]:443 XXX url=https://XXX ver=0.0.3
Bridge webtunnel [XXX]:443 XXX url=https://XXX ver=0.0.3
    

Replace [XXX] with the actual bridge details you find on the Webtunnel bridge list. You can find bridges here.

5. Restart Tor and Check Logs

Restart the Tor service to apply the changes:

sudo systemctl restart tor.service
    

Check the Tor logs to verify that the Webtunnel is working. Run the following command to view the logs:

sudo journalctl -e -u tor@default
    

You should see a line like this in the logs:

Bootstrapped 100% (done): Done
    

Conclusion

By following these steps, you can configure Webtunnel on Debian 12 and start using it with Tor. The setup for Tor Browser and Tails OS is much simpler, just a matter of copying and pasting the webtunnel bridges into the applications.