try to support https (WIP)