Comments (3)
What's the idea around fleshing it out? What service/info is wanted? Or just to make bulk more useful?
I'd suggest versioning the api if it is something you want to adopt for the project long term (e.g. .../api/1.0/...), I guess it depends what the goal of the api is!
from check.
What's the idea around fleshing it out? What service/info is wanted? Or just to make bulk more useful?
Nothing really wants this at the moment, it just seems like it could be useful to have around. An idea stemming from, https://trac.torproject.org/projects/tor/ticket/9529#comment:20
The fleshing out is to determine what info we have and how to expose it. Something like,
/api/ip?address=123.123.123.123&port=80 // returns { tor: true/false, fingerprint: ... }
/api/ip?fingerprint=AD2344243... // returns { exitip: 123.123.123.123 }
/api/bulk/all // returns [ ... list of all known exits and their ips ... ]
I'd suggest versioning the api if it is something you want to adopt for the project long term (e.g. .../api/1.0/...), I guess it depends what the goal of the api is!
There are other services, besides the TBB, that depend on check, so long term support is a goal. See https://trac.torproject.org/projects/tor/ticket/10183
I'd rather not have the version number in the url. That can be accomplished with an Accept
header. I guess see GitHub's API or this article as a model.
from check.
/api/ip?address=123.123.123.123&port=80 // returns { tor: true/false, fingerprint: ... }
Seems sound, how about RESTful-ish /api/ip/-ip-/-port-
Should multiple IPs be supported per query? (I don't think so)
It could be useful to provide a lastseen timestamp for the IP lookups so consumers can make their own decisions for how many hours they're willing to allow true/false for instead of providing true/false? (or could be additional?)
If no port is given, we could return the accept/reject policies? (Since isTor can't be known for that?)
Could also list alternative IPs seen for the matched fingerprint (with last seen time for each?)
/api/ip?fingerprint=AD2344243... // returns { exitip: 123.123.123.123 }
Perhaps /api/router? Again, might want to provide ip/time combos?
/api/bulk/all // returns [ ... list of all known exits and their ips ... ]
So this is an exit list basically? , (I think we can drop the /all , no query implies all)
Would providing microdesc/fulldesc endpoints be overkill? Any consumer should probably be using the fingerprints to lookup atlas/globe/whatever for further information? Perhaps supplying a 'further info' link we can update to the service of the day might be useful?
I'd rather not have the version number in the url. That can be accomplished with an Accept header. I guess see GitHub's API or this article as a model.
I don't feel that strongly about implementation on that as long as it's there :) But I would note that having it in the url makes it easier to test in browser (not a big issue really)
On another aesthetic note: I noticed in the code it's looking for format=json, /i/like/endpoint.{json,xml,...} personally :)
from check.
Related Issues (17)
- "This browser" HOT 1
- Documentation HOT 2
- What to do about false positives that are found? HOT 6
- Bulk should have a port option in the form HOT 1
- Link to Atlas HOT 3
- Init.d script HOT 1
- Saw multiple response.WriteHeader calls HOT 10
- More stuff HOT 8
- False negatives HOT 26
- make descriptors is downloading too much data HOT 6
- rsync
- gzip vs no gzip HOT 2
- Translations HOT 12
- Tests HOT 3
- Project requires exit-data or retrieval information HOT 3
- Extending B) from https://trac.torproject.org/projects/tor/ticket/9204 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from check.