support setting the port and multiple hosts