apache / openwhisk-cli

Apache OpenWhisk Command Line Interface (CLI)
https://openwhisk.apache.org/
Apache License 2.0
104 stars 99 forks source link

how to set a https proxy for wsk #514

Open GitHubDiom opened 3 years ago

GitHubDiom commented 3 years ago

Hello there,

I am wondering if can set a http/https proxy for openwhisk-cli.

I search document of repo:openwhisk and found there is some related instruction for setting it.

I set the mentioned env variable HTTPS_PROXY in one of my terminal by export HTTPS_PROXY=127.0.0.1:8080, where the 127.0.0.1:8080 is the address of my web proxy.

Then when I invoke an action wsk action invoke -r {action_name}, the action flow does not through my proxy.

The web proxy work fine when I invoke the action by curl --proxy 127.0.0.1:8080 http://localhost:3233/api/v1/web/{action_name}

Could anyone please tell me how to set up a HTTP/HTTPS proxy for wsk?

rabbah commented 2 years ago

I am not sure, I have not used this feature myself. What you did looks right according to the docs. Is the proxy http or https?

GitHubDiom commented 2 years ago

The proxy I used is mitmproxy, which can intercept both HTTP and HTTPS requests.

The mitmproxy listens localhost:8080 by default, so I try to let the wsk to through the proxy by export HTTPS_PROXY=127.0.0.1:8080 in my terminal.

But it didn't work