the performance is ok, but likely can be improved upon:
libcurl seems to not reuse connections, why not?
libcurl when using any auth, ALWAYS tries unauth'd for EVERY
request instead of caching that this url NEEDs auth
there are some error handling cases that could be improved
for communication instead of TCP. This allows you to forward the
connection over ssh in a secure maner. Though you can forward TCP
sessions over ssh, it doesn't implement authentication, so ANYONE
on the box could end up accessing the disks. With socks you can use
file system permissions to restrict them.