better proxy option handling