You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/debugtest/port-forwarding.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Support for port forwarding is built into Visual Studio Code via [Microsoft dev
9
9
10
10
## How to use port forwarding
11
11
12
-
First, you need to have a service you want to forward. If you don't have one yet but do have Node.js installed, you can run this command to start up a server on port 3000:
12
+
First, you need to have a service to forward. If you don't have one yet but do have Node.js installed, you can run this command to start up a server on port 3000:
13
13
14
14
```bash
15
15
npx serve
@@ -19,33 +19,34 @@ Then, navigate to the **Ports** view in the Panel region (**Ports: Focus on Port
19
19
20
20

21
21
22
-
If you haven't logged in with GitHub before, you'll be prompted to sign in. Then, enter the port you'd like to forward; the default port using the above command is port 3000. Once you do, the port forwarding system starts and the **Ports** view updates to show the port you forwarded and its **Forwarded Address**.
22
+
If you haven't logged in with GitHub before, you'll be prompted to sign in. Then, enter the port you'd like to forward; the default port using the above command is port 3000. Once you do this, port forwarding starts and the **Ports** view updates to show the port you forwarded and its **Forwarded Address**.
23
23
24
24

25
25
26
-
Hovering over the **Forwarded Address**, you can use the inline actions copy the address, open it in your browser, or open an in-editor preview.
26
+
Hovering over the **Forwarded Address**, you can use the inline actions to copy the address, open it in your browser, or open an in-editor preview.
27
27
28
-
By default, the forwarded port is **Private**. When you navigate to the URL, you'll be required to sign in with the same GitHub account you used to start the port forwarding process in VS Code. You can change the visibility right-clicking on the port and selecting **Port Visibility > Public**. **Public** ports don't require sign in.
28
+
By default, the forwarded port is **Private**. When you navigate to the URL, you'll be required to sign in with the same GitHub account you used to start the port forwarding process in VS Code. You can change the visibility by right-clicking on the port and selecting **Port Visibility > Public**. **Public** ports don't require sign in.
29
29
30
30
## Common questions
31
31
32
32
### How do I forward local services if I'm connected to a remote machine?
33
33
34
-
Currently, port forwarding only works to expose locally-running services. It doesn't work in remote connections yet, although we expect it to in the future.
34
+
Port forwarding currently exposes only locally-running services. Remote connections aren't supported yet, but we plan to add this capability in the future.
35
35
36
36
Depending on your scenario, you may want to use the VS Code [Remote - Tunnels](https://marketplace.visualstudio.com/items?itemName=ms-vscode.remote-server) extension to tunnel into a remote machine. You can learn more in the [Remote - Tunnels documentation](/docs/remote/tunnels.md).
37
37
38
38
### How are forwarded ports secured?
39
39
40
-
By default, both hosting and connecting to a tunnel requires authentication with the same GitHub or Microsoft account on each end. In both cases, VS Code makes outbound connections to a service hosted in Azure; no firewall changes are generally necessary, and VS Code doesn't set up any network listeners.
40
+
By default, both hosting and connecting to a tunnel require authentication with the same GitHub or Microsoft account on each end. In both cases, VS Code makes outbound connections to a service hosted in Azure; no firewall changes are generally necessary, and VS Code doesn't set up any network listeners.
41
41
42
-
However, if you've opened a **Public** port, any user with your link can access the forwarded service. You should be careful to avoid hosting any confidential information or insecure services over such ports.
42
+
> [!CAUTION]
43
+
> If you've opened a **Public** port, any user with your link can access the forwarded service. Avoid hosting confidential information or insecure services on public ports.
43
44
44
-
You can learn more about the security of the underlying dev tunnels service in its [documentation](https://learn.microsoft.com/azure/developer/dev-tunnels/security).
45
+
Learn more about the [security of the underlying dev tunnels service](https://learn.microsoft.com/azure/developer/dev-tunnels/security).
45
46
46
47
### What limits are there on port forwarding?
47
48
48
-
There are limits to both the amount of bandwidth used and the number of active machines that can be used in port forwarding, which are subject to change over time. Read more about tunnel usage limits in the [Remote-Tunnels](https://aka.ms/vscode-dev-tunnel-limit) documentation.
49
+
There are limits to both the amount of bandwidth used and the number of active machines that can be used in port forwarding, which are subject to change over time. Read more about [tunnel usage limits](https://aka.ms/vscode-dev-tunnel-limit).
49
50
50
51
### Can I configure policies across my organization?
0 commit comments