Native implementation of curl in node LNUG May 2019

Wednesday, 22 May 2019

Abstract

Over my last holiday I started a project I am quite enjoying. It is an implementation of the functionality of curl written done purely in node. It presently is nothing close to done, but you can do some basic curl stuff with it (e.g. make multipart form data posts to some url, pipe responses to files, handle http and https proxies (provided they support the connect header) to do requests over to http or https, recursively follow location headers, set headers, etc.).

There's presently some vague ftp ideas that are not at all done.

The rather bigger challenge I was working on last time I was doing my project was to establish an ssh connection, (which on account of doing everything from scratch will make a number of assumptions about the server it's connecting to).

I'm hoping to over the next month or so get it all done nicely.

Overall it's a pleasant way to learn some details of networking, starting to write an ssh client in particular requires manually writing the packets as per the ssh protocol which has been a reasonable education in how that sort of things works. It has also been good for me to appreicate how excellent node is, it really does seem to provide nice apis for everything you want.

About me

I'm a former mathematician who over the last 9 or so months has turned programmer, I currently work as a developer mostly working with JavaScript. I mostly like doing algorithms and stuff and have only recently begun to learn the broader aspects of programming. I really love doing things from 'scratch' (in the sense of just using the stuff provided by the language) as I find it quite insightful.