Skip to content

access devices sitting behind firewalls with unknown ip-address via reverse tunnel on demand.

License

Notifications You must be signed in to change notification settings

intesso/hidden-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hidden-server

talk to public-server in order to execute client commands

use case: access server sitting behind firewalls with unknown ip-address via reverse tunnel on demand.

documentation

the hidden-server is the counter part of public-server. to keep things less redundant, the documentation can be found here: public-server

install

npm install hidden-server

##usage

full examples can be found here: public-server/examples

###with roundtrip

var HiddenServer = require('hidden-server');
var hidden = new HiddenServer({
  publicServer: 'http://localhost:3000',
  pingUri: '/ping/:hiddenServerName',
  simultaneousPings: 3,
  pingInterval: 5,
  keepPingOpen: true,
  roundTripResponse: true,
  hiddenServerName: 'server1'
}).start();

hidden.on('command', function(obj, cb) {
  console.log('got command', obj);
  // simulate async response
  setTimeout(function() {
    obj.response = "are you sure about: " + obj.command;
    console.log('parameters', obj, cb);
    if (cb) cb(obj);
  }, 0);
});

###without roundtrip

var HiddenServer = require('hidden-server');
var hidden = new HiddenServer({
  publicServer: 'http://localhost:3000',
  pingUri: '/ping/:hiddenServerName',
  simultaneousPings: 5,
  pingInterval: 3,
  keepPingOpen: true,
  roundTripResponse: false,
  hiddenServerName: 'server1'
}).start();


hidden.on('command', function(obj) {
  console.log('command', obj);
});

##test

tests can be found here: public-server/test

license

MIT License

About

access devices sitting behind firewalls with unknown ip-address via reverse tunnel on demand.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published