summaryrefslogtreecommitdiffhomepage
path: root/cmd/tsconnect/src/lib/ssh.ts
AgeCommit message (Collapse)AuthorFilesLines
2026-01-23all: remove AUTHORS file and references to itWill Norris1-1/+1
This file was never truly necessary and has never actually been used in the history of Tailscale's open source releases. A Brief History of AUTHORS files --- The AUTHORS file was a pattern developed at Google, originally for Chromium, then adopted by Go and a bunch of other projects. The problem was that Chromium originally had a copyright line only recognizing Google as the copyright holder. Because Google (and most open source projects) do not require copyright assignemnt for contributions, each contributor maintains their copyright. Some large corporate contributors then tried to add their own name to the copyright line in the LICENSE file or in file headers. This quickly becomes unwieldy, and puts a tremendous burden on anyone building on top of Chromium, since the license requires that they keep all copyright lines intact. The compromise was to create an AUTHORS file that would list all of the copyright holders. The LICENSE file and source file headers would then include that list by reference, listing the copyright holder as "The Chromium Authors". This also become cumbersome to simply keep the file up to date with a high rate of new contributors. Plus it's not always obvious who the copyright holder is. Sometimes it is the individual making the contribution, but many times it may be their employer. There is no way for the proejct maintainer to know. Eventually, Google changed their policy to no longer recommend trying to keep the AUTHORS file up to date proactively, and instead to only add to it when requested: https://opensource.google/docs/releasing/authors. They are also clear that: > Adding contributors to the AUTHORS file is entirely within the > project's discretion and has no implications for copyright ownership. It was primarily added to appease a small number of large contributors that insisted that they be recognized as copyright holders (which was entirely their right to do). But it's not truly necessary, and not even the most accurate way of identifying contributors and/or copyright holders. In practice, we've never added anyone to our AUTHORS file. It only lists Tailscale, so it's not really serving any purpose. It also causes confusion because Tailscalars put the "Tailscale Inc & AUTHORS" header in other open source repos which don't actually have an AUTHORS file, so it's ambiguous what that means. Instead, we just acknowledge that the contributors to Tailscale (whoever they are) are copyright holders for their individual contributions. We also have the benefit of using the DCO (developercertificate.org) which provides some additional certification of their right to make the contribution. The source file changes were purely mechanical with: git ls-files | xargs sed -i -e 's/\(Tailscale Inc &\) AUTHORS/\1 contributors/g' Updates #cleanup Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d Signed-off-by: Will Norris <will@tailscale.com>
2023-11-28scripts/check_license_headers: enforce license on ts/tsx filesSonia Appasamy1-0/+3
Enforcing inclusion of our OSS license at the top of .ts and .tsx files. Also updates any relevant files in the repo that were previously missing the license comment. An additional `@license` comment is added to client/web/src/index.tsx to preserve the license in generated Javascript. Updates #10261 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2022-10-17cmd/tsconnect: add progress and connection callbacksMihai Parparita1-4/+12
Allows UI to display slightly more fine-grained progress when the SSH connection is being established. Updates tailscale/corp#7186 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-10-06cmd/tsconnect: close the SSH session an unload event instead of beforeunloadMihai Parparita1-5/+5
The window may not end up getting unloaded (if other beforeunload handlers prevent the event), thus we should only close the SSH session if it's truly getting unloaded. Updates tailscale/corp#7304 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-09-21cmd/tsconnect: add error callback for SSH sessionsMihai Parparita1-1/+2
We were just logging them to the console, which is useful for debugging, but we may want to show them in the UI too. Updates tailscale/corp#6939 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-09-19cmd/tsconnect: allow SSH connection timeout to be overriddenMihai Parparita1-0/+3
5 seconds may not be enough if we're still loading the derp map and connecting to a slow machine. Updates #5693 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-09-14cmd/tsconnect: use the parent window for `beforeunload` event listenerMihai Parparita1-6/+4
The SSH session may be rendered in a different window that the one that is executing the script. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-09-12cmd/tsconnect: allow xterm.js terminal options to be passed inMihai Parparita1-2/+4
Allows clients to use a custom theme and other xterm.js customization options. Fixes #5610 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-09-12cmd/tsconnect: fix xterm.js link opening not working when rendered into ↵Mihai Parparita1-1/+3
another window The default WebLinksAddon handler uses window.open(), but that gets blocked by the popup blocker when the event being handled is another window. We instead need to invoke open() on the window that the event was triggered in. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-09-09cmd/tsconnect: enable web links addon in the terminalMihai Parparita1-0/+6
More user friendly, and as a side-effect we handle SSH check mode better, since the URL that's output is now clickable. Fixes #5247 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-09-08cmd/tsconnect: temporarily switch to xterm.js fork that handles popup windowsMihai Parparita1-1/+4
Allows other work to be unblocked while xtermjs/xterm.js#4069 is worked through. To enable testing the popup window handling, the standalone app allows opening of SSH sessions in new windows by holding down the alt key while pressing the SSH button. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-08-31cmd/tsconnect: remove debugging codeMihai Parparita1-1/+1
Remove test prefix added to validate the error code from 27f36f77c364562bc1ca660c241291e23606e54d. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-08-30cmd/tsconnect: output errors to the JS console tooMihai Parparita1-8/+21
We were just outputting them to the terminal, but that's hard to debug because we immediately tear down the terminal when getting an error. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-08-26cmd/tsconnect: expose runSSHSession in npm packageMihai Parparita1-0/+52
Move it to lib/ so that it can be used in both the app and the package. Updates #5415 Signed-off-by: Mihai Parparita <mihai@tailscale.com>