botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Bot behind proxy gets [407] Proxy Authorization Required Error

Open senthil2m opened this issue 10 years ago • 3 comments

Hi,

My bot is deployed behind a closed corporate network. It will not be exposed to open network as per our requirement. I want the bot should work when testing with Bot Emulator in the closed network. After a lot of research, I found some workaround in #842 . After using this below code in my bot mentioning the proxy details, when I send msg from bot emulator, I get 202 Accepted in Emulator but in the console, I get the [407] Proxy Authorization Required. I understand that I need to set the proxy authentication details based on this error. Kindly let me know how to set the proxy username password details to make it work in the closed network.

var globalTunnel = require('global-tunnel'); process.env.http_proxy = 'http://proxy:80'; process.env.https_proxy = 'http://proxy:80'; globalTunnel.initialize({ host: 'proxy', port: 80 }); globalTunnel.end();

Also, If I set the proxy in this format "http://user_name:[email protected]:8080" with proxy credentials mentioned, I get a different error as mentioned in the screenshot.

error

Thanks, Senthil M

senthil2m avatar Nov 16 '16 06:11 senthil2m

Are you able to make other http requests through your proxy? Is this issue specific to BotBuilder? To me it seems more like a global-tunnel issue that botbuilder; here is one more guy having same issue https://github.com/salesforce/global-tunnel/issues/14 it would be more productive if you post this issue on global-tunnel's issue tracking.

maxpert avatar Nov 28 '16 18:11 maxpert

If you search the closed issues someone had a proxy issue before and found a node module that will let you globally specify your proxy for all requests.

Stevenic avatar Dec 12 '16 10:12 Stevenic

I believe this is the one you're referring to: https://github.com/Microsoft/BotBuilder/issues/399#issuecomment-223256399

Closing this issue for now. Please at-mention Steve or me, or open a new issue if you encounter further problems.

dandriscoll avatar Dec 21 '16 17:12 dandriscoll