Set default port based on TLS setting