ZeroTier Desktop Tray Application and UI

Overview

ZeroTier Desktop Tray Application and User Interface

This is (as of ZeroTier 1.8) the system tray application and user interface for controlling a local ZeroTier service on Windows, Mac, and (soon) Linux systems.

It runs a very tiny tray application that displays service status, network status, and allows some basic configuration operations, and then launches a system web view container when the user wishes to display a full control panel. The web view dies when this window is closed, so unlike Electron-based or other web technology based system tray apps it does not hog memory while idle.

Plumbing and tray application glue code is written in Rust. UI control panels are written using React and ElasticUI.

Building

Only MacOS and Windows are currently supported. Linux may build but there are still outstanding issues. We're working on full Linux support at least for popular Linux desktop environments that support relatively standard tray application APIs.

Building the full HTML/JS/CSS UI bundle is a bit cumbersome but is only required if you make changes to the source code or themes under the ui directory. A pre-built copy of the UI is shipped in the repository to make simple builds easier and significantly faster.

MacOS

Prerequisites

  • Rust (and cargo) with targets x86_64-apple-darwin and aarch64-apple-darwin installed to enable universal binaries to be built.
  • Xcode with standard command line tools and SDKs.
  • We ship the JavaScript UI bundle pre-built. If you want to modify the JavaScript parts of the UI you need:
    • NodeJS (we use the Node package from Homebrew)
    • The yarn package manager for NodeJS.

To build on MacOS you should just be able to type make from the project root. If all the necessary dependencies are present it should build a ZeroTier.app application in the current directory.

To rebuild the UI, change into ui/ and type yarn install (this is needed only once) and yarn build. As discussed above this is optional and is only needed if you make control panel UI changes.

Windows

Prerequisites

  • Rust (and cargo) with targets x86_64-pc-windows-msvc and i686-pc-windows-msvc installed.
  • Microsoft Visual Studio (we use 2019) with both 32-bit and 64-bit X86 targets and with appropriate desktop application SDKs.
  • GCC/G++ with support for both 64-bit and 32-bit builds (we use the linked distribution). Yes, we need both Visual Studio and GCC with GNU make.

To build native applications for Windows, just type make. This assumes that GNU make, GCC, and Cargo are in your path. The result will be two native EXEs in target\x86_64-pc-windows-msvc\release and target\i686-pc-windows-msvc\release. We plan to add native support for Windows on ARM64 soon, both for this UI application and for ZeroTier itself.

Building the web bundle part of the UI on Windows has never been done and those tool chains tend to be unfriendly to Windows. We recommend doing yarn build stuff in Linux or MacOS. It should work in the Linux subsystem for Windows. As mentioned above we ship this pre-built to make builds easy if you don't need to modify the JavaScript code.

Linux, FreeBSD, Other Open Source Desktops

Coming soon.

Directly Incorporated Third Party Code

The ZeroTier desktop UI uses forked and slightly modified versions of the following third party code:

  • Tray by Serge Zaitsev, forked to slightly modify behavior in regard to loop timeouts and Mac application settings. We also manually applied a pull request that fixes builds on ARM64 MacOS. (Retains the MIT license.)
  • Rust web-view by multiple contributors, forked to modify Mac application behavior and add some custom functionality around copy/paste. (Retains the MIT license.)

Other third party dependencies are included in the normal way. See Cargo.toml and ui/package.json for these.

License

The main UI code in src and ui is copyright ZeroTier, Inc. and is licensed under the Mozilla Public License (MPL) version 2.0.

Code in tray and web-view is licensed under the MIT license, which is the original license used by the upstream projects.

