[PR #3858] [MERGED] Create Telnet connection type and default loopback profile for Universal #25528

Open
opened 2026-01-31 09:10:05 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3858
Author: @miniksa
Created: 12/5/2019
Status: ✅ Merged
Merged: 12/9/2019
Merged by: @miniksa

Base: master ← Head: dev/miniksa/tel2


📝 Commits (10+)

  • 29daf76 Add telnet connection type. Compensate for GSL conflict. Temporarily use AzureCloudShell entrypoint to launch Telnet conection type.
  • c03763a Add telnet generator, create our own settings entry for UWP, pipe everything through, add icons for telnet type. Add resources for failure. Round out the Telnet connection to work more like how we expect. Fix AppLogic to declare UWP status before settings. Bring telnetpp license in.
  • 86a006a move telnetpp to 1.0.1, add some comments and a bit of file cleanup.
  • 91d2274 codeformat pass.
  • 09b7c9e Add option to send window resizing information
  • ad91e49 Try set title, respond to Dustin's PR feedback around try/catches, comments I forgot to update, and other tweaks.
  • 5f3fb0e codeformat
  • 4cee8b8 suppress menu options when in UWP. Make the TelnetConnection take a URI so a port can be specified.
  • 8d95fc4 We don't really need a dynamic generator. Just define the profile.
  • 3a2acd8 I wish Visual Studio actually would do the code formatting thing correctly...

📊 Changes

27 files changed (+716 additions, -91 deletions)

View changed files

📝 NOTICE.md (+30 -0)
➕ src/cascadia/CascadiaPackage/ProfileIcons/{550ce7b8-d500-50ad-8a1a-c400c3262db3}.scale-100.png (+0 -0)
➕ src/cascadia/CascadiaPackage/ProfileIcons/{550ce7b8-d500-50ad-8a1a-c400c3262db3}.scale-200.png (+0 -0)
📝 src/cascadia/TerminalApp/App.cpp (+1 -1)
📝 src/cascadia/TerminalApp/AppLogic.cpp (+16 -1)
📝 src/cascadia/TerminalApp/AppLogic.h (+1 -0)
📝 src/cascadia/TerminalApp/AppLogic.idl (+1 -0)
📝 src/cascadia/TerminalApp/CascadiaSettings.h (+1 -0)
📝 src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp (+24 -0)
📝 src/cascadia/TerminalApp/LegacyProfileGeneratorNamespaces.h (+1 -0)
➕ src/cascadia/TerminalApp/TelnetGenerator.h (+19 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+34 -22)
➕ src/cascadia/TerminalApp/defaults-universal.json (+105 -0)
📝 src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj (+22 -52)
📝 src/cascadia/TerminalConnection/AzureConnection.cpp (+5 -0)
📝 src/cascadia/TerminalConnection/ConptyConnection.cpp (+5 -0)
📝 src/cascadia/TerminalConnection/Resources/en-US/Resources.resw (+3 -0)
➕ src/cascadia/TerminalConnection/TelnetConnection.cpp (+315 -0)
➕ src/cascadia/TerminalConnection/TelnetConnection.h (+72 -0)
➕ src/cascadia/TerminalConnection/TelnetConnection.idl (+14 -0)

...and 7 more files

📄 Description

Summary of the Pull Request

For our Universal terminal for development purposes, we will use telnet to escape the universal application container and empower developers to debug/diagnose issues with their own machine on loopback to the already-elevated telnet context.

PR Checklist

  • Closes internal development-blocker deliverable
  • I work here
  • Manual testing
  • Internal tool right now to test the waters on what's possible, no public doc.
  • I'm a core contributor

Detailed Description of the Pull Request / Additional comments

We have two factors at odds here:

  1. To develop our modern devices platforms, our developers need the ability to run diagnostics and utilities directly on a device.
  2. Universal applications tend to be stuck inside a container

This provides a development-based way around the issue. The telnet server exists on a device when it is in a development mode and runs in an already elevated context. This is great for performing activities from off-device, but not for the same device. However, if we loopback out of the containered app to the elevated context, we should be able to be on-device but with the same power as off-device.

So overall, this adds the following:

  1. A telnet connection type, leveraging the MIT-licensed telnetpp library for the communication channel
  2. Telnet profile generators
  3. Customization of the universal-edition of settings loading so it goes directly into this telnet connection type
  4. A bunch of odds and ends cleaning up strings and handling errors and connection things (and icons and whatnot).

This enables a developer on a more constrained device that is set to developer mode to launch a special edition of Windows Terminal straight into a prompt that runs in an elevated context against the same device.

TODO:

  • Expose third-party notices in about box? @DHowett-MSFT
  • Upload telnetpp vcpkg to feed and update references
  • Do first pass PR on this myself then set to "ready" status from "draft"
  • Hookup resize
  • Make the tab say something
  • Telnet server detects this connection type and moves up to xterm256 utf-8 mode.

TODO after completion:

  • Ingest this package into development images of Windows

Validation Steps Performed

  • Connected from local dev box running this application in a containered context to the telnet server running on another device and ran commands.
  • Connected in loopback on the device itself to itself and ran commands.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/3858 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 12/5/2019 **Status:** ✅ Merged **Merged:** 12/9/2019 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `dev/miniksa/tel2` --- ### 📝 Commits (10+) - [`29daf76`](https://github.com/microsoft/terminal/commit/29daf76d0be4fe3ca9c87925c28a3aeee39a218f) Add telnet connection type. Compensate for GSL conflict. Temporarily use AzureCloudShell entrypoint to launch Telnet conection type. - [`c03763a`](https://github.com/microsoft/terminal/commit/c03763a283bc6891acae87f1f88febe5bd1d949a) Add telnet generator, create our own settings entry for UWP, pipe everything through, add icons for telnet type. Add resources for failure. Round out the Telnet connection to work more like how we expect. Fix AppLogic to declare UWP status before settings. Bring telnetpp license in. - [`86a006a`](https://github.com/microsoft/terminal/commit/86a006a4c10bbcb22831718299f9f912cdbea7f6) move telnetpp to 1.0.1, add some comments and a bit of file cleanup. - [`91d2274`](https://github.com/microsoft/terminal/commit/91d22749ae012cace48a8a9d3328b48d313c6d0f) codeformat pass. - [`09b7c9e`](https://github.com/microsoft/terminal/commit/09b7c9ed8c0268b4f0dd49ea4c07b3a430970a5c) Add option to send window resizing information - [`ad91e49`](https://github.com/microsoft/terminal/commit/ad91e49f6951f9e4f9a6ef5b9988e0504d0c79e9) Try set title, respond to Dustin's PR feedback around try/catches, comments I forgot to update, and other tweaks. - [`5f3fb0e`](https://github.com/microsoft/terminal/commit/5f3fb0ec8c3cdad690d80bdf03e45004fc15ec0e) codeformat - [`4cee8b8`](https://github.com/microsoft/terminal/commit/4cee8b80203bc9474f03dd37271e06421deee61b) suppress menu options when in UWP. Make the TelnetConnection take a URI so a port can be specified. - [`8d95fc4`](https://github.com/microsoft/terminal/commit/8d95fc4468ebfe08d3141956d91a5c9c4468769a) We don't really need a dynamic generator. Just define the profile. - [`3a2acd8`](https://github.com/microsoft/terminal/commit/3a2acd895bf8d231f3ce8490c6d2a7c1deea956c) I wish Visual Studio actually would do the code formatting thing correctly... ### 📊 Changes **27 files changed** (+716 additions, -91 deletions) <details> <summary>View changed files</summary> 📝 `NOTICE.md` (+30 -0) ➕ `src/cascadia/CascadiaPackage/ProfileIcons/{550ce7b8-d500-50ad-8a1a-c400c3262db3}.scale-100.png` (+0 -0) ➕ `src/cascadia/CascadiaPackage/ProfileIcons/{550ce7b8-d500-50ad-8a1a-c400c3262db3}.scale-200.png` (+0 -0) 📝 `src/cascadia/TerminalApp/App.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+16 -1) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+1 -0) 📝 `src/cascadia/TerminalApp/AppLogic.idl` (+1 -0) 📝 `src/cascadia/TerminalApp/CascadiaSettings.h` (+1 -0) 📝 `src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp` (+24 -0) 📝 `src/cascadia/TerminalApp/LegacyProfileGeneratorNamespaces.h` (+1 -0) ➕ `src/cascadia/TerminalApp/TelnetGenerator.h` (+19 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+34 -22) ➕ `src/cascadia/TerminalApp/defaults-universal.json` (+105 -0) 📝 `src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj` (+22 -52) 📝 `src/cascadia/TerminalConnection/AzureConnection.cpp` (+5 -0) 📝 `src/cascadia/TerminalConnection/ConptyConnection.cpp` (+5 -0) 📝 `src/cascadia/TerminalConnection/Resources/en-US/Resources.resw` (+3 -0) ➕ `src/cascadia/TerminalConnection/TelnetConnection.cpp` (+315 -0) ➕ `src/cascadia/TerminalConnection/TelnetConnection.h` (+72 -0) ➕ `src/cascadia/TerminalConnection/TelnetConnection.idl` (+14 -0) _...and 7 more files_ </details> ### 📄 Description ## Summary of the Pull Request For our Universal terminal for development purposes, we will use telnet to escape the universal application container and empower developers to debug/diagnose issues with their own machine on loopback to the already-elevated telnet context. ## PR Checklist * [x] Closes internal development-blocker deliverable * [x] I work here * [x] Manual testing * [x] Internal tool right now to test the waters on what's possible, no public doc. * [x] I'm a core contributor ## Detailed Description of the Pull Request / Additional comments We have two factors at odds here: 1. To develop our modern devices platforms, our developers need the ability to run diagnostics and utilities directly on a device. 2. Universal applications tend to be stuck inside a container This provides a development-based way around the issue. The telnet server exists on a device when it is in a development mode and runs in an already elevated context. This is great for performing activities from off-device, but not for the same device. However, if we loopback out of the containered app to the elevated context, we should be able to be on-device but with the same power as off-device. So overall, this adds the following: 1. A telnet connection type, leveraging the MIT-licensed telnetpp library for the communication channel 2. Telnet profile generators 3. Customization of the universal-edition of settings loading so it goes directly into this telnet connection type 4. A bunch of odds and ends cleaning up strings and handling errors and connection things (and icons and whatnot). This enables a developer on a more constrained device that is set to developer mode to launch a special edition of Windows Terminal straight into a prompt that runs in an elevated context against the same device. TODO: - [ ] Expose third-party notices in about box? @DHowett-MSFT - [x] Upload telnetpp vcpkg to feed and update references - [x] Do first pass PR on this myself then set to "ready" status from "draft" - [x] Hookup resize - [x] Make the tab say something - [ ] Telnet server detects this connection type and moves up to xterm256 utf-8 mode. TODO after completion: - [ ] Ingest this package into development images of Windows ## Validation Steps Performed - Connected from local dev box running this application in a containered context to the telnet server running on another device and ran commands. - [x] Connected in loopback on the device itself to itself and ran commands. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:10:05 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25528