Better practice and better performance for getting remote ip