Comments
  • Infinite UAC prompts

    Infinite UAC prompts

    When opening ZeroTier UI for the first time on a Windows account, the UAC prompt cannot be dismissed by clicking "No" – it keeps popping up again every time it's dismissed. The easiest way to escape seems to be locking the PC (Win+L) and restarting.

    Expected behaviour is that the action will be cancelled and it will not ask again.

    UAC prompt's Program location: "C:\Program Files (x86)\ZeroTier\One\zerotier_desktop_ui.exe" copy_authtoken ZeroTier 1.8.4 Windows 10

    opened by aplum 15
  • compile fail: DesktopUI-1.8.4\vendor\windows_x86_64_msvc\lib/windows.lib`

    compile fail: DesktopUI-1.8.4\vendor\windows_x86_64_msvc\lib/windows.lib`

    PS D:\NewDev\DesktopUI-1.8.4> cargo build error: failed to calculate checksum of: D:\NewDev\DesktopUI-1.8.4\vendor\windows_x86_64_msvc\lib/windows.lib

    Caused by: failed to open file D:\NewDev\DesktopUI-1.8.4\vendor\windows_x86_64_msvc\lib/windows.lib

    PS D:\NewDev\DesktopUI-1.8.4>

    opened by soarway 8
  • ZT 1.8.1 User Interface won't start on macOS mojave

    ZT 1.8.1 User Interface won't start on macOS mojave

    Required

    Hi just tried to update ZeroTier to 1.8.1 from 1.6.6, but it won't start anymore. On your download page it says "MacOS 10.12 or newer is supported." and the install worked just fine...

    Also ran the /Library/Application Support/ZeroTier/One/uninstall.sh script and reinstalled, still the same issue.

    cd "/Applications/ZeroTier.app/Contents/MacOS"
    ./ZeroTier
    2021-11-08 17:39:29.457 ZeroTier[908:17773] +[NSDate now]: unrecognized selector sent to class 0x106bb9ea8
    2021-11-08 17:39:29.465 ZeroTier[908:17773] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDate now]: unrecognized selector sent to class 0x106bb9ea8'
    *** First throw call stack:
    (
    	0   CoreFoundation                      0x000000010672db79 __exceptionPreprocess + 256
    	1   libobjc.A.dylib                     0x00000001088823c6 objc_exception_throw + 48
    	2   CoreFoundation                      0x00000001067a81cb __CFExceptionProem + 0
    	3   CoreFoundation                      0x00000001066cf658 ___forwarding___ + 1478
    	4   CoreFoundation                      0x00000001066cf008 _CF_forwarding_prep_0 + 120
    	5   ZeroTier                            0x000000010462a035 tray_loop + 97
    	6   ZeroTier                            0x000000010455a46f _ZN19zerotier_desktop_ui4main17h1bf8b0ab362a77aaE + 7930
    	7   ZeroTier                            0x000000010453d72f _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17hef195725c6ce9d43E + 6
    	8   ZeroTier                            0x000000010455aa67 main + 595
    	9   libdyld.dylib                       0x000000010ce523d5 start + 1
    	10  ???                                 0x0000000000000001 0x0 + 1
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    zsh: abort      ./ZeroTier
    

    Additional information

    • Device: iMac
    • OS: macOS 10.14.6
    • ZeroTier Version 1.8.1

    1.6.6 works fine.

    opened by apfelchips 3
  • Error compiling on windows (x64)

    Error compiling on windows (x64)

    Following the readme, when I compile it in Windows (x64) I get the following error (multiple errors from gimli)

    error[E0412]: cannot find type 'Option' in this scope--> C:\Users\user\Desktop\DesktopUI-master\vendor\gimli\src\read\mod.rs:653:55](http://mod.rs:653:55/)|653 | fn lookup_offset_id(&self, id: ReaderOffsetId) -> Option<(SectionId, R::Offset)>| ^^^^^^ not found in this scope

    opened by wewlad-dev 2
  • macOS cannot paste network id when joining

    macOS cannot paste network id when joining

    When joining a new network via the UI on macOS one needs to tediously type in each character of the network ID since the UI doesn't allow pasting in the ID.

    This works normally on Windows.

    opened by zalmanlew 1
  • How to get windows.lib file ?

    How to get windows.lib file ?

    make[1]: Leaving directory 'D:/DesktopUI-1.8.4/tray' cargo build --release --target=x86_64-pc-windows-msvc error: failed to calculate checksum of: D:\DesktopUI-1.8.4\vendor\windows_x86_64_msvc\lib/windows.lib

    Caused by: failed to open file D:\DesktopUI-1.8.4\vendor\windows_x86_64_msvc\lib/windows.lib

    opened by soarway 1
  • Mac GUI: Cannot paste network address in Control Panel

    Mac GUI: Cannot paste network address in Control Panel

    On MacOS 10.13.6 (old) and 12.1 (new), with ZeroTier version 1.8.4:

    The ZeroTier GUI appears to exist as a Sheet or Dialog (unsure exactly what type) rather than a full-fledged application window: the menu bar application name at top-left of the screen does not change when the ZeroTier Control Panel is launched.

    As a sheet, by default it lacks standard cut/copy/paste shortcuts and menu items for the Join Network text element, so the Network ID must be typed in manually. (This issue also affects Primary Port, but that's less important).

    I am not sure it is possible to add it to the menu & keyboard shortcuts: the Backblaze Backup "Inherit Backup State" feature uses a similar sheet/dialog with the same problem; however, they provide a workaround by enabling the right-click contextual menu with cut/copy/paste. (See example.)

    I'd like to suggest either adding the menu bar cut/copy/paste functionality if possible, or if not, enabling the right-click contextual menu. Making the Control Panel an actual application window that launches from the menu bar would also be a solution.

    opened by sylvank 1
  • Control Panel window steals focus when opened twice

    Control Panel window steals focus when opened twice

    On macOS, if the control panel window is already open and you open it again, it will steal focus until the application is stopped or the window is closed.

    bug 
    opened by joseph-henry 1
  • Bump minimist from 1.2.5 to 1.2.6 in /ui

    Bump minimist from 1.2.5 to 1.2.6 in /ui

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • SSO flow issues in desktop UI

    SSO flow issues in desktop UI

    This code causes issues in the SSO flow wherein the window is automatically closed mid login flow.

    https://github.com/zerotier/DesktopUI/blob/38b327208b6f339ad21216c6c48b4c3c8a8fe7bc/src/main.rs#L1282

    Basically, there's no one single known URL the window can be that can determine if the window should be closed. The closet would be the SSO url in zerotier-one at http://localhost:9993/sso, however 9993 is just the default port. It can be changed by the user.

    Ideally, the only time the window should auto close would be going from status AUTHENTICATION_REQUIRED -> OK. But there also needs to be a way to restart the process as the Nonce & State in the URL do change periodically.

    opened by glimberg 0
  • Fix for Issue #32

    Fix for Issue #32

    patch serviceclient::get_auth_token_and_port() so that the home directory is specified externally to it.

    Previously, it calculated the user home at the top of the function definition, but this caused issues when being run from non-Administrator accounts on Windows. The function would first be run as the non-Admin user. The app detects that it doesn't have access to the system authtoken so it requests to elevate privileges and copy. The issue arrises is that the destination path was re-calculated after running as an administrator so the target path of the copy was the administrator's home directory, not the initial user. This patch sets the target home directory as a command line argument when running the copy_authtoken subcommand.

    opened by glimberg 0
  • feature request: Disconnect when quit

    feature request: Disconnect when quit

    I join many different networks. Since there's only "Disconnect" button here, I have to remember to check all networks and disconnect which I don't really trust before I quit the UI. When the UI has been closed, it can be easily forgotten that I'm still in that untrusted network thus been vulnerable to potential attacks.

    I think a "Disconnect when quit" button is better.

    ZeroTier 1.10.1 Windows 10

    opened by Ledenel 0
  • UI Not Detecting Invalid Local Authtoken -

    UI Not Detecting Invalid Local Authtoken - "Waiting for ZeroTier System Service..."

    Adding here to make sure we don't forget to fix. "Waiting for system service" issue is caused by an invalid copy of the service authtoken in the user's home directory.

    We need to detect this by catching 403 responses from the service backend & giving the user the ability to recopy the token in the tray app.

    opened by glimberg 2
  • Sort network by name

    Sort network by name

    We use Zerotier to connect on different remote machines. Each machine has it own network.

    It would be fine to sort or have an option to sort the network by name in the tray. As you can see, it is not so user friendly to find the right network at a glance (here not all network are present) image

    opened by flo17 0
  • Join Networks not visible in Zerotier Control Panel on Windows

    Join Networks not visible in Zerotier Control Panel on Windows

    I just installed Zerotier-One client on two new Windows 11 machines and ran into an issue that the "Join Network" portion of the Control Panel interface was located off the bottom of the screen. It appears that it is "pinned" to a specific window location and does not move if the window is resized (either by actually dragging the corner of the window or using display scaling). I could reproduce he issue on a higher resolution display by grabbing the bottom of the window and moving it up. Running a vertical resolution of 720 required setting the taskbar to hid in order to see the input box.

    opened by whooperhsd 1
  • cant build

    cant build

    i use cargo build,but cant build success。 error: the listed checksum of F:\github\DesktopUI\vendor\chrono\src/offset/mod.rs has changed: expected: a1036f75fc686603b216f9bb45b1689c8b34198b617b204800ceafb87b66ec45 actual: f40c95ba4c6759e378c35c44790c635472201f3d6feb86c1b8518e9f43537ddb

    directory sources are not intended to be edited, if modifications are required then it is recommended that [patch] is used with a forked copy of the source

    opened by noeat 0
  • Leaving a network removes it from menubar

    Leaving a network removes it from menubar

    Small weird thing, if you leave a network from the cli, it disappears from the list in the menubar. It's not in there as disconnected.

    It is still listed in the control panel.

    If you leave from the control panel, sometimes this happens too.

    Currently on 1.8.10, macos, intel. Testing with the "intranet" network.

    opened by laduke 0
Releases(1.8.3)
Owner
ZeroTier, Inc.
Directly Connecting the World's Devices with Universal Software Defined Networking
ZeroTier, Inc.
A desktop application wrapper for CovidValidator.app

A desktop application wrapper for CovidValidator.app Check EU Digitial Covid Certificates with ease and validate them against local or country rules.

Timo Koenig 2 Mar 15, 2022
Build beautiful desktop apps with flutter and rust. 🌠 (wip)

flutter-rs Build flutter desktop app in dart & rust. Get Started Install requirements Rust flutter sdk Develop install the cargo flutter command cargo

null 2k Dec 26, 2022
Build smaller, faster, and more secure desktop applications with a web frontend.

TAURI Tauri Apps footprint: minuscule performance: ludicrous flexibility: gymnastic security: hardened Current Releases Component Descrip

Tauri 56.3k Jan 3, 2023
SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

SixtyFPS 5.5k Jan 1, 2023
A react-inspired UI library for building multimedia desktop apps with rust and vulkan.

narui A react-inspired UI library for building multimedia desktop apps with rust and vulkan. declarative UI with Ergonomics similar to React with hook

apertus° - open source cinema 42 Jan 1, 2023
Native Maps for Web, Mobile and Desktop

mapr Native Maps for Web, Mobile and Linux A map rendering library written in Rust. Example | Book | API | Chat in Matrix Space Project State This pro

MapLibre 942 Jan 2, 2023
A powerful desktop widget app for windows, built with Vue and Tauri.

DashboardX Widgets A powerful desktop widget app for windows, built with Vue and Tauri. Still in development Currently only runs on windows (uses nati

DashboardX Widgets 3 Oct 25, 2023
Access German-language public broadcasting live streams and archives on the Linux Desktop

Deutsche Version Televido Televido (“Television” in Esperanto) lets you livestream, search, play and download media from German-language public televi

David C. 10 Nov 4, 2023
Desktop GUI Framework

Azul - Desktop GUI framework WARNING: The features advertised in this README may not work yet. Azul is a free, functional, immediate mode GUI framewor

Maps4Print 5.4k Jan 1, 2023
Better GNOME Desktop Experience

Better GNOME Desktop Experience Tired of having the best feeling DE with the worst defaults? This app is for you. Transform the default GNOME look to:

Dimitar Dimitrov 3 May 10, 2022
Azul - Desktop GUI framework

Azul - Desktop GUI framework Azul is a free, functional, reactive GUI framework for Rust and C++, built using the WebRender rendering engine and a CSS

Felix Schütt 5.4k Dec 31, 2022
A simple note taking application written in Rust and GTK4

Rnote A simple note taking application written in Rust and GTK4. Rnote aims to be a simple but functional note taking application for freehand drawing

Felix Zwettler 3.4k Jan 5, 2023
A lightweight cross-platform system-monitoring fltk gui application based on sysinfo

Sysinfo-gui A lightweight cross-platform system-monitoring fltk gui application based on sysinfo. The UI design is inspired by stacer. The svg icons a

Mohammed Alyousef 22 Dec 31, 2022
A simple Iced application that I wrote as a learning activity, which allows you to browse the full list of regular Material Icons.

Iced Material Icon Browser Iced Material Icon Browser is a simple Iced application that I wrote as a learning activity, which allows you to browse the

BB-301 4 Sep 18, 2023
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

Deno Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Features Secure by default. No file,

Derek Jones 2 Aug 13, 2022
Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS

core-foundation-rs Compatibility Targets macOS 10.7 by default. To enable features added in macOS 10.8, set Cargo feature mac_os_10_8_features. To hav

Servo 685 Jan 2, 2023
Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo.

THIS REPOSITORY IS DEPRECATED SEE: https://github.com/rust-gnome rgtk Rust bindings and wrappers for GLib, GDK 3, GTK+ 3 and Cairo. Building rgtk expe

Jeremy Letang 124 Jul 10, 2022
A simple, clean, and beautiful WYSIWYG Markdown editor and content-management system

ScribeDown Current version: v0.0.1 Feature level: See the roadmap Beautiful, Clean, Writer-Oriented The goal of ScribeDown is to make Markdown the bes

Alex Dumas 4 Dec 20, 2022
A collection of components and widgets that are built for bevy_ui and the ECS pattern

Widgets for Bevy UI A collection of components and widgets that are built for bevy_ui and the ECS pattern. Current State This was started recently and

Gabriel Bourgeois 3 Sep 2, 2022