microsoft / dev-tunnels

Dev Tunnels SDK
MIT License
286 stars 20 forks source link

How to get a fixed url when using the same client id? #477

Closed mbsysde99 closed 1 week ago

mbsysde99 commented 2 weeks ago

I tried generating with the same client id, the result is url different.

How to get a fixed url when using the same client id? Thanks

EYN

derekbekoe commented 2 weeks ago

Can you share more details on what you are trying to achieve? We have documentation on the CLI at https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/cli-commands

mbsysde99 commented 2 weeks ago

Can you share more details on what you are trying to achieve? We have documentation on the CLI at https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/cli-commands

I am using DevTunnel CLI. I successfully created a tunnel with a specific tunnel id. After I host it, I get the url

Connect via browser: https://dxs78mj1-10433.asse.devtunnels.ms
Inspect network activity: https://dxs78mj1-10433-inspect.asse.devtunnels.ms

Then I delete the tunnel.

And I repeat creating a tunnel with the same tunnel id as before, but I get a new url:

Connect via browser: https://r1l4z1ln-10433.asse.devtunnels.ms
Inspect network activity: https://r1l4z1ln-10433-inspect.asse.devtunnels.ms

How do I make the url not change when generating with the same tunnel id? Thanks

derekbekoe commented 5 days ago

If you want to keep the same tunnel URL, keep the tunnel (i.e. do not delete it). When you stop hosting, the tunnel will be stopped (i.e. not accept any traffic). Then, when you wish to use the tunnel again, you can re-host the existing tunnel.