Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
help text, socket.pause on write-false
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexzxelA committed Jul 11, 2017
1 parent 0be55b9 commit 0adf5ad
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Binary file added LICENSE.pdf
Binary file not shown.
11 changes: 7 additions & 4 deletions help-messages/no-command.txt
Expand Up @@ -23,15 +23,18 @@ Usage information and examples:

Using beame-insta-ssl for RDP / VNC / SSH etc
Set DESTINATION_PROTO to "tcp", this will create a native tcp tunnel with termination on your machine and option to
control access by setting GROUP to a segment of valid certificate under '.beameio.net' subdomain. This
type of tunnel requires "beame-insta-ssl client" to be used on the other side of the tunnel (instead of a Browser)
control access by setting "highestFqdn" (to allow search up my trust tree) and "trustDepth" (to define how levels below mine are valid to connect). This
type of tunnel requires "beame-insta-ssl client" to be used on the other side of the tunnel with client-certificate that satisfies the trust criteria

Example RDP:
Server side (host Windows machine):
beame-insta-ssl tunnel make --dst 3389 --proto tcp --fqdn myfqsukadn.v1.p.beameio.net --group beameio
beame-insta-ssl tunnel make --dst 3389 --proto tcp --fqdn rdpFqdn.v1.p.beameio.net --highestFqdn oneOfMyParents.v1.p.beameio.net --trustDepth 1

Client side (connecting client machine):
beame-insta-ssl client make --dst 3389 --fqdn myclientcert.v1.d.beameio.net --src myfqsukadn.v1.p.beameio.net:443
beame-insta-ssl tunnelClient make --dst 3389 --fqdn myclientcert.oneOfMyParents.v1.d.beameio.net --src rdpFqdn.v1.p.beameio.net:443

Now run RDP client on client machine (point it to 127.0.0.1 and pre-configure username/password)


If DESTINATION_PROTO is "http", the tunnel will terminate TLS
traffic and transform the requests to HTTP. This way you can
Expand Down
3 changes: 2 additions & 1 deletion lib/client.js
Expand Up @@ -32,6 +32,7 @@ function startTunnelClient(secureOptions, dstNode, srcNode, toFile, cb) {

let written = dstSockets[id] && dstSockets[id].write(rawData);
if(!written){
dstSockets[id].pause();
//console.warn(id, '=> failed to write:', rawData.byteLength);
}
});
Expand Down Expand Up @@ -128,7 +129,7 @@ function startTunnelClient(secureOptions, dstNode, srcNode, toFile, cb) {
// localBuffer = [];
});
socket.on('drain', () => {
console.log('dstSocket drain');
// console.log('dstSocket drain');
socket.resume();
});
socket.on('close', () => {
Expand Down
5 changes: 4 additions & 1 deletion lib/tunnel.js
Expand Up @@ -239,7 +239,10 @@ function startTerminatingHttpsServer(cred, targetPort) {
let written = localSockets[id] && localSockets[id].write(rawData);
// console.log('terminatingSocket got (Bytes): ', rawData.byteLength,
// ' written:', written, '=>', rawData.length);
if (!written && localSockets[id]) localSockets[id].pause();
if (!written && localSockets[id]) {
// console.log('localSockets[',id,'] pause');
localSockets[id].pause();
}
}
};

Expand Down

0 comments on commit 0adf5ad

Please sign in to comment.