If anyone's interested, I've managed to solve all the exercises without using any npm module except ws and tar (writing one's own implementations of WebSocket and tar is clearly out of scope), and writing custom streams instead.
my solutions
how to implement your own streams