How do you call http_request on localhost?

Hello. Has anything been updated in the icx-proxy functionality? I’m trying to execute this command: icx-proxy --address 127.0.0.1:8453 --dns-alias 127.0.0.1:rrkah-fqaaa-aaaaa-aaaaq-cai --replica http://localhost:8080 -v , but I’m getting an error: error: unexpected argument '--dns-alias' found . Does anyone have information on this?

We bumped the icx-proxy version in the latest dfx version and didn’t notice that some features were removed. We’re now considering to downgrade the version again,

The --dns-alias option has been removed since end of November 2022: feat: add flags to force certification on `_/raw/` and SEO paths · dfinity/ic@2ca2d2d · GitHub

What is your use-case? I guess you are trying to call 127.0.0.1 and get forwarded directly to the canister. What client do you use?

Thanks for the quick response. I am working on enabling the staking of a neuron, the controller of which is a canister. Since I cannot use inter-canister calls (ic_cdk::call ), the only option I see is to use HTTP out calls in combination with threshold_ecdsa . Specifically, at the moment, I am looking for a way to test my changes on a local replica. For this, I need to invoke the ‘manage_neuron’ method of the governance canister using the ‘http_request’.

I see. So you are trying to make an HTTP outcall to 127.0.0.1:8453 (localhost) and want that call to be forwarded to the canister.

I am not sure if the following will work for your setting/with HTTP outcalls, but that’s what works for me (with the latest version):

icx-proxy --address 127.0.0.1:8453 --replica http://localhost:8080 --canister-alias ic:oa7fk-maaaa-aaaam-abgka-cai --domain example.com

Then, I can curl with:

curl http://ic.example.com:8453 --resolve ic.example.com:8453:127.0.0.1

Now, you cannot add --resolve to the HTTP outcalls. Therefore, it might work by just locally setting example.com to resolve to 127.0.0.1 in /etc/hosts.