describe proxy selection logic