refactor utils.ParseHost with switch-case, so we can add other proto support easily