Working client-side gateway discovery