ayeowch/bitnodes

API access does not work via tor (cloudflare block)

Closed this issue · 9 comments

I cannot access to the API via tor request:
torify curl -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/nodes/x.y.z.x-8333
cloudflare blocks the request.

I've updated the Cloudflare config to allow tor. Note that Cloudflare may not immediately recognize certain IP as tor exit node, so your access could still be blocked.

Just tested, it still does not work to acccess api via torify command.

@micressor Yes, still not working here either.
@ayeowch If setting Protection to Off does not work, could you consider enabling Onion Routing to test?

Toggle Onion Routing On or Off via the Cloudflare Network app.

@micressor @nyxnor The "Onion Routing" was on previously. I have just turned it off. Can you retest your torify command?

@ayeowch Thank you for the response.
If you enable onion routing for a day, I could try to torsocks curl from that onion address to test.
The command is right because without torsocks it works.
Tested now with torsocks:

<!DOCTYPE html>
...
<title>Please Wait... | Cloudflare</title>

<meta name="captcha-bypass" id="captcha-bypass" />
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,p$
<style type="text/css">body{margin:0;padding:0}</style>
...

@ayeowch It is still not fixed. please re-open this issue.

Tried with the following command:

torify curl -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/nodes/torv3.onion-8333/ | lynx -stdin

Output:

Please complete the security check to access bitnodes.io

   Please stand by, while we are checking your browser...

   Redirecting...

Please turn JavaScript on and reload the page.

   Please enable Cookies and reload the page.

Why do I have to complete a CAPTCHA?

   Completing the CAPTCHA proves you are a human and gives you temporary access to the web
   property.

What can I do to prevent this in the future?

   If you are on a personal connection, like at home, you can run an anti-virus scan on your device
   to make sure it is not infected with malware.

   If you are at an office or shared network, you can ask the network administrator to run a scan
   across the network looking for misconfigured or infected devices.

@micressor I have temporarily turned off the challenge. Can you help retest?

@ayeowch Tested now, did work after your changes.

@ayeowch Now it works, perfect.