microsoft / BotFramework-Emulator

A desktop application that allows users to locally test and debug chat bots built with the Bot Framework SDK.
https://aka.ms/botemulator
MIT License
1.81k stars 752 forks source link

Add support for Azure Relay service as an alternative for Ngrok #2450

Open ceciliaavila opened 8 months ago

ceciliaavila commented 8 months ago

Description

We should include Azure Relay service as an alternative tunneling tool.

stevkan commented 8 months ago

@ceciliaavila - There's a problem with Azure Relay in that it doesn't work with Direct Line Speech. Or, more accurately, DL Speech won't work with Azure Relay which is a problem for anyone wanting to test it in Emulator. I've used and tested Azure Relay a lot over the past few years. I knew from past experience that this issue with DL Speech existed but only dug into it recently.

Tools I tested included: Azure Service Bus Relay, Tunnel Relay, NetPassage, and DevTunnel.

A little background on each.

The Azure Service Bus Relay tool was created by Gabo Gilabert as an alternative to ngrok and works well when used with DirectLine with or without Cognitive Services Speech. Cognitive Services Speech and DL Speech are different products however both are accessed using a secret/token from CS. (Side note - this tool actually only uses Azure Relay and not Azure Service Bus.)

Team's Tunnel Relay does exactly the same thing as Azure Service Bus Relay by utilizing Azure Relay. It just has a GUI to work with. As it is essentially the same, DL Speech also does not work with it.

NetPassage was initially created as a branch on the Azure Service Bus Relay repo. It has since become its own product. It produces a bi-directional web socket tunnel turning any http requests into a message in a web socket stream. This works with DirectLine, but DL Speech still does not.

DevTunnel is another MS product that also makes use of Azure Relay and web sockets, though the implementation is different than the other products. Regardless, DL Speech does not work with it.

Here are some of my findings:

Anyhow, as ngrok was able to overcome this hurdle, as DL Speech works with it, it really seems that it should be possible to overcome this using another tool, such as NetPassage, Tunnel Relay, or DevTunnel. It's just a matter of getting the correct solution implemented.

ceciliaavila commented 8 months ago

Thanks for the detailed information @stevkan!

sambathrajv commented 7 months ago

hi, Is there any guidance / steps available to use DevTunnel with bot emulator?

OEvgeny commented 7 months ago

@sambathrajv there is no support yet. There are limitations on DevTunnel side stopping us from the integration. NgRok v3 should work with Emulator Nightly releases