add tls options and server support