update api URL and support proxy