summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-08-06 15:49:34 -0300
committerTomás Touceda <chiiph@leap.se>2014-08-06 15:49:34 -0300
commitaaec2c78dc0bf39d7d4b9ae930de9b7f95ae763c (patch)
treeeec66281a67f1cc99f540b870e2876fcecb78455 /src/leap/bitmask/backend
parent0c6ec2f7a5aae716b76d508066fbb69b378fbf43 (diff)
parent9a7485bcaf5460d68b7f601927500299bb2ca9f0 (diff)
Merge remote-tracking branch 'refs/remotes/kali/bug/fix-bad-eip-status' into develop
Diffstat (limited to 'src/leap/bitmask/backend')
-rw-r--r--src/leap/bitmask/backend/backend.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/leap/bitmask/backend/backend.py b/src/leap/bitmask/backend/backend.py
index 67ffe35a..37535f37 100644
--- a/src/leap/bitmask/backend/backend.py
+++ b/src/leap/bitmask/backend/backend.py
@@ -14,6 +14,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# FIXME this is missing module documentation. It would be fine to say a couple
+# of lines about the whole backend architecture.
+# TODO use txzmq bindings instead.
+
import json
import threading
import time
@@ -38,7 +43,11 @@ class Backend(object):
Backend server.
Receives signals from backend_proxy and emit signals if needed.
"""
+ # XXX this should not be hardcoded. Make it configurable.
PORT = '5556'
+
+ # XXX we might want to make this configurable per-platform,
+ # and use the most performant socket type on each one.
BIND_ADDR = "tcp://127.0.0.1:%s" % PORT
PING_INTERVAL = 2 # secs
@@ -67,6 +76,7 @@ class Backend(object):
# Start an authenticator for this context.
auth = ThreadAuthenticator(context)
auth.start()
+ # XXX do not hardcode this here.
auth.allow('127.0.0.1')
# Tell authenticator to use the certificate in a directory