ProxyCommand implementations for SSH

Project URL: https://wh0.github.io/2018/03/18/proxycommand.html

I’ve used Glitch for some experiments in a study I conducted on alternatives for implementing a non-native ProxyCommand for SSH, with a focus on interpreter availability, memory usage overhead, and implementation complexity.

update: scripts now available online https://github.com/wh0/proxycommand-benchmarks

Nice comparison!

Can I see the code for the Node version of the proxy? What is its exact purpose?

Here’s the Node version:

#!/usr/bin/env node
const net = require('net');
const sock = new net.Socket();
sock.connect(xx, 'xxxx', () => {
  sock.pipe(process.stdout);
  process.stdin.pipe(sock);
});

Really concise! Node has very well-matched abstractions for doing this kind of work.

The exact purpose: I’m writing a ProxyCommand to interact with a relay, which is part of my project for storing Git repositories on a phone: https://gitlab.com/wh0/te. Which is why I compared the overhead to a Git clone operation (:

edit: mistakenly referred to this as a relay. it’s not; the relay is separate. the ProxyCommand interacts with the relay.

1 Like