Possible to have custom onion address pointing to site hosted on Cloudflare Pages?

What is the name of the domain?

What is the issue you’re encountering

I’d like to have a custom onion address that when accessed over Tor points to my site hosted on Cloudflare Pages. I’d like to know if it’s even possible because I’m struggling to make it work.

What steps have you taken to resolve the issue?

I’ve setup tor hidden service with nginx the should do the redirection page hosted on Cloudflare Pages. There are currently 2 issues I’m running into:

  1. When I set proxy_pass http lofextra com, I’m redirected to Cloudflare error page. See the attached screenshot
  2. When I set proxy_pass https lofextra com with certificate generated under SSL/TLS → Origin Server, I’m getting 502 Bad Gateway error from my nginx. According to the logs, there’s an issue with SSL handshake.
server {
    listen 5735;
    server_name ee7kdtq6beddezcymp2fa7zmutft2yh7e3gvw3agbrexore3xc4qyoyd onion;

    ssl_certificate /etc/ssl/certs/cloudflare-lofextra-origin.pem;
    ssl_certificate_key /etc/ssl/private/cloudflare-lofextra-origin.key;

    location / {
        proxy_pass https lofextra com;
        #proxy_ssl_verify off;
        proxy_set_header Host $host;
        #proxy_set_header Host https lofextra com;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
2024/08/06 14:03:19 [error] 7339#7339: *5 SSL_do_handshake() failed (SSL: error:0A000410:SSL routines::sslv3 alert handshake failure:SSL alert number 40) while SSL handshaking to upstream, client: 127.0.0.1, server: ee7kdtq6beddezcymp2fa7zmutft2yh7e3gvw3agbrexore3xc4qyoyd onion, request: "GET / HTTP/1.1", upstream: "https 104.21.13.139:443", host: "ee7kdtq6beddezcymp2fa7zmutft2yh7e3gvw3agbrexore3xc4qyoyd onion"
2024/08/06 14:03:19 [error] 7339#7339: *5 connect() to [2606:4700:3031::ac43:c860]:443 failed (101: Network is unreachable) while connecting to upstream, client: 127.0.0.1, server: ee7kdtq6beddezcymp2fa7zmutft2yh7e3gvw3agbrexore3xc4qyoyd onion, request: "GET / HTTP/1.1", upstream: "`https [2606:4700:3031::ac43:c860] 443/`", host: "ee7kdtq6beddezcymp2fa7zmutft2yh7e3gvw3agbrexore3xc4qyoyd onion"

What feature, service or problem is this related to?

I don’t know

Screenshot of the error

Hello @kotjak ,

As checking the domain lofextra.com, it was successfully redirected to https://lofextra.com/ and returned an HTTP code 200. The website is currently up and accessible without any issues, as shown in the screenshot below:

Unfortunately, we were unable to replicate the error at this time. If you are encountering a 502 Bad Gateway or a 1001 DNS resolution error, please refer to the information provided below for further assistance:

502 Bad Gateway
1001 DNS resolution error

Thank you.

Hello, thanks for the reply, but I’m not sure you even read my post. I’m having issues with tor, not clearnet.

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