[tor-commits] [oonib/master] Add Handlers and API for bouncer

art at torproject.org art at torproject.org
Wed Sep 11 09:13:51 UTC 2013


commit bbe4e010381d1daf0710672f531c9fe99c9c93cf
Author: aagbsn <aagbsn at extc.org>
Date:   Sun Jul 7 19:48:06 2013 +0200

    Add Handlers and API for bouncer
---
 oonib/bouncer/api.py      |    8 ++++++++
 oonib/bouncer/handlers.py |   19 +++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/oonib/bouncer/api.py b/oonib/bouncer/api.py
new file mode 100644
index 0000000..21f2be4
--- /dev/null
+++ b/oonib/bouncer/api.py
@@ -0,0 +1,8 @@
+from oonib.bouncer.handlers import *
+#XXX: if bouncer is configured
+bouncerAPI = [
+        #return a collector and helper of the requested type
+        (r"/bouncer", BouncerQueryHandler),
+        #XXX: register a collector or helper
+        (r"/register", CollectorRegisterHandler),
+]
diff --git a/oonib/bouncer/handlers.py b/oonib/bouncer/handlers.py
new file mode 100644
index 0000000..74d828a
--- /dev/null
+++ b/oonib/bouncer/handlers.py
@@ -0,0 +1,19 @@
+class BouncerQueryHandler(web.RequestHandler):
+    def get(self):
+        #XXX unused
+        pass
+
+    def post(self):
+        pass
+        # request.get?
+        #'collector': {'foo.onion': {'helper-name': 'helper-address'}, 'bar.onion': {'helper-name': 'helper-address'}} 
+
+class CollectorRegisterHandler(self):
+    def post(self):
+        #XXX: update the list of collectors to query
+        pass
+
+    def get(self):
+        pass
+        #XXX unused
+





More information about the tor-commits mailing list