diff --git a/build.assets/windows/build.ps1 b/build.assets/windows/build.ps1 index 982e7eb93b4df..b385380a0ad15 100644 --- a/build.assets/windows/build.ps1 +++ b/build.assets/windows/build.ps1 @@ -165,33 +165,6 @@ function Enable-Node { } } -function Install-Wintun { - <# - .SYNOPSIS - Downloads wintun.dll into the supplied dir - #> - [CmdletBinding()] - param( - [Parameter(Mandatory)] - [string] $InstallDir - ) - begin { - Write-Host "::group::Installing wintun.dll to $InstallDir..." - New-Item -Path "$InstallDir" -ItemType Directory -Force | Out-Null - $WintunZipfile = "$InstallDir/wintun.zip" - Invoke-WebRequest -Uri https://www.wintun.net/builds/wintun-0.14.1.zip -OutFile $WintunZipfile - $ExpectedHash = "07C256185D6EE3652E09FA55C0B673E2624B565E02C4B9091C79CA7D2F24EF51" - $ZipFileHash = Get-FileHash -Path $WintunZipFile -Algorithm SHA256 - if ($ZipFileHash.Hash -ne $ExpectedHash) { - Write-Host "checksum: $ZipFileHash" - throw "Checksum verification for wintun.zip failed! Expected $ExpectedHash but got $($ZipFileHash.Hash)" - } - Expand-Archive -Force -Path $WintunZipfile -DestinationPath $InstallDir - Move-Item -Force -Path "$InstallDir/wintun/bin/amd64/wintun.dll" -Destination "$InstallDir/wintun.dll" - Write-Host "::endgroup::" - } -} - function Get-Relcli { <# .SYNOPSIS @@ -467,8 +440,6 @@ function Build-Connect { $CommandDuration = Measure-Block { Write-Host "::group::Building Teleport Connect..." - Install-Wintun -InstallDir "$TeleportSourceDirectory\wintun" - $env:CONNECT_WINTUN_DLL_PATH = "$TeleportSourceDirectory\wintun\wintun.dll" $env:CONNECT_TSH_BIN_PATH = "$SignedTshBinaryPath" pnpm install --frozen-lockfile pnpm build-term diff --git a/web/packages/teleterm/README.md b/web/packages/teleterm/README.md index 93eb78f4d5fdf..00ba036820ebb 100644 --- a/web/packages/teleterm/README.md +++ b/web/packages/teleterm/README.md @@ -135,14 +135,6 @@ When running `pnpm package-term`, you need to provide these environment variable The details behind those vars are described below. -### Windows - -Packaging Connect on Windows requires wintun.dll, which VNet uses to create a -virtual network interface. -A zip file containing the DLL can be downloaded from https://www.wintun.net/builds/wintun-0.14.1.zip -Extract the zip file and then pass the path to wintun.dll to `pnpm package-term` -with the `CONNECT_WINTUN_DLL_PATH` environment variable. - #### tsh.app Unlike other platforms, macOS needs the whole tsh.app to be bundled with Connect, not just the tsh diff --git a/web/packages/teleterm/build_resources/installer.nsh b/web/packages/teleterm/build_resources/installer.nsh index b76c80f02a269..1df15aef65815 100644 --- a/web/packages/teleterm/build_resources/installer.nsh +++ b/web/packages/teleterm/build_resources/installer.nsh @@ -13,15 +13,6 @@ # Make EnVar define user env vars instead of system env vars. EnVar::SetHKCU EnVar::AddValue "Path" $INSTDIR\resources\bin - - nsExec::ExecToStack '"$INSTDIR\resources\bin\tsh.exe" vnet-install-service' - Pop $0 # ExitCode - Pop $1 # Output - ${If} $0 != 0 - MessageBox MB_ICONSTOP \ - "tsh.exe vnet-install-service failed with exit code $0. Output: $1" - Quit - ${Endif} !macroend !macro customUnInstall @@ -30,12 +21,4 @@ # Fortunately, electron-builder puts the uninstaller directly into the actual installation dir. # https://nsis.sourceforge.io/Docs/Chapter4.html#varother EnVar::DeleteValue "Path" $INSTDIR\resources\bin - - nsExec::ExecToStack 'sc delete TeleportVNet' - Pop $0 # ExitCode - Pop $1 # Output - ${If} $0 != 0 - MessageBox MB_ICONSTOP \ - "sc delete TeleportVNet failed with exit code $0. Output: $1" - ${Endif} !macroend diff --git a/web/packages/teleterm/electron-builder-config.js b/web/packages/teleterm/electron-builder-config.js index f89ba512dc3a4..b61b2b316b9bd 100644 --- a/web/packages/teleterm/electron-builder-config.js +++ b/web/packages/teleterm/electron-builder-config.js @@ -2,7 +2,6 @@ const { env, platform } = require('process'); const fs = require('fs'); const { spawnSync } = require('child_process'); const isMac = platform === 'darwin'; -const isWindows = platform === 'win32'; // The following checks make no sense when cross-building because they check the platform of the // host and not the platform we're building for. @@ -30,10 +29,6 @@ if (!isMac && env.CONNECT_TSH_BIN_PATH === undefined) { throw new Error('You must provide CONNECT_TSH_BIN_PATH'); } -if (isWindows && env.CONNECT_WINTUN_DLL_PATH === undefined) { - throw new Error('You must provide CONNECT_WINTUN_DLL_PATH'); -} - // Holds tsh.app Info.plist during build. Used in afterPack. let tshAppPlist; @@ -183,20 +178,12 @@ module.exports = { from: env.CONNECT_TSH_BIN_PATH, to: './bin/tsh.exe', }, - env.CONNECT_WINTUN_DLL_PATH && { - from: env.CONNECT_WINTUN_DLL_PATH, - to: './bin/wintun.dll', - }, ].filter(Boolean), }, nsis: { // Turn off blockmaps since we don't support automatic updates. // https://github.com/electron-userland/electron-builder/issues/2900#issuecomment-730571696 differentialPackage: false, - // Use a per-machine installation to support VNet. - // VNet installs a Windows service per-machine, and tsh.exe must be - // installed in a path that is not user-writable. - perMachine: true, }, rpm: { artifactName: '${name}-${version}.${arch}.${ext}',