conformal / cyphertite

A high-security scalable solution for online backups.
https://www.cyphertite.com/
46 stars 8 forks source link

Networking Enhancements (Proxy and IPv4/6 switches) #100

Open SirHumphreyAppleby opened 9 years ago

SirHumphreyAppleby commented 9 years ago

I would like to see some enhancements made to Cyphertite to support proxies, SOCKS in particular, and to force the selection of IPv4/IPv6.

I have managed to get Cyphertite uploading from New Zealand at a (almost) usable speed by forcing Cyphertite through a US-based SOCKS proxy. I have observed this behaviour on Linux using tun2socks, and on Windows using ProxyCap. Adding a SOCKS option would simplify the setup.

Currently I am seeing >700K/s for uploads, which is significantly better than the 200K/s I was getting without using SOCKS on a 200Mb/s symmetric connection. My VPS is in California, and I am contemplating trying one in Chicago to see if I can squeeze a little more speed out of the service.

Adding a switch for IPv4/IPv6 would also be beneficial. Currently I do not have native IPv6, so all IPv6 data goes through a much slower tunneling service and I would like Cyphertite to use IPv4 exclusively. Previously I was on a limited IPv4 connection, with unmetered IPv6, so the ability to specify either would offer the most flexibility for those who need it.

csmiken commented 9 years ago

Noted, we will review this for future releases.

SirHumphreyAppleby commented 9 years ago

A quick update. Using a SOCKS proxy in Chicago appears to have further improved seed.

Adding an IPv4/IPv6 switch requires changes to libassl which is hard coded to use AF_UNSPEC. In case anyone else is searching for a solution, edit assl/assl.c, and in assl_connect_opts change...

hints.ai_family = AF_UNSPEC;

to...

hints.ai_family = AF_INET;

Or AF_INET6 to force IPv6.

Recompile and install using ct_install.sh. This change causes libassl to only request IPv4 addresses when resolving hostnames.