The setup_starpls downloads the binaries via curl in a genrule. This fails when using a proxy server because the genrule runs in a stripped environment (missing the http_proxy environment variables).
The better way would be to separate the download step from the genrule. E.g. by having a http_archive()
in the MODULE.bazel or registry and then the genrule would just make it executable and provide it as a target in the module. That way also download will be reproducible because it needs to be downloaded (only) if the hash of the archive changes.