vscode: Unable switch to HTTPS for Local Port Forwarding
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version:
1.85.1
- OS Version:
Windows_NT x64 10.0.19045
Version: 1.85.1 (user setup)
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:49:37.021Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045
Steps to Reproduce:
-
Create a sample Angular project (for testing tls connection)
npm i -g @angular/cli ng new demo1 --ssr=false --style=css cd demo1 ng serve --ssl
At this moment, it will listen https://localhost:4200/
-
Open with VSCode and create a new Local Port Forwarding
code .
I tried to switch to HTTPS.
It never switch to HTTPS.
Preview in Editor
It never response.
About this issue
- Original URL
- State: open
- Created 6 months ago
- Reactions: 7
- Comments: 18 (6 by maintainers)
Commits related to this issue
- Allow tunnel factory providers to opt out of protocol support Part of #201465 — committed to microsoft/vscode by alexr00 6 months ago
- Allow tunnel factory providers to opt out of protocol support (#202067) Part of #201465 — committed to microsoft/vscode by alexr00 6 months ago
Glad to see it’s not just me struggling with this issue!
https://github.com/microsoft/vscode/issues/201371
For anyone wanting to get this working while they fix the issue, you can download the devtunnel cli and follow the guide here.
For linux machines:
devtunnel
using:Solved all my problems… In the meanwhile thanks for your great work on vscode @connor4312. I hope it’ll be fixed soon! 😃
@alexr00 I think dev tunnel do support HTTP to the backend. Do we saying the same product?
Check here: https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/cli-commands
Example:
See also:
@connor4312 ok, so is the plan now to keep the protocol switching menu (not bother with adding
auto
due to it’s seeming uselessness) and when a user switches protocol, instead of updating the existing dev tunnel, it will be closed/reopened instead using the new protocol?@alexr00 Please tell me I’ve misunderstood things again, because dev tunnels in vs code works just fine with http protocol as I mentioned in my original issue.
Per @connor4312 in https://github.com/microsoft/vscode/issues/201465#issuecomment-1881501118, switching the protocol is not supported in Dev Tunnels. I’ve added a way for the Dev Tunnels extension to simply remove this functionality for ports forwarded by Dev Tunnels. Once @connor4312 adopts this in the Dev Tunnels extension you should be all set with
https
as the default, as I assume, Dev Tunnels will also just usehttps
as the default.I have no need to switch dev tunnels between HTTP and HTTPS. How can I add a port with HTTPS at the beginning for this new change?