support ssl

with a variable protocol