Revised ports API, for https compatibility