README update and example server port change

This commit is contained in:
Joseph Henry 2016-01-12 14:04:55 -08:00
parent 23cdb3aed5
commit e91322bd10
2 changed files with 10 additions and 4 deletions

View File

@ -109,9 +109,15 @@ Now you can run an application inside your network container.
export LD_PRELOAD=`pwd`/libzerotierintercept.so
export ZT_NC_NETWORK=/tmp/netcon-test-home/nc_8056c2e21c000001
python -m SimpleHTTPServer
node netcon/httpserver.js
If you are running Python 3, use "-m http.server". Also note that the "pwd" in LD_PRELOAD assumes you are in the ZeroTier source root and have built netcon there. If not, substitute the full path to *libzerotierintercept.so*. If you want to remove those environment variables later, use "unset LD_PRELOAD" and "unset ZT_NC_NETWORK".
Also note that the "pwd" in LD_PRELOAD assumes you are in the ZeroTier source root and have built netcon there. If not, substitute the full path to *libzerotierintercept.so*. If you want to remove those environment variables later, use "unset LD_PRELOAD" and "unset ZT_NC_NETWORK".
If you don't have node.js installed, an alternative test using python would be:
python -m SimpleHTTPServer 80
If you are running Python 3, use "-m http.server".
If all went well a small static HTTP server is now serving up the current directory, but only inside the network container. Going to port 80 on your machine won't work. To reach it, go to the other system where you joined the same network with a conventional ZeroTier instance and try:

View File

@ -1,7 +1,7 @@
var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("welcome to the machine!\n");
response.end("\n\nWelcome to the machine!\n\n");
});
server.listen(8080);
server.listen(80);
console.log("Server running!");