How to setup Tor Middle/Guard Relay


I just wanted to ask if it is possible to set up a Tor Middle/Guard Relay with Cloudflare Tunnel?

I would install it on my Ubuntu server, and expose its Port 443 with cloudflared

The default configuration of the Middle/Guard Relay:

Nickname    myNiceRelay  # Change "myNiceRelay" to something you like
ContactInfo [email protected]  # Write your e-mail and be aware it will be published
ORPort      443          # You might use a different port, should you want to
ExitRelay   0
SocksPort   0

My initial cloudflared configuration:

tunnel: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
credentials-file: /root/.cloudflared/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.json

 - hostname:
     noTLSVerify: true
 - service: http_status:404

Unfortunately this isn’t possible. Cloudflare Tunnel only supports exposing HTTP applications by default. If you want to expose arbitrary TCP applications, you have to use the WARP client on any computer that needs to connect.

Thank you. I’ll experiment on this one.

It won’t work with Cloudflare Tunnel. You would have to use Spectrum or Magic WAN, but I honestly cannot recommend using Cloudflare in front of a TOR relay. Not only would it be quite expensive for you due to bandwidth usage, but I doubt Cloudflare wants its IPs showing up as TOR relays.

1 Like

Sure, no worries. I will not attempt to experiment either due to the lack of technical skills and busy schedule.

"But I doubt Cloudflare wants its IPs showing up as TOR relays" Oh, I see. I didn’t know that. I’ll obey Cloudflare’s policies by not attempting to.

Thanks for the advice! :slightly_smiling_face:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.