Loading...

Building Securely, Developing Swiftly: Dev Tunnels Updates

Building Securely, Developing Swiftly: Dev Tunnels Updates

Dev Tunnels is a tunneling service that can enhance your productivity when testing and debugging web apps, webhooks, APIs, and more. You can also simply use Dev Tunnels to share your work with colleagues, demo at conferences, or test your app on other devices. It takes seconds to get started, regardless of if you use Dev Tunnels through Visual Studio, VS Code, or the devtunnel CLI.

 

Today, we have some exciting updates to share with you! Even if you’re new to Dev Tunnels, stick around to discover the latest. If you want to know about the benefits of Dev Tunnels and how to get started though, check out this blog post.

 

Port forwarding in Visual Studio Code

Previously, Dev Tunnels was only available through Visual Studio and the devtunnel CLI. We’re thrilled to share Dev Tunnels is now seamlessly integrated into Visual Studio Code – no extensions required! To get started, you will need to have a service to forward. Then, navigate to the Ports view in the Panel region (Ports: Focus on Ports View) and select Forward a port. Check out their documentation for more detailed instructions.

carolinauribe_6-1701720851149.png

 

Visual Studio Code Dev Containers + Remote-Tunnels

You can now use the Visual Studio Code together! This is helpful if you’d like to leverage the reproducibility of Dev Containers while developing in a remote environment. More information on how to get started can be found here.

 

Custom tunnel expiration

The default expiration is after 30 days of no activity. You can now set a custom expiration by using the --expiration flag in the create, host, or update command. Minimum that you can set is 1 hour (1h) and the maximum you can set is 30 days (30d). The custom expiration you set is after a period of inactivity, just like the default expiration. This means it isn't a fixed expiration time, but instead a sliding window that is automatically pushed out by any new activity. This is particularly helpful for developers creating anonymous tunnels that only need to be publicly accessible for a short period of time. See examples here.

carolinauribe_7-1701720907323.png

 

Time-limited anonymous access

You can now set time-limited anonymous access to your tunnel. This is helpful if you want to share a tunnel only for a limited amount of time, but you want to keep the tunnel after as a private tunnel. To give it a try, you will need to create a tunnel by running devtunnel create. After this, you’ll see the tunnel ID in the output, which you’ll use to set time-limited anonymous access on that tunnel by running the following command:

 

devtunnel access create TUNNELID -a --expiration 2h

 

This command is creating an anonymous access control entry (indicated by the -a) for 2 hours (indicated by --expiration or -e). The minimum is 1 hour (1h) and the maximum is 30 days (30d), like custom tunnel expiration. Once the access control expires, it is removed from the tunnel. If an access control is set to expire after the tunnel expires, the tunnel expiration takes precedence. Note, once you set the expiration for an access control you cannot modify it, unless you entirely reset your access controls on the tunnel. Additionally, this expiration is on a fixed window, so it checks the access control expiration against the time it was created. See examples here.

carolinauribe_8-1701721107353.png

 

Install and update the devtunnel CLI with winget and homebrew

 

Winget

You can now use winget, Microsoft’s package manager for Windows, to install and update the devtunnel CLI on Windows.

 

winget install Microsoft.devtunnnel

 

This command installs the latest version by default and removes the older version in the same location, which is %LOCALAPPDATA%\Microsoft\WinGet\Packages. To specify a version, add  --version <version_number> with your desired version to the command.

 

winget upgrade Microsoft.devtunnel

 

Homebrew

You can also now use homebrew, to install and update the devtunnel CLI on MacOS.

 

brew install --cask devtunnelbrew uninstall --cask devtunnelbrew upgrade --cask devtunnel

 

 

Windows Group Policy for Dev Tunnels in Visual Studio

Administrators can now disable Dev Tunnels in Visual Studio using Windows Group Policy. More information on how to enable this policy can be found here. If your organization requires specific policies or additional enterprise management capabilities, please let us know by opening or up-voting existing issues, such as this one to control authentication methods on our GitHub repo.

carolinauribe_9-1701721247440.png

 

Tunnel ID changes

You can now specify a tunnel ID when creating a tunnel. For example, devtunnel create mytunnelid is now a valid command. If you do not specify an ID, then one will be automatically generated for you. Please note, this ID is solely for tunnel identification and won’t appear in the tunnel URL. You will need to provide the ID for all operations that refer to a tunnel.

 

carolinauribe_10-1701721264957.png

 

Wrapping up

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using dev tunnels on what you like and what we can improve. Your feedback is critical to help us make dev tunnels the best tool it can be! You can share feedback with us on our GitHub repo here.

 

Happy tunneling!

Published on:

Learn more
Azure Developer Community Blog articles
Azure Developer Community Blog articles

Azure Developer Community Blog articles

Share post:

Related posts

This Month in Azure Static Web Apps | 09/2024

    We are back with another edition of the Azure Static Web Apps Community! :party_popper:   September was yet another month ...

1 year ago

GitHub Copilot for Azure: 6 Must-Try Features

As developers, we are constantly seeking tools that streamline our workflows and boost productivity. … Enter GitHub Copilot for Azure, now in ...

1 year ago

Responsible AI Mitigation Layers

Generative AI is increasingly being used in various kinds of systems to augment humans and infuse intelligent behavior into existing and new a...

1 year ago

Streamline Your Azure Workflow: Introducing GitHub Copilot for Azure in VS Code

I'm excited to announce the public preview of GitHub Copilot for Azure - a new addition to your toolkit that seamlessly integrates with G...

1 year ago

Build Intelligent Apps Code-First with Prompty and Azure AI

      Building Generative AI applications can feel daunting for traditional app developers. What does the end-to-end applicati...

1 year ago

Certificación AI-900 (Fundamentos de IA) con Chicas en IA

La inteligencia artificial ha llegado para quedarse, ¡y más aún con la revolucionaria IA generativa! Para ayudar a los profesionales a especia...

1 year ago

Get certified with Learn Live GitHub series!

GitHub Universe is coming, and Microsoft and GitHub are partnering to offer a new special Learn Live series in Brazilian Portuguese, English a...

1 year ago

Certifícate con Learn Live GitHub en Español

Microsoft y GitHub se han unido para ofrecer una nueva serie especial de Learn Live en inglés y español: GitHub 2024. Del 10 al 24 de Octubre,...

1 year ago

Evaluating generative AI: Best practices for developers

As a developer working with generative AI, you've likely marveled at the impressive outputs your models can produce. But how do you ensure the...

1 year ago

Introducing Azure Product Retirement Livestreams

The Azure Retirements team, in collaboration with key partner groups, is excited t...

1 year ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.