-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dns server #5
Comments
Hi Thanks for opening this issue! It looks like I missed https://lists.torproject.org/pipermail/tor-project/2020-March/002759.html TLDR; the TorDNSEL service is retired and replaced with a simpler and better service. I will release a new version this evening or tomorrow morning with the fix for this. |
The last commit introduces a backwards compatible fix with the current interface so it will work. In an upcoming release the interface will be simplified and add TXT support for getting relay fingerprints. |
Thanks for quick response! |
When I was working on it last night I was thinking about IPv6 too and noticing the "Tor bulk exit list" still does not contain any IPv6 addresses. I'm going to add IPv6 support to my code for when the lists contain IPv6. This assumes the DNSBL will use the same 1-digit hex representation like other DNSBL services. So right now you still cannot use the DNSBL for checking against IPv6 clients. I also publish my own exit lists (just derived from the "Exit" flag) so it is not based on observation like Onionoo but at least you might be able to get some basic IPv6 checking with that. |
About Cloudflare: they return real IP in the header parameter HTTP_CF_CONNECTING_IP, which may contain IPv6 as well. |
If your site is using Cloudflare then you can simply rely on the Even though this code may no longer be too relevant for you (that's ok!) here is the newer interface I came up with in case you had any feedback. I don't like the static interface anymore but it keeps this really simple (for users) and keeps the existing code backwards compatible.
Example usage:
Thank you again! |
This Tor detecting became a real nightmare for me. I noticed that a quite sufficient part of TOR user IPs return a particular country code rather than T1. For example 2a0b:f4c1::8 returns DE. Will you please advice where and how these methods are implemented: |
That is unfortunate. Maybe CF's Tor detection for IPv6 is also lacking. As stated earlier, the new TorDNSEL service also doesn't support IPv6 so this class won't help yet. Regarding the new method signatures I posted above, I haven't actually pushed those changes yet (which include IPv6 readiness but not support since the underlying service doesn't yet either. Sadly, this may require even more code. The Tor exit lists that I maintain and publish (updated every 10 minutes from live Tor directory consensus) do contain the IP you reference, 2a0b:f4c1::8, so perhaps a combination of DNSEL for IPv4 and list lookup for IPv6 is the interim solution (which sucks). I will push the changes to master in a moment, and you may need to do something to download and cache these lists so you can do an IPv6 lookup. |
…EL::getFingerprints(); IPv6 readiness for when the Tor DNSEL service supports IPv6
I have to run for a bit but the new code is pushed to master (referenced in above commit). This TorUtils library doesn't have any code for dealing with my exit lists but in the mean time feel free to check out my Wordpress plugin https://wordpress.org/plugins/vigilantor/ which has code that downloads the lists and checks (works with IPv6). We can discuss further if you have ideas and maybe it makes sense to add a new class to this code that can check against Onionoo lists, Tor DNSEL, my exit lists, and perhaps others' too. |
Check this: Let's say I'm interesting in this address 2a0b:f4c1::8, so I can curl to https://onionoo.torproject.org/summary?search=2a0b:f4c1::8 and receive json response containing both IPv6 I requested and corresponding IPv4. If I receive it I can conclude that this IP is from Tor network I actually am not sure if this format https://onionoo.torproject.org/summary?search=... is documented and will be supported tomorrow |
The parameters described here are the documentation on how to use Onionoo. These have been stable for quite some time but I'm not sure this service is really suitable for real-time lookups. For example you could shorten your search to https://onionoo.torproject.org/summary?search=2a0b:f4c1::8&fields=nickname&limit=1 (limit 1, only return 1 field). Right now I'm getting response times around 0.8 seconds looking up random IP's (some Tor some not). Non-cached Tor DNSEL responses are at least 2.5x faster, and if you use a close & fast caching resolver they go down to virtually 0 once cached. The mailing list post https://lists.torproject.org/pipermail/tor-project/2020-March/002759.html mentions some changes to how the Bulk Exit List is created (based on observations and not only "Exit" flags set on relays) so I'm not entirely sure what the source(s) of that list are anymore. The fastest and more reliable way to run these checks is to download lists periodically and stoe them locally and perform lookups against these lists.As of last night I am having good luck combining https://check.torproject.org/torbulkexitlist and https://www2.openinternet.io/tor/tor-exit-list.txt and removing dupes and searching a sorted list with binary search (for speed). |
Yes, you are right! Cached file is simple and fast solution. I update it each hour, I guess it is quite sufficient for practical use. If the file is not updated for a while (e.g. onionoo service ceased to exist) then the script tries to fetch from onionoo link then if failed it calls TorDNSEL. |
This will always result in error:
It seems like DNS server exitlist.torproject.org has changed. Will you please advice how to fix this
The text was updated successfully, but these errors were encountered: