reorganize get_real_ip function, and use filter_vars.