More robust TLS support, improved logging, and bug fixes
Visible changes:
- Added useragent to the logs for portal and host
- Accurately log the bytes sent over the wire instead of just the size
of the file (and added this as an API in the tools library). - Clean up several extraneous log lines that appeared in the demo run
- Randomly stagger the lease expirations to stagger renews
- Better support for attempting TLS in both TCP and HTTP forwarding.
- TCP I think has no edge cases where it will not detect athough it
doesn't verify certs. - HTTP works unless you're an API client that turned off
CertificateRequest for some reason, so third party HTTPS servers
should work now.
- TCP I think has no edge cases where it will not detect athough it
Improvements and bug fixes:
- Add a call to sync when saving the state file on unix OSs
- On Windows do a more atomic file save with MoveFileEx
- On Windows ask the OS to kill child processes automatically. Also use
MoveFileEx to ask the OS to delete the copied binaries on reboot if
you have admin permissions. - Fix a panic that happened if you have two different IPs connected to
the same server requesting the same FixedPort because the state file
didn't have the IP in the map key - On Linux fix a potential bug with killing children because go could
kill the thread that called fork(), now we lock the thread and keep
the goroutine alive. - Fixed spawn responding to ^C during the dashboard password prompt
- Updated dependencies