Permalink
Browse files

link to correct address on master and include reverse dns information

  • Loading branch information...
mkjones committed Jan 22, 2012
1 parent ec58d0f commit 294bccacc9f991c8b8d9afbaef9bca2d0197f023
Showing with 6 additions and 3 deletions.
  1. +6 −3 master.py
View
@@ -1,6 +1,8 @@
+import re
+import socket
+
import tornado.ioloop
import tornado.web
-import re
# Runs on a master server somewhere outside the local network.
# Takes a POST request with a single param ('addr') and stores
@@ -38,9 +40,10 @@ def get(self):
else:
out = ''
for external, internal in RegisterHandler.addrs.iteritems():
- out += '<div><a href="%s">external %s and internal %s</a></div>' % (
- 'http://'+external+':8888',
+ out += '<div><a href="%s">external %s (%s) and internal %s</a></div>' % (
+ 'http://'+internal+':8888',
external,
+ socket.gethostbyaddr(external)[0],
internal)
self.write('unknown address %s. Other options: %s' % (remote_ip, out))

0 comments on commit 294bcca

Please sign in to comment.