Switch to use internal SOCKS5 proxy instead of proxy created by SSH tunnel
Proper way to restart socks5 server
Direct connect if ssh proxy is off
Retry after failed to restart