microsoft / botbuilder-js

Welcome to the Bot Framework SDK for JavaScript repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using JavaScript.
https://github.com/Microsoft/botframework
MIT License
680 stars 276 forks source link

[Botframework-Connector] Proxy Settings are Ignored #717

Closed justinwilaby closed 4 years ago

justinwilaby commented 5 years ago

Currently, the botframework-connector package ignores HTTP_PROXY and HTTPS_PROXY environment variables and will not work for networks that require a proxy. There are a number of tools that depend on this package and each of them are broken for customers that require the use of a proxy.

Repro

  1. Set the HTTP_PROXY and HTTPS_PROXY environment variables in your node project to a proxy url.
  2. initiate a call using an API in the botframework-connector

Observe

The rest call does not use the proxy and times out when on a network requiring a proxy.

Expected Behavior

The rest call will use the proxy settings.

Notes

Consider removing ms-rest-js since it does not appear to support proxies and replace it with an isomorphic fetch implementation similar to this implementation

stevengum commented 5 years ago

@justinwilaby https://github.com/Azure/ms-rest-js/pull/322 was merged, is this now unblocked?

@EricDahlvang as an FYI

cleemullins commented 5 years ago

@juanar, is this something we can move forward with this cycle? We just finished getting Proxy support working in the C# SDK (thanks @carlosscastro and @dmvtech and @drub0y !!), and having parity in the JS would be great.

cleemullins commented 5 years ago

Keeping as P1 in the 4.6 time frame, and prioritizing with @juanar

cleemullins commented 5 years ago

This can't be done yet, as it's blocked on the #1072 work. Pushing.

cleemullins commented 4 years ago

I don't believe we will fix this in the near term.

joshgummersall commented 3 years ago

ETIMEDOUT indicates that there is a problem connecting to the IP address in the logs. Using dig I see that login.botframework.com resolves to a different IP address than the one logged.

> dig +short login.botframework.com
bc-api.trafficmanager.net.
connector-api-westus.azurewebsites.net.
waws-prod-bay-049.vip.azurewebsites.windows.net.
waws-prod-bay-049.cloudapp.net.
40.83.182.206

That tells me that perhaps there is something wrong with your proxy. Can you share your BotFrameworkAdapter configuration?

ChupaCabre commented 4 months ago

Hi @cleemullins @justinwilaby is there proxy support for the javascript SDK at this point? If so, how are the proxy settings passed into the CloudAdapter? I've looked through the docs & samples but I don't see any mention of proxies.