insert https support
fix build errors