Revert "use get_host"

This reverts commit ab1e37781cf2caa0309de2c66d3a95da33b3cad7.