Przeglądaj źródła

Merge pull request #2509 from zerotier/dev

1.16 dev to main
Adam Ierymenko 1 dzień temu
rodzic
commit
377462e776
100 zmienionych plików z 517 dodań i 9763 usunięć
  1. 5 0
      .clangd
  2. 0 256
      .drone.jsonnet
  3. 0 465
      .drone.yml
  4. 4 1
      .github/workflows/build.yml
  5. 3 2
      .github/workflows/validate.yml
  6. 8 7
      .gitignore
  7. 0 14
      .kick
  8. 0 75
      AUTHORS.md
  9. 0 12
      COPYING
  10. 3 3
      Dockerfile.release
  11. 373 0
      LICENSE-MPL.txt
  12. 3 147
      LICENSE.txt
  13. 3 0
      Makefile
  14. 1 1
      OFFICIAL-RELEASE-STEPS.md
  15. 1 0
      README.docker.md
  16. 109 158
      RELEASE-NOTES.md
  17. 4 3
      SECURITY.md
  18. 0 459
      attic/WinUI/APIHandler.cs
  19. 0 35
      attic/WinUI/AboutView.xaml
  20. 0 35
      attic/WinUI/AboutView.xaml.cs
  21. 0 6
      attic/WinUI/App.config
  22. 0 14
      attic/WinUI/App.xaml
  23. 0 25
      attic/WinUI/App.xaml.cs
  24. 0 256
      attic/WinUI/CentralAPI.cs
  25. 0 30
      attic/WinUI/CentralLogin.cs
  26. 0 48
      attic/WinUI/CentralNetwork.cs
  27. 0 23
      attic/WinUI/CentralServer.cs
  28. 0 21
      attic/WinUI/CentralToken.cs
  29. 0 51
      attic/WinUI/CentralUser.cs
  30. BIN
      attic/WinUI/Fonts/segoeui.ttf
  31. BIN
      attic/WinUI/Fonts/segoeuib.ttf
  32. BIN
      attic/WinUI/Fonts/segoeuii.ttf
  33. BIN
      attic/WinUI/Fonts/segoeuiz.ttf
  34. 0 13
      attic/WinUI/ISwitchable.cs
  35. 0 17
      attic/WinUI/JoinNetworkView.xaml
  36. 0 127
      attic/WinUI/JoinNetworkView.xaml.cs
  37. 0 233
      attic/WinUI/MainWindow.xaml.cs
  38. 0 88
      attic/WinUI/NetworkInfoView.xaml
  39. 0 183
      attic/WinUI/NetworkInfoView.xaml.cs
  40. 0 88
      attic/WinUI/NetworkListView.xaml
  41. 0 85
      attic/WinUI/NetworkListView.xaml.cs
  42. 0 203
      attic/WinUI/NetworkMonitor.cs
  43. 0 201
      attic/WinUI/NetworkNameGenerator.cs
  44. 0 42
      attic/WinUI/NetworkRoute.cs
  45. 0 13
      attic/WinUI/NetworksPage.xaml
  46. 0 99
      attic/WinUI/NetworksPage.xaml.cs
  47. 0 26
      attic/WinUI/PeersPage.xaml
  48. 0 54
      attic/WinUI/PeersPage.xaml.cs
  49. 0 30
      attic/WinUI/PreferencesView.xaml
  50. 0 74
      attic/WinUI/PreferencesView.xaml.cs
  51. 0 56
      attic/WinUI/Properties/AssemblyInfo.cs
  52. 0 73
      attic/WinUI/Properties/Resources.Designer.cs
  53. 0 124
      attic/WinUI/Properties/Resources.resx
  54. 0 30
      attic/WinUI/Properties/Settings.Designer.cs
  55. 0 7
      attic/WinUI/Properties/Settings.settings
  56. BIN
      attic/WinUI/Resources/ZeroTierIcon.ico
  57. 0 1128
      attic/WinUI/Simple Styles.xaml
  58. 0 6
      attic/WinUI/Themes/Generic.xaml
  59. 0 65
      attic/WinUI/ToolbarItem.xaml
  60. 0 353
      attic/WinUI/ToolbarItem.xaml.cs
  61. 0 273
      attic/WinUI/WinUI.csproj
  62. BIN
      attic/WinUI/ZeroTierIcon.ico
  63. 0 516
      attic/WinUI/ZeroTierNetwork.cs
  64. 0 116
      attic/WinUI/ZeroTierPeer.cs
  65. 0 27
      attic/WinUI/ZeroTierPeerPhysicalPath.cs
  66. 0 39
      attic/WinUI/ZeroTierStatus.cs
  67. 0 55
      attic/WinUI/app.manifest
  68. 0 5
      attic/WinUI/packages.config
  69. 0 391
      attic/macui/ZeroTier One.xcodeproj/project.pbxproj
  70. 0 7
      attic/macui/ZeroTier One.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  71. 0 8
      attic/macui/ZeroTier One.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  72. 0 33
      attic/macui/ZeroTier One/AboutViewController.h
  73. 0 57
      attic/macui/ZeroTier One/AboutViewController.m
  74. 0 31
      attic/macui/ZeroTier One/AboutViewController.xib
  75. 0 61
      attic/macui/ZeroTier One/AppDelegate.h
  76. 0 379
      attic/macui/ZeroTier One/AppDelegate.m
  77. 0 59
      attic/macui/ZeroTier One/Assets.xcassets/AppIcon.appiconset/Contents.json
  78. BIN
      attic/macui/ZeroTier One/Assets.xcassets/AppIcon.appiconset/ZeroTierIcon512x512.png
  79. 0 6
      attic/macui/ZeroTier One/Assets.xcassets/Contents.json
  80. 0 21
      attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMac.imageset/Contents.json
  81. BIN
      attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMac.imageset/[email protected]
  82. BIN
      attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMac.imageset/Menubar.png
  83. 0 21
      attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMacWhite.imageset/Contents.json
  84. BIN
      attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMacWhite.imageset/MenubarWhite.png
  85. BIN
      attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMacWhite.imageset/[email protected]
  86. 0 26
      attic/macui/ZeroTier One/AuthtokenCopy.h
  87. 0 97
      attic/macui/ZeroTier One/AuthtokenCopy.m
  88. 0 680
      attic/macui/ZeroTier One/Base.lproj/MainMenu.xib
  89. 0 41
      attic/macui/ZeroTier One/Info.plist
  90. 0 41
      attic/macui/ZeroTier One/JoinNetworkViewController.h
  91. 0 186
      attic/macui/ZeroTier One/JoinNetworkViewController.m
  92. 0 91
      attic/macui/ZeroTier One/JoinNetworkViewController.xib
  93. 0 69
      attic/macui/ZeroTier One/Network.h
  94. 0 352
      attic/macui/ZeroTier One/Network.m
  95. 0 51
      attic/macui/ZeroTier One/NetworkInfoCell.h
  96. 0 86
      attic/macui/ZeroTier One/NetworkInfoCell.m
  97. 0 45
      attic/macui/ZeroTier One/NetworkMonitor.h
  98. 0 253
      attic/macui/ZeroTier One/NetworkMonitor.m
  99. 0 35
      attic/macui/ZeroTier One/NodeStatus.h
  100. 0 40
      attic/macui/ZeroTier One/NodeStatus.m

+ 5 - 0
.clangd

@@ -4,3 +4,8 @@ CompileFlags:
     - "-I../ext"
     - "-I../ext/prometheus-cpp-lite-1.0/core/include"
     - "-I../ext/prometheus-cpp-lite-1.0/simpleapi/include"
+    - "-I../ext/opentelemetry-cpp-1.21.0/api/include"
+    - "-I./ext"
+    - "-I./ext/prometheus-cpp-lite-1.0/core/include"
+    - "-I./ext/prometheus-cpp-lite-1.0/simpleapi/include"
+    - "-I./ext/opentelemetry-cpp-1.21.0/api/include"

+ 0 - 256
.drone.jsonnet

@@ -1,256 +0,0 @@
-//
-// tweakables
-//
-
-local registry = "084037375216.dkr.ecr.us-east-2.amazonaws.com";
-local build_channel = "zerotier-builds";
-local release_channel = "zerotier-releases";
-
-local targets = [
-    { "os": "linux", distro: "redhat", "name": "el9",      "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "tag", "custom" ] },
-    { "os": "linux", distro: "redhat", "name": "el8",      "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "tag" ] },
-    { "os": "linux", distro: "redhat", "name": "el7",      "isas": [ "386",          "amd64",          "ppc64le"],                                  "events": [ "tag" ] },
-    { "os": "linux", distro: "amazon", "name": "amzn2",    "isas": [                 "amd64", "arm64" ],                                            "events": [ "tag" ] },
-    { "os": "linux", distro: "amazon", "name": "amzn2022", "isas": [                 "amd64", "arm64" ],                                            "events": [ "tag" ] },
-    { "os": "linux", distro: "fedora", "name": "fc38",     "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "tag" ] },
-    { "os": "linux", distro: "fedora", "name": "fc37",     "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "tag" ] },
-    { "os": "linux", distro: "fedora", "name": "fc36",     "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "tag" ] },
-    { "os": "linux", distro: "ubuntu", "name": "jammy",    "isas": [        "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ],             "events": [ "tag" ] },
-    { "os": "linux", distro: "ubuntu", "name": "focal",    "isas": [        "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ],             "events": [ "tag" ] },
-    { "os": "linux", distro: "ubuntu", "name": "bionic",   "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "tag" ] },
-    { "os": "linux", distro: "ubuntu", "name": "xenial",   "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "tag" ] },
-    { "os": "linux", distro: "ubuntu", "name": "trusty",   "isas": [ "386", "armv7", "amd64", "arm64" ],                                            "events": [ "tag" ] },
-    { "os": "linux", distro: "debian", "name": "bookworm", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ],            "events": [ "tag"] },
-    { "os": "linux", distro: "debian", "name": "bullseye", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ],            "events": [ "push", "tag", "custom" ] },
-    { "os": "linux", distro: "debian", "name": "buster",   "isas": [ "386", "armv7", "amd64", "arm64" ],                                            "events": [ "tag" ] },
-    { "os": "linux", distro: "debian", "name": "stretch",  "isas": [ "386", "armv7", "amd64", "arm64" ],                                            "events": [ "tag" ] },
-    { "os": "linux", distro: "debian", "name": "jessie",   "isas": [ "386", "armv7", "amd64" ],                                                     "events": [ "tag" ] },
-
-//   { "os": "windows", distro: "windows", "name": "windows",  "isas": [ "amd64" ], "events": [ "push", "tag", "custom" ] },
-//   { "os": "darwin", distro: "darwin", "name": "darwin",  "isas": [ "amd64" ], "events": [ "push", "tag", "custom" ] },
-
-];
-
-local less_targets = [
-      { "os": "linux", distro: "redhat", "name": "el9",      "isas": [                 "amd64", "arm64" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "redhat", "name": "el8",      "isas": [                 "amd64", "arm64" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "ubuntu", "name": "jammy",    "isas": [        "armv7", "amd64", "arm64" ],             "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "ubuntu", "name": "focal",    "isas": [        "armv7", "amd64", "arm64" ],             "events": [ "push", "tag", "custom" ] },
-];
-
-
-local native_targets = [
-      { "os": "linux", distro: "debian", "name": "bullseye", "isas": [ "386", "armv7", "amd64", "arm64" ],            "events": [ "push", "tag", "custom" ] },
-];    
-
-local master_targets = [
-      //
-      // copypasta from here
-      //
-      { "os": "linux", distro: "redhat", "name": "el9",      "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "redhat", "name": "el8",      "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "redhat", "name": "el7",      "isas": [ "386", "amd64",          "ppc64le"],                                  "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "amazon", "name": "amzn2",    "isas": [                 "amd64", "arm64" ],                                            "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "amazon", "name": "amzn2022", "isas": [                 "amd64", "arm64" ],                                            "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "fedora", "name": "fc38",     "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "fedora", "name": "fc37",     "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "fedora", "name": "fc36",     "isas": [                 "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "ubuntu", "name": "jammy",    "isas": [        "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ],             "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "ubuntu", "name": "focal",    "isas": [        "armv7", "amd64", "arm64", "ppc64le", "s390x", "riscv64" ],             "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "ubuntu", "name": "bionic",   "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "ubuntu", "name": "xenial",   "isas": [ "386", "armv7", "amd64", "arm64", "ppc64le", "s390x" ],                        "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "ubuntu", "name": "trusty",   "isas": [ "386", "armv7", "amd64", "arm64" ],                                            "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "debian", "name": "sid",      "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x", "riscv64" ], "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "debian", "name": "bookworm", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ],            "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "debian", "name": "bullseye", "isas": [ "386", "armv7", "amd64", "arm64", "mips64le", "ppc64le", "s390x" ],            "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "debian", "name": "buster",   "isas": [ "386", "armv7", "amd64", "arm64" ],                                            "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "debian", "name": "stretch",  "isas": [ "386", "armv7", "amd64", "arm64" ],                                            "events": [ "push", "tag", "custom" ] },
-      { "os": "linux", distro: "debian", "name": "jessie",   "isas": [ "386", "armv7", "amd64" ],                                                     "events": [ "push", "tag", "custom" ] },
-      { "os": "windows", distro: "windows", "name": "win2k22", "isas": [ "amd64" ],                                                                     "events": [ "push", "tag", "custom" ] }
-];
-
-//
-// functions
-//
-
-local pipeline_type(os)  = if os == "darwin" then "exec" else "docker";
-local builder_image(os)  = if os == "linux" then registry + "/honda-builder" else registry + "/windows-builder";
-local tester_image(os)   = if os == "linux" then registry + "/honda-builder" else registry + "/windows-tester";
-local build_step_volumes(os) = if os == "linux" then [ { name: "zerotier-builds", path: "/zerotier-builds" } ] else [];
-local release_step_volumes(os) = if os == "linux" then [ { name: "zerotier-releases", path: "/zerotier-releases" } ] else [];
-local host_volumes(os)   = if os == "linux" then [
-  { name: "zerotier-builds", host: { path: "/zerotier-builds" } },
-  { name: "zerotier-releases", host: { path: "/zerotier-releases" } },
-] else [];
-
-local index_image(distro) =
-      if distro == "debian" || distro == "ubuntu" then
-          registry + "/apt-builder"
-      else if distro == "redhat" || distro == "fedora" || distro == "amazon" then
-          registry + "/dnf-builder"
-      else if distro == "windows" then
-          registry + "/msi-builder"
-;          
-
-local copy_commands(os, distro, name, isa, version) =
-  if os == "linux" then [
-      std.join(" ", [ "./ci/scripts/publish.sh", name, distro, isa, version, "${DRONE_BUILD_EVENT}" ])
-    ]
-    else if os == "windows" then [  
-      "C:\\scripts\\fix-ec2-metadata.ps1",
-      "Get-ChildItem windows",
-      // "aws s3 cp windows\\bytey-SetupFiles\\bytey.msi s3://zerotier-builds/windows/" + version + "/bytey.msi",
-    ] else if os == "darwin" then [
-        "echo hello"
-      ]
-;
-
-local index_commands(os, channel, distro, name, isas) =
-      if os == "linux" then
-        [ "/usr/local/bin/index " + channel + " " + distro + " " + name  + " " + std.join(" ", isas) ]
-      else if os == "windows" then
-        [ "Get-ChildItem -Recurse windows" ]
-;
-
-local build_commands(os, distro, name, isa, version) =
-      if os == "linux" then
-        [ std.join(" ", [ "./ci/scripts/build.sh", name, distro, isa, version, "${DRONE_BUILD_EVENT}" ]) ]
-      else
-        if os == "windows" then
-           [ "windows/build.ps1", "windows/package.ps1" ]
-      else
-        if os == "darwin" then
-           [ "whoami" ]
-;
-
-local test_commands(os, distro, name, isa, version) =
-  if os == "linux" then
-    [ std.join(" ", [ "./ci/scripts/test.sh", name, distro, isa, version, "${DRONE_BUILD_EVENT}" ]) ]
-  else
-    if os == "windows" then
-      [ "windows/testpackage.ps1 " + version ]
-;
-
-//
-// render
-//
-
-local Build(os, distro, name, isa, events) = {
-  "kind": "pipeline",
-  "type": pipeline_type(os),
-  "name": std.join(" ", [ name, isa, "build" ]),
-  "pull": "always",
-  "clone": { "depth": 1, [ if os == "darwin" then "disable" ]: true },
-  "steps": [
-    {
-      "name": "build",
-      "image": builder_image(os),
-      "commands": build_commands(os, distro, name, isa, "100.0.0+${DRONE_COMMIT_SHA:0:8}"),
-      "when": { "event": [ "push" ]},
-    },
-    {
-      "name": "release",
-      "image": builder_image(os),
-      "commands": build_commands(os, distro, name, isa, "${DRONE_TAG}"),
-      "when": { "event": [ "tag" ]},
-    },    
-    {
-      "name": "copy build",
-      "image": builder_image(os),
-      "commands": copy_commands(os, distro, name, isa, "100.0.0+${DRONE_COMMIT_SHA:0:8}"),
-      "volumes": build_step_volumes(os),
-      "when": { "event": [ "push" ]},
-    },
-    {
-      "name": "copy relase",
-      "image": builder_image(os),
-      "commands": copy_commands(os, distro, name, isa, "${DRONE_TAG}"),
-      "volumes": release_step_volumes(os),
-      "when": { "event": [ "tag" ]},      
-    },    
-  ],
-  "volumes": host_volumes(os),
-  "platform": { "os": os, [ if isa == "arm64" || isa == "armv7" then "arch" ]: "arm64" },
-  "trigger": { "event": events }
-};
-
-local Test(os, distro, name, isa, events) = {
-  "kind": "pipeline",
-  "type": pipeline_type(os),
-  "name": std.join(" ", [ name, isa, "test"]),
-  "pull": "always",
-  "clone": { "depth": 1 },
-  "steps": [
-    {
-      "name": "test build",
-      "image": tester_image(os),
-      "volumes": build_step_volumes(os),
-      "commands": test_commands(os, distro, name, isa, "100.0.0+${DRONE_COMMIT_SHA:0:8}"),
-      "when": { "event": [ "push" ]},
-    },
-    {
-      "name": "test release",
-      "image": tester_image(os),
-      "volumes": release_step_volumes(os),
-      "commands": test_commands(os, distro, name, isa, "${DRONE_TAG}"),
-      "when": { "event": [ "tag" ]},
-    },    
-  ],
-  "volumes": host_volumes(os),
-  "platform": { "os": os, [ if isa == "arm64" || isa == "armv7" then "arch" ]: "arm64" },
-  "depends_on": [ std.join(" ", [ name, "index" ]) ],
-  "trigger": { "event": events }
-};
-
-local Index(p) = {
-  "kind": "pipeline",
-  "type": pipeline_type(p.os),
-  "name": std.join(" ", [ p.name, "index" ]),
-  "pull": "always",
-  "clone": { "depth": 1 },
-  "steps": [
-    {
-      "name": "index build",
-      "image": index_image(p.distro),
-      "commands": index_commands(p.os, "zerotier-builds", p.distro, p.name, p.isas),
-      "volumes": build_step_volumes(p.os),
-      "environment":{ "GPG_PRIVATE_KEY": { from_secret: "gpg-private-key" }},
-      "when": { "event": [ "push" ]},
-    },
-    {
-      "name": "index release",
-      "image": index_image(p.distro),
-      "commands": index_commands(p.os, "zerotier-releases", p.distro, p.name, p.isas),
-      "volumes": release_step_volumes(p.os),
-      "environment":{ "GPG_PRIVATE_KEY": { from_secret: "gpg-private-key" }},
-      "when": { "event": [ "tag" ]},  
-    },    
-  ],
-  "volumes": host_volumes(p.os),
-  "platform": { "os": p.os },
-  depends_on: std.flattenArrays([ [ std.join(" ", [ p.name, isa, "build" ]) ] for isa in p.isas ]),
-  "trigger": { "event": p.events }
-};
-
-//
-// print
-//
-
-std.flattenArrays([
-    [
-      Build(p.os, p.distro, p.name, isa, p.events)
-        for isa in p.isas
-    ] +
-    [
-      Index(p)
-    ]
-    for p in native_targets
- ]) +
- std.flattenArrays([
-     [
-        Test(p.os, p.distro, p.name, isa, p.events)
-         for isa in p.isas
-     ]
-     for p in native_targets
- ])
- 

+ 0 - 465
.drone.yml

@@ -1,465 +0,0 @@
----
-clone:
-  depth: 1
-kind: pipeline
-name: bullseye 386 build
-platform:
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/build.sh bullseye debian 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: build
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/build.sh bullseye debian 386 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: release
-  when:
-    event:
-    - tag
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian 386 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy relase
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-kind: pipeline
-name: bullseye armv7 build
-platform:
-  arch: arm64
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/build.sh bullseye debian armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: build
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/build.sh bullseye debian armv7 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: release
-  when:
-    event:
-    - tag
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian armv7 100.0.0+${DRONE_COMMIT_SHA:0:8}
-    ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian armv7 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy relase
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-kind: pipeline
-name: bullseye amd64 build
-platform:
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/build.sh bullseye debian amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: build
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/build.sh bullseye debian amd64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: release
-  when:
-    event:
-    - tag
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian amd64 100.0.0+${DRONE_COMMIT_SHA:0:8}
-    ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian amd64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy relase
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-kind: pipeline
-name: bullseye arm64 build
-platform:
-  arch: arm64
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/build.sh bullseye debian arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: build
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/build.sh bullseye debian arm64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: release
-  when:
-    event:
-    - tag
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian arm64 100.0.0+${DRONE_COMMIT_SHA:0:8}
-    ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/publish.sh bullseye debian arm64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: copy relase
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-depends_on:
-- bullseye 386 build
-- bullseye armv7 build
-- bullseye amd64 build
-- bullseye arm64 build
-kind: pipeline
-name: bullseye index
-platform:
-  os: linux
-pull: always
-steps:
-- commands:
-  - /usr/local/bin/index zerotier-builds debian bullseye 386 armv7 amd64 arm64
-  environment:
-    GPG_PRIVATE_KEY:
-      from_secret: gpg-private-key
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/apt-builder
-  name: index build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - /usr/local/bin/index zerotier-releases debian bullseye 386 armv7 amd64 arm64
-  environment:
-    GPG_PRIVATE_KEY:
-      from_secret: gpg-private-key
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/apt-builder
-  name: index release
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-depends_on:
-- bullseye index
-kind: pipeline
-name: bullseye 386 test
-platform:
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/test.sh bullseye debian 386 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/test.sh bullseye debian 386 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test release
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-depends_on:
-- bullseye index
-kind: pipeline
-name: bullseye armv7 test
-platform:
-  arch: arm64
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/test.sh bullseye debian armv7 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/test.sh bullseye debian armv7 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test release
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-depends_on:
-- bullseye index
-kind: pipeline
-name: bullseye amd64 test
-platform:
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/test.sh bullseye debian amd64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/test.sh bullseye debian amd64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test release
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-clone:
-  depth: 1
-depends_on:
-- bullseye index
-kind: pipeline
-name: bullseye arm64 test
-platform:
-  arch: arm64
-  os: linux
-pull: always
-steps:
-- commands:
-  - ./ci/scripts/test.sh bullseye debian arm64 100.0.0+${DRONE_COMMIT_SHA:0:8} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test build
-  volumes:
-  - name: zerotier-builds
-    path: /zerotier-builds
-  when:
-    event:
-    - push
-- commands:
-  - ./ci/scripts/test.sh bullseye debian arm64 ${DRONE_TAG} ${DRONE_BUILD_EVENT}
-  image: 084037375216.dkr.ecr.us-east-2.amazonaws.com/honda-builder
-  name: test release
-  volumes:
-  - name: zerotier-releases
-    path: /zerotier-releases
-  when:
-    event:
-    - tag
-trigger:
-  event:
-  - push
-  - tag
-  - custom
-type: docker
-volumes:
-- host:
-    path: /zerotier-builds
-  name: zerotier-builds
-- host:
-    path: /zerotier-releases
-  name: zerotier-releases
----
-kind: signature
-hmac: 887a3ef78d3fe8f0149911e1e4876401dd7dd313b36eb893e791fa42f45d7768
-
-...

+ 4 - 1
.github/workflows/build.yml

@@ -1,4 +1,7 @@
-on: [ push ]
+on:
+  pull_request:
+  push:
+  workflow_dispatch:
 
 jobs:
   build_ubuntu:

+ 3 - 2
.github/workflows/validate.yml

@@ -1,4 +1,5 @@
 on:
+  pull_request:
   push:
   workflow_dispatch:
 
@@ -38,13 +39,13 @@ jobs:
         CXX: 'g++'
         BRANCH: ${{  github.ref_name }}
       run: |
-        sudo apt install -y valgrind xmlstarlet gcovr iperf3 tree
+        sudo apt update && sudo apt install -y valgrind xmlstarlet gcovr iperf3 tree
         make one ZT_COVERAGE=1 ZT_TRACE=1
         sudo chmod +x ./.github/workflows/validate-linux.sh
         sudo ./.github/workflows/validate-linux.sh
 
     - name: Archive test results
-      uses: actions/upload-artifact@v3
+      uses: actions/upload-artifact@v4
       with:
         name: ${{github.sha}}-test-results
         path: "*test-results*"

+ 8 - 7
.gitignore

@@ -6,16 +6,19 @@
 /zerotier
 /nltest
 
-# IDE stuff
+# IDE and dev tool stuff
 /.idea
 /.nova
 /compile_commands.json
+/.claude
+/.aider
 
 # OS-created garbage files from various platforms
 .DS_Store
 .Apple*
 Thumbs.db
 @eaDir
+lost+found
 ._*
 
 # Windows build droppings
@@ -58,6 +61,9 @@ zt1-src.tar.gz
 /MacEthernetTapAgent
 
 # Miscellaneous temporaries, build files, etc.
+ext/installfiles/windows/*.back*.aip
+tcp-proxy/tcp-proxy
+rustybits/target
 *.log
 *.opensdf
 *.user
@@ -101,7 +107,6 @@ windows/ZeroTierOne/Debug/
 /ext/installfiles/windows/chocolatey/zerotier-one/*.nupkg
 
 # Miscellaneous mac/Xcode droppings
-.DS_Store
 .Trashes
 *.swp
 *~.nib
@@ -126,17 +131,13 @@ workspace2/
 zeroidc/target/
 tcp-proxy/target
 
-#snapcraft specifics
+# Snapcraft Linux build stuff
 /parts/
 /stage/
 /prime/
-
 *.snap
-
 .snapcraft
 __pycache__
 *.pyc
 *_source.tar.bz2
 snap/.snapcraft
-tcp-proxy/tcp-proxy
-rustybits/target

+ 0 - 14
.kick

@@ -1,14 +0,0 @@
-kick
-kick
-kick
-kick
-kick
-kick
-kick
-kick
-kick
-kick
-kick
-kick
-kick
-kick

+ 0 - 75
AUTHORS.md

@@ -1,75 +0,0 @@
-# Authors and Third Party Code Licensing Information
-
-## Primary Authors
-
- * ZeroTier Core and ZeroTier One virtual networking service<br>
-   Adam Ierymenko / [email protected]
-   Joseph Henry / [email protected] (QoS and multipath)
-
- * Java JNI Interface to enable Android application development, and Android app itself (code for that is elsewhere)<br>
-   Grant Limberg / [email protected]
-
- * ZeroTier SDK (formerly known as Network Containers)<br>
-   Joseph Henry / [email protected]
-
-## Third Party Contributors
-
- * A number of fixes and improvements to the new controller, other stuff.<br>
-   Kees Bos / https://github.com/keesbos/
-
- * Debugging and testing, OpenWRT support fixes.<br>
-   Moritz Warning / [email protected]
-
- * Debian GNU/Linux packaging, manual pages, and license compliance edits.<br>
-   Ben Finney <[email protected]>
-
- * Several others made smaller contributions, which GitHub tracks here:<br>
-   https://github.com/zerotier/ZeroTierOne/graphs/contributors/
-
-## Third-Party Code
-
-ZeroTier includes the following third party code, either in ext/ or incorporated into the ZeroTier core. This third party code remains licensed under its original license and is not subject to ZeroTier's BSL license.
-
- * LZ4 compression algorithm by Yann Collet
-
-   * Files: node/Packet.cpp (bundled within anonymous namespace)
-   * Home page: http://code.google.com/p/lz4/
-   * License grant: BSD 2-clause
-
- * http-parser by Joyent, Inc. (many authors)
-
-   * Files: ext/http-parser/*
-   * Home page: https://github.com/joyent/http-parser/
-   * License grant: MIT/Expat
-
- * C++11 json (nlohmann/json) by Niels Lohmann
-
-   * Files: ext/json/*
-   * Home page: https://github.com/nlohmann/json
-   * License grant: MIT
-
- * tap-windows6 by the OpenVPN project
-
-   * Files: windows/TapDriver6/*
-   * Home page: https://github.com/OpenVPN/tap-windows6/
-   * License grant: GNU GPL v2
-   * ZeroTier Modifications: change name of driver to ZeroTier, add ioctl() to get L2 multicast memberships (source is in ext/ and modifications inherit GPL)
-
- * Salsa20 stream cipher, Curve25519 elliptic curve cipher, Ed25519 digital signature algorithm, and Poly1305 MAC algorithm, all by Daniel J. Bernstein
-
-   * Files: node/Salsa20.* node/C25519.* node/Poly1305.*
-   * Home page: http://cr.yp.to/
-   * License grant: public domain
-   * ZeroTier Modifications: slight cryptographically-irrelevant modifications for inclusion into ZeroTier core
-
- * MiniUPNPC and libnatpmp by Thomas Bernard
-
-   * Files: ext/libnatpmp/* ext/miniupnpc/*
-   * Home page: http://miniupnp.free.fr/
-   * License grant: BSD attribution no-endorsement
-
- * cpp-httplib by yhirose
-
-   * Files: ext/cpp-httplib/*
-   * Home page: https://github.com/yhirose/cpp-httplib
-   * License grant: MIT

+ 0 - 12
COPYING

@@ -1,12 +0,0 @@
-ZeroTier One, an endpoint server for the ZeroTier virtual network layer.
-Copyright © 2011–2019 ZeroTier, Inc.
-
-ZeroTier is released under the terms of the BSL version 1.1. See the
-file LICENSE.txt for details.
-
-..
-    Local variables:
-    coding: utf-8
-    mode: text
-    End:
-    vim: fileencoding=utf-8 filetype=text :

+ 3 - 3
Dockerfile.release

@@ -1,6 +1,6 @@
 # vim: ft=dockerfile
 
-FROM debian:bullseye
+FROM debian:bookworm
 
 ARG VERSION
 
@@ -9,9 +9,9 @@ RUN mkdir -p /usr/share/zerotier && \
     curl -o /usr/share/zerotier/tmp.asc "https://download.zerotier.com/contact%40zerotier.com.gpg" && \
     gpg --no-default-keyring --keyring /usr/share/zerotier/zerotier.gpg --import /usr/share/zerotier/tmp.asc && \
     rm -f /usr/share/zerotier/tmp.asc && \
-    echo "deb [signed-by=/usr/share/zerotier/zerotier.gpg] http://download.zerotier.com/debian/bullseye bullseye main" > /etc/apt/sources.list.d/zerotier.list
+    echo "deb [signed-by=/usr/share/zerotier/zerotier.gpg] http://download.zerotier.com/debian/bookworm bookworm main" > /etc/apt/sources.list.d/zerotier.list
 
-RUN apt-get update -qq && apt-get install zerotier-one=${VERSION} curl iproute2 net-tools iputils-ping openssl libssl1.1 -y
+RUN apt-get update -qq && apt-get install zerotier-one=${VERSION} curl iproute2 net-tools iputils-ping openssl libssl3 -y
 RUN rm -rf /var/lib/zerotier-one
 
 COPY entrypoint.sh.release /entrypoint.sh

+ 373 - 0
LICENSE-MPL.txt

@@ -0,0 +1,373 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+    means each individual or legal entity that creates, contributes to
+    the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+    means the combination of the Contributions of others (if any) used
+    by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+    means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+    means Source Code Form to which the initial Contributor has attached
+    the notice in Exhibit A, the Executable Form of such Source Code
+    Form, and Modifications of such Source Code Form, in each case
+    including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+    means
+
+    (a) that the initial Contributor has attached the notice described
+        in Exhibit B to the Covered Software; or
+
+    (b) that the Covered Software was made available under the terms of
+        version 1.1 or earlier of the License, but not also under the
+        terms of a Secondary License.
+
+1.6. "Executable Form"
+    means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+    means a work that combines Covered Software with other material, in
+    a separate file or files, that is not Covered Software.
+
+1.8. "License"
+    means this document.
+
+1.9. "Licensable"
+    means having the right to grant, to the maximum extent possible,
+    whether at the time of the initial grant or subsequently, any and
+    all of the rights conveyed by this License.
+
+1.10. "Modifications"
+    means any of the following:
+
+    (a) any file in Source Code Form that results from an addition to,
+        deletion from, or modification of the contents of Covered
+        Software; or
+
+    (b) any new file in Source Code Form that contains any Covered
+        Software.
+
+1.11. "Patent Claims" of a Contributor
+    means any patent claim(s), including without limitation, method,
+    process, and apparatus claims, in any patent Licensable by such
+    Contributor that would be infringed, but for the grant of the
+    License, by the making, using, selling, offering for sale, having
+    made, import, or transfer of either its Contributions or its
+    Contributor Version.
+
+1.12. "Secondary License"
+    means either the GNU General Public License, Version 2.0, the GNU
+    Lesser General Public License, Version 2.1, the GNU Affero General
+    Public License, Version 3.0, or any later versions of those
+    licenses.
+
+1.13. "Source Code Form"
+    means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+    means an individual or a legal entity exercising rights under this
+    License. For legal entities, "You" includes any entity that
+    controls, is controlled by, or is under common control with You. For
+    purposes of this definition, "control" means (a) the power, direct
+    or indirect, to cause the direction or management of such entity,
+    whether by contract or otherwise, or (b) ownership of more than
+    fifty percent (50%) of the outstanding shares or beneficial
+    ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+    Licensable by such Contributor to use, reproduce, make available,
+    modify, display, perform, distribute, and otherwise exploit its
+    Contributions, either on an unmodified basis, with Modifications, or
+    as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+    for sale, have made, import, and otherwise transfer either its
+    Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+    or
+
+(b) for infringements caused by: (i) Your and any other third party's
+    modifications of Covered Software, or (ii) the combination of its
+    Contributions with other software (except as part of its Contributor
+    Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+    its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+    Form, as described in Section 3.1, and You must inform recipients of
+    the Executable Form how they can obtain a copy of such Source Code
+    Form by reasonable means in a timely manner, at a charge no more
+    than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+    License, or sublicense it under different terms, provided that the
+    license for the Executable Form does not attempt to limit or alter
+    the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+*                                                                      *
+*  6. Disclaimer of Warranty                                           *
+*  -------------------------                                           *
+*                                                                      *
+*  Covered Software is provided under this License on an "as is"       *
+*  basis, without warranty of any kind, either expressed, implied, or  *
+*  statutory, including, without limitation, warranties that the       *
+*  Covered Software is free of defects, merchantable, fit for a        *
+*  particular purpose or non-infringing. The entire risk as to the     *
+*  quality and performance of the Covered Software is with You.        *
+*  Should any Covered Software prove defective in any respect, You     *
+*  (not any Contributor) assume the cost of any necessary servicing,   *
+*  repair, or correction. This disclaimer of warranty constitutes an   *
+*  essential part of this License. No use of any Covered Software is   *
+*  authorized under this License except under this disclaimer.         *
+*                                                                      *
+************************************************************************
+
+************************************************************************
+*                                                                      *
+*  7. Limitation of Liability                                          *
+*  --------------------------                                          *
+*                                                                      *
+*  Under no circumstances and under no legal theory, whether tort      *
+*  (including negligence), contract, or otherwise, shall any           *
+*  Contributor, or anyone who distributes Covered Software as          *
+*  permitted above, be liable to You for any direct, indirect,         *
+*  special, incidental, or consequential damages of any character      *
+*  including, without limitation, damages for lost profits, loss of    *
+*  goodwill, work stoppage, computer failure or malfunction, or any    *
+*  and all other commercial damages or losses, even if such party      *
+*  shall have been informed of the possibility of such damages. This   *
+*  limitation of liability shall not apply to liability for death or   *
+*  personal injury resulting from such party's negligence to the       *
+*  extent applicable law prohibits such limitation. Some               *
+*  jurisdictions do not allow the exclusion or limitation of           *
+*  incidental or consequential damages, so this exclusion and          *
+*  limitation may not apply to You.                                    *
+*                                                                      *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+  This Source Code Form is subject to the terms of the Mozilla Public
+  License, v. 2.0. If a copy of the MPL was not distributed with this
+  file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+  This Source Code Form is "Incompatible With Secondary Licenses", as
+  defined by the Mozilla Public License, v. 2.0.

+ 3 - 147
LICENSE.txt

@@ -1,149 +1,5 @@
------------------------------------------------------------------------------
+See LICENSE-MPL.txt for all code in node/, osdep/. service/, and everywhere else except ext/ and nonfree/.
 
-Business Source License 1.1
+See nonfree/LICENSE.md for all non-free ("source available") portions of this repository.
 
-License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
-"Business Source License" is a trademark of MariaDB Corporation Ab.
-
------------------------------------------------------------------------------
-
-Parameters
-
-Licensor:             ZeroTier, Inc.
-Licensed Work:        ZeroTier Network Virtualization Engine 1.4.4
-                      The Licensed Work is (c)2019 ZeroTier, Inc.
-Additional Use Grant: You may make use of the Licensed Work, provided you
-                      do not use it in any of the following ways:
-
-                      * Sell hosted ZeroTier services as a "SaaS" Product
-
-                      (1) Operate or sell access to ZeroTier root servers,
-                      network controllers, or authorization key or certificate
-                      generation components of the Licensed Work as a
-                      for-profit service, regardless of whether the use of
-                      these components is sold alone or is bundled with other
-                      services. Note that this does not apply to the use of
-                      ZeroTier behind the scenes to operate a service not
-                      related to ZeroTier network administration.
-
-                      * Create Non-Open-Source Commercial Derivative Works
-
-                      (2) Link or directly include the Licensed Work in a
-                      commercial or for-profit application or other product
-                      not distributed under an Open Source Initiative (OSI)
-                      compliant license. See: https://opensource.org/licenses
-
-                      (3) Remove the name, logo, copyright, or other branding
-                      material from the Licensed Work to create a "rebranded"
-                      or "white labeled" version to distribute as part of
-                      any commercial or for-profit product or service.
-
-                      * Certain Government Uses
-
-                      (4) Use or deploy the Licensed Work in a government
-                      setting in support of any active government function
-                      or operation with the exception of the following:
-                      physical or mental health care, family and social
-                      services, social welfare, senior care, child care, and
-                      the care of persons with disabilities.
-
-Change Date:          2026-01-01
-
-Change License:       Apache License version 2.0 as published by the Apache
-                      Software Foundation
-											https://www.apache.org/licenses/
-
-Alternative Licensing
-
-If you would like to use the Licensed Work in any way that conflicts with
-the stipulations of the Additional Use Grant, contact ZeroTier, Inc. to
-obtain an alternative commercial license.
-
-Visit us on the web at: https://www.zerotier.com/
-
-Notice
-
-The Business Source License (this document, or the "License") is not an Open
-Source license. However, the Licensed Work will eventually be made available
-under an Open Source License, as stated in this License.
-
-For more information on the use of the Business Source License for ZeroTier
-products, please visit our pricing page which contains license details and
-and license FAQ: https://zerotier.com/pricing
-
-For more information on the use of the Business Source License generally,
-please visit the Adopting and Developing Business Source License FAQ at
-https://mariadb.com/bsl-faq-adopting.
-
------------------------------------------------------------------------------
-
-Business Source License 1.1
-
-Terms
-
-The Licensor hereby grants you the right to copy, modify, create derivative
-works, redistribute, and make non-production use of the Licensed Work. The
-Licensor may make an Additional Use Grant, above, permitting limited
-production use.
-
-Effective on the Change Date, or the fourth anniversary of the first publicly
-available distribution of a specific version of the Licensed Work under this
-License, whichever comes first, the Licensor hereby grants you rights under
-the terms of the Change License, and the rights granted in the paragraph
-above terminate.
-
-If your use of the Licensed Work does not comply with the requirements
-currently in effect as described in this License, you must purchase a
-commercial license from the Licensor, its affiliated entities, or authorized
-resellers, or you must refrain from using the Licensed Work.
-
-All copies of the original and modified Licensed Work, and derivative works
-of the Licensed Work, are subject to this License. This License applies
-separately for each version of the Licensed Work and the Change Date may vary
-for each version of the Licensed Work released by Licensor.
-
-You must conspicuously display this License on each original or modified copy
-of the Licensed Work. If you receive the Licensed Work in original or
-modified form from a third party, the terms and conditions set forth in this
-License apply to your use of that work.
-
-Any use of the Licensed Work in violation of this License will automatically
-terminate your rights under this License for the current and all other
-versions of the Licensed Work.
-
-This License does not grant you any right in any trademark or logo of
-Licensor or its affiliates (provided that you may use a trademark or logo of
-Licensor as expressly required by this License).
-
-TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
-AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
-EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
-TITLE.
-
------------------------------------------------------------------------------
-
-MariaDB hereby grants you permission to use this License’s text to license
-your works, and to refer to it using the trademark "Business Source License",
-as long as you comply with the Covenants of Licensor below.
-
-Covenants of Licensor
-
-In consideration of the right to use this License’s text and the "Business
-Source License" name and trademark, Licensor covenants to MariaDB, and to all
-other recipients of the licensed work to be provided by Licensor:
-
-1. To specify as the Change License the GPL Version 2.0 or any later version,
-   or a license that is compatible with GPL Version 2.0 or a later version,
-   where "compatible" means that software provided under the Change License can
-   be included in a program with software provided under GPL Version 2.0 or a
-   later version. Licensor may specify additional Change Licenses without
-   limitation.
-
-2. To either: (a) specify an additional grant of rights to use that does not
-   impose any additional restriction on the right granted in this License, as
-   the Additional Use Grant; or (b) insert the text "None".
-
-3. To specify a Change Date.
-
-4. Not to modify this License in any other way.
+Code in ext/ is external code included for build convenience or backward compatibility and retains its original license.

+ 3 - 0
Makefile

@@ -31,3 +31,6 @@ drone:
 	@echo "rendering .drone.yaml from .drone.jsonnet"
 	drone jsonnet --format --stream
 	drone sign zerotier/ZeroTierOne --save
+
+clang-format:
+	find node osdep service tcp-proxy nonfree/controller -iname '*.cpp' -o -iname '*.hpp' | xargs clang-format -i

+ 1 - 1
OFFICIAL-RELEASE-STEPS.md

@@ -30,4 +30,4 @@ You will need [Packages](http://s.sudre.free.fr/Software/Packages/about.html) an
 
 ## Windows
 
-First load the Visual Studio solution and rebuild the UI and ZeroTier One in both x64 and i386 `Release` mode. Then load [Advanced Installer Enterprise](http://www.advancedinstaller.com/), check that the version is correct, and build. The build will fail if any build artifacts are missing, and Windows must have our product singing key (from DigiCert) available to sign the resulting MSI file. The MSI must then be tested on at least a few different CLEAN Windows VMs to ensure that the installer is valid and properly signed.
+First load the Visual Studio solution and rebuild the UI and ZeroTier One in both x64, i386, and arm64 `Release` mode. Then load [Advanced Installer Enterprise](http://www.advancedinstaller.com/), check that the version is correct, and build. The build will fail if any build artifacts are missing, and Windows must have our product singing key (from DigiCert) available to sign the resulting MSI file. The MSI must then be tested on at least a few different CLEAN Windows VMs to ensure that the installer is valid and properly signed.

+ 1 - 0
README.docker.md

@@ -64,6 +64,7 @@ You can control a few settings including the identity used and the authtoken use
 - `ZEROTIER_API_SECRET`: replaces the `authtoken.secret` before booting and allows you to manage the control socket's authentication key.
 - `ZEROTIER_IDENTITY_PUBLIC`: the `identity.public` file for zerotier-one. Use `zerotier-idtool` to generate one of these for you.
 - `ZEROTIER_IDENTITY_SECRET`: the `identity.secret` file for zerotier-one. Use `zerotier-idtool` to generate one of these for you.
+- `ZEROTIER_LOCAL_CONF`: Sets the the `local.conf` file content for zerotier-one
 
 ### Tips
 

+ 109 - 158
RELEASE-NOTES.md

@@ -1,7 +1,71 @@
 ZeroTier Release Notes
 ======
 
-# 2024-09-12 -- Version 1.14.1
+## 2025-08-21 -- Version 1.16.0
+
+  * License Changes
+    * The core (`node/` and `include/`) and the service (`service/` and `osdep/`) are now under the Mozilla Public License (MPL).
+    * The network controller (`controller/`) is now under a commercial source-available license.
+    * Use `make ZT_NONFREE=1` to build non-MPL components.
+    * Building with `ZT_NONFREE=1` changes the license of the resulting executable to a proprietary commercial license vs. MPL.
+  * Default binary builds no longer contain the controller.
+  * Network-Specific Relays (preview / beta)
+    * It is now possible to designate one or more nodes as network-specific relays to be used in preference to roots for relayed traffic between members of a network. These nodes need not necessarily be members of the network.
+    * "Moons" are now considered even more extra *deprecated* and should not be used in new deployments.
+    * We will announce support for network-specific relays once we have worked with some users to test and performed more internal validation.
+  * HELLO packet encryption is now available by enabling the `encryptedHelloEnabled` settting in `local.conf`.
+    * HELLO packets contain no data, only public keys and very basic meta-data like protocol version information.
+    * Most users won't care about this, but if you require this for e.g. compliance reasons you can enable. This adds a small amount of CPU and bandwidth overhead to the HELLO sign-on process.
+  * Small Fixes
+    * Code has been reformatted using `clang-format` with a `.clang-format` definition in the repo. Typing `make clang-format` executes this against all main core and service C++ files.
+    * Bridges are no longer counted toward multicast limits.
+    * A flow designation issue in bridged traffic under multipath scenarios has been fixed.
+    * Library version updates for OIDC and other features.
+    * Antiquated and unused software update code removed for precautionary reasons.
+    * Compiler warnings removed through removing use of deprecated functions on some platforms.
+    * Other minor bug fixes.
+
+  * Merged PRs:
+    * PR #2495: Hosted controller changes for cv1 os/arch reporting
+    * PR #2493: Add a warning about missing DNS functionality on Linux
+    * PR #2491: Fix: standardize bond link selection method JSON field naming
+    * PR #2489: Fix link select field in bond CLI
+    * PR #2487: Windows installer fixes
+    * PR #2486: Add 'apt update' to validation action
+    * PR #2482: Add OpenTelemetry support in Central Controllers
+    * PR #2481: Rust warning removal, clippy allows, update library versions
+    * PR #2477: Don't count bridges towards multicast limit. Send to all bridges
+    * PR #2475: clang-format
+    * PR #2474: Hello encryption
+    * PR #2452: CV2 db schema support
+    * PR #2451: Bump crossbeam-channel from 0.5.13 to 0.5.15 in /rustybits
+    * PR #2450: Bump tokio from 1.42.0 to 1.43.1 in /rustybits
+    * PR #2449: Bump openssl from 0.10.70 to 0.10.72 in /rustybits
+    * PR #2445: Allow setting local.conf content from Docker environment variable
+    * PR #2444: Temporal sdk fix
+    * PR #2443: Fix AuthInfo Provider not being set
+    * PR #2442: Bump ring from 0.17.8 to 0.17.13 in /rustybits
+    * PR #2441: Run CI on pull requests
+    * PR #2438: Add custom control plane for third-party device vendors
+    * PR #2432: Update upload-artifact action to use v4
+    * PR #2430: Bump openssl from 0.10.68 to 0.10.70 in /rustybits
+    * PR #2427: Fix active backup link selection
+    * PR #2417: Update rust dependencies
+    * PR #2409: Bump rustls from 0.23.15 to 0.23.18 in /rustybits
+    * PR #2405: Build fix for OpenBSD - See ticket #2397
+
+----
+
+# 1.14
+
+## 2024-10-23 -- Version 1.14.2
+
+  * Fix for missing entitlement on macOS Sequoia.
+  * Fix for a problem correctly parsing local.conf to enable low bandwidth mode.
+  * Increment versions of some dependent libraries.
+  * Other fixes.
+
+## 2024-09-12 -- Version 1.14.1
 
   * Multithreaded packet I/O support! Currently this is just for Linux and must
     be enabled in local.conf. It will likely make the largest difference on small
@@ -17,7 +81,7 @@ ZeroTier Release Notes
     to network controllers when networks are joined so it can be displayed to
     network admins and in the future used in policy checking and inventory operations.
 
-# 2024-05-02 -- Version 1.14.0
+## 2024-05-02 -- Version 1.14.0
 
   * Linux I/O performance improvements under heavy load
   * Improvements to multipath
@@ -26,18 +90,22 @@ ZeroTier Release Notes
   * Controller API enhancements: node names and other node meta-data
   * Other bug fixes
 
-# 2023-09-12 -- Version 1.12.2
+----
+
+# 1.12 and Older
+
+## 2023-09-12 -- Version 1.12.2
 
   * More improvements to macOS full tunnel mode.
   * Faster recovery after changes to physical network settings.
 
-# 2023-08-25 -- Version 1.12.1
+## 2023-08-25 -- Version 1.12.1
 
   * Minor release to fix a port binding issue in Linux.
   * Update Debian dependencies.
   * No changes for other platforms.
 
-# 2023-08-23 -- Version 1.12.0
+## 2023-08-23 -- Version 1.12.0
 
   * Experimental Windows ARM64 support
   * Fix numerous sleep/wake issues on macOS and other platforms
@@ -47,17 +115,17 @@ ZeroTier Release Notes
   * Numerous macOS DNS fixes
   * 10-30% speed improvement on Linux
 
-# 2023-03-23 -- Version 1.10.6
+## 2023-03-23 -- Version 1.10.6
 
   * Prevent binding temporary ipv6 addresses on macos (#1910)
   * Prevent path-learning loops (#1914)
   * Prevent infinite loop of UAC prompts in tray app
 
-# 2023-03-10 -- Version 1.10.5
+## 2023-03-10 -- Version 1.10.5
 
  * Fix for high CPU usage bug on Windows
 
-# 2023-03-07 -- Version 1.10.4
+## 2023-03-07 -- Version 1.10.4
 
  * SECURITY FIX (Windows): this version fixes a file permission problem on
    Windows that could allow non-privileged users on a Windows system to read
@@ -66,11 +134,10 @@ ZeroTier Release Notes
    instance without appropriate local permissions. This issue is not remotely
    exploitable unless a remote user can read arbitrary local files, and does
    not impact other operating systems.
-
  * Fix a bug in the handling of multiple IP address assignments to virtual
    interfaces on macOS.
 
-# 2023-02-15 -- Version 1.10.3
+## 2023-02-15 -- Version 1.10.3
 
  * Fix for duplicate paths in client. Could cause connectivity issues. Affects all platforms.
  * Fix for Ethernet Tap MTU setting, would not properly apply on Linux.
@@ -82,7 +149,7 @@ ZeroTier Release Notes
  * Fix bug that prevented setting of custom TCP relay address.
  * Build script improvements and bug fixes.
 
-# 2022-11-01 -- Version 1.10.2
+## 2022-11-01 -- Version 1.10.2
 
  * Fix another SSO "stuck client" issue in zeroidc.
  * Expose root-reported external IP/port information via the local JSON API for better diagnostics.
@@ -93,12 +160,12 @@ ZeroTier Release Notes
 
 Note that releases are coming few and far between because most of our dev effort is going into version 2.
 
-# 2022-06-27 -- Version 1.10.1
+## 2022-06-27 -- Version 1.10.1
 
  * Fix an issue that could cause SSO clients to get "stuck" on stale auth URLs.
  * A few other SSO related bug fixes.
 
-# 2022-06-07 -- Version 1.10.0
+## 2022-06-07 -- Version 1.10.0
 
  * Fix formatting problem in `zerotier-cli` when using SSO networks.
  * Fix a few other minor bugs in SSO signin to prepare for general availability.
@@ -107,11 +174,11 @@ Note that releases are coming few and far between because most of our dev effort
  * Use system default browser for SSO login so all your plugins, MFA devices, password managers, etc. will work as you have them configured.
  * Minor fix for bonding/multipath.
 
-# 2022-05-10 -- Version 1.8.10
+## 2022-05-10 -- Version 1.8.10
 
  * Fixed a bug preventing SSO sign-on on Windows.
 
-# 2022-04-25 -- Version 1.8.9
+## 2022-04-25 -- Version 1.8.9
 
  * Fixed a long-standing and strange bug that was causing sporadic "phantom" packet authentication failures. Not a security problem but could be behind sporadic reports of link failures under some conditions.
  * Fixed a memory leak in SSO/OIDC support.
@@ -120,26 +187,26 @@ Note that releases are coming few and far between because most of our dev effort
  * Fixed a deadlock bug on leaving SSO/OIDC managed networks.
  * Added some new Linux distributions to the build subsystem.
 
-# 2022-04-11 -- Version 1.8.8
+## 2022-04-11 -- Version 1.8.8
 
  * Fix a local privilege escalation bug in the Windows installer.
  * Dependency fix for some Ubuntu versions.
  * No changes for other platforms. Windows upgrade recommended, everyone else optional.
 
-# 2022-03-30 -- Version 1.8.7
+## 2022-03-30 -- Version 1.8.7
 
  * Fix for dependency installations in Windows MSI package.
  * Fix for desktop UI setup when run by a non-super-user.
  * Bug fix in local OIDC / SSO support for auth0 and other providers.
  * Other minor fixes for e.g. old Linux distributions.
 
-# 2022-03-04 -- Version 1.8.6
+## 2022-03-04 -- Version 1.8.6
 
  * Fixed an issue that could cause the UI to be non-responsive if not joined to any networks.
  * Fix dependency issues in Debian and RedHat packages for some distributions (Fedora, Mint).
  * Bumped the peer cache serialization version to prevent "coma" issues on upgrade due to changes in path logic behaving badly with old values.
 
-# 2022-02-22 -- Version 1.8.5
+## 2022-02-22 -- Version 1.8.5
 
  * Plumbing under the hood for endpoint device SSO support.
  * Fix in LinuxEthernetTap to tap device support on very old (2.6) Linux kernels.
@@ -147,7 +214,7 @@ Note that releases are coming few and far between because most of our dev effort
  * Merge a series of changes by Joseph Henry (of ZeroTier) that should fix some edge cases where ZeroTier would "forget" valid paths.
  * Minor multipath improvements for automatic path negotiation.
 
-# 2021-11-30 -- Version 1.8.4
+## 2021-11-30 -- Version 1.8.4
 
  * Fixed an ugly font problem on some older macOS versions.
  * Fixed a bug that could cause the desktop tray app control panel to stop opening after a while on Windows.
@@ -155,7 +222,7 @@ Note that releases are coming few and far between because most of our dev effort
  * Fixed installation on 32-bit Windows 10.
  * Fixed a build flags issue that could cause ZeroTier to crash on older ARM32 CPUs.
 
-# 2021-11-15 -- Version 1.8.3
+## 2021-11-15 -- Version 1.8.3
 
  * Remove problematic spinlock, which was only used on x86_64 anyway. Just use pthread always.
  * Fix fd leak on MacOS that caused non-responsiveness after some time.
@@ -163,14 +230,14 @@ Note that releases are coming few and far between because most of our dev effort
  * Fix regression that could prevent managed routes from being deleted.
  * DesktopUI: Remove NSDate:now() call, now works on MacOS 10.13 or newer!
 
-# 2021-11-08 -- Version 1.8.2
+## 2021-11-08 -- Version 1.8.2
 
  * Fix multicast on linux.
  * Fix a bug that could cause the tap adapter to have the wrong MAC on Linux.
  * Update build flags to possibly support MacOS older than 10.14, but more work needs to be done. It may not work yet.
  * Fix path variable setting on Windows.
 
-# 2021-10-28 -- Version 1.8.1
+## 2021-10-28 -- Version 1.8.1
 
  * Fix numerous UI issues from 1.8.0 (never fully released).
  * Remove support for REALLY ancient 1.1.6 or earlier network controllers.
@@ -180,7 +247,7 @@ Note that releases are coming few and far between because most of our dev effort
 
  * NOTE: Windows 7 is no longer supported! Windows 7 users will have to use version 1.6.5 or earlier.
 
-# 2021-09-15 -- Version 1.8.0 (preview release only)
+## 2021-09-15 -- Version 1.8.0 (preview release only)
 
  * A *completely* rewritten desktop UI for Mac and Windows!
  * Implement a workaround for one potential source of a "coma" bug, which can occur if buggy NATs/routers stop allowing the service to communicate on a given port. ZeroTier now reassigns a new secondary port if it's offline for a while unless a secondary port is manually specified in local.conf. Working around crummy buggy routers is an ongoing effort.
@@ -191,32 +258,32 @@ Note that releases are coming few and far between because most of our dev effort
  * Check if DNS servers need to be applied on macOS
  * Upgrade json.hpp dependency to version 3.10.2
 
-# 2021-09-21 -- Version 1.6.6
+## 2021-09-21 -- Version 1.6.6
 
  * Backport COM hash check mitigation against network member impersonation.
 
-# 2021-04-13 -- Version 1.6.5
+## 2021-04-13 -- Version 1.6.5
 
  * Fix a bug in potential network path filtering that could in some circumstances lead to "software laser" effects.
  * Fix a printf overflow in zerotier-cli (not exploitable or a security risk)
  * Windows now looks up the name of ZeroTier devices instead of relying on them having "ZeroTier" in them.
 
-# 2021-02-15 -- Version 1.6.4
+## 2021-02-15 -- Version 1.6.4
 
  * The groundhog saw his shadow, which meant that the "connection coma" bug still wasn't gone. We think we found it this time.
 
-# 2021-02-02 -- Version 1.6.3
+## 2021-02-02 -- Version 1.6.3
 
  * Likely fix for GitHub issue #1334, an issue that could cause ZeroTier to
    go into a "coma" on some networks.
  * Also groundhog day
 
-# 2020-11-30 -- Version 1.6.2
+## 2020-11-30 -- Version 1.6.2
 
  * Fix an ARM hardware AES crypto issue (not an exploitable vulnerability).
  * Fix a Linux network leave hang due to a mutex deadlock.
 
-# 2020-11-24 -- Version 1.6.1
+## 2020-11-24 -- Version 1.6.1
 
 This release fixes some minor bugs and other issues in 1.6.0.
 
@@ -226,7 +293,7 @@ This release fixes some minor bugs and other issues in 1.6.0.
  * Merged CLI options for controlling bonded devices into the beta multipath code.
  * Updated Windows driver with Microsoft cross-signing to fix issues on some Windows systems.
 
-# 2020-11-19 -- Version 1.6.0
+## 2020-11-19 -- Version 1.6.0
 
 Version 1.6.0 is a major release that incorporates back-ported features from the 2.0 branch, which is still under development. It also fixes a number of issues.
 
@@ -267,7 +334,7 @@ Known issues that are not yet fixed in this beta:
 
 We're trying to fix all these issues before the 1.6.0 release. Stay tuned.
 
-# 2019-08-30 -- Version 1.4.6
+## 2019-08-30 -- Version 1.4.6
 
  * Update default root list to latest
  * ARM32 platform build and flag fixes
@@ -276,19 +343,19 @@ We're trying to fix all these issues before the 1.6.0 release. Stay tuned.
  * Windows service now looks for service command line arguments
  * Fixed a bug that could cause excessive queued multicasts
 
-# 2019-08-23 -- Version 1.4.4
+## 2019-08-23 -- Version 1.4.4
 
  * Change license from GPL3 to BSL 1.1, see LICENSE.txt
  * Fix an issue with the "ipauth" rule and auto-generated unforgeable IPv6 addresses
  * Fix socket/bind errors setting IPs and routes on Linux
 
-# 2019-08-12 -- Version 1.4.2
+## 2019-08-12 -- Version 1.4.2
 
  * Fix high CPU use bug on some platforms
  * Fix issues with PostgreSQL controller DB (only affects Central)
  * Restore backward compatibility with MacOS versions prior to 10.13
 
-# 2019-07-29 -- Version 1.4.0
+## 2019-07-29 -- Version 1.4.0
 
 ### Major Changes
 
@@ -306,20 +373,20 @@ We're trying to fix all these issues before the 1.6.0 release. Stay tuned.
  * Fixed numerous other small issues and bugs such as ARM alignment issues causing crashes on some devices.
  * Windows now sets the adapter name such that it is consistent in both the Windows UI and command line utilities.
 
-# 2018-07-27 -- Version 1.2.12
+## 2018-07-27 -- Version 1.2.12
 
  * Fixed a bug that caused exits to take a long time on Mac due to huge numbers of redundant attempts to delete managed routes.
  * Fixed a socket limit problem on Windows that caused the ZeroTier service to run out of sockets, causing the UI and CLI to be unable to access the API.
  * Fixed a threading bug in the ZeroTier Core, albeit one that never manifested on the regular ZeroTier One service/client.
  * Fixed a bug that could cause the service to crash if an authorized local client accessed an invalid URL via the control API. (Not exploitable since you needed admin access anyway.)
 
-# 2018-05-08 -- Version 1.2.10
+## 2018-05-08 -- Version 1.2.10
 
  * Fix bug loading `moons.d/` files for federated root operation.
  * Fix compile problem with ZT_DEBUG on some versions of `clang`
  * Fix slow network startup bug related to loading of `networks.d/` cache files
 
-# 2018-04-27 -- Version 1.2.8
+## 2018-04-27 -- Version 1.2.8
 
  * Linux version once again builds with PIE (position independent executable) flags
  * Fixed bug in zerotier-idtool file sign and verify
@@ -327,7 +394,7 @@ We're trying to fix all these issues before the 1.6.0 release. Stay tuned.
  * Merged alpha NetBSD support (mostly untested, so YMMV)
  * Merged several minor typo and one-liner bug fixes
 
-# 2018-04-17 -- Version 1.2.6
+## 2018-04-17 -- Version 1.2.6
 
  * Features and Core Improvements
     * Path selection has been overhauled to improve path stability, simplify code, and prepare for multi-path and trunking in the next major release.
@@ -362,7 +429,7 @@ We're trying to fix all these issues before the 1.6.0 release. Stay tuned.
         * Multicast now works on Android in most cases! Android apps can send and receive multicast and subscribe to multicast group IPs. Note that in some cases the app must bind to the specific correct interface for this to work.
         * IPv6 can be disabled in UI for cases where it causes problems.
 
-# 2017-04-20 -- Version 1.2.4
+## 2017-04-20 -- Version 1.2.4
 
  * Managed routes are now only bifurcated for the default route. This is a change in behavior, though few people will probably notice. Bifurcating all managed routes was causing more trouble than it was worth for most users.
  * Up to 2X crypto speedup on x86-64 (except Windows, which will take some porting) and 32-bit ARM platforms due to integration of fast assembly language implementations of Salsa20/12 from the [supercop](http://bench.cr.yp.to/supercop.html) code base. These were written by Daniel J. Bernstein and are in the public domain. My MacBook Pro (Core i5 2.8ghz) now does almost 1.5GiB/sec Salsa20/12 per core and a Raspberry Pi got a 2X boost. 64-bit ARM support and Windows support will take some work but should not be too hard.
@@ -372,128 +439,12 @@ We're trying to fix all these issues before the 1.6.0 release. Stay tuned.
  * Fixed an issue causing build problems on some MIPS architecture systems.
  * Fixed Windows forgetting routes on sleep/wake or in some other circumstances. (GitHub issue #465)
 
-# 2017-03-17 -- Version 1.2.2
+## 2017-03-17 -- Version 1.2.2
 
  * A bug causing unreliable multicast propagation (GitHub issue #461).
  * A crash in ARM binaries due to a build chain and flags problem.
  * A bug in the network controller preventing members from being listed (GitHub issue #460).
 
-# 2017-03-14 -- Version 1.2.0
+## 2017-03-14 -- Version 1.2.0
 
 Version 1.2.0 is a major milestone release representing almost nine months of work. It includes our rules engine for distributed network packet filtering and security monitoring, federated roots, and many other architectural and UI improvements and bug fixes.
-
-## New Features in 1.2.0
-
-### The ZeroTier Rules Engine
-
-The largest new feature in 1.2.0, and the product of many months of work, is our advanced network rules engine. With this release we achieve traffic control, security monitoring, and micro-segmentation capability on par with many enterprise SDN solutions designed for use in advanced data centers and corporate networks.
-
-Rules allow you to filter packets on your network and vector traffic to security observers. Security observation can be performed in-band using REDIRECT or out of band using TEE.
-
-Tags and capabilities provide advanced methods for implementing fine grained permission structures and micro-segmentation schemes without bloating the size and complexity of your rules table.
-
-See the [rules engine announcement blog post](https://www.zerotier.com/blog/?p=927) for an in-depth discussion of theory and implementation. The [manual](https://www.zerotier.com/manual.shtml) contains detailed information on rule, tag, and capability use, and the `rule-compiler/` subfolder of the ZeroTier source tree contains a JavaScript function to compile rules in our human-readable rule definition language into rules suitable for import into a network controller. (ZeroTier Central uses this same script to compile rules on [my.zerotier.com](https://my.zerotier.com/).)
-
-### Root Server Federation
-
-It's now possible to create your own root servers and add them to the root server pool on your nodes. This is done by creating what's called a "moon," which is a signed enumeration of root servers and their stable points on the network. Refer to the [manual](https://www.zerotier.com/manual.shtml) for instructions.
-
-Federated roots achieve a number of things:
-
- * You can deploy your own infrastructure to reduce dependency on ours.
- * You can deploy roots *inside your LAN* to ensure that network connectivity inside your facility still works if the Internet goes down. This is the first step toward making ZeroTier viable as an in-house SDN solution.
- * Roots can be deployed inside national boundaries for countries with data residency laws or "great firewalls." (As of 1.2.0 there is still no way to force all traffic to use these roots, but that will be easy to do in a later version.)
- * Last but not least this makes ZeroTier somewhat less centralized by eliminating any hard dependency on ZeroTier, Inc.'s infrastructure.
-
-Our roots will of course remain and continue to provide zero-configuration instant-on deployment, a secure global authority for identities, and free traffic relaying for those who can't establish peer to peer connections.
-
-### Local Configuration
-
-An element of our design philosophy is "features are bugs." This isn't an absolute dogma but more of a guiding principle. We try as hard as we can to avoid adding features, especially "knobs" that must be tweaked by a user.
-
-As of 1.2.0 we've decided that certain knobs are unavoidable, and so there is now a `local.conf` file that can be used to configure them. See the ZeroTier One documentation for these. They include:
-
- * Blacklisting interfaces you want to make sure ZeroTier doesn't use for network traffic, such as VPNs, slow links, or backplanes designated for only certain kinds of traffic.
- * Turning uPnP/NAT-PMP on or off.
- * Configuring software updates on Windows and Mac platforms.
- * Defining trusted paths (the old trusted paths file is now deprecated)
- * Setting the ZeroTier main port so it doesn't have to be changed on the command line, which is very inconvenient in many cases.
-
-### Improved In-Band Software Updates
-
-A good software update system for Windows and Mac clients has been a missing feature in previous versions. It does exist but we've been shy about using it so far due to its fragility in some environments.
-
-We've greatly improved this mechanism in 1.2.0. Not only does it now do a better job of actually invoking the update, but it also transfers updates in-band using the ZeroTier protocol. This means it can work in environments that do not allows http/https traffic or that force it through proxies. There's also now an update channel setting: `beta` or `release` (the default).
-
-Software updates are authenticated three ways:
-
- 1. ZeroTier's own signing key is used to sign all updates and this signature is checked prior to installation. ZeroTier, Inc.'s signatures are performed on an air-gapped machine.
-
- 2. Updates for Mac and Windows are signed using Apple and Microsoft (DigiCert EV) keys and will not install unless these signatures are also valid.
-
- 3. The new in-band update mechanism also authenticates the source of the update via ZeroTier's built-in security features. This provides transport security, while 1 and 2 provide security of the update at rest.
-
-Updates are now configurable via `local.conf`. There are three options: `disable`, `download`, and `apply`. The third (apply) is the default for official builds on Windows and Mac, making updates happen silently and automatically as they do for popular browsers like Chrome and Firefox. Updates are disabled by default on Linux and other Unix-type systems as these are typically updated through package managers.
-
-### Path Link Quality Awareness
-
-Version 1.2.0 is now aware of the link quality of direct paths with other 1.2.0 nodes. This information isn't used yet but is visible through the JSON API. (Quality always shows as 100% with pre-1.2.0 nodes.) Quality is measured passively with no additional overhead using a counter based packet loss detection algorithm.
-
-This information is visible from the command line via `listpeers`:
-
-    200 listpeers XXXXXXXXXX 199.XXX.XXX.XXX/9993;10574;15250;1.00 48 1.2.0 LEAF
-    200 listpeers XXXXXXXXXX 195.XXX.XXX.XXX/45584;467;7608;0.44 290 1.2.0 LEAF
-
-The first peer's path is at 100% (1.00), while the second peer's path is suffering quite a bit of packet loss (0.44).
-
-Link quality awareness is a precursor to intelligent multi-path and QoS support, which will in future versions bring us to feature parity with SD-WAN products like Cisco iWAN.
-
-### Security Improvements
-
-Version 1.2.0 adds anti-DOS (denial of service) rate limits and other hardening for improved resiliency against a number of denial of service attack scenarios.
-
-It also adds a mechanism for instantaneous credential revocation. This can be used to revoke certificates of membership instantly to kick a node off a network (for private networks) and also to revoke capabilities and tags. The new controller sends revocations by default when a peer is de-authorized.
-
-Revocations propagate using a "rumor mill" peer to peer algorithm. This means that a controller need only successfully send a revocation to at least one member of a network with connections to other active members. At this point the revocation will flood through the network peer to peer very quickly. This helps make revocations more robust in the face of poor connectivity with the controller or attempts to incapacitate the controller with denial of service attacks, as well as making revocations faster on huge networks.
-
-### Windows and Macintosh UI Improvements (ZeroTier One)
-
-The Mac has a whole new UI built natively in Objective-C. It provides a pulldown similar in appearance and operation to the Mac WiFi task bar menu.
-
-The Windows UI has also been improved and now provides a task bar icon that can be right-clicked to manage networks. Both now expose managed route and IP permissions, allowing nodes to easily opt in to full tunnel operation if you have a router configured on your network.
-
-### Ad-Hoc Networks
-
-A special kind of public network called an ad-hoc network may be accessed by joining a network ID with the format:
-
-    ffSSSSEEEE000000
-    | |   |   |
-    | |   |   Reserved for future use, must be 0
-    | |   End of port range (hex)
-    | Start of port range (hex)
-    Reserved ZeroTier address prefix indicating a controller-less network
-
-Ad-hoc networks are public (no access control) networks that have no network controller. Instead their configuration and other credentials are generated locally. Ad-hoc networks permit only IPv6 UDP and TCP unicast traffic (no multicast or broadcast) using 6plane format NDP-emulated IPv6 addresses. In addition an ad-hoc network ID encodes an IP port range. UDP packets and TCP SYN (connection open) packets are only allowed to destination ports within the encoded range.
-
-For example `ff00160016000000` is an ad-hoc network allowing only SSH, while `ff0000ffff000000` is an ad-hoc network allowing any UDP or TCP port.
-
-Keep in mind that these networks are public and anyone in the entire world can join them. Care must be taken to avoid exposing vulnerable services or sharing unwanted files or other resources.
-
-### Network Controller (Partial) Rewrite
-
-The network controller has been largely rewritten to use a simple in-filesystem JSON data store in place of SQLite, and it is now included by default in all Windows, Mac, Linux, and BSD builds. This means any desktop or server node running ZeroTier One can now be a controller with no recompilation needed.
-
-If you have data in an old SQLite3 controller we've included a NodeJS script in `controller/migrate-sqlite` to migrate data to the new format. If you don't migrate, members will start getting `NOT_FOUND` when they attempt to query for updates.
-
-## Major Bug Fixes in 1.2.0
-
- * **The Windows HyperV 100% CPU bug is FINALLY DEAD**: This long-running problem turns out to have been an issue with Windows itself, but one we were triggering by placing invalid data into the Windows registry. Microsoft is aware of the issue but we've also fixed the triggering problem on our side. ZeroTier should now co-exist quite well with HyperV and should now be able to be bridged with a HyperV virtual switch.
- * **Segmentation faults on musl-libc based Linux systems**: Alpine Linux and some embedded Linux systems that use musl libc (a minimal libc) experienced segmentation faults. These were due to a smaller default stack size. A work-around that sets the stack size for new threads has been added.
- * **Windows firewall blocks local JSON API**: On some Windows systems the firewall likes to block 127.0.0.1:9993 for mysterious reasons. This is now fixed in the installer via the addition of another firewall exemption rule.
- * **UI crash on embedded Windows due to missing fonts**: The MSI installer now ships fonts and will install them if they are not present, so this should be fixed.
-
-## Other Improvements in 1.2.0
-
- * **Improved dead path detection**: ZeroTier is now more aggressive about expiring paths that do not seem to be active. If a path seems marginal it is re-confirmed before re-use.
- * **Minor performance improvements**: We've reduced unnecessary memcpy's and made a few other performance improvements in the core.
- * **Linux static binaries**: For our official packages (the ones in the download.zerotier.com apt and yum repositories) we now build Linux binaries with static linking. Hopefully this will stop all the bug reports relating to library inconsistencies, as well as allowing our deb packages to run on a wider variety of Debian-based distributions. (There are far too many of these to support officially!) The overhead for this is very small, especially since we built our static versions against musl-libc. Distribution maintainers are of course free to build dynamically linked versions for inclusion into distributions; this only affects our official binaries.

+ 4 - 3
SECURITY.md

@@ -1,6 +1,6 @@
 # Security
 
-ZeroTier takes the security of our software products and services seriously, which 
+ZeroTier takes the security of our software products and services seriously, which
 includes all source code repositories managed through our GitHub organization.
 
 ## Supported Versions
@@ -9,8 +9,9 @@ The following versions of ZeroTier One receive security updates
 
 | Version  | Supported          |
 | -------- | ------------------ |
+| 1.16.x   | :white_check_mark: |
 | 1.14.x   | :white_check_mark: |
-| 1.12.x   | :white_check_mark: |
+| 1.12.x   | :x:                |
 | < 1.12.0 | :x:                |
 
 ## Reporting a Vulnerability
@@ -20,7 +21,7 @@ The following versions of ZeroTier One receive security updates
 Instead, please report vulnerabilities via email to [email protected]. If possible,
 please encrypt with our PGP key (see below).
 
-Please include the following information, or as much as you can provide to help us 
+Please include the following information, or as much as you can provide to help us
 understand the nature and scope of the issue:
 
   * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)

+ 0 - 459
attic/WinUI/APIHandler.cs

@@ -1,459 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Net;
-using System.IO;
-using System.Windows;
-using Newtonsoft.Json;
-using System.Diagnostics;
-using System.Windows.Threading;
-
-namespace WinUI
-{
-
-
-    public class APIHandler
-    {
-        private string authtoken;
-
-        private string url = null;
-
-        private static volatile APIHandler instance;
-        private static object syncRoot = new Object();
-
-        public delegate void NetworkListCallback(List<ZeroTierNetwork> networks);
-        public delegate void StatusCallback(ZeroTierStatus status);
-
-        private string ZeroTierAddress = "";
-
-        public static APIHandler Instance
-        {
-            get
-            {
-                if (instance == null)
-                {
-                    lock (syncRoot)
-                    {
-                        if (instance == null)
-                        {
-                            if (!initHandler())
-                            {
-                                return null;
-                            }
-                        }
-                    }
-                }
-
-                return instance;
-            }
-        }
-
-        private static bool initHandler(bool resetToken = false)
-        {
-            String localZtDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\ZeroTier\\One";
-            String globalZtDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ZeroTier\\One";
-
-            String authToken = "";
-            Int32 port = 9993;
-
-            if (resetToken)
-            {
-                instance = null;
-                if (File.Exists(localZtDir + "\\authtoken.secret"))
-                {
-                    File.Delete(localZtDir + "\\authtoken.secret");
-                }
-
-                if (File.Exists(localZtDir + "\\zerotier-one.port"))
-                {
-                    File.Delete(localZtDir + "\\zerotier-one.port");
-                }
-            }
-
-            if (!File.Exists(localZtDir + "\\authtoken.secret") || !File.Exists(localZtDir + "\\zerotier-one.port"))
-            {
-                // launch external process to copy file into place
-                String curPath = System.Reflection.Assembly.GetEntryAssembly().Location;
-                int index = curPath.LastIndexOf("\\");
-                curPath = curPath.Substring(0, index);
-                ProcessStartInfo startInfo = new ProcessStartInfo(curPath + "\\copyutil.exe", "\"" + globalZtDir + "\"" + " " + "\"" + localZtDir + "\"");
-                startInfo.Verb = "runas";
-
-
-                var process = Process.Start(startInfo);
-                process.WaitForExit();
-            }
-
-            authToken = readAuthToken(localZtDir + "\\authtoken.secret");
-
-            if ((authToken == null) || (authToken.Length <= 0))
-            {
-                MessageBox.Show("Unable to read ZeroTier One authtoken", "ZeroTier One");
-                return false;
-            }
-
-            port = readPort(localZtDir + "\\zerotier-one.port");
-            instance = new APIHandler(port, authToken);
-            return true;
-        }
-
-        private static String readAuthToken(String path)
-        {
-            String authToken = "";
-
-            if (File.Exists(path))
-            {
-                try
-                {
-                    byte[] tmp = File.ReadAllBytes(path);
-                    authToken = System.Text.Encoding.UTF8.GetString(tmp).Trim();
-                }
-                catch
-                {
-                    MessageBox.Show("Unable to read ZeroTier One Auth Token from:\r\n" + path, "ZeroTier One");
-                }
-            }
-
-            return authToken;
-        }
-
-        private static Int32 readPort(String path)
-        {
-            Int32 port = 9993;
-
-            try
-            {
-                byte[] tmp = File.ReadAllBytes(path);
-                port = Int32.Parse(System.Text.Encoding.ASCII.GetString(tmp).Trim());
-                if ((port <= 0) || (port > 65535))
-                    port = 9993;
-            }
-            catch
-            {
-            }
-
-            return port;
-        }
-
-        private APIHandler()
-        {
-            url = "http://127.0.0.1:9993";
-        }
-
-        public APIHandler(int port, string authtoken)
-        {
-            url = "http://127.0.0.1:" + port;
-            this.authtoken = authtoken;
-        }
-
-
-
-        public void GetStatus(StatusCallback cb)
-        {
-            var request = WebRequest.Create(url + "/status" + "?auth=" + authtoken) as HttpWebRequest;
-            if (request != null)
-            {
-                request.Method = "GET";
-                request.ContentType = "application/json";
-            }
-
-            try
-            {
-                var httpResponse = (HttpWebResponse)request.GetResponse();
-                if (httpResponse.StatusCode == HttpStatusCode.OK)
-                {
-                    using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
-                    {
-                        var responseText = streamReader.ReadToEnd();
-
-                        ZeroTierStatus status = null;
-                        try
-                        {
-                            status = JsonConvert.DeserializeObject<ZeroTierStatus>(responseText);
-
-                            if (ZeroTierAddress != status.Address)
-                            {
-                                ZeroTierAddress = status.Address;
-                            }
-                        }
-                        catch (JsonReaderException e)
-                        {
-                            Console.WriteLine(e.ToString());
-                        }
-                        cb(status);
-                    }
-                }
-                else if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
-                {
-                    APIHandler.initHandler(true);
-                }
-            }
-            catch (System.Net.Sockets.SocketException)
-            {
-                cb(null);
-            }
-            catch (System.Net.WebException e)
-            {
-                HttpWebResponse res = (HttpWebResponse)e.Response;
-                if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
-                {
-                    APIHandler.initHandler(true);
-                }
-                else
-                {
-                    cb(null);
-                }
-            }
-        }
-
-
-
-        public void GetNetworks(NetworkListCallback cb)
-        {
-            var request = WebRequest.Create(url + "/network" + "?auth=" + authtoken) as HttpWebRequest;
-            if (request == null)
-            {
-                cb(null);
-            }
-
-            request.Method = "GET";
-            request.ContentType = "application/json";
-            request.Timeout = 10000;
-
-            try
-            {
-                var httpResponse = (HttpWebResponse)request.GetResponse();
-
-                if (httpResponse.StatusCode == HttpStatusCode.OK)
-                {
-                    using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
-                    {
-                        var responseText = streamReader.ReadToEnd();
-
-                        List<ZeroTierNetwork> networkList = null;
-                        try
-                        {
-                            networkList = JsonConvert.DeserializeObject<List<ZeroTierNetwork>>(responseText);
-                            foreach (ZeroTierNetwork n in networkList)
-                            {
-                                // all networks received via JSON are connected by definition
-                                n.IsConnected = true;
-                            }
-                        }
-                        catch (JsonReaderException e)
-                        {
-                            Console.WriteLine(e.ToString());
-                        }
-                        cb(networkList);
-                    }
-                }
-                else if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
-                {
-                    APIHandler.initHandler(true);
-                }
-            }
-            catch (System.Net.Sockets.SocketException)
-            {
-                cb(null);
-            }
-            catch (System.Net.WebException e)
-            {
-                HttpWebResponse res = (HttpWebResponse)e.Response;
-                if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
-                {
-                    APIHandler.initHandler(true);
-                }
-                else
-                {
-                    cb(null);
-                }
-            }
-        }
-
-        public void JoinNetwork(Dispatcher d, string nwid, bool allowManaged = true, bool allowGlobal = false, bool allowDefault = false, bool allowDNS = false)
-        {
-            Task.Factory.StartNew(() =>
-            {
-                var request = WebRequest.Create(url + "/network/" + nwid + "?auth=" + authtoken) as HttpWebRequest;
-                if (request == null)
-                {
-                    return;
-                }
-
-                request.Method = "POST";
-                request.ContentType = "applicaiton/json";
-                request.Timeout = 30000;
-                try
-                {
-                    using (var streamWriter = new StreamWriter(((HttpWebRequest)request).GetRequestStream()))
-                    {
-                        string json = "{\"allowManaged\":" + (allowManaged ? "true" : "false") + "," +
-                                "\"allowGlobal\":" + (allowGlobal ? "true" : "false") + "," +
-                                "\"allowDefault\":" + (allowDefault ? "true" : "false") + "," +
-                                "\"allowDNS\":" + (allowDNS ? "true" : "false") + "}";
-                        streamWriter.Write(json);
-                        streamWriter.Flush();
-                        streamWriter.Close();
-                    }
-                }
-                catch (System.Net.WebException)
-                {
-                    d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                    {
-                        MessageBox.Show("Error Joining Network: Cannot connect to ZeroTier service.");
-                    }));
-                    return;
-                }
-
-                try
-                {
-                    var httpResponse = (HttpWebResponse)request.GetResponse();
-
-                    if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
-                    {
-                        APIHandler.initHandler(true);
-                    }
-                    else if (httpResponse.StatusCode != HttpStatusCode.OK)
-                    {
-                        Console.WriteLine("Error sending join network message");
-                    }
-                }
-                catch (System.Net.Sockets.SocketException)
-                {
-                    d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                    {
-                        MessageBox.Show("Error Joining Network: Cannot connect to ZeroTier service.");
-                    }));
-                }
-                catch (System.Net.WebException e)
-                {
-                    HttpWebResponse res = (HttpWebResponse)e.Response;
-                    if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
-                    {
-                        APIHandler.initHandler(true);
-                    }
-                    d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                    {
-                        MessageBox.Show("Error Joining Network: Cannot connect to ZeroTier service.");
-                    }));
-                }
-            });
-        }
-
-        public void LeaveNetwork(Dispatcher d, string nwid)
-        {
-            Task.Factory.StartNew(() =>
-            {
-                var request = WebRequest.Create(url + "/network/" + nwid + "?auth=" + authtoken) as HttpWebRequest;
-                if (request == null)
-                {
-                    return;
-                }
-
-                request.Method = "DELETE";
-                request.Timeout = 30000;
-
-                try
-                {
-                    var httpResponse = (HttpWebResponse)request.GetResponse();
-
-                    if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
-                    {
-                        APIHandler.initHandler(true);
-                    }
-                    else if (httpResponse.StatusCode != HttpStatusCode.OK)
-                    {
-                        Console.WriteLine("Error sending leave network message");
-                    }
-                }
-                catch (System.Net.Sockets.SocketException)
-                {
-                    d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                    {
-                        MessageBox.Show("Error Leaving Network: Cannot connect to ZeroTier service.");
-                    }));
-                }
-                catch (System.Net.WebException e)
-                {
-                    HttpWebResponse res = (HttpWebResponse)e.Response;
-                    if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
-                    {
-                        APIHandler.initHandler(true);
-                    }
-                    d.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                    {
-                        MessageBox.Show("Error Leaving Network: Cannot connect to ZeroTier service.");
-                    }));
-                }
-                catch
-                {
-                    Console.WriteLine("Error leaving network: Unknown error");
-                }
-            });
-        }
-
-        public delegate void PeersCallback(List<ZeroTierPeer> peers);
-
-        public void GetPeers(PeersCallback cb)
-        {
-            var request = WebRequest.Create(url + "/peer" + "?auth=" + authtoken) as HttpWebRequest;
-            if (request == null)
-            {
-                cb(null);
-            }
-
-            request.Method = "GET";
-            request.ContentType = "application/json";
-
-            try
-            {
-                var httpResponse = (HttpWebResponse)request.GetResponse();
-                if (httpResponse.StatusCode == HttpStatusCode.OK)
-                {
-                    using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
-                    {
-                        var responseText = streamReader.ReadToEnd();
-                        //Console.WriteLine(responseText);
-                        List<ZeroTierPeer> peerList = null;
-                        try
-                        {
-                            peerList = JsonConvert.DeserializeObject<List<ZeroTierPeer>>(responseText);
-                        }
-                        catch (JsonReaderException e)
-                        {
-                            Console.WriteLine(e.ToString());
-                        }
-                        cb(peerList);
-                    }
-                }
-                else if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
-                {
-                    APIHandler.initHandler(true);
-                }
-            }
-            catch (System.Net.Sockets.SocketException)
-            {
-                cb(null);
-            }
-            catch (System.Net.WebException e)
-            {
-                HttpWebResponse res = (HttpWebResponse)e.Response;
-                if (res != null && res.StatusCode == HttpStatusCode.Unauthorized)
-                {
-                    APIHandler.initHandler(true);
-                }
-                else
-                {
-                    cb(null);
-                }
-            }
-        }
-
-        public string NodeAddress()
-        {
-            return ZeroTierAddress;
-        }
-    }
-}

+ 0 - 35
attic/WinUI/AboutView.xaml

@@ -1,35 +0,0 @@
-<Window x:Class="WinUI.AboutView"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:WinUI"
-        mc:Ignorable="d"
-        Title="AboutView" Height="368.267" Width="300" Icon="ZeroTierIcon.ico">
-	<Grid>
-		<Image x:Name="image" HorizontalAlignment="Center" Height="100" Margin="0,10,0,0" VerticalAlignment="Top" Width="100" Source="ZeroTierIcon.ico"/>
-		<RichTextBox x:Name="richTextBox" HorizontalAlignment="Left" Height="209" Margin="10,123,0,0" VerticalAlignment="Top" Width="275" IsReadOnly="True" IsDocumentEnabled="True" BorderThickness="0" FontSize="18" RenderTransformOrigin="0.506,0.63">
-			<RichTextBox.Resources>
-				<Style TargetType="Hyperlink">
-					<Setter Property="Cursor" Value="Hand" />
-				</Style>
-			</RichTextBox.Resources>
-            <FlowDocument>
-                <Paragraph TextAlignment="Center">
-                    <Run Text="ZeroTier One"/>
-                </Paragraph>
-                <Paragraph TextAlignment="Center">
-                    <Run FontSize="14" Text="Version 1.6.6"/>
-                    <LineBreak/>
-                    <Run FontSize="14" Text="(c) 2011-2021 ZeroTier, Inc."/>
-                    <LineBreak/>
-                    <Run FontSize="14" Text="www.zerotier.com"/>
-                </Paragraph>
-                <Paragraph TextAlignment="Center">
-                    <Run FontSize="14" Text="ZeroTier One allows your computer to join virtual networks. Just select &quot;join&quot; and enter a network's 16-digit ID. Each network appears on your computer as a new network port."/>
-                </Paragraph>
-            </FlowDocument>
-        </RichTextBox>
-
-	</Grid>
-</Window>

+ 0 - 35
attic/WinUI/AboutView.xaml.cs

@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for AboutView.xaml
-    /// </summary>
-    public partial class AboutView : Window
-    {
-        public AboutView()
-        {
-            InitializeComponent();
-        }
-
-        private void Hyperlink_MouseLeftButtonDown(object sender, RequestNavigateEventArgs e)
-        {
-            var hyperlink = (Hyperlink)sender;
-            Process.Start(hyperlink.NavigateUri.ToString());
-        }
-    }
-}

+ 0 - 6
attic/WinUI/App.config

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-    <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-    </startup>
-</configuration>

+ 0 - 14
attic/WinUI/App.xaml

@@ -1,14 +0,0 @@
-<Application x:Class="WinUI.App"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             StartupUri="ToolbarItem.xaml">
-    <Application.Resources>
-         
-    	<ResourceDictionary>
-    		<ResourceDictionary.MergedDictionaries>
-    			<ResourceDictionary Source="Simple Styles.xaml"/>
-    		</ResourceDictionary.MergedDictionaries>
-    	</ResourceDictionary>
-         
-    </Application.Resources>
-</Application>

+ 0 - 25
attic/WinUI/App.xaml.cs

@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-using Hardcodet.Wpf.TaskbarNotification;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for App.xaml
-    /// </summary>
-    public partial class App : Application
-    {
-        private TaskbarIcon tb;
-
-        private void InitApplication()
-        {
-            tb = (TaskbarIcon)FindResource("NotifyIcon");
-            tb.Visibility = Visibility.Visible;
-        }
-    }
-}

+ 0 - 256
attic/WinUI/CentralAPI.cs

@@ -1,256 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    class CentralAPI
-    {
-        private static volatile CentralAPI instance;
-        private static object syncRoot = new Object();
-
-        private CookieContainer cookieContainer;
-        private HttpClientHandler clientHandler;
-        private HttpClient client;
-
-        private CentralServer server;
-        public CentralServer Central
-        {
-            get
-            {
-                return this.server;
-            }
-            set
-            {
-                this.server = value;
-                WriteCentralConfig();
-                UpdateRequestHeaders();
-            }
-        }
-
-        public static CentralAPI Instance
-        {
-            get
-            {
-                if (instance == null)
-                {
-                    lock (syncRoot)
-                    {
-                        if (instance == null)
-                        {
-                            instance = new CentralAPI();
-                        }
-                    }
-                }
-
-                return instance;
-            }
-        }
-
-
-
-        private CentralAPI()
-        {
-#if DEBUG
-            ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
-#endif
-            cookieContainer = new CookieContainer();
-            clientHandler = new HttpClientHandler
-            {
-                AllowAutoRedirect = true,
-                UseCookies = true,
-                CookieContainer = cookieContainer
-            };
-
-            client = new HttpClient(clientHandler);
-
-            string centralConfigPath = CentralConfigFile();
-            if (File.Exists(centralConfigPath))
-            {
-                byte[] tmp = File.ReadAllBytes(centralConfigPath);
-                string json = Encoding.UTF8.GetString(tmp).Trim();
-                CentralServer ctmp = JsonConvert.DeserializeObject<CentralServer>(json);
-                if (ctmp != null)
-                {
-                    Central = ctmp;
-                } 
-                else
-                {
-                    Central = new CentralServer();
-                }
-            }
-            else
-            {
-                Central = new CentralServer();
-            }
-        }
-
-        public bool HasAccessToken()
-        {
-            if (Central == null)
-                return false;
-
-            return !string.IsNullOrEmpty(Central.APIKey);
-        }
-
-        private string ZeroTierDir()
-        {
-            return Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\ZeroTier\\One";
-        }
-
-        private string CentralConfigFile()
-        {
-            return ZeroTierDir() + "\\central.conf";
-        }
-
-        public void WriteCentralConfig()
-        {
-            string json = JsonConvert.SerializeObject(Central);
-            byte[] tmp = Encoding.UTF8.GetBytes(json);
-            if (tmp != null)
-            {
-                File.WriteAllBytes(CentralConfigFile(), tmp);
-            }
-        }
-
-        private void UpdateRequestHeaders()
-        {
-            if (client.DefaultRequestHeaders.Contains("Authorization"))
-            {
-                client.DefaultRequestHeaders.Remove("Authorization");
-            }
-
-            if (!string.IsNullOrEmpty(Central.APIKey))
-            {
-                client.DefaultRequestHeaders.Add("Authorization", "bearer " + Central.APIKey);
-            }
-        }
-
-        public async Task<bool> Login(string email, string password, bool isNewUser)
-        {
-            string postURL = Central.ServerURL + "/api/_auth/local";
-            CentralLogin login = new CentralLogin(email, password, isNewUser);
-            var content = new StringContent(JsonConvert.SerializeObject(login), Encoding.UTF8, "application/json");
-            HttpResponseMessage response = await client.PostAsync(postURL, content);
-
-            if (!response.IsSuccessStatusCode)
-            {
-                return false;
-            }
-
-            string resContent = await response.Content.ReadAsStringAsync();
-
-            CentralUser user = JsonConvert.DeserializeObject<CentralUser>(resContent);
-
-            if (user.Tokens.Count == 0)
-            {
-                // create token
-                user = await CreateAuthToken(user);
-            }
-
-            Central.APIKey = user.Tokens[0];
-
-            UpdateRequestHeaders();
-            WriteCentralConfig();
-
-            return true;
-        }
-
-        public async Task<CentralUser> CreateAuthToken(CentralUser user)
-        {
-            string randomTokenURL = Central.ServerURL + "/api/randomToken";
-            HttpResponseMessage response = await client.GetAsync(randomTokenURL);
-
-            if (!response.IsSuccessStatusCode)
-            {
-                // TODO: throw an error
-                return null;
-            }
-
-            string resContent = await response.Content.ReadAsStringAsync();
-
-            CentralToken t = JsonConvert.DeserializeObject<CentralToken>(resContent);
-
-            user.Tokens.Add(t.Token);
-
-            string tokenObj = "{ \"tokens\": " + JsonConvert.SerializeObject(user.Tokens) + " } ";
-
-            string postURL = Central.ServerURL + "/api/user/" + user.Id;
-            var postContent = new StringContent(tokenObj, Encoding.UTF8, "application/json");
-            response = await client.PostAsync(postURL, postContent);
-
-            if (!response.IsSuccessStatusCode)
-            {
-                // TODO: thrown an error
-                return null;
-            }
-
-            resContent = await response.Content.ReadAsStringAsync();
-            user = JsonConvert.DeserializeObject<CentralUser>(resContent);
-
-            return user;
-        }
-
-        public async Task<List<CentralNetwork>> GetNetworkList()
-        {
-            string networkURL = Central.ServerURL + "/api/network";
-
-            HttpResponseMessage response = await client.GetAsync(networkURL);
-
-            if (!response.IsSuccessStatusCode)
-            {
-                // TODO:  Throw Error
-                return new List<CentralNetwork>();
-            }
-
-            string resContent = await response.Content.ReadAsStringAsync();
-
-            List<CentralNetwork> networkList = JsonConvert.DeserializeObject<List<CentralNetwork>>(resContent);
-
-            return networkList;
-        }
-
-        public async Task<CentralNetwork> CreateNewNetwork()
-        {
-            string networkURL = Central.ServerURL + "/api/network?easy=1";
-            CentralNetwork network = new CentralNetwork();
-            network.Config = new CentralNetwork.CentralNetworkConfig();
-            network.Config.Name = NetworkNameGenerator.GenerateName();
-            string jsonNetwork = JsonConvert.SerializeObject(network);
-            var postContent = new StringContent(jsonNetwork, Encoding.UTF8, "application/json");
-            HttpResponseMessage response = await client.PostAsync(networkURL, postContent);
-
-            if (!response.IsSuccessStatusCode)
-            {
-                return null;
-            }
-
-            string resContent = await response.Content.ReadAsStringAsync();
-
-            CentralNetwork newNetwork = JsonConvert.DeserializeObject<CentralNetwork>(resContent);
-
-            return newNetwork;
-        }
-
-        public async Task<bool> AuthorizeNode(string nodeAddress, string networkId)
-        {
-            string json = "{ \"config\": { \"authorized\": true } }";
-            string postURL = Central.ServerURL + "/api/network/" + networkId + "/member/" + nodeAddress;
-            var postContent = new StringContent(json, Encoding.UTF8, "application/json");
-            HttpResponseMessage response = await client.PostAsync(postURL, postContent);
-
-            if (response.IsSuccessStatusCode)
-            {
-                return true;
-            }
-
-            return false;
-        }
-    }
-}

+ 0 - 30
attic/WinUI/CentralLogin.cs

@@ -1,30 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    class CentralLogin
-    {
-
-
-        public CentralLogin(string email, string password, bool isNew)
-        {
-            Login = email;
-            Password = password;
-            IsNew = isNew;
-        }
-
-        [JsonProperty("login")]
-        public string Login { get; set; }
-
-        [JsonProperty("password")]
-        public string Password { get; set; }
-
-        [JsonProperty("register")]
-        public bool IsNew { get; set; }
-    }
-}

+ 0 - 48
attic/WinUI/CentralNetwork.cs

@@ -1,48 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    class CentralNetwork
-    {
-        [JsonProperty("id")]
-        public string Id { get; set; }
-
-        [JsonProperty("type")]
-        public string Type { get; set; }
-
-        [JsonProperty("clock")]
-        public UInt64 Clock { get; set; }
-
-        [JsonProperty("rulesSource")]
-        public string RulesSource { get; set; }
-
-        [JsonProperty("description")]
-        public string Description { get; set; }
-
-        [JsonProperty("ownerId")]
-        public string OwnerID { get; set; }
-
-        [JsonProperty("onlineMemberCount")]
-        public int OnlineMemberCount { get; set; }
-
-        [JsonProperty("config")]
-        public CentralNetworkConfig Config { get; set; }
-
-        public class CentralNetworkConfig
-        {
-            [JsonProperty("id")]
-            public string Id { get; set; }
-
-            [JsonProperty("nwid")]
-            public string NetworkID { get; set; }
-
-            [JsonProperty("name")]
-            public string Name { get; set; }
-        }
-    }
-}

+ 0 - 23
attic/WinUI/CentralServer.cs

@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    class CentralServer
-    {
-        public CentralServer()
-        {
-            ServerURL = "https://my.zerotier.com";
-        }
-
-        [JsonProperty("server_url")]
-        public string ServerURL { get; set; }
-
-        [JsonProperty("api_key")]
-        public string APIKey { get; set; }
-    }
-}

+ 0 - 21
attic/WinUI/CentralToken.cs

@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    class CentralToken
-    {
-        [JsonProperty("token")]
-        public string Token { get; set; }
-
-        [JsonProperty("clock")]
-        public UInt64 Clock { get; set; }
-
-        [JsonProperty("raw")]
-        public string Raw { get; set; }
-    }
-}

+ 0 - 51
attic/WinUI/CentralUser.cs

@@ -1,51 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    class CentralUser
-    {
-        public class CentralGlobalPermissions
-        {
-            [JsonProperty("a")]
-            public bool Administrator { get; set; }
-
-            [JsonProperty("d")]
-            public bool Delete { get; set; }
-
-            [JsonProperty("m")]
-            public bool Modify { get; set; }
-
-            [JsonProperty("r")]
-            public bool Read { get; set; }
-        }
-
-        [JsonProperty("id")]
-        public string Id { get; set; }
-
-        [JsonProperty("type")]
-        public string Type { get; set; }
-
-        [JsonProperty("clock")]
-        public UInt64 Clock { get; set; }
-
-        [JsonProperty("globalPermissions")]
-        public CentralGlobalPermissions GlobalPermissions { get; set; }
-
-        [JsonProperty("displayName")]
-        public string DisplayName { get; set; }
-
-        [JsonProperty("email")]
-        public string Email { get; set; }
-
-        [JsonProperty("smsNumber")]
-        public string SmsNumber { get; set; }
-
-        [JsonProperty("tokens")]
-        public List<string> Tokens { get; set; }
-    }
-}

BIN
attic/WinUI/Fonts/segoeui.ttf


BIN
attic/WinUI/Fonts/segoeuib.ttf


BIN
attic/WinUI/Fonts/segoeuii.ttf


BIN
attic/WinUI/Fonts/segoeuiz.ttf


+ 0 - 13
attic/WinUI/ISwitchable.cs

@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WinUI
-{
-    interface ISwitchable
-    {
-        void UtilizeState(object state);
-    }
-}

+ 0 - 17
attic/WinUI/JoinNetworkView.xaml

@@ -1,17 +0,0 @@
-<Window x:Class="WinUI.JoinNetworkView"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:WinUI"
-        mc:Ignorable="d"
-        Title="Join a Network" SizeToContent="WidthAndHeight" Height="Auto" Width="Auto" Icon="ZeroTierIcon.ico">
-    <Grid HorizontalAlignment="Left" Margin="0,0,0,0" Width="315">
-        <TextBox x:Name="joinNetworkBox" HorizontalAlignment="Left" Height="23" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="291" PreviewTextInput="joinNetworkBox_OnTextEntered" PreviewKeyDown="joinNetworkBox_OnKeyDown"/>
-        <CheckBox x:Name="allowManagedCheckbox" Content="Allow Managed" HorizontalAlignment="Left" Margin="10,38,0,0" VerticalAlignment="Top" IsChecked="True"/>
-        <CheckBox x:Name="allowGlobalCheckbox" Content="Allow Global" HorizontalAlignment="Left" Margin="118,38,0,0" VerticalAlignment="Top"/>
-        <CheckBox x:Name="allowDefaultCheckbox" Content="Allow Default" HorizontalAlignment="Left" Margin="10,58,0,0" VerticalAlignment="Top"/>
-        <CheckBox x:Name="allowDNSCheckbox" Content="Allow DNS" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="118,58,0,0"/>
-        <Button x:Name="joinButton" Content="Join" HorizontalAlignment="Left" Margin="226,58,0,10" Background="#FFFFB354" VerticalAlignment="Top" Width="75" Click="joinButton_Click" IsEnabled="False"/>
-    </Grid>
-</Window>

+ 0 - 127
attic/WinUI/JoinNetworkView.xaml.cs

@@ -1,127 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for JoinNetworkView.xaml
-    /// </summary>
-    public partial class JoinNetworkView : Window
-    {
-        Regex charRegex = new Regex("[0-9a-fxA-FX]");
-        Regex wholeStringRegex = new Regex("^[0-9a-fxA-FX]+$");
-
-        public JoinNetworkView()
-        {
-            InitializeComponent();
-
-            DataObject.AddPastingHandler(joinNetworkBox, onPaste);
-            DataObject.AddCopyingHandler(joinNetworkBox, onCopyCut);
-        }
-
-        private void joinNetworkBox_OnTextEntered(object sender, TextCompositionEventArgs e)
-        {
-            e.Handled = !charRegex.IsMatch(e.Text);
-
-            if ( (joinNetworkBox.Text.Length + e.Text.Length) == 16)
-            {
-                joinButton.IsEnabled = true;
-            }
-            else
-            {
-                joinButton.IsEnabled = false;
-            }
-        }
-
-        private void joinNetworkBox_OnKeyDown(object sender, KeyEventArgs e)
-        {
-            if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
-            {
-                if (e.Key == Key.X && joinNetworkBox.IsSelectionActive)
-                {
-                    // handle ctrl-x removing characters
-                    joinButton.IsEnabled = false;
-                }
-            }
-            else if (e.Key == Key.Delete || e.Key == Key.Back)
-            {
-                if ((joinNetworkBox.Text.Length - 1) == 16)
-                {
-                    joinButton.IsEnabled = true;
-                }
-                else
-                {
-                    joinButton.IsEnabled = false;
-                }
-            }
-            else
-            {
-                if ((joinNetworkBox.Text.Length + 1) > 16)
-                {
-                    e.Handled = true;
-                }
-            }
-        }
-
-        private void onPaste(object sender, DataObjectPastingEventArgs e)
-        {
-            var isText = e.SourceDataObject.GetDataPresent(DataFormats.UnicodeText, true);
-            if (!isText)
-            {
-                joinButton.IsEnabled = false;
-                return;
-            }
-
-            var text = e.SourceDataObject.GetData(DataFormats.UnicodeText) as string;
-
-            if (!wholeStringRegex.IsMatch(text))
-            {
-                e.Handled = true;
-                e.CancelCommand();
-            }
-
-            if (text.Length == 16 || (joinNetworkBox.Text.Length + text.Length) == 16)
-            {
-                joinButton.IsEnabled = true;
-            }
-            else if (text.Length > 16 || (joinNetworkBox.Text.Length + text.Length) > 16)
-            {
-                e.Handled = true;
-                e.CancelCommand();
-            }
-            else
-            {
-                joinButton.IsEnabled = false;
-            }
-        }
-
-        private void onCopyCut(object sender, DataObjectCopyingEventArgs e)
-        {
-            
-        }
-
-        private void joinButton_Click(object sender, RoutedEventArgs e)
-        {
-            bool allowDefault = allowDefaultCheckbox.IsChecked.Value;
-            bool allowGlobal = allowGlobalCheckbox.IsChecked.Value;
-            bool allowManaged = allowManagedCheckbox.IsChecked.Value;
-            bool allowDNS = allowDNSCheckbox.IsChecked.Value;
-
-            APIHandler.Instance.JoinNetwork(this.Dispatcher, joinNetworkBox.Text, allowManaged, allowGlobal, allowDefault, allowDNS);
-
-            Close();
-        }
-    }
-}

+ 0 - 233
attic/WinUI/MainWindow.xaml.cs

@@ -1,233 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Timers;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Threading;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for MainWindow.xaml
-    /// </summary>
-    public partial class MainWindow : Window
-    {
-        APIHandler handler;
-        Regex charRegex = new Regex("[0-9a-fxA-FX]");
-        Regex wholeStringRegex = new Regex("^[0-9a-fxA-FX]+$");
-
-        Timer timer = new Timer();
-
-        bool connected = false;
-
-        public MainWindow()
-        {
-            InitializeComponent();
-
-            if (InitAPIHandler())
-            {
-                networksPage.SetAPIHandler(handler);
-
-                updateStatus();
-                if (!connected)
-                {
-                    MessageBox.Show("Unable to connect to ZeroTier Service.");
-                }
-
-                updateNetworks();
-                //updatePeers();
-
-                DataObject.AddPastingHandler(joinNetworkID, OnPaste);
-
-                timer.Elapsed += new ElapsedEventHandler(OnUpdateTimer);
-                timer.Interval = 2000;
-                timer.Enabled = true;
-            }
-        }
-
-
-        private String readAuthToken(String path)
-        {
-            String authToken = "";
-
-            if (File.Exists(path))
-            {
-                try
-                {
-                    byte[] tmp = File.ReadAllBytes(path);
-                    authToken = System.Text.Encoding.UTF8.GetString(tmp).Trim();
-                }
-                catch
-                {
-                    MessageBox.Show("Unable to read ZeroTier One Auth Token from:\r\n" + path, "ZeroTier One");
-                }
-            }
-
-            return authToken;
-        }
-
-        private Int32 readPort(String path)
-        {
-            Int32 port = 9993;
-
-            try
-            {
-                byte[] tmp = File.ReadAllBytes(path);
-                port = Int32.Parse(System.Text.Encoding.ASCII.GetString(tmp).Trim());
-                if ((port <= 0) || (port > 65535))
-                    port = 9993;
-            }
-            catch
-            {
-            }
-
-            return port;
-        }
-
-        private bool InitAPIHandler()
-        {
-            String localZtDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\ZeroTier\\One";
-            String globalZtDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ZeroTier\\One";
-
-            String authToken = "";
-            Int32 port = 9993;
-
-            if (!File.Exists(localZtDir + "\\authtoken.secret") || !File.Exists(localZtDir + "\\zerotier-one.port"))
-            {
-                // launch external process to copy file into place
-                String curPath = System.Reflection.Assembly.GetEntryAssembly().Location;
-                int index = curPath.LastIndexOf("\\");
-                curPath = curPath.Substring(0, index);
-                ProcessStartInfo startInfo = new ProcessStartInfo(curPath + "\\copyutil.exe", globalZtDir + " " + localZtDir);
-                startInfo.Verb = "runas";
-
-
-                var process = Process.Start(startInfo);
-                process.WaitForExit();
-            }
-
-            authToken = readAuthToken(localZtDir + "\\authtoken.secret");
-
-            if ((authToken == null) || (authToken.Length <= 0))
-            {
-                MessageBox.Show("Unable to read ZeroTier One authtoken", "ZeroTier One");
-                this.Close();
-                return false;
-            }
-
-            port = readPort(localZtDir + "\\zerotier-one.port");
-            handler = new APIHandler(port, authToken);
-            return true;
-        }
-
-        private void updateStatus()
-        {
-            var status = handler.GetStatus();
-
-            if (status != null)
-            {
-                connected = true;
-
-                networkId.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    this.networkId.Text = status.Address;
-                }));
-                versionString.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    this.versionString.Content = status.Version;
-                }));
-                onlineStatus.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    this.onlineStatus.Content = (status.Online ? "ONLINE" : "OFFLINE");
-                }));
-            }
-            else
-            {
-                connected = false;
-
-                networkId.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    this.networkId.Text = "";
-                }));
-                versionString.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    this.versionString.Content = "0";
-                }));
-                onlineStatus.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    this.onlineStatus.Content = "OFFLINE";
-                }));
-            }
-        }
-
-        private void updateNetworks()
-        {
-            var networks = handler.GetNetworks();
-
-            networksPage.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-            {
-                networksPage.setNetworks(networks);
-            }));
-        }
-
-        private void updatePeers()
-        {
-            //var peers = handler.GetPeers();
-
-            //peersPage.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-            //{
-            //    peersPage.SetPeers(peers);
-            //}));
-        }
-
-        private void OnUpdateTimer(object source, ElapsedEventArgs e)
-        {
-            updateStatus();
-            updateNetworks();
-            //updatePeers();
-        }
-
-        private void joinButton_Click(object sender, RoutedEventArgs e)
-        {
-            if (joinNetworkID.Text.Length < 16)
-            {
-                MessageBox.Show("Invalid Network ID");
-            }
-            else
-            {
-                handler.JoinNetwork(joinNetworkID.Text);
-            }
-        }
-
-        private void OnNetworkEntered(object sender, TextCompositionEventArgs e)
-        {
-            e.Handled = !charRegex.IsMatch(e.Text);
-        }
-
-        private void OnPaste(object sender, DataObjectPastingEventArgs e)
-        {
-            var isText = e.SourceDataObject.GetDataPresent(DataFormats.UnicodeText, true);
-            if (!isText) return;
-
-            var text = e.SourceDataObject.GetData(DataFormats.UnicodeText) as string;
-
-            if (!wholeStringRegex.IsMatch(text))
-            {
-                e.CancelCommand();
-            }
-        }
-    }
-}

+ 0 - 88
attic/WinUI/NetworkInfoView.xaml

@@ -1,88 +0,0 @@
-<UserControl Background="LightGray" x:Class="WinUI.NetworkInfoView"
-      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-      mc:Ignorable="d"
-	>
-    
-    <Border Background="GhostWhite" BorderBrush="Gainsboro" BorderThickness="1" CornerRadius="8,8,8,8">
-        <Grid Background="GhostWhite" Margin="10,10,10,10">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="auto"/>
-                <ColumnDefinition Width="10"/>
-                <ColumnDefinition Width="*"/>
-            </Grid.ColumnDefinitions>
-            <Grid.RowDefinitions>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-                <RowDefinition Height="auto"/>
-            </Grid.RowDefinitions>
-
-            <Grid Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3">
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="auto"/>
-                    <ColumnDefinition Width="*"/>
-                </Grid.ColumnDefinitions>
-
-                <TextBox x:Name="networkId" Text="8056c2e21c000001" HorizontalAlignment="Left" Grid.Column="0" Foreground="#FF91A2A3" FontFamily="Lucida Console" BorderThickness="0" IsReadOnly="true" Background="Transparent"/>
-                <TextBox x:Name="networkName" Text="earth.zerotier.net" HorizontalAlignment="Right" Grid.Column="1" Foreground="#FF000000" BorderThickness="0" IsReadOnly="true" Background="Transparent"/>
-            </Grid>
-            
-            <Separator Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"/>
-            
-            <TextBlock TextWrapping="Wrap" Text="Status" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="2" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Type" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="3" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="MAC" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="4" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="MTU" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="5" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Broadcast" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="6" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Bridging" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="7" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Device" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="8" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Managed IPs" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="9" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Allow Global IP" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="10" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Allow Managed IP" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="11" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Allow Default Route" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="12" Foreground="#FF000000"/>
-            <TextBlock TextWrapping="Wrap" Text="Allow DNS" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="13" Foreground="#FF000000"/>
-
-            <Rectangle Grid.Column="2" Grid.Row="2" Grid.RowSpan="12" Fill="#FFEEEEEE"/>
-
-            <TextBlock x:Name="networkStatus" FontFamily="Lucida Console" TextWrapping="Wrap" HorizontalAlignment="Right" Text="OK" TextAlignment="Right"  Grid.Column="2" Grid.Row="2" Foreground="#FF000000"/>
-            <TextBlock x:Name="networkType" FontFamily="Lucida Console" TextWrapping="Wrap" Text="PUBLIC" HorizontalAlignment="Right"  Grid.Column="2" Grid.Row="3" Foreground="#FF000000"/>
-            <TextBlock x:Name="macAddress" FontFamily="Lucida Console" TextWrapping="Wrap" HorizontalAlignment="Right"  Grid.Column="2" Grid.Row="4" Foreground="#FF000000"><Span><Run Text="02:83:4a:1e:4b:3a"/></Span></TextBlock>
-            <TextBlock x:Name="mtu" FontFamily="Lucida Console" TextWrapping="Wrap" Text="2800" HorizontalAlignment="Right"  Grid.Column="2" Grid.Row="5" Foreground="#FF000000"/>
-            <TextBlock x:Name="broadcastEnabled" FontFamily="Lucida Console" TextWrapping="Wrap" Text="ENABLED" HorizontalAlignment="Right"  Grid.Column="2" Grid.Row="6" Foreground="#FF000000"/>
-            <TextBlock x:Name="bridgingEnabled" FontFamily="Lucida Console" TextWrapping="Wrap" Text="DISABLED" HorizontalAlignment="Right"  Grid.Column="2" Grid.Row="7" Background="#FFEEEEEE" Foreground="#FF000000"/>
-            <TextBlock x:Name="deviceName" FontFamily="Lucida Console" TextWrapping="Wrap" HorizontalAlignment="Right"  Grid.Column="2" Grid.Row="8" Foreground="#FF000000"><Span><Run Text="ethernet_32771"/></Span></TextBlock>
-            <TextBox x:Name="managedIps" TextWrapping="Wrap" FontFamily="Lucida Console" HorizontalAlignment="Right" TextAlignment="Right"  Grid.Column="2" Grid.Row="9" Foreground="#FF000000" IsReadOnly="True" BorderThickness="0" Background="#FFEEEEEE" Text="28.2.169.248/7&#x0a;fd80:56c2:e21c:0000:0199:9383:4a02:a9f8/88"/>
-            <CheckBox x:Name="allowGlobal" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="10" />
-            <CheckBox x:Name="allowManaged" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="11" />
-            <CheckBox x:Name="allowDefault" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="12" />
-            <CheckBox x:Name="allowDNS" HorizontalAlignment="Right" Grid.Column="2" Grid.Row="13"/>
-
-            <Separator Grid.Column="0" Grid.Row="14" Grid.ColumnSpan="3"/>
-            
-            <Grid Grid.Column="0" Grid.Row="15" Grid.ColumnSpan="3" Background="GhostWhite">
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="auto"/>
-                    <ColumnDefinition Width="*"/>
-                    <ColumnDefinition Width="auto"/>
-                </Grid.ColumnDefinitions>
-                <Button x:Name="deleteButton" Grid.Column="0" Content="Delete" HorizontalAlignment="Left" VerticalAlignment="Center" Width="75" Background="#FFFFB354" Click="deleteButton_Click"/>
-                <CheckBox x:Name="connectedCheckBox" Grid.Column="2" Content="Connected" HorizontalAlignment="Right" VerticalAlignment="Center" Checked="connectedCheckBox_Checked" Unchecked="connectedCheckbox_Unchecked"/>
-            </Grid>
-        </Grid>
-    </Border>
-</UserControl>

+ 0 - 183
attic/WinUI/NetworkInfoView.xaml.cs

@@ -1,183 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for NetworkInfoView.xaml
-    /// </summary>
-    public partial class NetworkInfoView : UserControl
-    {
-        public ZeroTierNetwork network;
-
-        public NetworkInfoView(ZeroTierNetwork network)
-        {
-            InitializeComponent();
-
-            this.network = network;
-
-            UpdateNetworkData();
-
-            allowDefault.Checked += AllowDefault_CheckStateChanged;
-            allowDefault.Unchecked += AllowDefault_CheckStateChanged;
-            allowGlobal.Checked += AllowGlobal_CheckStateChanged;
-            allowGlobal.Unchecked += AllowGlobal_CheckStateChanged;
-            allowManaged.Checked += AllowManaged_CheckStateChanged;
-            allowManaged.Unchecked += AllowManaged_CheckStateChanged;
-            allowDNS.Checked += AllowDNS_CheckStateChanged;
-            allowDNS.Unchecked += AllowDNS_CheckStateChanged;
-        }
-
-        private void UpdateNetworkData()
-        {
-
-            if (this.networkId.Text != network.NetworkId)
-                this.networkId.Text = network.NetworkId;
-
-            if (this.networkName.Text != network.NetworkName)
-                this.networkName.Text = network.NetworkName;
-
-            if (this.networkStatus.Text != network.NetworkStatus)
-                this.networkStatus.Text = network.NetworkStatus;
-
-            if (this.networkType.Text != network.NetworkType)
-                this.networkType.Text = network.NetworkType;
-
-            if (this.macAddress.Text != network.MacAddress)
-                this.macAddress.Text = network.MacAddress;
-
-            if (this.mtu.Text != network.MTU.ToString())
-                this.mtu.Text = network.MTU.ToString();
-
-            this.broadcastEnabled.Text = (network.BroadcastEnabled ? "ENABLED" : "DISABLED");
-            this.bridgingEnabled.Text = (network.Bridge ? "ENABLED" : "DISABLED");
-
-            if (this.deviceName.Text != network.DeviceName)
-                this.deviceName.Text = network.DeviceName;
-
-            string iplist = "";
-            for (int i = 0; i < network.AssignedAddresses.Length; ++i)
-            {
-                iplist += network.AssignedAddresses[i];
-                if (i < (network.AssignedAddresses.Length - 1))
-                    iplist += "\n";
-            }
-
-            if (this.managedIps.Text != iplist)
-                this.managedIps.Text = iplist;
-
-            this.allowDefault.IsChecked = network.AllowDefault;
-            this.allowGlobal.IsChecked = network.AllowGlobal;
-            this.allowManaged.IsChecked = network.AllowManaged;
-            this.allowDNS.IsChecked = network.AllowDNS;
-
-						this.connectedCheckBox.Checked -= connectedCheckBox_Checked;
-						this.connectedCheckBox.Unchecked -= connectedCheckbox_Unchecked;
-
-            this.connectedCheckBox.IsChecked = network.IsConnected;
-
-						this.connectedCheckBox.Checked += connectedCheckBox_Checked;
-						this.connectedCheckBox.Unchecked += connectedCheckbox_Unchecked;
-				}
-
-        public bool HasNetwork(ZeroTierNetwork network)
-        {
-            if (this.network.NetworkId.Equals(network.NetworkId))
-                return true;
-
-            return false;
-        }
-
-        public void SetNetworkInfo(ZeroTierNetwork network)
-        {
-            this.network = network;
-
-            UpdateNetworkData();
-        }
-
-        private void deleteButton_Click(object sender, RoutedEventArgs e)
-        {
-            APIHandler.Instance.LeaveNetwork(this.Dispatcher, network.NetworkId);
-            NetworkMonitor.Instance.RemoveNetwork(network.NetworkId);
-        }
-
-        private void AllowManaged_CheckStateChanged(object sender, RoutedEventArgs e)
-        {
-            CheckBox cb = sender as CheckBox;
-            APIHandler.Instance.JoinNetwork(this.Dispatcher, network.NetworkId,
-                allowManaged.IsChecked ?? false,
-                allowGlobal.IsChecked ?? false,
-                allowDefault.IsChecked ?? false,
-                allowDNS.IsChecked ?? false);
-        }
-
-        private void AllowGlobal_CheckStateChanged(object sender, RoutedEventArgs e)
-        {
-            CheckBox cb = sender as CheckBox;
-            APIHandler.Instance.JoinNetwork(this.Dispatcher, network.NetworkId,
-                allowManaged.IsChecked ?? false,
-                allowGlobal.IsChecked ?? false,
-                allowDefault.IsChecked ?? false,
-                allowDNS.IsChecked ?? false);
-        }
-
-        private void AllowDefault_CheckStateChanged(object sender, RoutedEventArgs e)
-        {
-            CheckBox cb = sender as CheckBox;
-            APIHandler.Instance.JoinNetwork(this.Dispatcher, network.NetworkId,
-                allowManaged.IsChecked ?? false,
-                allowGlobal.IsChecked ?? false,
-                allowDefault.IsChecked ?? false,
-                allowDNS.IsChecked ?? false);
-        }
-
-        private void AllowDNS_CheckStateChanged(object sender, RoutedEventArgs e)
-        {
-            CheckBox cb = sender as CheckBox;
-            APIHandler.Instance.JoinNetwork(this.Dispatcher, network.NetworkId,
-                allowManaged.IsChecked ?? false,
-                allowGlobal.IsChecked ?? false,
-                allowDefault.IsChecked ?? false,
-                allowDNS.IsChecked ?? false);
-        }
-
-        private void connectedCheckBox_Checked(object sender, RoutedEventArgs e)
-        {
-            onConnectedCheckboxUpdated(true);
-        }
-
-        private void connectedCheckbox_Unchecked(object sender, RoutedEventArgs e)
-        {
-            onConnectedCheckboxUpdated(false);
-        }
-
-        private void onConnectedCheckboxUpdated(bool isChecked)
-        {
-            if (isChecked)
-            {
-                bool global = allowGlobal.IsChecked.Value;
-                bool managed = allowManaged.IsChecked.Value;
-                bool defRoute = allowDefault.IsChecked.Value;
-                bool dns = allowDNS.IsChecked.Value;
-
-                APIHandler.Instance.JoinNetwork(this.Dispatcher, networkId.Text, managed, global, defRoute, dns);
-            }
-            else
-            {
-                APIHandler.Instance.LeaveNetwork(this.Dispatcher, networkId.Text);
-            }
-        }
-    }
-}

+ 0 - 88
attic/WinUI/NetworkListView.xaml

@@ -1,88 +0,0 @@
-<Window
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-        xmlns:local="clr-namespace:WinUI"
-        mc:Ignorable="d" x:Class="WinUI.NetworkListView"
-        Title="ZeroTier One" SizeToContent="Width" Height="500" Width="Auto" Icon="ZeroTierIcon.ico">
-	
-    <Window.Resources>
-        <SolidColorBrush x:Key="GreenBrush" Color="#ff91a2a3"/>
-
-        <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
-
-        <SolidColorBrush x:Key="GreenDisabledBrush" Color="#FF234447" />
-
-        <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
-
-        <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
-
-        <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
-        
-        <Style TargetType="{x:Type DataGrid}">
-            <Setter Property="Background" Value="#FFF" />
-            <Setter Property="AlternationCount" Value="2" />
-        </Style>
-
-        <Style TargetType="{x:Type DataGridRow}">
-            <Style.Triggers>
-                <Trigger Property="ItemsControl.AlternationIndex" Value="0">
-                    <Setter Property="Background" Value="#EEE"></Setter>
-                </Trigger>
-                <Trigger Property="ItemsControl.AlternationIndex" Value="1">
-                    <Setter Property="Background" Value="#FFF"></Setter>
-                </Trigger>
-            </Style.Triggers>
-        </Style>
-        
-        <Style TargetType="{x:Type TabItem}">
-            <Setter Property="Template">
-                <Setter.Value>
-                    <ControlTemplate TargetType="{x:Type TabItem}">
-                        <Grid>
-                            <Border 
-                                Name="Border"
-                                Margin="0,0,-4,0" 
-                                Background="{StaticResource GreenBrush}"
-                                BorderBrush="{StaticResource  SolidBorderBrush}" 
-                                BorderThickness="1,1,1,1" 
-                                CornerRadius="2,12,0,0" >
-                                <ContentPresenter x:Name="ContentSite"
-                                    VerticalAlignment="Center"
-                                    HorizontalAlignment="Center"
-                                    ContentSource="Header"
-                                    Margin="12,2,12,2"
-                                    RecognizesAccessKey="True"/>
-                            </Border>
-                        </Grid>
-                        <ControlTemplate.Triggers>
-                            <Trigger Property="IsSelected" Value="True">
-                                <Setter Property="Panel.ZIndex" Value="100" />
-                                <Setter TargetName="Border" Property="Background" Value="{StaticResource GreenDisabledBrush}" />
-                                <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
-                            </Trigger>
-                            <Trigger Property="IsEnabled" Value="False">
-                                <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
-                                <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
-                                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
-                            </Trigger>
-                        </ControlTemplate.Triggers>
-                    </ControlTemplate>
-                </Setter.Value>
-            </Setter>
-        </Style>
-    </Window.Resources>
-    
-    <DockPanel>
-	    <Grid Background="LightGray" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"/>
-            </Grid.ColumnDefinitions>
-            <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-            </Grid.RowDefinitions>
-            <local:NetworksPage x:Name="networksPage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Margin="0,0,0,0"/>
-        </Grid>
-	</DockPanel>
-</Window>

+ 0 - 85
attic/WinUI/NetworkListView.xaml.cs

@@ -1,85 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Timers;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using System.Windows.Threading;
-using System.ComponentModel;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for MainWindow.xaml
-    /// </summary>
-    public partial class NetworkListView : Window
-    {
-        Regex charRegex = new Regex("[0-9a-fxA-FX]");
-        Regex wholeStringRegex = new Regex("^[0-9a-fxA-FX]+$");
-
-        public NetworkListView()
-        {
-            InitializeComponent();
-
-            Closed += onClosed;
-
-            NetworkMonitor.Instance.SubscribeNetworkUpdates(updateNetworks);
-        }
-
-        ~NetworkListView()
-        {
-        }
-
-        protected override void OnClosing(CancelEventArgs e)
-        {
-            e.Cancel = true;
-            Hide();
-        }
-
-        private void onClosed(object sender, System.EventArgs e)
-        {
-            NetworkMonitor.Instance.UnsubscribeNetworkUpdates(updateNetworks);
-        }
-
-        private void updateNetworks(List<ZeroTierNetwork> networks)
-        {
-            if (networks != null)
-            {
-                networksPage.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    networksPage.setNetworks(networks);
-                }));
-            }
-        }
-
-        private void OnNetworkEntered(object sender, TextCompositionEventArgs e)
-        {
-            e.Handled = !charRegex.IsMatch(e.Text);
-        }
-
-        private void OnPaste(object sender, DataObjectPastingEventArgs e)
-        {
-            var isText = e.SourceDataObject.GetDataPresent(DataFormats.UnicodeText, true);
-            if (!isText) return;
-
-            var text = e.SourceDataObject.GetData(DataFormats.UnicodeText) as string;
-
-            if (!wholeStringRegex.IsMatch(text))
-            {
-                e.CancelCommand();
-            }
-        }
-    }
-}

+ 0 - 203
attic/WinUI/NetworkMonitor.cs

@@ -1,203 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace WinUI
-{
-    class NetworkMonitor
-    {
-        public delegate void NetworkListCallback(List<ZeroTierNetwork> networks);
-        public delegate void StatusCallback(ZeroTierStatus status);
-
-        private Thread runThread;
-        private NetworkListCallback _nwCb;
-        private StatusCallback _stCb;
-
-
-        private List<ZeroTierNetwork> _knownNetworks = new List<ZeroTierNetwork>();
-
-        private static NetworkMonitor instance;
-        private static object syncRoot = new object();
-
-        public static NetworkMonitor Instance
-        {
-            get
-            {
-                if (instance == null)
-                {
-                    lock (syncRoot)
-                    {
-                        if (instance == null)
-                        {
-                            instance = new NetworkMonitor();
-                        }
-                    }
-                }
-
-                return instance;
-            }
-        }
-
-        private NetworkMonitor()
-        {
-            runThread = new Thread(new ThreadStart(run));
-            loadNetworks();
-
-            runThread.Start();
-        }
-
-        ~NetworkMonitor()
-        {
-            runThread.Interrupt();
-        }
-
-        private void loadNetworks()
-        {
-            String dataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\ZeroTier\\One";
-            String dataFile = Path.Combine(dataPath, "networks.dat");
-            
-            if (File.Exists(dataFile))
-            {
-                List<ZeroTierNetwork> netList;
-
-                using (Stream stream = File.Open(dataFile, FileMode.Open))
-                {
-                    var bformatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
-                    netList = (List<ZeroTierNetwork>)bformatter.Deserialize(stream);
-                    stream.Close();
-                }
-
-                lock (_knownNetworks)
-                {
-                    _knownNetworks = netList;
-                }
-            }
-        }
-
-        private void writeNetworks()
-        {
-            String dataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\ZeroTier\\One";
-            String dataFile = Path.Combine(dataPath, "networks.dat");
-
-            if (!Directory.Exists(dataPath))
-            {
-                Directory.CreateDirectory(dataPath);
-            }
-
-            using (Stream stream = File.Open(dataFile, FileMode.OpenOrCreate))
-            {
-                lock (_knownNetworks)
-                {
-                    var bformatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
-                    bformatter.Serialize(stream, _knownNetworks);
-                    stream.Flush();
-                    stream.Close();
-                }
-            }
-        }
-
-        private void apiNetworkCallback(List<ZeroTierNetwork> networks)
-        {
-						if (networks == null)
-						{
-								return;
-						}
-
-            lock (_knownNetworks)
-            {
-                _knownNetworks = _knownNetworks.Union(networks, new NetworkEqualityComparer()).ToList();
-
-                foreach (ZeroTierNetwork n in _knownNetworks)
-                {
-                    if (networks.Contains(n))
-                    {
-                        n.IsConnected = true;
-                    }
-                    else
-                    {
-                        n.IsConnected = false;
-                    }
-                }
-
-                _knownNetworks.Sort();
-                _nwCb(_knownNetworks);
-            }
-
-            writeNetworks();
-        }
-
-        private void apiStatusCallback(ZeroTierStatus status)
-        {
-            _stCb(status);
-        }
-
-        private void run()
-        {
-            try
-            {
-                while (runThread.IsAlive)
-                {
-                    APIHandler handler = APIHandler.Instance;
-
-                    if (handler != null)
-                    {
-                        handler.GetNetworks(apiNetworkCallback);
-                        handler.GetStatus(apiStatusCallback);
-                    }
-
-                    Thread.Sleep(2000);
-                }
-            }
-            catch (Exception e)
-            {
-                Console.WriteLine("Monitor Thread Exception: " + "\n" + e.StackTrace);
-            }
-			Console.WriteLine("Monitor Thread Ended");
-        }
-
-        public void SubscribeStatusUpdates(StatusCallback cb)
-        {
-            _stCb += cb;
-        }
-
-        public void UnsubscribeStatusUpdates(StatusCallback cb)
-        {
-            _stCb -= cb;
-        }
-
-        public void SubscribeNetworkUpdates(NetworkListCallback cb)
-        {
-            _nwCb += cb;
-        }
-
-        public void UnsubscribeNetworkUpdates(NetworkListCallback cb)
-        {
-            _nwCb -= cb;
-        }
-
-        public void RemoveNetwork(String networkID)
-        {
-            lock(_knownNetworks)
-            {
-                foreach (ZeroTierNetwork n in _knownNetworks)
-                {
-                    if (n.NetworkId.Equals(networkID))
-                    {
-                        _knownNetworks.Remove(n);
-                        writeNetworks();
-                        break;
-                    }
-                }
-            }
-        }
-
-        public void StopMonitor()
-        {
-            runThread.Abort();
-        }
-    }
-}

+ 0 - 201
attic/WinUI/NetworkNameGenerator.cs

@@ -1,201 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace WinUI
-{
-    class NetworkNameGenerator
-    {
-        public static string GenerateName()
-        {
-            Random r = new Random(DateTime.Now.Millisecond);
-            int firstIndex = r.Next(0, FIRST.Length);
-            int secondIndex = r.Next(0, SECOND.Length);
-            return FIRST[firstIndex] + "_" + SECOND[secondIndex];
-        }
-
-        private static string[] FIRST =
-        {
-              "admiring",
-              "adoring",
-              "agitated",
-              "amazing",
-              "angry",
-              "awesome",
-              "berserk",
-              "big",
-              "clever",
-              "compassionate",
-              "cranky",
-              "crazy",
-              "desperate",
-              "determined",
-              "distracted",
-              "dreamy",
-              "ecstatic",
-              "elated",
-              "elegant",
-              "fervent",
-              "focused",
-              "furious",
-              "gigantic",
-              "gloomy",
-              "goofy",
-              "grave",
-              "happy",
-              "high",
-              "hopeful",
-              "hungry",
-              "insane",
-              "jolly",
-              "jovial",
-              "lonely",
-              "loving",
-              "modest",
-              "nostalgic",
-              "pedantic",
-              "pensive",
-              "prickly",
-              "reverent",
-              "romantic",
-              "sad",
-              "serene",
-              "sharp",
-              "silly",
-              "sleepy",
-              "stoic",
-              "stupefied",
-              "suspicious",
-              "tender",
-              "thirsty",
-              "tiny",
-              "trusting"
-        };
-
-        private static string[] SECOND =
-        {
-            // constructed telephone-like devices in 1854
-            "meucci",
-
-            // prototype make-or-break telephones in 1860
-            "reis",
-
-            // Alexander Graham Bell
-            "bell",
-
-            // designed telephone using water microphone in 1876
-            "gray",
-
-            // Tivadar Puskás invented the telephone switchboard exchange in 1876.
-            "puskas",
-
-            // Thomas Edison, invented the carbon microphone which produced a strong telephone signal.
-            "edison",
-
-            // 1950s, Paul Baran developed the concept Distributed Adaptive Message Block Switching
-            "baran",
-
-            // Donald Davies coined the phrase 'packet switching network'
-            "davies",
-
-            // Robert Licklider helped get ARPANET funded
-            "licklider",
-
-            // Robert Taylor, ARPANET pioneer
-            "taylor",
-
-            // Lawrence Roberts, ARPANET
-            "roberts",
-
-            // Vint Cerf, TCP
-            "cerf",
-
-            // Bob Kahn, TCP
-            "kahn",
-
-            // David P Reed, UDP
-            "reed",
-
-            // Community Memory was created by Efrem Lipkin, Mark Szpakowski, and Lee Felsenstein, acting as The Community Memory Project within the Resource One computer center at Project One in San Francisco.
-            "lipkin",
-            "szpakowski",
-            "felsenstein",
-
-            // The first public dial-up BBS was developed by Ward Christensen and Randy Suess.
-            "christensen",
-            "suess",
-
-            // Joybubbles (May 25, 1949 – August 8, 2007), born Josef Carl Engressia, Jr. in Richmond, Virginia, USA, was an early phone phreak.
-            "engressia",
-            "joybubbles",
-
-            // John Thomas Draper (born 1943), also known as Captain Crunch, Crunch or Crunchman (after Cap'n Crunch breakfast cereal mascot), is an American computer programmer and former phone phreak
-            "draper",
-
-            // Dennis C. Hayes, founder of Hayes Microcomputer Products
-            // "The Modem of Dennis Hayes and Dale Heatherington."
-            "hayes",
-            "heatherington",
-
-            // "Ethernet was developed at Xerox PARC between 1973 and 1974.[7][8] It was inspired by ALOHAnet, which Robert Metcalfe had studied as part of his PhD dissertation."
-            "metcalfe",
-
-            // William Bradford Shockley Jr. (February 13, 1910 – August 12, 1989) was an American physicist and inventor. Shockley was the manager of a research group that included John Bardeen and Walter Brattain. The three scientists invented the point contact transistor in 1947
-            "shockley",
-            "bardeen",
-            "brattain",
-
-            // "Randall Erck invented the modern modem as we know it today. There were devices similar to modems used by the military, but they were designed more for the purpose of sending encripted nuclear launch codes to various bases around the world."
-            "erck",
-
-            // Leonard Kleinrock, packet switching network pioneer
-            "kleinrock",
-
-            // Tim Berners-Lee, WWW
-            "berners_lee",
-
-            // Steve Wozniak, early phone phreak
-            "wozniak",
-
-            // James Fields Smathers of Kansas City invented what is considered the first practical power-operated typewriter in 1914.
-            "smathers",
-
-            // The teleprinter evolved through a series of inventions by a number of engineers, including Royal Earl House, David Edward Hughes, Emile Baudot, Donald Murray, Charles L. Krum, Edward Kleinschmidt and Frederick G. Creed.
-            "house",
-            "hughes",
-            "baudot",
-            "murray",
-            "krum",
-            "kleinschmidt",
-            "creed",
-
-            // Ron Rosenbaum, author of "Secrets of the Little Blue Box" which mainstreamed phone phreaking
-            "rosenbaum",
-
-            // Bram Cohen. Bram Cohen (born October 12, 1975) is an American computer programmer, best known as the author of the peer-to-peer (P2P) BitTorrent protocol,
-            "cohen",
-
-            // Jarkko Oikarinen (born 16 August 1967, in Kuusamo, Finland) is the inventor of the first Internet chat network, called Internet Relay Chat (IRC), where he is known as WiZ.
-            "oikarinen",
-
-            // "What you probably didn't know is that the author of Trumpet Winsock — Peter Tattam from Tasmania, Australia — didn't see much money for his efforts."
-            "tattam",
-
-            // Satoshi Nakamoto
-            "nakamoto",
-
-            // Philo Farnsworth, inventor of the first practical TV tube
-            "farnsworth",
-
-            // Scottish inventor John Logie Baird employed the Nipkow disk in his prototype video systems. On 25 March 1925, Baird gave the first public demonstration of televised silhouette images in motion, at Selfridge's Department Store in London.
-            "baird",
-
-            // Beginning in 1836, the American artist Samuel F. B. Morse, the American physicist Joseph Henry, and Alfred Vail developed an electrical telegraph system.
-            "morse",
-            "henry",
-            "vail"
-        };
-    }
-}

+ 0 - 42
attic/WinUI/NetworkRoute.cs

@@ -1,42 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    [Serializable]
-    public class NetworkRoute : ISerializable
-    {
-        protected NetworkRoute(SerializationInfo info, StreamingContext ctx)
-        {
-            Target = info.GetString("target");
-            Via = info.GetString("via");
-            Flags = info.GetInt32("flags");
-            Metric = info.GetInt32("metric");
-        }
-
-        public virtual void GetObjectData(SerializationInfo info, StreamingContext ctx)
-        {
-            info.AddValue("target", Target);
-            info.AddValue("via", Via);
-            info.AddValue("flags", Flags);
-            info.AddValue("metric", Metric);
-        }
-
-        [JsonProperty("target")]
-        public string Target { get; set; }
-
-        [JsonProperty("via")]
-        public string Via { get; set; }
-
-        [JsonProperty("flags")]
-        public int Flags { get; set; }
-
-        [JsonProperty("metric")]
-        public int Metric { get; set; }
-    }
-}

+ 0 - 13
attic/WinUI/NetworksPage.xaml

@@ -1,13 +0,0 @@
-<UserControl x:Class="WinUI.NetworksPage"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             mc:Ignorable="d" 
-             d:DesignHeight="300" d:DesignWidth="300">
-    <ScrollViewer x:Name="MyScrollViewer" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
-        <UniformGrid x:Name="wrapPanel" Background="#FFDDDDDD"  HorizontalAlignment="Stretch" VerticalAlignment="Top" Columns="1">
-
-        </UniformGrid>
-    </ScrollViewer>
-</UserControl>

+ 0 - 99
attic/WinUI/NetworksPage.xaml.cs

@@ -1,99 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for NetworksPage.xaml
-    /// </summary>
-    public partial class NetworksPage : UserControl
-    {
-        public NetworksPage()
-        {
-            InitializeComponent();
-        }
-
-        public void setNetworks(List<ZeroTierNetwork> networks)
-        {
-            if (networks == null)
-            {
-                this.wrapPanel.Children.Clear();
-                return;
-            }
-
-            foreach (ZeroTierNetwork network in networks)
-            {
-                NetworkInfoView view = ChildWithNetwork(network);
-                if (view != null)
-                {
-                    view.SetNetworkInfo(network);
-                }
-                else
-                {
-                    wrapPanel.Children.Add(
-                        new NetworkInfoView(
-                            network));
-                }
-            }
-
-            // remove networks we're no longer joined to.
-            List<ZeroTierNetwork> tmpList = GetNetworksFromChildren();
-            foreach (ZeroTierNetwork n in networks)
-            {
-                if (tmpList.Contains(n))
-                {
-                    tmpList.Remove(n);
-                }
-            }
-
-            foreach (ZeroTierNetwork n in tmpList)
-            {
-                NetworkInfoView view = ChildWithNetwork(n);
-                if (view != null)
-                {
-                    wrapPanel.Children.Remove(view);
-                }
-            }
-        }
-
-        private NetworkInfoView ChildWithNetwork(ZeroTierNetwork network)
-        {
-            List<NetworkInfoView> list = wrapPanel.Children.OfType<NetworkInfoView>().ToList();
-           
-            foreach (NetworkInfoView view in list)
-            {
-                if (view.HasNetwork(network))
-                {
-                    return view;
-                }
-            }
-
-            return null;
-        }
-
-        private List<ZeroTierNetwork> GetNetworksFromChildren()
-        {
-            List<ZeroTierNetwork> networks = new List<ZeroTierNetwork>(wrapPanel.Children.Count);
-
-            List<NetworkInfoView> list = wrapPanel.Children.OfType<NetworkInfoView>().ToList();
-            foreach (NetworkInfoView n in list)
-            {
-                networks.Add(n.network);
-            }
-
-            return networks;
-        }
-    }
-}

+ 0 - 26
attic/WinUI/PeersPage.xaml

@@ -1,26 +0,0 @@
-<UserControl x:Class="WinUI.PeersPage"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             mc:Ignorable="d" 
-             d:DesignHeight="300" d:DesignWidth="300" Background="White" Foreground="Black">
-
-    <DataGrid x:Name="dataGrid" GridLinesVisibility="None" AutoGenerateColumns="False" CanUserResizeColumns="True" Margin="0,0,0,0" CanUserReorderColumns="False" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto" CanUserSortColumns="False">
-        <DataGrid.CellStyle>
-            <Style TargetType="DataGridCell">
-                <Setter Property="BorderThickness" Value="0"/>
-                <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
-            </Style>
-        </DataGrid.CellStyle>
-        <DataGrid.Columns>
-            <DataGridTextColumn Header="Address" Binding="{Binding Address}"/>
-            <DataGridTextColumn Header="Version" Binding="{Binding VersionString}"/>
-            <DataGridTextColumn Header="Latency" Binding="{Binding Latency}"/>
-            <DataGridTextColumn Header="Data Paths" Binding="{Binding DataPaths}"/>
-            <DataGridTextColumn Header="Last Unicast" Binding="{Binding LastUnicastFrame}"/>
-            <DataGridTextColumn Header="Last Multicast" Binding="{Binding LastMulticastFrame}"/>
-            <DataGridTextColumn Width="*" Header="Role" Binding="{Binding Role}"/>
-        </DataGrid.Columns>
-    </DataGrid>
-</UserControl>

+ 0 - 54
attic/WinUI/PeersPage.xaml.cs

@@ -1,54 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for PeersPage.xaml
-    /// </summary>
-    public partial class PeersPage : UserControl
-    {
-        private List<ZeroTierPeer> peersList = new List<ZeroTierPeer>();
-
-        public PeersPage()
-        {
-            InitializeComponent();
-
-            dataGrid.ItemsSource = peersList;
-        }
-
-        public void SetPeers(List<ZeroTierPeer> list)
-        {
-            if (list == null)
-                return;
-
-            
-            foreach(ZeroTierPeer p in list)
-            {
-                ZeroTierPeer curPeer = peersList.Find(peer => peer.Equals(p));
-                if (curPeer == null)
-                {
-                    peersList.Add(p);                    
-                }
-                else
-                {
-                    curPeer.Update(p);
-                }
-            }
-
-            dataGrid.Items.Refresh();
-        }
-    }
-}

+ 0 - 30
attic/WinUI/PreferencesView.xaml

@@ -1,30 +0,0 @@
-<Window x:Class="WinUI.PreferencesView"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:WinUI"
-        mc:Ignorable="d"
-        Title="PreferencesView" SizeToContent="WidthAndHeight" Height="Auto" Width="Auto" Icon="ZeroTierIcon.ico">
-  <Grid>
-		<Grid.ColumnDefinitions>
-			<ColumnDefinition Width="Auto"/>
-			<ColumnDefinition Width="Auto"/>
-		</Grid.ColumnDefinitions>
-		<Grid.RowDefinitions>
-			<RowDefinition Height="Auto"/>
-			<RowDefinition Height="Auto"/>
-			<RowDefinition Height="Auto"/>
-			<RowDefinition Height="Auto"/>
-		</Grid.RowDefinitions>
-    <CheckBox x:Name="startupCheckbox" Content="Launch ZeroTier On Startup" HorizontalAlignment="Left" Margin="10" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0"/>
-		
-		<TextBlock Text="Central Instance:" Grid.Row="1" Grid.Column="0" Margin="10"/>
-		<TextBox x:Name="CentralInstanceTextBox" Grid.Row="1" Grid.Column="1" MinWidth="200" Margin="10"/>
-
-		<TextBlock Text="API Key:" Grid.Row="2" Grid.Column="0" Margin="10"/>
-		<TextBox x:Name="APIKeyTextBox" Grid.Row="2" Grid.Column="1" MinWidth="200" Margin="10"/>
-
-		<Button x:Name="OKButton" Grid.Row="3" Grid.Column="1" Background="#FFFFB354" Content="OK" Margin="10" Width="90" HorizontalAlignment="Right" Click="OKButton_Clicked"/>
-	</Grid>
-</Window>

+ 0 - 74
attic/WinUI/PreferencesView.xaml.cs

@@ -1,74 +0,0 @@
-using Microsoft.Win32;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for PreferencesView.xaml
-    /// </summary>
-    public partial class PreferencesView : Window
-    {
-        public static string AppName = "ZeroTier One";
-        private RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
-        private string AppLocation = System.Reflection.Assembly.GetExecutingAssembly().Location;
-        public PreferencesView()
-        {
-            InitializeComponent();
-
-
-            string keyValue = rk.GetValue(AppName) as string;
-
-            if (keyValue != null && keyValue.Equals(AppLocation))
-            {
-                startupCheckbox.IsChecked = true;
-            }
-
-            CentralAPI api = CentralAPI.Instance;
-            CentralInstanceTextBox.Text = api.Central.ServerURL;
-            APIKeyTextBox.Text = api.Central.APIKey;
-        }
-
-        private void OKButton_Clicked(object sender, RoutedEventArgs e)
-        {
-            CentralAPI api = CentralAPI.Instance;
-
-            if (api.Central.ServerURL != CentralInstanceTextBox.Text ||
-                api.Central.APIKey != APIKeyTextBox.Text)
-            {
-                CentralServer newServer = new CentralServer();
-                newServer.ServerURL = CentralInstanceTextBox.Text;
-                newServer.APIKey = APIKeyTextBox.Text;
-
-                api.Central = newServer;
-            }
-
-            if (startupCheckbox.IsChecked.HasValue && (bool)startupCheckbox.IsChecked)
-            {
-                rk.SetValue(AppName, AppLocation);
-            }
-            else
-            {
-                string keyValue = rk.GetValue(AppName) as string;
-
-                if (keyValue != null && keyValue.Equals(AppLocation))
-                {
-                    rk.DeleteValue(AppName);
-                }
-            }
-
-            Close();
-        }
-    }
-}

+ 0 - 56
attic/WinUI/Properties/AssemblyInfo.cs

@@ -1,56 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ZeroTier One")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("ZeroTier, Inc")]
-[assembly: AssemblyProduct("ZeroTier One")]
-[assembly: AssemblyCopyright("Copyright ©  2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set 
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
-//inside a <PropertyGroup>.  For example, if you are using US english
-//in your source files, set the <UICulture> to en-US.  Then uncomment
-//the NeutralResourceLanguage attribute below.  Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
-    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
-    //(used if a resource is not found in the page, 
-    // or application resource dictionaries)
-    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
-    //(used if a resource is not found in the page, 
-    // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: NeutralResourcesLanguageAttribute("en-US")]

+ 0 - 73
attic/WinUI/Properties/Resources.Designer.cs

@@ -1,73 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace WinUI.Properties {
-    using System;
-    
-    
-    /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
-    /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
-        }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinUI.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
-        /// </summary>
-        internal static System.Drawing.Icon ZeroTierIcon {
-            get {
-                object obj = ResourceManager.GetObject("ZeroTierIcon", resourceCulture);
-                return ((System.Drawing.Icon)(obj));
-            }
-        }
-    }
-}

+ 0 - 124
attic/WinUI/Properties/Resources.resx

@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-  <data name="ZeroTierIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\ZeroTierIcon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
-</root>

+ 0 - 30
attic/WinUI/Properties/Settings.Designer.cs

@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace WinUI.Properties
-{
-
-
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
-        public static Settings Default
-        {
-            get
-            {
-                return defaultInstance;
-            }
-        }
-    }
-}

+ 0 - 7
attic/WinUI/Properties/Settings.settings

@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>

BIN
attic/WinUI/Resources/ZeroTierIcon.ico


+ 0 - 1128
attic/WinUI/Simple Styles.xaml

@@ -1,1128 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
-                    xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006" 
-                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-                    mc:Ignorable="d"
-                    xmlns:tb="http://www.hardcodet.net/taskbar">
-	
-	<!-- SimpleStyles.XAML defines a set of control styles which are simplified starting points for creating your own controls -->
-	
-	<!-- Brushes : These are used to define the color for background, foreground, selection, enabled etc of all controls
-	If you want to change the color of a control you can just chnage the brush; if you want to add a new shape or change arrangement then also edit the template -->
-	
-	<!-- NormalBrush is used as the Background for SimpleButton, SimpleRepeatButton -->
-	<LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0">
-		<GradientStop Color="#EEE" Offset="0.0"/>
-		<GradientStop Color="#CCC" Offset="1.0"/>
-	</LinearGradientBrush>
-	<LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0,1" StartPoint="0,0">
-		<GradientStop Color="#CCC" Offset="0.0"/>
-		<GradientStop Color="#444" Offset="1.0"/>
-	</LinearGradientBrush>
-	
-	<!-- LightBrush is used for content areas such as Menu, Tab Control background -->
-	<LinearGradientBrush x:Key="LightBrush" EndPoint="0,1" StartPoint="0,0">
-		<GradientStop Color="#FFF" Offset="0.0"/>
-		<GradientStop Color="#EEE" Offset="1.0"/>
-	</LinearGradientBrush>
-	
-	<!-- MouseOverBrush is used for MouseOver in Button, Radio Button, CheckBox -->
-	<LinearGradientBrush x:Key="MouseOverBrush" EndPoint="0,1" StartPoint="0,0">
-		<GradientStop Color="#FFF" Offset="0.0"/>
-		<GradientStop Color="#AAA" Offset="1.0"/>
-	</LinearGradientBrush>
-	
-	<!-- PressedBrush is used for Pressed in Button, Radio Button, CheckBox -->
-	<LinearGradientBrush x:Key="PressedBrush" EndPoint="0,1" StartPoint="0,0">
-		<GradientStop Color="#BBB" Offset="0.0"/>
-		<GradientStop Color="#EEE" Offset="0.1"/>
-		<GradientStop Color="#EEE" Offset="0.9"/>
-		<GradientStop Color="#FFF" Offset="1.0"/>
-	</LinearGradientBrush>
-	<LinearGradientBrush x:Key="PressedBorderBrush" EndPoint="0,1" StartPoint="0,0">
-		<GradientStop Color="#444" Offset="0.0"/>
-		<GradientStop Color="#888" Offset="1.0"/>
-	</LinearGradientBrush>
-
-	<!-- SelectedBackgroundBrush is used for the Selected item in ListBoxItem, ComboBoxItem-->
-	<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD"/>	
-
-	<!-- Disabled Brushes are used for the Disabled look of each control -->
-	<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
-	<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE"/>
-	<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA"/>
-
-	<!-- Used for background of ScrollViewer, TreeView, ListBox, Expander, TextBox, Tab Control -->
-	<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF"/>
-	
-	<!-- DefaultedBorderBrush is used to show KeyBoardFocus -->
-	<LinearGradientBrush x:Key="DefaultedBorderBrush" EndPoint="0,1" StartPoint="0,0">
-		<GradientStop Color="#777" Offset="0.0"/>
-		<GradientStop Color="#000" Offset="1.0"/>
-	</LinearGradientBrush>
-
-	<SolidColorBrush x:Key="SolidBorderBrush" Color="#888"/>
-	<SolidColorBrush x:Key="LightBorderBrush" Color="#AAA"/>
-	<SolidColorBrush x:Key="LightColorBrush" Color="#DDD"/>
-	
-	<!-- Used for Checkmark, Radio button, TreeViewItem, Expander ToggleButton glyphs -->
-	<SolidColorBrush x:Key="GlyphBrush" Color="#444"/>
-	
-	
-	<!-- Style and Template pairs are used to define each control Part -->
-	<!-- The Style provides default values on the control; the Template gives the elements for each control -->
-	
-	<!-- SimpleButtonFocusVisual is used to show keyboard focus around a SimpleButton control -->
-	<Style x:Key="SimpleButtonFocusVisual">
-		<Setter Property="Control.Template">
-			<Setter.Value>
-				<ControlTemplate>
-					<Border>
-						<Rectangle Margin="2" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
-					</Border>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Button - This control sets brushes on each state. Note that these brushes must be listed above since they are static resources -->
-	<Style x:Key="SimpleButton" TargetType="{x:Type Button}" BasedOn="{x:Null}">
-		<Setter Property="FocusVisualStyle" Value="{DynamicResource SimpleButtonFocusVisual}"/>
-		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Button}">
-					
-					<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
-					<Grid x:Name="Grid">
-						<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/>
-						
-						<!-- Content Presenter is where the text content etc is placed by the control -->
-						<!-- The bindings are useful so that the control can be parameterized without editing the template -->
-						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
-					</Grid>
-					
-					<!--Each state sets a brush on the Border in the template -->
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsKeyboardFocused" Value="true">
-							<Setter Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsMouseOver" Value="true">
-							<Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsPressed" Value="true">
-							<Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="true"/>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<Style x:Key="RadioButtonFocusVisual">
-		<Setter Property="Control.Template">
-			<Setter.Value>
-				<ControlTemplate>
-					<Border>
-						<Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
-					</Border>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<Style x:Key="CheckBoxFocusVisual">
-		<Setter Property="Control.Template">
-			<Setter.Value>
-				<ControlTemplate>
-					<Border>
-						<Rectangle Margin="15,0,0,0" Stroke="#60000000" StrokeThickness="1" StrokeDashArray="1 2"/>
-					</Border>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple CheckBox -->
-	<Style x:Key="SimpleCheckBox" TargetType="{x:Type CheckBox}">
-		<Setter Property="SnapsToDevicePixels" Value="true"/>
-		<Setter Property="FocusVisualStyle" Value="{DynamicResource CheckBoxFocusVisual}"/>
-		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type CheckBox}">
-					
-					<!-- BulletDecorator is used to provide baseline alignment between the checkmark and the Content -->
-					<BulletDecorator Background="Transparent">
-						<BulletDecorator.Bullet>
-							<Grid Width="13" Height="13">
-								<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
-								<Path x:Name="CheckMark" Stroke="{DynamicResource GlyphBrush}" StrokeThickness="2" SnapsToDevicePixels="False" Data="M 0 0 L 13 13 M 0 13 L 13 0"/>
-							</Grid>
-						</BulletDecorator.Bullet>
-						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
-					</BulletDecorator>
-					
-					<!-- This uses Visibility to hide and show the CheckMark on IsChecked -->
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsChecked" Value="false">
-							<Setter Property="Visibility" Value="Collapsed" TargetName="CheckMark"/>
-						</Trigger>
-						<Trigger Property="IsMouseOver" Value="true">
-							<Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsPressed" Value="true">
-							<Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-					
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Radio Button -->
-	<Style x:Key="SimpleRadioButton" TargetType="{x:Type RadioButton}">
-		<Setter Property="SnapsToDevicePixels" Value="true"/>
-		<Setter Property="FocusVisualStyle" Value="{DynamicResource RadioButtonFocusVisual}"/>
-		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type RadioButton}">
-				
-					<!-- BulletDecorator is used to provide baseline alignment between the checkmark and the Content -->
-					<BulletDecorator Background="Transparent">
-						<BulletDecorator.Bullet>
-							<Grid Width="13" Height="13">
-								<Ellipse x:Name="Ellipse_Border" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
-								<Ellipse Margin="4" x:Name="CheckMark" Fill="{DynamicResource GlyphBrush}"/>
-							</Grid>
-						</BulletDecorator.Bullet>
-						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
-					</BulletDecorator>
-					
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsChecked" Value="false">
-							<Setter Property="Visibility" Value="Collapsed" TargetName="CheckMark"/>
-						</Trigger>
-						<Trigger Property="IsMouseOver" Value="true">
-							<Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Ellipse_Border"/>
-						</Trigger>
-						<Trigger Property="IsPressed" Value="true">
-							<Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Ellipse_Border"/>
-							<Setter Property="Stroke" Value="{DynamicResource GlyphBrush}" TargetName="Ellipse_Border"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Ellipse_Border"/>
-							<Setter Property="Stroke" Value="#40000000" TargetName="Ellipse_Border"/>
-							<Setter Property="Foreground" Value="#80000000"/>
-						</Trigger>
-						
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Repeat Button - This is used by Simple ScrollBar for the up and down buttons -->
-	<Style x:Key="SimpleRepeatButton" d:IsControlPart="True" TargetType="{x:Type RepeatButton}" BasedOn="{x:Null}">
-		<Setter Property="Background" Value="{DynamicResource NormalBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type RepeatButton}">
-					<Grid>
-						<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
-						<ContentPresenter HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsKeyboardFocused" Value="true">
-							<Setter Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsMouseOver" Value="true">
-							<Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsPressed" Value="true">
-							<Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Thumb - The Thumb is the draggable part of the Scrollbar -->
-	<Style x:Key="SimpleThumbStyle" d:IsControlPart="True" TargetType="{x:Type Thumb}" BasedOn="{x:Null}">
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Thumb}">
-					<Grid Margin="0,0,0,0" x:Name="Grid">
-						<Rectangle HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="2" RadiusY="2" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsFocused" Value="True"/>
-						<Trigger Property="IsMouseOver" Value="True"/>
-						<Trigger Property="IsEnabled" Value="False"/>
-						<Trigger Property="IsDragging" Value="True"/>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple ScrollRepeatButton Style - This RepeatButton is used above and below the Thumb in the Scrollbar. They are set to transparent si that they do not show over the scrollbar -->
-	<Style x:Key="SimpleScrollRepeatButtonStyle" d:IsControlPart="True" TargetType="{x:Type RepeatButton}">
-		<Setter Property="Background" Value="Transparent"/>
-		<Setter Property="BorderBrush" Value="Transparent"/>
-		<Setter Property="IsTabStop" Value="false"/>
-		<Setter Property="Focusable" Value="false"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type RepeatButton}">
-					<Grid>
-						<Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
-					</Grid>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple ScrollBar  This makes use of SimpleThumb, SimpleRepeatButton and SimpleScrollRepeatButton -->
-	
-	<Style x:Key="SimpleScrollBar" TargetType="{x:Type ScrollBar}">
-		<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
-		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ScrollBar}">
-					<Grid x:Name="GridRoot" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Background="{TemplateBinding Background}">
-						<Grid.RowDefinitions>
-							<RowDefinition MaxHeight="18"/>
-							<RowDefinition Height="0.00001*"/>
-							<RowDefinition MaxHeight="18"/>
-						</Grid.RowDefinitions>
-						
-						<RepeatButton x:Name="DecreaseRepeat" Style="{DynamicResource SimpleRepeatButton}" Command="ScrollBar.LineUpCommand">
-							<Grid>
-								<Path x:Name="DecreaseArrow" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" Data="M 0 4 L 8 4 L 4 0 Z"/>
-							</Grid>
-						</RepeatButton>
-						
-						<!-- Track is a special layout container which sizes the thumb and the repeat button which do jump scrolling either side of it -->
-						<Track Grid.Row="1" x:Name="PART_Track" Orientation="Vertical" IsDirectionReversed="true">
-							<Track.Thumb>
-								<Thumb Style="{DynamicResource SimpleThumbStyle}"/>
-							</Track.Thumb>
-							<Track.IncreaseRepeatButton>
-								<RepeatButton x:Name="PageUp" Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="ScrollBar.PageDownCommand"/>
-							</Track.IncreaseRepeatButton>
-							<Track.DecreaseRepeatButton>
-								<RepeatButton x:Name="PageDown" Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="ScrollBar.PageUpCommand"/>
-							</Track.DecreaseRepeatButton>
-						</Track>
-						
-						<RepeatButton Grid.Row="2" x:Name="IncreaseRepeat" Style="{DynamicResource SimpleRepeatButton}" Command="ScrollBar.LineDownCommand">
-							<Grid>
-								<Path x:Name="IncreaseArrow" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" Data="M 0 0 L 4 4 L 8 0 Z"/>
-							</Grid>
-						</RepeatButton>
-					</Grid>
-					
-					<!-- This uses a single template for ScrollBar and rotate it to be Horizontal
-					It also changes the commands so that the it does Left and Right instead of Up and Down Commands -->
-					<ControlTemplate.Triggers>
-						<Trigger Property="Orientation" Value="Horizontal">
-
-							<!-- Rotate the ScrollBar from Vertical to Horizontal -->
-							<Setter Property="LayoutTransform" TargetName="GridRoot">
-								<Setter.Value>
-									<RotateTransform Angle="-90"/>
-								</Setter.Value>
-							</Setter>
-							
-							<!-- Track is bound to Orientation internally, so we need to rotate it back to Vertical -->
-							<Setter TargetName="PART_Track" Property="Orientation" Value="Vertical"/>
-					
-							<!-- Change the commands to do Horizontal commands -->
-							<Setter Property="Command" Value="ScrollBar.LineLeftCommand" TargetName="DecreaseRepeat"/>
-							<Setter Property="Command" Value="ScrollBar.LineRightCommand" TargetName="IncreaseRepeat"/>
-							<Setter Property="Command" Value="ScrollBar.PageLeftCommand" TargetName="PageDown"/>
-							<Setter Property="Command" Value="ScrollBar.PageRightCommand" TargetName="PageUp"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple ScrollViewer 
-	ScrollViewer is a Grid control which has a ContentPresenter and a Horizontal and Vertical ScrollBar 
-	It is used by ListBox, MenuItem, ComboBox, and TreeView -->
-	<Style x:Key="SimpleScrollViewer" TargetType="{x:Type ScrollViewer}" BasedOn="{x:Null}">
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ScrollViewer}">
-					<Grid Background="{TemplateBinding Background}">
-						<Grid.ColumnDefinitions>
-							<ColumnDefinition Width="*"/>
-							<ColumnDefinition Width="Auto"/>
-						</Grid.ColumnDefinitions>
-						<Grid.RowDefinitions>
-							<RowDefinition Height="*"/>
-							<RowDefinition Height="Auto"/>
-						</Grid.RowDefinitions>
-						<ScrollContentPresenter Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
-						
-						<!-- The visibility of the ScrollBars is controlled by the implementation fo the control -->
-						<ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" x:Name="PART_HorizontalScrollBar" Style="{DynamicResource SimpleScrollBar}" Orientation="Horizontal" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" />
-						<ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" x:Name="PART_VerticalScrollBar" Style="{DynamicResource SimpleScrollBar}" Orientation="Vertical" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" />
-					</Grid>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple ListBox - This uses SimpleScrollViewer to allow items to be scrolled and SimpleListBoxItem to define the look of each item -->
-	<Style x:Key="SimpleListBox" TargetType="{x:Type ListBox}">
-		<Setter Property="SnapsToDevicePixels" Value="true"/>
-		<Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource SolidBorderBrush}"/>
-		<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
-		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
-		<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ListBox}">
-					<Grid>
-						<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
-						<ScrollViewer Margin="1" Style="{DynamicResource SimpleScrollViewer}" Focusable="false" Background="{TemplateBinding Background}">
-							
-							<!-- The StackPanel is used to display the children by setting IsItemsHost to be Trus -->
-							<StackPanel Margin="2" IsItemsHost="true"/>
-							
-						</ScrollViewer>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsGrouping" Value="true">
-							<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple ListBoxItem - This is used for each Item in a ListBox. The item's content is placed in the ContentPresenter -->
-	
-	<Style x:Key="SimpleListBoxItem" d:IsControlPart="True" TargetType="{x:Type ListBoxItem}">
-		<Setter Property="SnapsToDevicePixels" Value="true"/>
-		<Setter Property="OverridesDefaultStyle" Value="true"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ListBoxItem}">
-					<Grid SnapsToDevicePixels="true">
-						<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
-						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						
-						<!-- Change IsSelected SelectedBackgroundBrush to set the selection color for the items -->
-						<Trigger Property="IsSelected" Value="true">
-							<Setter Property="Background" Value="{DynamicResource SelectedBackgroundBrush}" TargetName="Border"/>
-						</Trigger>
-						
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Expander ToggleButton - This Button is used by the Expander control. When it is toggled it switches visibility on the Up_Arrow and Down_Arrow -->
-	<ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
-		<Grid>
-			<Rectangle Margin="0,0,0,0" x:Name="Rectangle" Fill="Transparent" Stroke="{DynamicResource NormalBorderBrush}"/>
-			<Path HorizontalAlignment="Center" x:Name="Up_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z"/>
-			<Path Visibility="Collapsed" HorizontalAlignment="Center" x:Name="Down_Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 4 L 4 0 L 8 4 Z"/>
-		</Grid>
-		<ControlTemplate.Triggers>
-			<Trigger Property="IsMouseOver" Value="true">
-				<Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Rectangle"/>
-			</Trigger>
-			<Trigger Property="IsPressed" Value="true">
-				<Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Rectangle"/>
-			</Trigger>
-			<Trigger Property="IsChecked" Value="true">
-				<Setter Property="Visibility" Value="Visible" TargetName="Down_Arrow"/>
-				<Setter Property="Visibility" Value="Collapsed" TargetName="Up_Arrow"/>
-			</Trigger>
-			<Trigger Property="IsEnabled" Value="False">
-				<Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle"/>
-				<Setter Property="Stroke" Value="{DynamicResource DisabledBorderBrush}" TargetName="Rectangle"/>
-				<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-				<Setter Property="Fill" Value="{DynamicResource DisabledForegroundBrush}" TargetName="Up_Arrow"/>
-			</Trigger>
-		</ControlTemplate.Triggers>
-	</ControlTemplate>
-	
-	<!-- Simple Expander 
-	 This uses the Simpler ExpanderToggleButton. It sets Visibility on the ContentPresenter to expand
-	 Limitations : The Simple Expander only expands down -->
-	<Style x:Key="SimpleExpander" TargetType="{x:Type Expander}">
-		<Setter Property="Background" Value="{DynamicResource LightBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Expander}">
-					<Grid>
-						<Grid.RowDefinitions>
-							<RowDefinition Height="Auto"/>
-							<RowDefinition Height="*" x:Name="ContentRow"/>
-						</Grid.RowDefinitions>
-						<Border Grid.Row="0" x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2,2,0,0">
-							<Grid>
-								<Grid.ColumnDefinitions>
-									<ColumnDefinition Width="20"/>
-									<ColumnDefinition Width="*"/>
-								</Grid.ColumnDefinitions>
-								<ToggleButton Template="{DynamicResource ExpanderToggleButton}" Background="{DynamicResource NormalBrush}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" OverridesDefaultStyle="True"/>
-								<ContentPresenter Grid.Column="1" Margin="4" RecognizesAccessKey="True" ContentSource="Header"/>
-							</Grid>
-						</Border>
-						<Border Visibility="Collapsed" Grid.Row="1" x:Name="ExpandSite" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1,0,1,1" CornerRadius="0,0,2,2">
-							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="false"/>
-						</Border>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsExpanded" Value="True">
-							<Setter Property="Visibility" Value="Visible" TargetName="ExpandSite"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="False">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple ComboBox Toggle Button - This is used in ComboBox to expand and collapse the ComboBox Popup-->
-	<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
-		<Grid>
-			<Grid.ColumnDefinitions>
-				<ColumnDefinition/>
-				<ColumnDefinition Width="20"/>
-			</Grid.ColumnDefinitions>
-			<Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
-			<Rectangle Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource WindowBackgroundBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
-			<Path Grid.Column="1" HorizontalAlignment="Center" x:Name="Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z"/>
-		</Grid>
-		<ControlTemplate.Triggers>
-			<Trigger Property="IsMouseOver" Value="true">
-				<Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Rectangle"/>
-			</Trigger>
-			<Trigger Property="IsChecked" Value="true">
-				<Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Rectangle"/>
-			</Trigger>
-			<Trigger Property="IsEnabled" Value="False">
-				<Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle"/>
-				<Setter Property="Stroke" Value="{DynamicResource DisabledBorderBrush}" TargetName="Rectangle"/>
-				<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-				<Setter Property="Fill" Value="{DynamicResource DisabledForegroundBrush}" TargetName="Arrow"/>
-			</Trigger>
-		</ControlTemplate.Triggers>
-	</ControlTemplate>
-	
-	<!-- This is the area which contains the selected item in the ComboBox -->
-	
-	<ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
-		<!-- This must be named as PART_ContentHost -->
-		<Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}"/>
-	</ControlTemplate>
-	
-	<!-- Simple ComboBox 
-	This uses the ComboBoxToggleButton to expand and collapse a Popup control
-	SimpleScrollViewer to allow items to be scrolled and SimpleComboBoxItem to define the look of each item 
-	The Popup shows a list of items in a StackPanel-->
-	
-	<Style x:Key="SimpleComboBox" TargetType="{x:Type ComboBox}">
-		<Setter Property="SnapsToDevicePixels" Value="true"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ComboBox}">
-					<Grid>
-						<!-- The ToggleButton is databound to the ComboBox itself to toggle IsDropDownOpen -->
-						<ToggleButton Grid.Column="2" Template="{DynamicResource ComboBoxToggleButton}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
-						<ContentPresenter HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False"/>
-						
-						<!-- The TextBox must be named PART_EditableTextBox or ComboBox will not recognize it -->
-						<TextBox Visibility="Hidden" Template="{DynamicResource ComboBoxTextBox}" HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="PART_EditableTextBox" Style="{x:Null}" VerticalAlignment="Center" Focusable="True" Background="Transparent" IsReadOnly="{TemplateBinding IsReadOnly}"/>
-						
-						<!-- The Popup shows the list of items in the ComboBox. IsOpen is databound to IsDropDownOpen which is toggled via the ComboBoxToggleButton -->
-						<Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
-							<Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
-								<Border x:Name="DropDownBorder" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1"/>
-								<ScrollViewer Margin="4,6,4,6" Style="{DynamicResource SimpleScrollViewer}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
-							
-									<!-- The StackPanel is used to display the children by setting IsItemsHost to be True -->
-									<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained"/>
-								
-								</ScrollViewer>
-							</Grid>
-						</Popup>
-					</Grid>
-					<ControlTemplate.Triggers>						
-						<!-- This forces the DropDown to have a minimum size if it is empty -->
-						<Trigger Property="HasItems" Value="false">
-							<Setter Property="MinHeight" Value="95" TargetName="DropDownBorder"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-						<Trigger Property="IsGrouping" Value="true">
-							<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
-						</Trigger>
-						<Trigger Property="AllowsTransparency" SourceName="Popup" Value="true">
-							<Setter Property="CornerRadius" Value="4" TargetName="DropDownBorder"/>
-							<Setter Property="Margin" Value="0,2,0,0" TargetName="DropDownBorder"/>
-						</Trigger>
-						<Trigger Property="IsEditable" Value="true">
-							<Setter Property="IsTabStop" Value="false"/>
-							<Setter Property="Visibility" Value="Visible" TargetName="PART_EditableTextBox"/>
-							<Setter Property="Visibility" Value="Hidden" TargetName="ContentSite"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple ComboBoxItem - This is used for each item inside of the ComboBox. You can change the selected color of each item below-->
-	<Style x:Key="SimpleComboBoxItem" d:IsControlPart="True" TargetType="{x:Type ComboBoxItem}">
-		<Setter Property="SnapsToDevicePixels" Value="true"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ComboBoxItem}">
-					<Grid SnapsToDevicePixels="true">
-						<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
-						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-					
-						<!-- Change IsHighlighted SelectedBackgroundBrush to set the selection color for the items -->
-						<Trigger Property="IsHighlighted" Value="true">
-							<Setter Property="Background" Value="{DynamicResource SelectedBackgroundBrush}" TargetName="Border"/>
-						</Trigger>
-						
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple SimpleProgressBar
-	 The template uses two Border controls to show the Track and Progress 
-	 Limitations : It only supports a horizontal orientated ProgressBar -->
-	<Style x:Key="SimpleProgressBar" TargetType="{x:Type ProgressBar}">
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ProgressBar}">
-					<Grid>
-					
-						<!-- This Border is the track. It must be named PART_Track -->
-						<Border x:Name="PART_Track" Background="{DynamicResource PressedBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="2"/>
-						
-						<!-- This Border shows progress. It must be named PART_Indicator for the control to function -->
-						<Border HorizontalAlignment="Left" x:Name="PART_Indicator" Background="{DynamicResource MouseOverBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" BorderThickness="1" CornerRadius="2"/>
-					
-					</Grid>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple TextBox -->
-	<Style x:Key="SimpleTextBox" TargetType="{x:Type TextBox}">
-		<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
-		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
-		<Setter Property="AllowDrop" Value="true"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type TextBox}">
-					<Grid>
-						<Border x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" Padding="2" CornerRadius="2">
-							
-							<!-- The implementation places the Content into the ScrollViewer. It must be named PART_ContentHost for the control to function -->
-							<ScrollViewer Margin="0" x:Name="PART_ContentHost" Style="{DynamicResource SimpleScrollViewer}" Background="{TemplateBinding Background}"/>
-						
-						</Border>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsEnabled" Value="False">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Label - This template is just a ContentPresenter that shows the content of the Label -->
-	<Style x:Key="SimpleLabel" TargetType="{x:Type Label}">
-		<Setter Property="HorizontalContentAlignment" Value="Left"/>
-		<Setter Property="VerticalContentAlignment" Value="Top"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Label}">
-					<Grid>
-						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsEnabled" Value="false"/>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Menu - This template uses a StackPanel to layout MenuItems --> 
-	<Style x:Key="SimpleMenu" TargetType="{x:Type Menu}">
-		<Setter Property="Background" Value="{DynamicResource LightBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
-		<Setter Property="SnapsToDevicePixels" Value="True"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Menu}">
-					<Grid>
-						<Border Margin="1" x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
-						<StackPanel Background="{TemplateBinding Background}" IsItemsHost="True" ClipToBounds="True" Orientation="Horizontal"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsEnabled" Value="False">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- This BitmapEffect is used by the Simple MenuItem -->
-	<DropShadowBitmapEffect x:Key="PopupDropShadow" ShadowDepth="1.5" Softness="0.15"/>
-	
-	<!-- Simple MenuItem - The template uses triggers to provide four different arrangements of menu item which are set via the Role property --> 
-	<Style x:Key="SimpleMenuItem" TargetType="{x:Type MenuItem}">
-		<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
-		<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
-		<Setter Property="Background" Value="Transparent"/>
-		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type MenuItem}">
-					<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
-						<Grid>
-							
-							<!-- The Grid is used to hold together columns for an Icon, Content, Glyph checkmark and Arrow to show the next level
-							 Size sharing is used in Grid so that the Icon, Content, Arrow for each MenuItem align together -->
-							<Grid.ColumnDefinitions>
-								<ColumnDefinition MinWidth="17" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
-								<ColumnDefinition Width="*"/>
-								<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
-								<ColumnDefinition Width="14"/>
-							</Grid.ColumnDefinitions>
-							
-							<!-- ContentPresenter to show an Icon if needed -->
-							<ContentPresenter Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
-							
-							<!-- Glyph is a checkmark if needed for a checkable menu -->
-							<Grid Visibility="Hidden" Margin="4,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center">
-								<Path x:Name="GlyphPanelpath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z" FlowDirection="LeftToRight"/>
-							</Grid>
-							
-							<!-- Content for the menu text etc -->
-							<ContentPresenter Grid.Column="1" Margin="{TemplateBinding Padding}" x:Name="HeaderHost" RecognizesAccessKey="True" ContentSource="Header"/>
-							
-							<!-- Arrow drawn path which points to the next level of the menu -->
-							<Grid Grid.Column="3" Margin="4,0,6,0" x:Name="ArrowPanel" VerticalAlignment="Center">
-								<Path x:Name="ArrowPanelPath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,0 L0,8 L4,4 z"/>
-							</Grid>
-							
-							<!-- The Popup is the body of the menu which expands down or across depending on the level of the item -->
-							<Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" x:Name="SubMenuPopup" Focusable="false" AllowsTransparency="true" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-3">
-								<Grid x:Name="SubMenu">
-									<Border x:Name="SubMenuBorder" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1"/>
-									
-									<!-- StackPanel holds children of the menu. This is set bu IsItemsHost=True -->
-									<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
-								</Grid>
-							</Popup>
-							
-						</Grid>
-					</Border>
-					
-					<!-- These triggers re-configure the four arrangements of MenuItem to show different levels of menu via Role -->
-					<ControlTemplate.Triggers>
-					
-						<!-- Role = TopLevelHeader : this is the root menu item in a menu; the Popup expands down -->
-						<Trigger Property="Role" Value="TopLevelHeader">
-							<Setter Property="Margin" Value="0,1,0,1"/>
-							<Setter Property="Padding" Value="6,3,6,3"/>
-							<Setter Property="Grid.IsSharedSizeScope" Value="true"/>
-							<Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup"/>
-							<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
-						</Trigger>
-						
-						<!-- Role = TopLevelItem :  this is a child menu item from the top level without any child items-->
-						<Trigger Property="Role" Value="TopLevelItem">
-							<Setter Property="Margin" Value="0,1,0,1"/>
-							<Setter Property="Padding" Value="6,3,6,3"/>
-							<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
-						</Trigger>
-						
-						<!-- Role = SubMenuHeader : this is a child menu item which does not have children -->
-						<Trigger Property="Role" Value="SubmenuHeader">
-							<Setter Property="DockPanel.Dock" Value="Top"/>
-							<Setter Property="Padding" Value="0,2,0,2"/>
-							<Setter Property="Grid.IsSharedSizeScope" Value="true"/>
-						</Trigger>
-						
-						<!-- Role = SubMenuItem : this is a child menu item which has children-->
-						<Trigger Property="Role" Value="SubmenuItem">
-							<Setter Property="DockPanel.Dock" Value="Top"/>
-							<Setter Property="Padding" Value="0,2,0,2"/>
-							<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
-						</Trigger>
-						<Trigger Property="IsSuspendingPopupAnimation" Value="true">
-							<Setter Property="PopupAnimation" Value="None" TargetName="SubMenuPopup"/>
-						</Trigger>
-						
-						<!-- If no Icon is present the we collapse the Icon Content -->
-						<Trigger Property="Icon" Value="{x:Null}">
-							<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
-						</Trigger>
-						
-						<!-- The GlyphPanel contains the CheckMark -->
-						<Trigger Property="IsChecked" Value="true">
-							<Setter Property="Visibility" Value="Visible" TargetName="GlyphPanel"/>
-							<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
-						</Trigger>
-						
-						<Trigger Property="AllowsTransparency" SourceName="SubMenuPopup" Value="true">
-							<Setter Property="Margin" Value="0,0,3,3" TargetName="SubMenu"/>
-							<Setter Property="SnapsToDevicePixels" Value="true" TargetName="SubMenu"/>
-							<Setter Property="BitmapEffect" Value="{DynamicResource PopupDropShadow}" TargetName="SubMenuBorder"/>
-						</Trigger>
-						
-						<!-- Using the system colors for the Menu Highlight and IsEnabled-->
-						<Trigger Property="IsHighlighted" Value="true">
-							<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" TargetName="Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!-- Simple Separator - This template is used for a Separator in a menu --> 
-	<Style x:Key="SimpleSeparator" TargetType="{x:Type Separator}">
-		<Setter Property="Height" Value="1"/>
-		<Setter Property="Margin" Value="0,2,0,2"/>
-		<Setter Property="Focusable" Value="false"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Separator}">
-					<Border BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1"/>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-
-	<!-- Simple TabControl 
-	This template uses Simple TabItem for each Tab. The TabItems are placed in the TabPanel
-	Limitations : The Simple TabControl only allow the Tabs to be shown at the top of the Tab control. You can re-position the TabPanel to change this-->
-	
-	<Style x:Key="SimpleTabControl" TargetType="{x:Type TabControl}">
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type TabControl}">
-					<Grid KeyboardNavigation.TabNavigation="Local">
-						<Grid.RowDefinitions>
-							<RowDefinition Height="Auto"/>
-							<RowDefinition Height="*"/>
-						</Grid.RowDefinitions>
-						
-						<!-- TabPanel is a layout container which allows the TabItems to wrap and re-order when selected
-						The implementation knows to use this control because it is marked IsItemsHost = True -->
-						<TabPanel Grid.Row="0" Margin="0,0,4,-1" x:Name="HeaderPanel" Background="Transparent" IsItemsHost="True" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1"/>
-						
-						<Border Grid.Row="1" x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.TabIndex="2">
-							
-							<!-- The implementation switches the content. This control must be named PART_SelectedContentHost -->
-							<ContentPresenter Margin="4" x:Name="PART_SelectedContentHost" ContentSource="SelectedContent"/>
-							
-						</Border>
-					</Grid>
-					
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsEnabled" Value="False">
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!--Simple TabItem -->
-	<Style x:Key="SimpleTabItem" d:IsControlPart="True" TargetType="{x:Type TabItem}">
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type TabItem}">
-					<Grid>
-						<Border Margin="0,0,-4,0" x:Name="Border" Background="{DynamicResource LightBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1,1,1,1" CornerRadius="2,12,0,0">
-							<ContentPresenter HorizontalAlignment="Center" Margin="12,2,12,2" x:Name="ContentSite" VerticalAlignment="Center" RecognizesAccessKey="True" ContentSource="Header"/>
-						</Border>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsSelected" Value="True">
-							<Setter Property="Panel.ZIndex" Value="100"/>
-							<Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderThickness" Value="1,1,1,0" TargetName="Border"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="False">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!--Simple Simple SliderThumb - The Thumb is the draggable part of a Slider-->
-	<Style x:Key="SimpleSliderThumb" d:IsControlPart="True" TargetType="{x:Type Thumb}">
-		<Setter Property="SnapsToDevicePixels" Value="true"/>
-		<Setter Property="Height" Value="14"/>
-		<Setter Property="Width" Value="14"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Thumb}">
-					<Grid>
-						<Ellipse x:Name="Ellipse" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}" StrokeThickness="1"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsMouseOver" Value="True">
-							<Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Ellipse"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Ellipse"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!--Simple Simple Slider
-	Similiar to ScrollBar this template uses Track to layout the draggable Thumb which has an up and down repeat button
-	It uses Simple SliderThumb and SimpleScrollRepeatButtonStyle for the page up and down repeat buttons -->
-	<Style x:Key="SimpleSlider" TargetType="{x:Type Slider}">
-		<Setter Property="Background" Value="{DynamicResource LightBrush}"/>
-		<Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type Slider}">
-					<Grid x:Name="GridRoot">
-						<Grid.RowDefinitions>
-							<RowDefinition Height="Auto"/>
-							<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
-							<RowDefinition Height="Auto"/>
-						</Grid.RowDefinitions>
-						
-						<!-- TickBar shows the ticks for Slider -->
-						<TickBar Visibility="Collapsed" x:Name="TopTick" Height="4" SnapsToDevicePixels="True" Placement="Top" Fill="{DynamicResource GlyphBrush}"/>
-						<Border Grid.Row="1" Margin="0" x:Name="Border" Height="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/>
-						
-						<!-- The Track lays out the repeat buttons and thumb -->
-						<Track Grid.Row="1" x:Name="PART_Track">
-							<Track.Thumb>
-								<Thumb Style="{DynamicResource SimpleSliderThumb}"/>
-							</Track.Thumb>
-							<Track.IncreaseRepeatButton>
-								<RepeatButton Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="Slider.IncreaseLarge"/>
-							</Track.IncreaseRepeatButton>
-							<Track.DecreaseRepeatButton>
-								<RepeatButton Style="{DynamicResource SimpleScrollRepeatButtonStyle}" Command="Slider.DecreaseLarge"/>
-							</Track.DecreaseRepeatButton>
-						</Track>
-						
-						<TickBar Visibility="Collapsed" Grid.Row="2" x:Name="BottomTick" Height="4" SnapsToDevicePixels="True" Placement="Bottom" Fill="{TemplateBinding Foreground}"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="TickPlacement" Value="TopLeft">
-							<Setter Property="Visibility" Value="Visible" TargetName="TopTick"/>
-						</Trigger>
-						<Trigger Property="TickPlacement" Value="BottomRight">
-							<Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/>
-						</Trigger>
-						<Trigger Property="TickPlacement" Value="Both">
-							<Setter Property="Visibility" Value="Visible" TargetName="TopTick"/>
-							<Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/>
-						</Trigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
-							<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
-						</Trigger>
-						
-						<!-- Use a rotation to create a Vertical Slider form the default Horizontal -->
-						<Trigger Property="Orientation" Value="Vertical">
-							<Setter Property="LayoutTransform" TargetName="GridRoot">
-								<Setter.Value>
-									<RotateTransform Angle="-90"/>
-								</Setter.Value>
-							</Setter>
-							<!-- Track rotates itself based on orientation so need to force it back -->
-							<Setter TargetName="PART_Track" Property="Orientation" Value="Horizontal"/>
-						</Trigger>
-						
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!--Simple Tree View - This lays out TreeViewItems within a ScrollViewer -->
-	<Style x:Key="SimpleTreeView" TargetType="{x:Type TreeView}">
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type TreeView}">
-					<Grid>
-						<Border x:Name="Border" Background="{DynamicResource WindowBackgroundBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="1">
-							<ScrollViewer Style="{DynamicResource SimpleScrollViewer}" Focusable="False" Background="{TemplateBinding Background}" Padding="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="False">
-								<ItemsPresenter/>
-							</ScrollViewer>
-						</Border>
-					</Grid>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!--Simple TreeViewItem ToggleButton - + and - button to expand and collapse a TreeViewItem -->
-	<Style x:Key="SimpleTreeViewItemToggleButton" d:IsControlPart="True" TargetType="{x:Type ToggleButton}">
-		<Setter Property="Focusable" Value="False"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type ToggleButton}">
-					<Grid Width="15" Height="13" Background="Transparent">
-						<Path Visibility="Collapsed" HorizontalAlignment="Left" Margin="1,1,1,1" x:Name="IsExpandedPath" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 4 L 8 4 L 4 8 Z"/>
-						<Path HorizontalAlignment="Left" Margin="1,1,1,1" x:Name="ExpandPath" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 4 0 L 8 4 L 4 8 Z"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsChecked" Value="True">
-							<Setter Property="Visibility" Value="Visible" TargetName="IsExpandedPath"/>
-							<Setter Property="Visibility" Value="Collapsed" TargetName="ExpandPath"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-	
-	<!--Simple TreeViewItem - The TreeViewItem template has a header which shows the Item and a Body which is an ItemsHost control which expands to show child items-->
-	<Style x:Key="SimpleTreeViewItem" d:IsControlPart="True" TargetType="{x:Type TreeViewItem}">
-		<Setter Property="Background" Value="Transparent"/>
-		<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
-		<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
-		<Setter Property="Padding" Value="1,0,0,0"/>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type TreeViewItem}">
-					<Grid>
-						<Grid.ColumnDefinitions>
-							<ColumnDefinition MinWidth="19" Width="Auto"/>
-							<ColumnDefinition Width="Auto"/>
-							<ColumnDefinition Width="*"/>
-						</Grid.ColumnDefinitions>
-						<Grid.RowDefinitions>
-							<RowDefinition Height="Auto"/>
-							<RowDefinition/>
-						</Grid.RowDefinitions>
-						<ToggleButton x:Name="Expander" Style="{DynamicResource SimpleTreeViewItemToggleButton}" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
-						<Border Grid.Column="1" x:Name="Selection_Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
-							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" x:Name="PART_Header" ContentSource="Header"/>
-						</Border>
-						<ItemsPresenter Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" x:Name="ItemsHost"/>
-					</Grid>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsExpanded" Value="false">
-							<Setter Property="Visibility" Value="Collapsed" TargetName="ItemsHost"/>
-						</Trigger>
-						<Trigger Property="HasItems" Value="false">
-							<Setter Property="Visibility" Value="Hidden" TargetName="Expander"/>
-						</Trigger>
-						<Trigger Property="IsSelected" Value="true">
-							<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" TargetName="Selection_Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
-						</Trigger>
-						<MultiTrigger>
-							<MultiTrigger.Conditions>
-								<Condition Property="IsSelected" Value="true"/>
-								<Condition Property="IsSelectionActive" Value="false"/>
-							</MultiTrigger.Conditions>
-							<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" TargetName="Selection_Border"/>
-							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
-						</MultiTrigger>
-						<Trigger Property="IsEnabled" Value="false">
-							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-
-    <tb:TaskbarIcon x:Key="NotifyIcon" IconSource="ZeroTierIcon.ico" ToolTipText="ZeroTier One"/>
-</ResourceDictionary>

+ 0 - 6
attic/WinUI/Themes/Generic.xaml

@@ -1,6 +0,0 @@
-<ResourceDictionary
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:local="clr-namespace:WinUI">
-
-</ResourceDictionary>

+ 0 - 65
attic/WinUI/ToolbarItem.xaml

@@ -1,65 +0,0 @@
-<Window x:Class="WinUI.ToolbarItem"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:WinUI"
-        xmlns:tb="http://www.hardcodet.net/taskbar"
-        xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
-        mc:Ignorable="d"
-        Height="300" Width="300" Visibility="Hidden" Name="Toolbar">
-
-    <Window.Resources>
-        <CollectionViewSource Source="{Binding ElementName=Toolbar, Path=NetworkCollection}" x:Key="KnownNetworks">
-            <CollectionViewSource.SortDescriptions>
-                <scm:SortDescription PropertyName="Header" Direction="Ascending"/>
-            </CollectionViewSource.SortDescriptions>
-        </CollectionViewSource>   
-    </Window.Resources>
-    
-    <Grid>
-        <tb:TaskbarIcon x:Name="MyNotifyIcon"
-                        IconSource="ZeroTierIcon.ico"
-                        ToolTipText="ZeroTier One"
-												MenuActivation="LeftOrRightClick">
-            <tb:TaskbarIcon.ContextMenu>
-                <ContextMenu>
-					<ContextMenu.ItemsSource>
-						<CompositeCollection>
-							<MenuItem Header="Node ID: unknown"
-                                      Click="ToolbarItem_NodeIDClicked"
-                                      x:Name="nodeIdMenuItem"/>
-							<Separator/>
-							<MenuItem Header="Join Network..."
-                                      Click="ToolbarItem_JoinNetworkClicked"/>
-							<MenuItem Header="Show Networks..."
-                                      Click="ToolbarItem_ShowNetworksClicked"/>
-							<Separator/>
-
-							<CollectionContainer Collection="{Binding Source={StaticResource KnownNetworks}}">
-
-							</CollectionContainer>
-
-							<Separator/>
-							<MenuItem Header="ZeroTier Central"
-												Click="ToolbarItem_CentralClicked"/>
-							<MenuItem Header="Create and Join Network"
-												Click="ToolbarItem_NewNetwork"
-												x:Name="newNetworkItem"/>
-							<Separator/>
-							<MenuItem Header="About..."
-                                      Click="ToolbarItem_AboutClicked"/>
-							<MenuItem Header="Preferences..."
-                                      Click="ToolbarItem_PreferencesClicked"/>
-							<Separator/>
-							<MenuItem Header="Quit"
-                                      Click="ToolbarItem_QuitClicked"/>
-
-						</CompositeCollection>
-					</ContextMenu.ItemsSource>
-				</ContextMenu>
-            </tb:TaskbarIcon.ContextMenu>
-
-        </tb:TaskbarIcon>
-    </Grid>
-</Window>

+ 0 - 353
attic/WinUI/ToolbarItem.xaml.cs

@@ -1,353 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Linq;
-using System.Net.Http;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-using System.Text.RegularExpressions;
-using System.Timers;
-using System.Windows.Threading;
-using System.IO;
-using System.Diagnostics;
-using Microsoft.Win32;
-
-namespace WinUI
-{
-    /// <summary>
-    /// Interaction logic for ToolbarItem.xaml
-    /// </summary>
-    public partial class ToolbarItem : Window, INotifyPropertyChanged
-    {
-        private APIHandler handler = APIHandler.Instance;
-
-        private Point netListLocation = new Point(0, 0);
-        private Point joinNetLocation = new Point(0, 0);
-        private Point aboutViewLocation = new Point(0, 0);
-        private Point prefsViewLocation = new Point(0, 0);
-
-        private NetworkListView netListView = new NetworkListView();
-        private JoinNetworkView joinNetView = null;
-        private AboutView aboutView = null;
-        private PreferencesView prefsView = null;
-
-        private NetworkMonitor mon = NetworkMonitor.Instance;
-
-        private ObservableCollection<MenuItem> _networkCollection = new ObservableCollection<MenuItem>();
-
-
-        public ObservableCollection<MenuItem> NetworkCollection
-        {
-            get { return _networkCollection; }
-            set { _networkCollection = value; }
-        }
-
-        private string nodeId;
-
-        public ToolbarItem()
-        {
-            InitializeComponent();
-
-            mon.SubscribeNetworkUpdates(updateNetworks);
-            mon.SubscribeStatusUpdates(updateStatus);
-
-            SystemEvents.DisplaySettingsChanged += new EventHandler(SystemEvents_DisplaySettingsChanged);
-        }
-
-        ~ToolbarItem()
-        {
-            mon.UnsubscribeNetworkUpdates(updateNetworks);
-            mon.UnsubscribeStatusUpdates(updateStatus);
-        }
-
-        public event PropertyChangedEventHandler PropertyChanged;
-
-        protected void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
-        {
-            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
-        }
-
-        private void updateNetworks(List<ZeroTierNetwork> networks)
-        {
-            if (networks != null)
-            {
-                Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    NetworkCollection.Clear();
-                    foreach (ZeroTierNetwork n in networks)
-                    {
-                        MenuItem item = new MenuItem();
-                        item.Header = n.Title.Replace("_", "__");
-                        item.DataContext = n;
-                        item.IsChecked = n.IsConnected;
-                        item.Click += ToolbarItem_NetworkClicked;
-
-                        NetworkCollection.Add(item);
-                    }
-                }));
-            }
-        }
-
-        private void updateStatus(ZeroTierStatus status) 
-        {
-            if (status != null)
-            {
-                Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
-                {
-                    nodeIdMenuItem.Header = "Node ID: " + status.Address;
-                    nodeIdMenuItem.IsEnabled = true;
-                    nodeId = status.Address;
-
-                    if (CentralAPI.Instance.HasAccessToken())
-                    {
-                        newNetworkItem.IsEnabled = true;
-                    }
-                    else
-                    {
-                        newNetworkItem.IsEnabled = false;
-                    }
-                }));
-            }
-        }
-
-        private void ToolbarItem_NodeIDClicked(object sender, System.Windows.RoutedEventArgs e)
-        {
-            try
-            {
-		            Clipboard.SetDataObject(nodeId);
-            }
-            catch (ArgumentNullException)
-            {
-                // tried to copy a null nodeId
-                Console.WriteLine("ArgumentNullException");
-            }
-            catch (Exception ex)
-            {
-                Console.WriteLine(ex.ToString());
-            }
-        }
-
-        private void ToolbarItem_ShowNetworksClicked(object sender, System.Windows.RoutedEventArgs e)
-        {
-            if (netListView == null)
-            {
-                netListView = new WinUI.NetworkListView();
-                netListView.Closed += ShowNetworksClosed;
-            }
-
-            bool netListNeedsMoving = true;
-            if (netListLocation.X > 0 && netListLocation.Y > 0)
-            {
-                netListView.Left = netListLocation.X;
-                netListView.Top = netListLocation.Y;
-                netListNeedsMoving = false;
-            }
-            
-            netListView.Show();
-
-            if (netListNeedsMoving)
-            {
-                setWindowPosition(netListView);
-                netListLocation.X = netListView.Left;
-                netListLocation.Y = netListView.Top;
-            }
-
-            netListView.Activate();
-        }
-
-        private void ShowNetworksClosed(object sender, System.EventArgs e)
-        {
-            netListView = null;
-        }
-
-        private void ToolbarItem_JoinNetworkClicked(object sender, System.EventArgs e)
-        {
-            if (joinNetView == null)
-            {
-                joinNetView = new JoinNetworkView();
-                joinNetView.Closed += JoinNetworkClosed;
-
-                bool needsMove = true;
-                if (joinNetLocation.X > 0 && joinNetLocation.Y > 0)
-                {
-                    joinNetView.Left = joinNetLocation.X;
-                    joinNetView.Top = joinNetLocation.Y;
-                    needsMove = false;
-                }
-
-                joinNetView.Show();
-
-                if (needsMove)
-                {
-                    setWindowPosition(joinNetView);
-                    joinNetLocation.X = joinNetView.Left;
-                    joinNetLocation.Y = joinNetView.Top;
-                }
-            }
-            else
-            {
-                joinNetView.Activate();
-            }
-        }
-
-        private void JoinNetworkClosed(object sender, System.EventArgs e)
-        {
-            joinNetView = null;
-        }
-
-        private void ToolbarItem_CentralClicked(object sender, System.EventArgs e)
-        {
-            Process.Start("https://my.zerotier.com");
-        }
-
-        private void ToolbarItem_AboutClicked(object sender, System.EventArgs e)
-        {
-            if (aboutView == null)
-            {
-                aboutView = new AboutView();
-                aboutView.Closed += AboutClosed;
-
-                bool needsMove = true;
-                if (aboutViewLocation.X > 0 && aboutViewLocation.Y > 0)
-                {
-                    aboutView.Left = aboutViewLocation.X;
-                    aboutView.Top = aboutViewLocation.Y;
-                    needsMove = false;
-                }
-
-                aboutView.Show();
-
-                if (needsMove)
-                {
-                    setWindowPosition(aboutView);
-                    aboutViewLocation.X = aboutView.Left;
-                    aboutViewLocation.Y = aboutView.Top;
-                }
-            }
-            else
-            {
-                aboutView.Activate();
-            }
-        }
-
-        private void AboutClosed(object sender, System.EventArgs e)
-        {
-            aboutView = null;
-        }
-
-        private void ToolbarItem_PreferencesClicked(object sender, System.EventArgs e)
-        {
-            if (prefsView == null)
-            {
-                prefsView = new PreferencesView();
-                prefsView.Closed += PreferencesClosed;
-
-                bool needsMove = true;
-                if (prefsViewLocation.X > 0 && prefsViewLocation.Y > 0)
-                {
-                    prefsView.Left = prefsViewLocation.X;
-                    prefsView.Top = prefsViewLocation.Y;
-                    needsMove = false;
-                }
-
-                prefsView.Show();
-
-                if (needsMove)
-                {
-                    setWindowPosition(prefsView);
-                    prefsViewLocation.X = prefsView.Left;
-                    prefsViewLocation.Y = prefsView.Top;
-                }
-            }
-            else
-            {
-                prefsView.Activate();
-            }
-        }
-
-        private void PreferencesClosed(object sender, System.EventArgs e)
-        {
-            prefsView = null;
-        }
-
-        private void ToolbarItem_QuitClicked(object sender, System.EventArgs e)
-        {
-            NetworkMonitor.Instance.StopMonitor();
-            Close();
-            Application.Current.Shutdown();
-        }
-
-        private void ToolbarItem_NetworkClicked(object sender, System.Windows.RoutedEventArgs e)
-        {
-            if(sender.GetType() == typeof(MenuItem))
-            {
-                MenuItem item = e.Source as MenuItem;
-                if (item.DataContext != null)
-                {
-                    ZeroTierNetwork network = item.DataContext as ZeroTierNetwork;
-                    if (item.IsChecked)
-                    {
-                        APIHandler.Instance.LeaveNetwork(Dispatcher, network.NetworkId);
-                    }
-                    else
-                    {
-                        APIHandler.Instance.JoinNetwork(Dispatcher, network.NetworkId, network.AllowManaged, network.AllowGlobal, network.AllowDefault);
-                    }
-                }   
-            }
-        }
-
-        private async void ToolbarItem_NewNetwork(object sender, System.Windows.RoutedEventArgs e)
-        {
-            if (CentralAPI.Instance.HasAccessToken())
-            {
-                CentralAPI api = CentralAPI.Instance;
-                CentralNetwork newNetwork = await api.CreateNewNetwork();
-
-                APIHandler handler = APIHandler.Instance;
-                handler.JoinNetwork(this.Dispatcher, newNetwork.Id);
-
-                string nodeId = APIHandler.Instance.NodeAddress();
-                bool authorized = await CentralAPI.Instance.AuthorizeNode(nodeId, newNetwork.Id);
-            }
-        }
-
-        private void setWindowPosition(Window w)
-        {
-            double width = w.ActualWidth;
-            double height = w.ActualHeight;
-
-            double screenHeight = SystemParameters.PrimaryScreenHeight;
-            double screenWidth = SystemParameters.PrimaryScreenWidth;
-
-            double top = screenHeight - height - 40;
-            double left = screenWidth - width - 20;
-            
-            w.Top = top;
-            w.Left = left;
-        }
-
-        private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e)
-        {
-            // reset cached locations to (0, 0) when display size changes
-            netListLocation.X = 0;
-            netListLocation.Y = 0;
-            joinNetLocation.X = 0;
-            joinNetLocation.Y = 0;
-            aboutViewLocation.X = 0;
-            aboutViewLocation.Y = 0;
-            prefsViewLocation.X = 0;
-            prefsViewLocation.Y = 0;
-        }
-    }
-}

+ 0 - 273
attic/WinUI/WinUI.csproj

@@ -1,273 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{4CCA6B98-5E64-45BF-AC34-19B3E2570DB1}</ProjectGuid>
-    <OutputType>WinExe</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>WinUI</RootNamespace>
-    <AssemblyName>ZeroTier One</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <WarningLevel>4</WarningLevel>
-    <ExpressionBlendVersion>5.0.40218.0</ExpressionBlendVersion>
-    <IsWebBootstrapper>false</IsWebBootstrapper>
-    <PublishUrl>publish\</PublishUrl>
-    <Install>true</Install>
-    <InstallFrom>Disk</InstallFrom>
-    <UpdateEnabled>false</UpdateEnabled>
-    <UpdateMode>Foreground</UpdateMode>
-    <UpdateInterval>7</UpdateInterval>
-    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
-    <UpdatePeriodically>false</UpdatePeriodically>
-    <UpdateRequired>false</UpdateRequired>
-    <MapFileExtensions>true</MapFileExtensions>
-    <AutorunEnabled>true</AutorunEnabled>
-    <ApplicationRevision>0</ApplicationRevision>
-    <ApplicationVersion>1.0.0.0</ApplicationVersion>
-    <UseApplicationTrust>false</UseApplicationTrust>
-    <BootstrapperEnabled>true</BootstrapperEnabled>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>true</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup>
-    <StartupObject>WinUI.App</StartupObject>
-  </PropertyGroup>
-  <PropertyGroup>
-    <ApplicationIcon>ZeroTierIcon.ico</ApplicationIcon>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>false</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignManifests>false</SignManifests>
-  </PropertyGroup>
-  <PropertyGroup />
-  <ItemGroup>
-    <Reference Include="Accessibility" />
-    <Reference Include="Hardcodet.Wpf.TaskbarNotification, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Hardcodet.NotifyIcon.Wpf.1.0.8\lib\net45\Hardcodet.Wpf.TaskbarNotification.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
-    <Reference Include="ReachFramework" />
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Deployment" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Net.Http" />
-    <Reference Include="System.Printing" />
-    <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="System.Xaml">
-      <RequiredTargetFramework>4.0</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="UIAutomationProvider" />
-    <Reference Include="UIAutomationTypes" />
-    <Reference Include="WindowsBase" />
-    <Reference Include="PresentationCore" />
-    <Reference Include="PresentationFramework" />
-  </ItemGroup>
-  <ItemGroup>
-    <ApplicationDefinition Include="App.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </ApplicationDefinition>
-    <Compile Include="AboutView.xaml.cs">
-      <DependentUpon>AboutView.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="CentralAPI.cs" />
-    <Compile Include="CentralLogin.cs" />
-    <Compile Include="CentralNetwork.cs" />
-    <Compile Include="CentralServer.cs" />
-    <Compile Include="CentralToken.cs" />
-    <Compile Include="CentralUser.cs" />
-    <Compile Include="ISwitchable.cs" />
-    <Compile Include="JoinNetworkView.xaml.cs">
-      <DependentUpon>JoinNetworkView.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="NetworkMonitor.cs" />
-    <Compile Include="NetworkNameGenerator.cs" />
-    <Compile Include="NetworkRoute.cs" />
-    <Compile Include="NetworksPage.xaml.cs">
-      <DependentUpon>NetworksPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="PeersPage.xaml.cs">
-      <DependentUpon>PeersPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="PreferencesView.xaml.cs">
-      <DependentUpon>PreferencesView.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="ToolbarItem.xaml.cs">
-      <DependentUpon>ToolbarItem.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="ZeroTierPeerPhysicalPath.cs" />
-    <Compile Include="ZeroTierPeer.cs" />
-    <Compile Include="ZeroTierNetwork.cs" />
-    <Compile Include="ZeroTierStatus.cs" />
-    <Page Include="AboutView.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-    <Page Include="JoinNetworkView.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-    <Page Include="NetworkListView.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Compile Include="APIHandler.cs" />
-    <Compile Include="App.xaml.cs">
-      <DependentUpon>App.xaml</DependentUpon>
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="NetworkListView.xaml.cs">
-      <DependentUpon>NetworkListView.xaml</DependentUpon>
-      <SubType>Code</SubType>
-    </Compile>
-    <Page Include="NetworkInfoView.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-    <Page Include="NetworksPage.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-    <Page Include="PeersPage.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-    <Page Include="PreferencesView.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-    <Page Include="Simple Styles.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="Themes\Generic.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="ToolbarItem.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="NetworkInfoView.xaml.cs">
-      <DependentUpon>NetworkInfoView.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Properties\AssemblyInfo.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-    </EmbeddedResource>
-    <None Include="app.manifest" />
-    <None Include="packages.config" />
-    <None Include="Properties\Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
-    <AppDesigner Include="Properties\" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <BootstrapperPackage Include=".NETFramework,Version=v4.5">
-      <Visible>False</Visible>
-      <ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
-      <Install>true</Install>
-    </BootstrapperPackage>
-    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
-      <Visible>False</Visible>
-      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
-      <Install>false</Install>
-    </BootstrapperPackage>
-    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
-      <Visible>False</Visible>
-      <ProductName>.NET Framework 3.5 SP1</ProductName>
-      <Install>false</Install>
-    </BootstrapperPackage>
-  </ItemGroup>
-  <ItemGroup>
-    <BlendEmbeddedFont Include="Fonts\segoeui.ttf">
-      <IsSystemFont>True</IsSystemFont>
-      <All>True</All>
-      <AutoFill>True</AutoFill>
-    </BlendEmbeddedFont>
-    <BlendEmbeddedFont Include="Fonts\segoeuib.ttf">
-      <IsSystemFont>True</IsSystemFont>
-      <All>True</All>
-      <AutoFill>True</AutoFill>
-    </BlendEmbeddedFont>
-    <BlendEmbeddedFont Include="Fonts\segoeuii.ttf">
-      <IsSystemFont>True</IsSystemFont>
-      <All>True</All>
-      <AutoFill>True</AutoFill>
-    </BlendEmbeddedFont>
-    <BlendEmbeddedFont Include="Fonts\segoeuiz.ttf">
-      <IsSystemFont>True</IsSystemFont>
-      <All>True</All>
-      <AutoFill>True</AutoFill>
-    </BlendEmbeddedFont>
-    <Resource Include="ZeroTierIcon.ico" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Resources\ZeroTierIcon.ico" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup>
-    <PostBuildEvent>copy "$(SolutionDir)\copyutil\bin\$(ConfigurationName)\copyutil.exe" "$(ProjectDir)\$(OutDir)\copyutil.exe"</PostBuildEvent>
-  </PropertyGroup>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

BIN
attic/WinUI/ZeroTierIcon.ico


+ 0 - 516
attic/WinUI/ZeroTierNetwork.cs

@@ -1,516 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    [Serializable]
-    public class ZeroTierNetwork : ISerializable, IEquatable<ZeroTierNetwork>, IComparable<ZeroTierNetwork>, INotifyPropertyChanged
-    {
-        private string networkId;
-        private string macAddress;
-        private string networkName;
-        private string networkStatus;
-        private string networkType;
-        private Int32 mtu;
-        private bool dhcp;
-        private bool bridge;
-        private bool broadcastEnabled;
-        private Int32 portError;
-        private Int32 netconfRevision;
-        private string[] assignedAddresses;
-        private NetworkRoute[] routes;
-        private string deviceName;
-        private bool allowManaged;
-        private bool allowGlobal;
-        private bool allowDefault;
-        private bool allowDNS;
-        private bool isConnected;
-
-        protected ZeroTierNetwork(SerializationInfo info, StreamingContext ctx)
-        {
-            try
-            {
-                NetworkId = info.GetString("nwid");
-                MacAddress = info.GetString("mac");
-                NetworkName = info.GetString("name");
-                NetworkStatus = info.GetString("status");
-                NetworkType = info.GetString("type");
-                MTU = info.GetInt32("mtu");
-                DHCP = info.GetBoolean("dhcp");
-                Bridge = info.GetBoolean("bridge");
-                BroadcastEnabled = info.GetBoolean("broadcastEnabled");
-                PortError = info.GetInt32("portError");
-                NetconfRevision = info.GetInt32("netconfRevision");
-                AssignedAddresses = (string[])info.GetValue("assignedAddresses", typeof(string[]));
-                Routes = (NetworkRoute[])info.GetValue("routes", typeof(NetworkRoute[]));
-                DeviceName = info.GetString("portDeviceName");
-                AllowManaged = info.GetBoolean("allowManaged");
-                AllowGlobal = info.GetBoolean("allowGlobal");
-                AllowDefault = info.GetBoolean("allowDefault");
-                AllowDNS = info.GetBoolean("allowDNS");
-            }
-            catch { }
-            IsConnected = false;
-        }
-
-        public event PropertyChangedEventHandler PropertyChanged;
-
-        public virtual void GetObjectData(SerializationInfo info, StreamingContext ctx)
-        {
-            info.AddValue("nwid", NetworkId);
-            info.AddValue("mac", MacAddress);
-            info.AddValue("name", NetworkName);
-            info.AddValue("status", NetworkStatus);
-            info.AddValue("type", NetworkType);
-            info.AddValue("mtu", MTU);
-            info.AddValue("dhcp", DHCP);
-            info.AddValue("bridge", Bridge);
-            info.AddValue("broadcastEnabled", BroadcastEnabled);
-            info.AddValue("portError", PortError);
-            info.AddValue("netconfRevision", NetconfRevision);
-            info.AddValue("assignedAddresses", AssignedAddresses);
-            info.AddValue("routes", Routes);
-            info.AddValue("portDeviceName", DeviceName);
-            info.AddValue("allowManaged", AllowManaged);
-            info.AddValue("allowGlobal", AllowGlobal);
-            info.AddValue("allowDefault", AllowDefault);
-            info.AddValue("allowDNS", AllowDNS);
-        }
-
-        public void UpdateNetwork(ZeroTierNetwork network)
-        {
-            if (network == null)
-                return;
-
-            if (!NetworkId.Equals(network.NetworkId))
-            {
-                NetworkId = network.NetworkId;
-            }
-
-            if (!MacAddress.Equals(network.MacAddress))
-            {
-                MacAddress = network.MacAddress;
-            }
-
-            if (!NetworkName.Equals(network.NetworkName))
-            {
-                NetworkName = network.NetworkName;
-            }
-
-            if (!NetworkStatus.Equals(network.NetworkStatus))
-            {
-                NetworkStatus = network.NetworkStatus;
-            }
-
-            if (!NetworkType.Equals(network.NetworkType))
-            {
-                NetworkType = network.NetworkType;
-            }
-
-            if (MTU != network.MTU)
-            {
-                MTU = network.MTU;
-            }
-
-            if (DHCP != network.DHCP)
-            {
-                DHCP = network.DHCP;
-            }
-
-            if (Bridge != network.Bridge)
-            {
-                Bridge = network.Bridge;
-            }
-
-            if (BroadcastEnabled != network.BroadcastEnabled)
-            {
-                BroadcastEnabled = network.BroadcastEnabled;
-            }
-
-            if (PortError != network.PortError)
-            {
-                PortError = network.PortError;
-            }
-
-            if (NetconfRevision != network.NetconfRevision)
-            {
-                NetconfRevision = network.NetconfRevision;
-            }
-
-            AssignedAddresses = network.AssignedAddresses;
-
-            Routes = network.Routes;
-
-            if (!DeviceName.Equals(network.DeviceName))
-            {
-                DeviceName = network.DeviceName;
-            }
-
-            if (AllowManaged != network.AllowManaged)
-            {
-                AllowManaged = network.AllowManaged;
-            }
-
-            if (AllowGlobal != network.AllowGlobal)
-            {
-                AllowGlobal = network.AllowGlobal;
-            }
-
-            if (AllowDefault != network.AllowDefault)
-            {
-                AllowDefault = network.AllowDefault;
-            }
-
-            if (AllowDNS != network.AllowDNS)
-            {
-                AllowDNS = network.AllowDNS;
-            }
-
-            if (IsConnected != network.IsConnected)
-            {
-                IsConnected = network.IsConnected;
-            }
-        }
-
-        protected void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
-        {
-            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
-        }
-
-        [JsonProperty("nwid")]
-        public string NetworkId {
-            get
-            {
-                return networkId;
-            }
-            set
-            {
-                networkId = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("mac")]
-        public string MacAddress
-        {
-            get
-            {
-                return macAddress;
-            }
-            set
-            {
-                macAddress = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("name")]
-        public string NetworkName
-        {
-            get
-            {
-                return networkName;
-            }
-            set
-            {
-                networkName = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("status")]
-        public string NetworkStatus
-        {
-            get
-            {
-                return networkStatus;
-            }
-            set
-            {
-                networkStatus = value;
-                NotifyPropertyChanged();
-            }
-
-        }
-
-        [JsonProperty("type")]
-        public string NetworkType
-        {
-            get
-            {
-                return networkType;
-            }
-            set
-            {
-                networkType = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("mtu")]
-        public int MTU
-        {
-            get
-            {
-                return mtu;
-            }
-            set
-            {
-                mtu = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("dhcp")]
-        public bool DHCP
-        {
-            get
-            {
-                return dhcp;
-            }
-            set
-            {
-                dhcp = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("bridge")]
-        public bool Bridge
-        {
-            get
-            {
-                return bridge;
-            }
-            set
-            {
-                bridge = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("broadcastEnabled")]
-        public bool BroadcastEnabled
-        {
-            get
-            {
-                return broadcastEnabled;
-            }
-            set
-            {
-                broadcastEnabled = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("portError")]
-        public int PortError
-        {
-            get
-            {
-                return portError;
-            }
-            set
-            {
-                portError = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("netconfRevision")]
-        public int NetconfRevision
-        {
-            get
-            {
-                return netconfRevision;
-            }
-            set
-            {
-                netconfRevision = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("assignedAddresses")]
-        public string[] AssignedAddresses
-        {
-            get
-            {
-                return assignedAddresses;
-            }
-            set
-            {
-                assignedAddresses = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("routes")]
-        public NetworkRoute[] Routes
-        {
-            get
-            {
-                return routes;
-            }
-            set
-            {
-                routes = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("portDeviceName")]
-        public string DeviceName
-        {
-            get
-            {
-                return deviceName;
-            }
-            set
-            {
-                deviceName = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("allowManaged")]
-        public bool AllowManaged
-        {
-            get
-            {
-                return allowManaged;
-            }
-            set
-            {
-                allowManaged = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("allowGlobal")]
-        public bool AllowGlobal
-        {
-            get
-            {
-                return allowGlobal;
-            }
-            set
-            {
-                allowGlobal = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("allowDefault")]
-        public bool AllowDefault
-        {
-            get
-            {
-                return allowDefault;
-            }
-            set
-            {
-                allowDefault = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        [JsonProperty("allowDNS")]
-        public bool AllowDNS
-        {
-            get
-            {
-                return allowDNS;
-            }
-            set
-            {
-                allowDNS = value;
-                NotifyPropertyChanged();
-            }
-        }
-        
-        public bool IsConnected
-        {
-            get
-            {
-                return isConnected;
-            }
-            set
-            {
-                isConnected = value;
-                NotifyPropertyChanged();
-            }
-        }
-
-        public String Title
-        {
-            get
-            {
-
-                if (NetworkName != null && NetworkName.Length > 0)
-                {
-                    return NetworkId + " (" + NetworkName + ")";
-                }
-                else
-                {
-                    return NetworkId;
-                }
-            }
-        }
-
-        public bool Equals(ZeroTierNetwork network)
-        {
-            if (NetworkId == null || network == null)
-                return false;
-
-            return NetworkId.Equals(network.NetworkId);
-        }
-        
-        public int CompareTo(ZeroTierNetwork network)
-        {
-            if (NetworkId == null || network == null)
-                return -1;
-
-            UInt64 thisNwid = UInt64.Parse(NetworkId, System.Globalization.NumberStyles.HexNumber);
-            UInt64 otherNwid = UInt64.Parse(network.NetworkId, System.Globalization.NumberStyles.HexNumber);
-
-            if (thisNwid > otherNwid)
-            {
-                return 1;
-            }
-            else if (thisNwid < otherNwid)
-            {
-                return -1;
-            }
-            else
-            {
-                return 0;
-            }
-        }
-    }
-
-     public class NetworkEqualityComparer : IEqualityComparer<ZeroTierNetwork>
-    {
-        public bool Equals(ZeroTierNetwork lhs, ZeroTierNetwork rhs)
-        {
-            if (lhs.NetworkId.Equals(rhs.NetworkId))
-            {
-                lhs.UpdateNetwork(rhs);
-                return true;
-            }
-            return false;
-        }
-
-        public int GetHashCode(ZeroTierNetwork obj)
-        {
-            return obj.NetworkId.GetHashCode();
-        }
-    }
-}

+ 0 - 116
attic/WinUI/ZeroTierPeer.cs

@@ -1,116 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    public class ZeroTierPeer : IEquatable<ZeroTierPeer>
-    {
-        [JsonProperty("address")]
-        public string Address { get; set; }
-
-        private Int64 _lastUnicast;
-        [JsonProperty("lastUnicastFrame")]
-        public Int64 LastUnicastFrame
-        {
-            get
-            {
-                if (_lastUnicast == 0)
-                    return 0;
-
-                TimeSpan t = DateTime.UtcNow - new DateTime(1970, 1, 1);
-                Int64 millisecondsSinceEpoch = (Int64)t.TotalMilliseconds;
-                return (millisecondsSinceEpoch - _lastUnicast) / 1000;
-            }
-            set
-            {
-                _lastUnicast = value;
-            }
-        }
-
-        private Int64 _lastMulticast;
-        [JsonProperty("lastMulticastFrame")]
-        public Int64 LastMulticastFrame 
-        {
-            get
-            {
-                if (_lastMulticast == 0)
-                    return 0;
-
-                TimeSpan t = DateTime.UtcNow - new DateTime(1970, 1, 1);
-                Int64 millisecondsSinceEpoch = (Int64)t.TotalMilliseconds;
-                return (millisecondsSinceEpoch - _lastMulticast) / 1000;
-            }
-            set
-            {
-                _lastMulticast = value;
-            }
-        }
-
-        [JsonProperty("versionMajor")]
-        public int VersionMajor { get; set; }
-
-        [JsonProperty("versionMinor")]
-        public int VersionMinor { get; set; }
-
-        [JsonProperty("versionRev")]
-        public int VersionRev { get; set; }
-
-        [JsonProperty("version")]
-        public string Version { get; set; }
-
-        public string VersionString
-        {
-            get
-            {
-                if (Version == "-1.-1.-1")
-                    return "-";
-                else
-                    return Version;
-            }
-        }
-
-        [JsonProperty("latency")]
-        public string Latency { get; set; }
-
-        [JsonProperty("role")]
-        public string Role { get; set; }
-
-        [JsonProperty("paths")]
-        public List<ZeroTierPeerPhysicalPath> Paths { get; set; }
-
-        public string DataPaths
-        {
-            get
-            {
-                string pathStr = "";
-                foreach(ZeroTierPeerPhysicalPath path in Paths)
-                {
-                    pathStr += path.Address + "\n";
-                }
-                return pathStr;
-            }
-        }
-
-        public bool Equals(ZeroTierPeer other)
-        {
-            return this.Address.Equals(other.Address, StringComparison.InvariantCultureIgnoreCase);
-        }
-
-        public void Update(ZeroTierPeer other)
-        {
-            _lastUnicast = other._lastUnicast;
-            _lastMulticast = other._lastMulticast;
-            VersionMajor = other.VersionMajor;
-            VersionMinor = other.VersionMinor;
-            VersionRev = other.VersionRev;
-            Version = other.Version;
-            Latency = other.Latency;
-            Role = other.Role;
-            Paths = other.Paths;
-        }
-    }
-}

+ 0 - 27
attic/WinUI/ZeroTierPeerPhysicalPath.cs

@@ -1,27 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    public class ZeroTierPeerPhysicalPath
-    {
-        [JsonProperty("address")]
-        public string Address { get; set; }
-
-        [JsonProperty("lastSend")]
-        public UInt64 LastSend { get; set; }
-
-        [JsonProperty("lastReceive")]
-        public UInt64 LastReceive { get; set; }
-
-        [JsonProperty("fixed")]
-        public bool Fixed { get; set; }
-
-        [JsonProperty("preferred")]
-        public bool Preferred { get; set; }
-    }
-}

+ 0 - 39
attic/WinUI/ZeroTierStatus.cs

@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Newtonsoft.Json;
-
-namespace WinUI
-{
-    public class ZeroTierStatus
-    {
-        [JsonProperty("address")]
-        public string Address { get; set; }
-
-        [JsonProperty("publicIdentity")]
-        public string PublicIdentity { get; set; }
-
-        [JsonProperty("online")]
-        public bool Online { get; set; }
-
-        [JsonProperty("tcpFallbackActive")]
-        public bool TcpFallbackActive { get; set; }
-
-        [JsonProperty("versionMajor")]
-        public int VersionMajor { get; set; }
-
-        [JsonProperty("versionMinor")]
-        public int VersionMinor { get; set; }
-
-        [JsonProperty("versionRev")]
-        public int VersionRev { get; set; }
-
-        [JsonProperty("version")]
-        public string Version { get; set; }
-
-        [JsonProperty("clock")]
-        public UInt64 Clock { get; set; }
-    }
-}

+ 0 - 55
attic/WinUI/app.manifest

@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
-  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
-    <security>
-      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
-        <!-- UAC Manifest Options
-            If you want to change the Windows User Account Control level replace the 
-            requestedExecutionLevel node with one of the following.
-
-        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
-        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
-        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
-
-            Specifying requestedExecutionLevel node will disable file and registry virtualization.
-            If you want to utilize File and Registry Virtualization for backward 
-            compatibility then delete the requestedExecutionLevel node.
-        -->
-        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
-      </requestedPrivileges>
-    </security>
-  </trustInfo>
-
-  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
-    <application>
-      <!-- A list of all Windows versions that this application is designed to work with. 
-      Windows will automatically select the most compatible environment.-->
-
-      <!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
-      <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
-
-      <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
-      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
-
-      <!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
-      <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
-
-    </application>
-  </compatibility>
-
-  <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
-  <!-- <dependency>
-    <dependentAssembly>
-      <assemblyIdentity
-          type="win32"
-          name="Microsoft.Windows.Common-Controls"
-          version="6.0.0.0"
-          processorArchitecture="*"
-          publicKeyToken="6595b64144ccf1df"
-          language="*"
-        />
-    </dependentAssembly>
-  </dependency>-->
-
-</asmv1:assembly>

+ 0 - 5
attic/WinUI/packages.config

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Hardcodet.NotifyIcon.Wpf" version="1.0.8" targetFramework="net45" />
-  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
-</packages>

+ 0 - 391
attic/macui/ZeroTier One.xcodeproj/project.pbxproj

@@ -1,391 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		932D472F1D1CD499004BCFE2 /* ZeroTierIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 932D472E1D1CD499004BCFE2 /* ZeroTierIcon.icns */; };
-		932D47331D1CD861004BCFE2 /* PreferencesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 932D47311D1CD861004BCFE2 /* PreferencesViewController.xib */; };
-		932D47371D1CDC9B004BCFE2 /* AboutViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 932D47351D1CDC9B004BCFE2 /* AboutViewController.xib */; };
-		93326BDE1CE7C816005CA2AC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 93326BDD1CE7C816005CA2AC /* Assets.xcassets */; };
-		93326BE11CE7C816005CA2AC /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93326BDF1CE7C816005CA2AC /* MainMenu.xib */; };
-		93326BEB1CE7D9B9005CA2AC /* JoinNetworkViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93326BE91CE7D9B9005CA2AC /* JoinNetworkViewController.xib */; };
-		93326BEF1CE7DA30005CA2AC /* ShowNetworksViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93326BED1CE7DA30005CA2AC /* ShowNetworksViewController.xib */; };
-		93D1675F1D54191C00330C99 /* NodeStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D1675E1D54191C00330C99 /* NodeStatus.m */; };
-		93D167621D541BC200330C99 /* ServiceCom.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D167611D541BC200330C99 /* ServiceCom.m */; };
-		93D167661D54308200330C99 /* Network.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D167651D54308200330C99 /* Network.m */; };
-		93D167691D57E7EA00330C99 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D167681D57E7EA00330C99 /* AboutViewController.m */; };
-		93D1676D1D57EB8400330C99 /* PreferencesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D1676C1D57EB8400330C99 /* PreferencesViewController.m */; };
-		93D167701D57FD3800330C99 /* NetworkMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D1676F1D57FD3800330C99 /* NetworkMonitor.m */; };
-		93D167731D58093C00330C99 /* NetworkInfoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D167721D58093C00330C99 /* NetworkInfoCell.m */; };
-		93D167761D580C3500330C99 /* ShowNetworksViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D167751D580C3500330C99 /* ShowNetworksViewController.m */; };
-		93D167791D5815E600330C99 /* JoinNetworkViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D167781D5815E600330C99 /* JoinNetworkViewController.m */; };
-		93D1677C1D58228A00330C99 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D1677B1D58228A00330C99 /* AppDelegate.m */; };
-		93D1679B1D58300F00330C99 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D1679A1D58300F00330C99 /* main.m */; };
-		93D1679D1D595F0000330C99 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93D1679C1D595F0000330C99 /* WebKit.framework */; };
-		93DAFB271D3F0BEE004D5417 /* about.html in Resources */ = {isa = PBXBuildFile; fileRef = 93DAFB261D3F0BEE004D5417 /* about.html */; };
-		93DAFE4B1CFE53CA00547CC4 /* AuthtokenCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DAFE4A1CFE53CA00547CC4 /* AuthtokenCopy.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		932D472E1D1CD499004BCFE2 /* ZeroTierIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = ZeroTierIcon.icns; sourceTree = "<group>"; };
-		932D47311D1CD861004BCFE2 /* PreferencesViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PreferencesViewController.xib; sourceTree = "<group>"; };
-		932D47351D1CDC9B004BCFE2 /* AboutViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AboutViewController.xib; sourceTree = "<group>"; };
-		93326BD81CE7C816005CA2AC /* ZeroTier One.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ZeroTier One.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		93326BDD1CE7C816005CA2AC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
-		93326BE01CE7C816005CA2AC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
-		93326BE21CE7C816005CA2AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-		93326BE91CE7D9B9005CA2AC /* JoinNetworkViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = JoinNetworkViewController.xib; sourceTree = "<group>"; };
-		93326BED1CE7DA30005CA2AC /* ShowNetworksViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShowNetworksViewController.xib; sourceTree = "<group>"; };
-		93D1675D1D54191C00330C99 /* NodeStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeStatus.h; sourceTree = "<group>"; };
-		93D1675E1D54191C00330C99 /* NodeStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeStatus.m; sourceTree = "<group>"; };
-		93D167601D541BC200330C99 /* ServiceCom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceCom.h; sourceTree = "<group>"; };
-		93D167611D541BC200330C99 /* ServiceCom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServiceCom.m; sourceTree = "<group>"; };
-		93D167641D54308200330C99 /* Network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Network.h; sourceTree = "<group>"; };
-		93D167651D54308200330C99 /* Network.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Network.m; sourceTree = "<group>"; };
-		93D167671D57E7EA00330C99 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = "<group>"; };
-		93D167681D57E7EA00330C99 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = "<group>"; };
-		93D1676B1D57EB8400330C99 /* PreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesViewController.h; sourceTree = "<group>"; };
-		93D1676C1D57EB8400330C99 /* PreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreferencesViewController.m; sourceTree = "<group>"; };
-		93D1676E1D57FD3800330C99 /* NetworkMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkMonitor.h; sourceTree = "<group>"; };
-		93D1676F1D57FD3800330C99 /* NetworkMonitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetworkMonitor.m; sourceTree = "<group>"; };
-		93D167711D58093C00330C99 /* NetworkInfoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkInfoCell.h; sourceTree = "<group>"; };
-		93D167721D58093C00330C99 /* NetworkInfoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetworkInfoCell.m; sourceTree = "<group>"; };
-		93D167741D580C3500330C99 /* ShowNetworksViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShowNetworksViewController.h; sourceTree = "<group>"; };
-		93D167751D580C3500330C99 /* ShowNetworksViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShowNetworksViewController.m; sourceTree = "<group>"; };
-		93D167771D5815E600330C99 /* JoinNetworkViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JoinNetworkViewController.h; sourceTree = "<group>"; };
-		93D167781D5815E600330C99 /* JoinNetworkViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JoinNetworkViewController.m; sourceTree = "<group>"; };
-		93D1677A1D58228A00330C99 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
-		93D1677B1D58228A00330C99 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
-		93D1679A1D58300F00330C99 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		93D1679C1D595F0000330C99 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
-		93DAFB261D3F0BEE004D5417 /* about.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = about.html; sourceTree = "<group>"; };
-		93DAFE4A1CFE53CA00547CC4 /* AuthtokenCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AuthtokenCopy.m; sourceTree = "<group>"; };
-		93DAFE4C1CFE53DA00547CC4 /* AuthtokenCopy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthtokenCopy.h; sourceTree = "<group>"; };
-		C13C72B12527E1B20094F8B4 /* ZeroTier One.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "ZeroTier One.entitlements"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		93326BD51CE7C816005CA2AC /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				93D1679D1D595F0000330C99 /* WebKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		93326BCF1CE7C816005CA2AC = {
-			isa = PBXGroup;
-			children = (
-				93D1679C1D595F0000330C99 /* WebKit.framework */,
-				93326BDA1CE7C816005CA2AC /* ZeroTier One */,
-				93326BD91CE7C816005CA2AC /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		93326BD91CE7C816005CA2AC /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				93326BD81CE7C816005CA2AC /* ZeroTier One.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		93326BDA1CE7C816005CA2AC /* ZeroTier One */ = {
-			isa = PBXGroup;
-			children = (
-				C13C72B12527E1B20094F8B4 /* ZeroTier One.entitlements */,
-				932D472E1D1CD499004BCFE2 /* ZeroTierIcon.icns */,
-				93326BDD1CE7C816005CA2AC /* Assets.xcassets */,
-				93326BDF1CE7C816005CA2AC /* MainMenu.xib */,
-				93326BE21CE7C816005CA2AC /* Info.plist */,
-				93DAFE4A1CFE53CA00547CC4 /* AuthtokenCopy.m */,
-				93DAFE4C1CFE53DA00547CC4 /* AuthtokenCopy.h */,
-				93D1676E1D57FD3800330C99 /* NetworkMonitor.h */,
-				93D1676F1D57FD3800330C99 /* NetworkMonitor.m */,
-				93DAFB261D3F0BEE004D5417 /* about.html */,
-				93D1675D1D54191C00330C99 /* NodeStatus.h */,
-				93D1675E1D54191C00330C99 /* NodeStatus.m */,
-				93D167601D541BC200330C99 /* ServiceCom.h */,
-				93D167611D541BC200330C99 /* ServiceCom.m */,
-				93D167641D54308200330C99 /* Network.h */,
-				93D167651D54308200330C99 /* Network.m */,
-				93D167671D57E7EA00330C99 /* AboutViewController.h */,
-				93D167681D57E7EA00330C99 /* AboutViewController.m */,
-				932D47351D1CDC9B004BCFE2 /* AboutViewController.xib */,
-				93D1676B1D57EB8400330C99 /* PreferencesViewController.h */,
-				93D1676C1D57EB8400330C99 /* PreferencesViewController.m */,
-				932D47311D1CD861004BCFE2 /* PreferencesViewController.xib */,
-				93D167711D58093C00330C99 /* NetworkInfoCell.h */,
-				93D167721D58093C00330C99 /* NetworkInfoCell.m */,
-				93D167741D580C3500330C99 /* ShowNetworksViewController.h */,
-				93D167751D580C3500330C99 /* ShowNetworksViewController.m */,
-				93326BED1CE7DA30005CA2AC /* ShowNetworksViewController.xib */,
-				93D167771D5815E600330C99 /* JoinNetworkViewController.h */,
-				93D167781D5815E600330C99 /* JoinNetworkViewController.m */,
-				93326BE91CE7D9B9005CA2AC /* JoinNetworkViewController.xib */,
-				93D1677A1D58228A00330C99 /* AppDelegate.h */,
-				93D1677B1D58228A00330C99 /* AppDelegate.m */,
-				93D1679A1D58300F00330C99 /* main.m */,
-			);
-			path = "ZeroTier One";
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		93326BD71CE7C816005CA2AC /* ZeroTier One */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 93326BE51CE7C816005CA2AC /* Build configuration list for PBXNativeTarget "ZeroTier One" */;
-			buildPhases = (
-				93326BD41CE7C816005CA2AC /* Sources */,
-				93326BD51CE7C816005CA2AC /* Frameworks */,
-				93326BD61CE7C816005CA2AC /* Resources */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "ZeroTier One";
-			productName = "ZeroTier One";
-			productReference = 93326BD81CE7C816005CA2AC /* ZeroTier One.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		93326BD01CE7C816005CA2AC /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastSwiftUpdateCheck = 0730;
-				LastUpgradeCheck = 0800;
-				ORGANIZATIONNAME = "ZeroTier, Inc";
-				TargetAttributes = {
-					93326BD71CE7C816005CA2AC = {
-						CreatedOnToolsVersion = 7.3;
-					};
-				};
-			};
-			buildConfigurationList = 93326BD31CE7C816005CA2AC /* Build configuration list for PBXProject "ZeroTier One" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				English,
-				en,
-				Base,
-			);
-			mainGroup = 93326BCF1CE7C816005CA2AC;
-			productRefGroup = 93326BD91CE7C816005CA2AC /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				93326BD71CE7C816005CA2AC /* ZeroTier One */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		93326BD61CE7C816005CA2AC /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				93DAFB271D3F0BEE004D5417 /* about.html in Resources */,
-				93326BEF1CE7DA30005CA2AC /* ShowNetworksViewController.xib in Resources */,
-				932D47371D1CDC9B004BCFE2 /* AboutViewController.xib in Resources */,
-				93326BEB1CE7D9B9005CA2AC /* JoinNetworkViewController.xib in Resources */,
-				93326BDE1CE7C816005CA2AC /* Assets.xcassets in Resources */,
-				93326BE11CE7C816005CA2AC /* MainMenu.xib in Resources */,
-				932D472F1D1CD499004BCFE2 /* ZeroTierIcon.icns in Resources */,
-				932D47331D1CD861004BCFE2 /* PreferencesViewController.xib in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		93326BD41CE7C816005CA2AC /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				93D1679B1D58300F00330C99 /* main.m in Sources */,
-				93D167621D541BC200330C99 /* ServiceCom.m in Sources */,
-				93D167761D580C3500330C99 /* ShowNetworksViewController.m in Sources */,
-				93DAFE4B1CFE53CA00547CC4 /* AuthtokenCopy.m in Sources */,
-				93D167701D57FD3800330C99 /* NetworkMonitor.m in Sources */,
-				93D1675F1D54191C00330C99 /* NodeStatus.m in Sources */,
-				93D167691D57E7EA00330C99 /* AboutViewController.m in Sources */,
-				93D1676D1D57EB8400330C99 /* PreferencesViewController.m in Sources */,
-				93D1677C1D58228A00330C99 /* AppDelegate.m in Sources */,
-				93D167731D58093C00330C99 /* NetworkInfoCell.m in Sources */,
-				93D167661D54308200330C99 /* Network.m in Sources */,
-				93D167791D5815E600330C99 /* JoinNetworkViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		93326BDF1CE7C816005CA2AC /* MainMenu.xib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				93326BE01CE7C816005CA2AC /* Base */,
-			);
-			name = MainMenu.xib;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		93326BE31CE7C816005CA2AC /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				CODE_SIGN_IDENTITY = "-";
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.11;
-				MTL_ENABLE_DEBUG_INFO = YES;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = macosx;
-				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-			};
-			name = Debug;
-		};
-		93326BE41CE7C816005CA2AC /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				CODE_SIGN_IDENTITY = "-";
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.11;
-				MTL_ENABLE_DEBUG_INFO = NO;
-				SDKROOT = macosx;
-			};
-			name = Release;
-		};
-		93326BE61CE7C816005CA2AC /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_MODULES = YES;
-				CODE_SIGN_ENTITLEMENTS = "ZeroTier One/ZeroTier One.entitlements";
-				CODE_SIGN_IDENTITY = "-";
-				COMBINE_HIDPI_IMAGES = YES;
-				ENABLE_HARDENED_RUNTIME = YES;
-				INFOPLIST_FILE = "ZeroTier One/Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.10;
-				PRODUCT_BUNDLE_IDENTIFIER = "com.zerotier.ZeroTier-One";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_OBJC_BRIDGING_HEADER = "ZeroTier One/ZeroTier One-Bridging-Header.h";
-				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
-			};
-			name = Debug;
-		};
-		93326BE71CE7C816005CA2AC /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_MODULES = YES;
-				CODE_SIGN_ENTITLEMENTS = "ZeroTier One/ZeroTier One.entitlements";
-				CODE_SIGN_IDENTITY = "-";
-				COMBINE_HIDPI_IMAGES = YES;
-				ENABLE_HARDENED_RUNTIME = YES;
-				INFOPLIST_FILE = "ZeroTier One/Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.10;
-				PRODUCT_BUNDLE_IDENTIFIER = "com.zerotier.ZeroTier-One";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SWIFT_OBJC_BRIDGING_HEADER = "ZeroTier One/ZeroTier One-Bridging-Header.h";
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		93326BD31CE7C816005CA2AC /* Build configuration list for PBXProject "ZeroTier One" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				93326BE31CE7C816005CA2AC /* Debug */,
-				93326BE41CE7C816005CA2AC /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		93326BE51CE7C816005CA2AC /* Build configuration list for PBXNativeTarget "ZeroTier One" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				93326BE61CE7C816005CA2AC /* Debug */,
-				93326BE71CE7C816005CA2AC /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 93326BD01CE7C816005CA2AC /* Project object */;
-}

+ 0 - 7
attic/macui/ZeroTier One.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
-   version = "1.0">
-   <FileRef
-      location = "self:ZeroTier One.xcodeproj">
-   </FileRef>
-</Workspace>

+ 0 - 8
attic/macui/ZeroTier One.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IDEDidComputeMac32BitWarning</key>
-	<true/>
-</dict>
-</plist>

+ 0 - 33
attic/macui/ZeroTier One/AboutViewController.h

@@ -1,33 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <WebKit/WebKit.h>
-
-@interface AboutViewController : NSViewController <WebPolicyDelegate>
-
-@property (nonatomic, weak) IBOutlet WebView *webView;
-
-- (void)viewDidLoad;
-
-- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation
-        request:(NSURLRequest *)request
-          frame:(WebFrame *)frame
-decisionListener:(id<WebPolicyDecisionListener>)listener;
-
-@end

+ 0 - 57
attic/macui/ZeroTier One/AboutViewController.m

@@ -1,57 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import "AboutViewController.h"
-
-@interface AboutViewController ()
-
-@end
-
-@implementation AboutViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-
-    [self.webView setWantsLayer:YES];
-    self.webView.layer.borderWidth = 1.0f;
-    [self.webView.layer setCornerRadius:1.0f];
-    self.webView.layer.masksToBounds = YES;
-    [self.webView.layer setBorderColor:[[NSColor darkGrayColor] CGColor]];
-    self.webView.policyDelegate = self;
-    
-    NSBundle *bundle = [NSBundle mainBundle];
-    NSURL *path = [bundle URLForResource:@"about" withExtension:@"html"];
-    if(path) {
-        [self.webView.mainFrame loadRequest:[NSURLRequest requestWithURL:path]];
-    }
-}
-
-- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation
-        request:(NSURLRequest *)request
-          frame:(WebFrame *)frame
-decisionListener:(id<WebPolicyDecisionListener>)listener
-{
-    if(request.URL != nil && request.URL.host != nil) {
-        [[NSWorkspace sharedWorkspace] openURL:request.URL];
-    }
-    else {
-        [listener use];
-    }
-}
-
-@end

+ 0 - 31
attic/macui/ZeroTier One/AboutViewController.xib

@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10116" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10116"/>
-        <plugIn identifier="com.apple.WebKitIBPlugin" version="10116"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="AboutViewController" customModule="ZeroTier_One" customModuleProvider="target">
-            <connections>
-                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
-                <outlet property="webView" destination="3BS-QW-rZO" id="ucY-A9-7p7"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <webView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3BS-QW-rZO">
-                    <rect key="frame" x="20" y="20" width="440" height="440"/>
-                    <webPreferences key="preferences" defaultFontSize="16" defaultFixedFontSize="13" minimumFontSize="0">
-                        <nil key="identifier"/>
-                    </webPreferences>
-                </webView>
-            </subviews>
-            <point key="canvasLocation" x="463" y="570"/>
-        </customView>
-    </objects>
-</document>

+ 0 - 61
attic/macui/ZeroTier One/AppDelegate.h

@@ -1,61 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Cocoa/Cocoa.h>
-
-@class NetworkMonitor;
-@class Network;
-@class NodeStatus;
-
-@interface AppDelegate : NSObject <NSApplicationDelegate>
-
-@property (weak, nonatomic) IBOutlet NSWindow *window;
-
-@property (nonatomic) NSStatusItem *statusItem;
-
-@property (nonatomic) NSPopover *networkListPopover;
-@property (nonatomic) NSPopover *joinNetworkPopover;
-@property (nonatomic) NSPopover *preferencesPopover;
-@property (nonatomic) NSPopover *aboutPopover;
-
-@property (nonatomic) id transientMonitor;
-
-@property (nonatomic) NetworkMonitor *monitor;
-
-@property (nonatomic) NSMutableArray<Network*> *networks;
-
-@property (nonatomic) NodeStatus *status;
-
-- (void)buildMenu;
-
-- (void)onNetworkListUpdated:(NSNotification*)note;
-- (void)onNodeStatusUpdated:(NSNotification*)note;
-
-- (void)showNetworks;
-- (void)joinNetwork;
-- (void)showPreferences;
-- (void)showAbout;
-- (void)quit;
-- (void)toggleNetwork:(NSMenuItem*)sender;
-- (void)copyNodeID;
-
-- (void)closeJoinNetworkPopover;
-
-- (void)darkModeChanged:(NSNotification*)note;
-
-@end

+ 0 - 379
attic/macui/ZeroTier One/AppDelegate.m

@@ -1,379 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import "AppDelegate.h"
-#import "NetworkMonitor.h"
-#import "Network.h"
-#import "NodeStatus.h"
-#import "JoinNetworkViewController.h"
-#import "ShowNetworksViewController.h"
-#import "PreferencesViewController.h"
-#import "AboutViewController.h"
-#import "ServiceCom.h"
-
-@implementation AppDelegate
-
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
-    self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:-2.0f];
-    self.networkListPopover = [[NSPopover alloc] init];
-    self.joinNetworkPopover = [[NSPopover alloc] init];
-    self.preferencesPopover = [[NSPopover alloc] init];
-    self.aboutPopover = [[NSPopover alloc] init];
-    self.transientMonitor = nil;
-    self.monitor = [[NetworkMonitor alloc] init];
-    self.networks = [NSMutableArray<Network*> array];
-    self.status = nil;
-
-    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-    NSDictionary *defaultsDict = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:@"firstRun"];
-    [defaults registerDefaults:defaultsDict];
-
-    NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
-
-    [nc addObserver:self
-           selector:@selector(onNetworkListUpdated:)
-               name:NetworkUpdateKey
-             object:nil];
-    [nc addObserver:self
-           selector:@selector(onNodeStatusUpdated:)
-               name:StatusUpdateKey
-             object:nil];
-
-    NSString *osxMode = [defaults stringForKey:@"AppleInterfaceStyle"];
-
-    if(osxMode != nil && [osxMode isEqualToString:@"Dark"]) {
-        self.statusItem.image = [NSImage imageNamed:@"MenuBarIconMacWhite"];
-    }
-    else {
-        self.statusItem.image = [NSImage imageNamed:@"MenuBarIconMac"];
-    }
-
-    [[NSDistributedNotificationCenter defaultCenter] addObserver:self
-                                                        selector:@selector(darkModeChanged:)
-                                                            name:@"AppleInterfaceThemeChangedNotification"
-                                                          object:nil];
-
-    [self buildMenu];
-    JoinNetworkViewController *jnvc = [[JoinNetworkViewController alloc] initWithNibName:@"JoinNetworkViewController" bundle:nil];
-    jnvc.appDelegate = self;
-    self.joinNetworkPopover.contentViewController = jnvc;
-    self.joinNetworkPopover.behavior = NSPopoverBehaviorTransient;
-
-    ShowNetworksViewController *showNetworksView = [[ShowNetworksViewController alloc] initWithNibName:@"ShowNetworksViewController" bundle:nil];
-    showNetworksView.netMonitor = self.monitor;
-    self.networkListPopover.contentViewController = showNetworksView;
-    self.networkListPopover.behavior = NSPopoverBehaviorTransient;
-
-    PreferencesViewController *prefsView = [[PreferencesViewController alloc] initWithNibName:@"PreferencesViewController" bundle:nil];
-    self.preferencesPopover.contentViewController = prefsView;
-    self.preferencesPopover.behavior = NSPopoverBehaviorTransient;
-
-    self.aboutPopover.contentViewController = [[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:nil];
-    self.aboutPopover.behavior = NSPopoverBehaviorTransient;
-
-    BOOL firstRun = [defaults boolForKey:@"firstRun"];
-
-    if(firstRun) {
-        [defaults setBool:NO forKey:@"firstRun"];
-        [defaults synchronize];
-
-        [prefsView setLaunchAtLoginEnabled:YES];
-
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-            sleep(2);
-            [[NSOperationQueue mainQueue] addOperationWithBlock:^{
-                [self showAbout];
-            }];
-        });
-    }
-
-    [self.monitor updateNetworkInfo];
-    [self.monitor start];
-}
-
-- (void)applicationWillTerminate:(NSNotification *)aNotification {
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-    [[NSDistributedNotificationCenter defaultCenter] removeObserver:self
-                                                               name:@"AppleInterfaceThemeChangedNotification"
-                                                             object:nil];
-}
-
-- (void)showNetworks {
-    NSButton *button = nil;
-    NSRect frame;
-    if ([self.statusItem respondsToSelector:@selector(button)]) {
-        button = self.statusItem.button;
-        frame = button.bounds;
-    } else if ([self.statusItem respondsToSelector:@selector(_button)]) {
-        button = [self.statusItem performSelector:@selector(_button)];
-        frame = button.bounds;
-    } else {
-        NSLog(@"Can't get view.  Uh oh.");
-        return;
-    }
-    
-    [self.networkListPopover showRelativeToRect:frame
-                                         ofView:button
-                                  preferredEdge:NSMinYEdge];
-
-    if(self.transientMonitor == nil) {
-        self.transientMonitor =
-        [NSEvent addGlobalMonitorForEventsMatchingMask:(NSLeftMouseDown|NSRightMouseDown|NSOtherMouseDown)
-                                               handler:^(NSEvent * _Nonnull e) {
-                                                   [NSEvent removeMonitor:self.transientMonitor];
-                                                   self.transientMonitor = nil;
-                                                   [self.networkListPopover close];
-                                               }];
-    }
-}
-
-- (void)joinNetwork {
-    NSButton *button = nil;
-    NSRect frame;
-    if ([self.statusItem respondsToSelector:@selector(button)]) {
-        button = self.statusItem.button;
-        frame = button.bounds;
-    } else if ([self.statusItem respondsToSelector:@selector(_button)]) {
-        button = [self.statusItem performSelector:@selector(_button)];
-        frame = button.bounds;
-    } else {
-        NSLog(@"Can't get view.  Uh oh.");
-        return;
-    }
-    
-    [self.joinNetworkPopover showRelativeToRect:button.bounds
-                                         ofView:button
-                                  preferredEdge:NSMinYEdge];
-    if(self.transientMonitor == nil) {
-        self.transientMonitor =
-        [NSEvent addGlobalMonitorForEventsMatchingMask:(NSLeftMouseDown|NSRightMouseDown|NSOtherMouseDown)
-                                               handler:^(NSEvent * _Nonnull e) {
-                                                   [NSEvent removeMonitor:self.transientMonitor];
-                                                   self.transientMonitor = nil;
-                                                   [self.joinNetworkPopover close];
-                                               }];
-    }
-}
-
-- (void)showPreferences {
-    NSButton *button = nil;
-    NSRect frame;
-    if ([self.statusItem respondsToSelector:@selector(button)]) {
-        button = self.statusItem.button;
-        frame = button.bounds;
-    } else if ([self.statusItem respondsToSelector:@selector(_button)]) {
-        button = [self.statusItem performSelector:@selector(_button)];
-        frame = button.bounds;
-    } else {
-        NSLog(@"Can't get view.  Uh oh.");
-        return;
-    }
-
-    [self.preferencesPopover showRelativeToRect:button.bounds
-                                         ofView:button
-                                  preferredEdge:NSMinYEdge];
-    if(self.transientMonitor == nil) {
-        [NSEvent addGlobalMonitorForEventsMatchingMask:(NSLeftMouseDown|NSRightMouseDown|NSOtherMouseDown)
-                                               handler:^(NSEvent * _Nonnull e) {
-                                                   [NSEvent removeMonitor:self.transientMonitor];
-                                                   self.transientMonitor = nil;
-                                                   [self.preferencesPopover close];
-                                               }];
-    }
-}
-
-- (void)showAbout {
-    NSButton *button = nil;
-    NSRect frame;
-    if ([self.statusItem respondsToSelector:@selector(button)]) {
-        button = self.statusItem.button;
-        frame = button.bounds;
-    } else if ([self.statusItem respondsToSelector:@selector(_button)]) {
-        button = [self.statusItem performSelector:@selector(_button)];
-        frame = button.bounds;
-    } else {
-        NSLog(@"Can't get view.  Uh oh.");
-        return;
-    }
-    
-    [self.aboutPopover showRelativeToRect:button.bounds
-                                   ofView:button
-                            preferredEdge:NSMinYEdge];
-    if(self.transientMonitor == nil) {
-        [NSEvent addGlobalMonitorForEventsMatchingMask:(NSLeftMouseDown|NSRightMouseDown|NSOtherMouseDown)
-                                               handler:^(NSEvent * _Nonnull e) {
-                                                   [NSEvent removeMonitor:self.transientMonitor];
-                                                   self.transientMonitor = nil;
-                                                   [self.aboutPopover close];
-                                               }];
-    }
-}
-
-- (void)quit {
-    [NSApp performSelector:@selector(terminate:) withObject:nil afterDelay:0.0];
-}
-
-- (void)onNetworkListUpdated:(NSNotification*)note {
-    NSArray<Network*> *netList = [note.userInfo objectForKey:@"networks"];
-    [(ShowNetworksViewController*)self.networkListPopover.contentViewController setNetworks:netList];
-    self.networks = [netList mutableCopy];
-
-    [self buildMenu];
-}
-
-- (void)onNodeStatusUpdated:(NSNotification*)note {
-    NodeStatus *status = [note.userInfo objectForKey:@"status"];
-    self.status = status;
-
-    [self buildMenu];
-}
-
-- (void)buildMenu {
-    NSMenu *menu = [[NSMenu alloc] init];
-
-    if(self.status != nil) {
-        NSString *nodeId = @"Node ID: ";
-        nodeId = [nodeId stringByAppendingString:self.status.address];
-        [menu addItem:[[NSMenuItem alloc] initWithTitle:nodeId
-                                                 action:@selector(copyNodeID)
-                                          keyEquivalent:@""]];
-        [menu addItem:[NSMenuItem separatorItem]];
-    }
-
-    [menu addItem:[[NSMenuItem alloc] initWithTitle:@"Network Details..."
-                                             action:@selector(showNetworks)
-                                      keyEquivalent:@"n"]];
-    [menu addItem:[[NSMenuItem alloc] initWithTitle:@"Join Network..."
-                                             action:@selector(joinNetwork)
-                                      keyEquivalent:@"j"]];
-
-    [menu addItem:[NSMenuItem separatorItem]];
-
-    if([self.networks count] > 0) {
-        for(Network *net in self.networks) {
-            NSString *nwid = [NSString stringWithFormat:@"%10llx", net.nwid];
-            NSString *networkName = @"";
-            if([net.name lengthOfBytesUsingEncoding:NSUTF8StringEncoding] == 0) {
-                networkName = nwid;
-            }
-            else {
-                networkName = [NSString stringWithFormat:@"%@ (%@)", nwid, net.name];
-            }
-
-            if(net.allowDefault && net.connected) {
-                networkName = [networkName stringByAppendingString:@" [default]"];
-            }
-
-            NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:networkName
-                                                          action:@selector(toggleNetwork:)
-                                                   keyEquivalent:@""];
-            if(net.connected) {
-                item.state = NSOnState;
-            }
-            else {
-                item.state = NSOffState;
-            }
-
-            item.representedObject = net;
-
-            [menu addItem:item];
-        }
-
-        [menu addItem:[NSMenuItem separatorItem]];
-    }
-
-    [menu addItem:[[NSMenuItem alloc] initWithTitle:@"About ZeroTier One..."
-                                             action:@selector(showAbout)
-                                      keyEquivalent:@""]];
-    [menu addItem:[[NSMenuItem alloc] initWithTitle:@"Preferences..."
-                                             action:@selector(showPreferences)
-                                      keyEquivalent:@""]];
-
-    [menu addItem:[NSMenuItem separatorItem]];
-
-    [menu addItem:[[NSMenuItem alloc] initWithTitle:@"Quit"
-                                             action:@selector(quit)
-                                      keyEquivalent:@"q"]];
-
-    self.statusItem.menu = menu;
-}
-
-- (void)toggleNetwork:(NSMenuItem*)sender {
-    Network *network = sender.representedObject;
-    NSString *nwid = [NSString stringWithFormat:@"%10llx", network.nwid];
-
-    if(network.connected) {
-        NSError *error = nil;
-
-        [[ServiceCom sharedInstance] leaveNetwork:nwid error:&error];
-
-        if (error) {
-            NSAlert *alert = [NSAlert alertWithError:error];
-            alert.alertStyle = NSCriticalAlertStyle;
-            [alert addButtonWithTitle:@"Ok"];
-
-            [alert runModal];
-        }
-    }
-    else {
-        NSError *error = nil;
-        [[ServiceCom sharedInstance] joinNetwork:nwid
-                                    allowManaged:network.allowManaged
-                                     allowGlobal:network.allowGlobal
-                                    allowDefault:(network.allowDefault && ![Network defaultRouteExists:self.networks])
-                                        allowDNS:network.allowDNS
-                                           error:&error];
-
-        if (error) {
-            NSAlert *alert = [NSAlert alertWithError:error];
-            alert.alertStyle = NSCriticalAlertStyle;
-            [alert addButtonWithTitle:@"Ok"];
-
-            [alert runModal];
-        }
-    }
-}
-
-- (void)copyNodeID {
-    if(self.status != nil) {
-        NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
-        [pasteboard declareTypes:[NSArray arrayWithObject:NSPasteboardTypeString] owner:nil];
-        [pasteboard setString:self.status.address forType:NSPasteboardTypeString];
-    }
-}
-
-- (void)darkModeChanged:(NSNotification*)note {
-    NSString *osxMode = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
-
-    if(osxMode != nil && [osxMode isEqualToString:@"Dark"]) {
-        self.statusItem.image = [NSImage imageNamed:@"MenuBarIconMacWhite"];
-    }
-    else {
-        self.statusItem.image = [NSImage imageNamed:@"MenuBarIconMac"];
-    }
-}
-
-- (void)closeJoinNetworkPopover {
-    if (self.transientMonitor) {
-        [NSEvent removeMonitor:self.transientMonitor];
-        self.transientMonitor = nil;
-    }
-    [self.joinNetworkPopover close];
-}
-
-@end

+ 0 - 59
attic/macui/ZeroTier One/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -1,59 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "mac",
-      "size" : "16x16",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "16x16",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "32x32",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "32x32",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "128x128",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "128x128",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "256x256",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "256x256",
-      "scale" : "2x"
-    },
-    {
-      "size" : "512x512",
-      "idiom" : "mac",
-      "filename" : "ZeroTierIcon512x512.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "mac",
-      "size" : "512x512",
-      "scale" : "2x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
attic/macui/ZeroTier One/Assets.xcassets/AppIcon.appiconset/ZeroTierIcon512x512.png


+ 0 - 6
attic/macui/ZeroTier One/Assets.xcassets/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 21
attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMac.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "mac",
-      "filename" : "Menubar.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "mac",
-      "filename" : "[email protected]",
-      "scale" : "2x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  },
-  "properties" : {
-    "template-rendering-intent" : "template"
-  }
-}

BIN
attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMac.imageset/[email protected]


BIN
attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMac.imageset/Menubar.png


+ 0 - 21
attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMacWhite.imageset/Contents.json

@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "mac",
-      "filename" : "MenubarWhite.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "mac",
-      "filename" : "[email protected]",
-      "scale" : "2x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  },
-  "properties" : {
-    "template-rendering-intent" : "template"
-  }
-}

BIN
attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMacWhite.imageset/MenubarWhite.png


BIN
attic/macui/ZeroTier One/Assets.xcassets/MenuBarIconMacWhite.imageset/[email protected]


+ 0 - 26
attic/macui/ZeroTier One/AuthtokenCopy.h

@@ -1,26 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef AuthtokenCopy_h
-#define AuthtokenCopy_h
-
-#import <Foundation/Foundation.h>
-
-NSString* getAdminAuthToken(AuthorizationRef authRef);
-
-#endif /* AuthtokenCopy_h */

+ 0 - 97
attic/macui/ZeroTier One/AuthtokenCopy.m

@@ -1,97 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "AuthtokenCopy.h"
-
-
-NSString* getAdminAuthToken(AuthorizationRef authRef) {
-    char *tool = "/bin/cat";
-    char *args[] = { "/Library/Application Support/ZeroTier/One/authtoken.secret", NULL};
-    FILE *pipe = nil;
-    char token[25];
-    memset(token, 0, sizeof(char)*25);
-
-
-    OSStatus status = AuthorizationExecuteWithPrivileges(authRef, tool, kAuthorizationFlagDefaults, args, &pipe);
-
-    if (status != errAuthorizationSuccess) {
-        NSLog(@"Reading authtoken failed!");
-
-
-        switch(status) {
-            case errAuthorizationDenied:
-                NSLog(@"Autorization Denied");
-                break;
-            case errAuthorizationCanceled:
-                NSLog(@"Authorization Canceled");
-                break;
-            case errAuthorizationInternal:
-                NSLog(@"Authorization Internal");
-                break;
-            case errAuthorizationBadAddress:
-                NSLog(@"Bad Address");
-                break;
-            case errAuthorizationInvalidRef:
-                NSLog(@"Invalid Ref");
-                break;
-            case errAuthorizationInvalidSet:
-                NSLog(@"Invalid Set");
-                break;
-            case errAuthorizationInvalidTag:
-                NSLog(@"Invalid Tag");
-                break;
-            case errAuthorizationInvalidFlags:
-                NSLog(@"Invalid Flags");
-                break;
-            case errAuthorizationInvalidPointer:
-                NSLog(@"Invalid Pointer");
-                break;
-            case errAuthorizationToolExecuteFailure:
-                NSLog(@"Tool Execute Failure");
-                break;
-            case errAuthorizationToolEnvironmentError:
-                NSLog(@"Tool Environment Failure");
-                break;
-            case errAuthorizationExternalizeNotAllowed:
-                NSLog(@"Externalize Not Allowed");
-                break;
-            case errAuthorizationInteractionNotAllowed:
-                NSLog(@"Interaction Not Allowed");
-                break;
-            case errAuthorizationInternalizeNotAllowed:
-                NSLog(@"Internalize Not Allowed");
-                break;
-            default:
-                NSLog(@"Unknown Error");
-                break;
-        }
-
-        return @"";
-    }
-
-    if(pipe != nil) {
-        fread(&token, sizeof(char), 24, pipe);
-        fclose(pipe);
-
-        return [NSString stringWithUTF8String:token];
-    }
-
-    return @"";
-}

+ 0 - 680
attic/macui/ZeroTier One/Base.lproj/MainMenu.xib

@@ -1,680 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10116" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10116"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
-            <connections>
-                <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customObject id="Voe-Tx-rLC" customClass="AppDelegate">
-            <connections>
-                <outlet property="window" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
-            </connections>
-        </customObject>
-        <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
-        <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
-            <items>
-                <menuItem title="ZeroTier One" id="1Xt-HY-uBw">
-                    <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="ZeroTier One" systemMenu="apple" id="uQy-DD-JDr">
-                        <items>
-                            <menuItem title="About ZeroTier One" id="5kV-Vb-QxS">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
-                            <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
-                            <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
-                            <menuItem title="Services" id="NMo-om-nkz">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
-                            <menuItem title="Hide ZeroTier One" keyEquivalent="h" id="Olw-nP-bQN">
-                                <connections>
-                                    <action selector="hide:" target="-1" id="PnN-Uc-m68"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                <connections>
-                                    <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Show All" id="Kd2-mp-pUS">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
-                            <menuItem title="Quit ZeroTier One" keyEquivalent="q" id="4sb-4s-VLi">
-                                <connections>
-                                    <action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
-                                </connections>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-                <menuItem title="File" id="dMs-cI-mzQ">
-                    <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="File" id="bib-Uj-vzu">
-                        <items>
-                            <menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
-                                <connections>
-                                    <action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
-                                <connections>
-                                    <action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Open Recent" id="tXI-mr-wws">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
-                                    <items>
-                                        <menuItem title="Clear Menu" id="vNY-rz-j42">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="clearRecentDocuments:" target="-1" id="Daa-9d-B3U"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
-                            <menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
-                                <connections>
-                                    <action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
-                                <connections>
-                                    <action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
-                                <connections>
-                                    <action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Revert to Saved" id="KaW-ft-85H">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
-                            <menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
-                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
-                                <connections>
-                                    <action selector="runPageLayout:" target="-1" id="Din-rz-gC5"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
-                                <connections>
-                                    <action selector="print:" target="-1" id="qaZ-4w-aoO"/>
-                                </connections>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-                <menuItem title="Edit" id="5QF-Oa-p0T">
-                    <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="Edit" id="W48-6f-4Dl">
-                        <items>
-                            <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
-                                <connections>
-                                    <action selector="undo:" target="-1" id="M6e-cu-g7V"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
-                                <connections>
-                                    <action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
-                            <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
-                                <connections>
-                                    <action selector="cut:" target="-1" id="YJe-68-I9s"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
-                                <connections>
-                                    <action selector="copy:" target="-1" id="G1f-GL-Joy"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
-                                <connections>
-                                    <action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                <connections>
-                                    <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Delete" id="pa3-QI-u2k">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
-                                <connections>
-                                    <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
-                            <menuItem title="Find" id="4EN-yA-p0u">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Find" id="1b7-l0-nxx">
-                                    <items>
-                                        <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
-                                            <connections>
-                                                <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
-                                    <items>
-                                        <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
-                                            <connections>
-                                                <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
-                                            <connections>
-                                                <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
-                                        <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Substitutions" id="9ic-FL-obx">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
-                                    <items>
-                                        <menuItem title="Show Substitutions" id="z6F-FW-3nz">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
-                                        <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smart Quotes" id="hQb-2v-fYv">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smart Dashes" id="rgM-f4-ycn">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smart Links" id="cwL-P1-jid">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Data Detectors" id="tRr-pd-1PS">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Text Replacement" id="HFQ-gK-NFA">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Transformations" id="2oI-Rn-ZJC">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Transformations" id="c8a-y6-VQd">
-                                    <items>
-                                        <menuItem title="Make Upper Case" id="vmV-6d-7jI">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Make Lower Case" id="d9M-CD-aMd">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Capitalize" id="UEZ-Bs-lqG">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Speech" id="xrE-MZ-jX0">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Speech" id="3rS-ZA-NoH">
-                                    <items>
-                                        <menuItem title="Start Speaking" id="Ynk-f8-cLZ">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Stop Speaking" id="Oyz-dy-DGm">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-                <menuItem title="Format" id="jxT-CU-nIS">
-                    <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="Format" id="GEO-Iw-cKr">
-                        <items>
-                            <menuItem title="Font" id="Gi5-1S-RQB">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
-                                    <items>
-                                        <menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
-                                            <connections>
-                                                <action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
-                                            <connections>
-                                                <action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
-                                            <connections>
-                                                <action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
-                                            <connections>
-                                                <action selector="underline:" target="-1" id="FYS-2b-JAY"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
-                                        <menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
-                                            <connections>
-                                                <action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
-                                            <connections>
-                                                <action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
-                                        <menuItem title="Kern" id="jBQ-r6-VK2">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Kern" id="tlD-Oa-oAM">
-                                                <items>
-                                                    <menuItem title="Use Default" id="GUa-eO-cwY">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="useStandardKerning:" target="-1" id="6dk-9l-Ckg"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Use None" id="cDB-IK-hbR">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="turnOffKerning:" target="-1" id="U8a-gz-Maa"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Tighten" id="46P-cB-AYj">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="tightenKerning:" target="-1" id="hr7-Nz-8ro"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Loosen" id="ogc-rX-tC1">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="loosenKerning:" target="-1" id="8i4-f9-FKE"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Ligatures" id="o6e-r0-MWq">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
-                                                <items>
-                                                    <menuItem title="Use Default" id="agt-UL-0e3">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="useStandardLigatures:" target="-1" id="7uR-wd-Dx6"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Use None" id="J7y-lM-qPV">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Use All" id="xQD-1f-W4t">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Baseline" id="OaQ-X3-Vso">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Baseline" id="ijk-EB-dga">
-                                                <items>
-                                                    <menuItem title="Use Default" id="3Om-Ey-2VK">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="unscript:" target="-1" id="0vZ-95-Ywn"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Superscript" id="Rqc-34-cIF">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="superscript:" target="-1" id="3qV-fo-wpU"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Subscript" id="I0S-gh-46l">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="subscript:" target="-1" id="Q6W-4W-IGz"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Raise" id="2h7-ER-AoG">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="raiseBaseline:" target="-1" id="4sk-31-7Q9"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Lower" id="1tx-W0-xDw">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="lowerBaseline:" target="-1" id="OF1-bc-KW4"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
-                                        <menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
-                                            <connections>
-                                                <action selector="orderFrontColorPanel:" target="-1" id="mSX-Xz-DV3"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
-                                        <menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="copyFont:" target="-1" id="GJO-xA-L4q"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="pasteFont:" target="-1" id="JfD-CL-leO"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Text" id="Fal-I4-PZk">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Text" id="d9c-me-L2H">
-                                    <items>
-                                        <menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
-                                            <connections>
-                                                <action selector="alignLeft:" target="-1" id="zUv-R1-uAa"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
-                                            <connections>
-                                                <action selector="alignCenter:" target="-1" id="spX-mk-kcS"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Justify" id="J5U-5w-g23">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="alignJustified:" target="-1" id="ljL-7U-jND"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
-                                            <connections>
-                                                <action selector="alignRight:" target="-1" id="r48-bG-YeY"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
-                                        <menuItem title="Writing Direction" id="H1b-Si-o9J">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
-                                                <items>
-                                                    <menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                    </menuItem>
-                                                    <menuItem id="YGs-j5-SAR">
-                                                        <string key="title">	Default</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeBaseWritingDirectionNatural:" target="-1" id="qtV-5e-UBP"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="Lbh-J2-qVU">
-                                                        <string key="title">	Left to Right</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="S0X-9S-QSf"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="jFq-tB-4Kx">
-                                                        <string key="title">	Right to Left</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="5fk-qB-AqJ"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
-                                                    <menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                    </menuItem>
-                                                    <menuItem id="Nop-cj-93Q">
-                                                        <string key="title">	Default</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeTextWritingDirectionNatural:" target="-1" id="lPI-Se-ZHp"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="BgM-ve-c93">
-                                                        <string key="title">	Left to Right</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="caW-Bv-w94"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="RB4-Sm-HuC">
-                                                        <string key="title">	Right to Left</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="EXD-6r-ZUu"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
-                                        <menuItem title="Show Ruler" id="vLm-3I-IUL">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleRuler:" target="-1" id="FOx-HJ-KwY"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="copyRuler:" target="-1" id="71i-fW-3W2"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="pasteRuler:" target="-1" id="cSh-wd-qM2"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-                <menuItem title="View" id="H8h-7b-M4v">
-                    <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="View" id="HyV-fh-RgO">
-                        <items>
-                            <menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                <connections>
-                                    <action selector="toggleToolbarShown:" target="-1" id="BXY-wc-z0C"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="runToolbarCustomizationPalette:" target="-1" id="pQI-g3-MTW"/>
-                                </connections>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-                <menuItem title="Window" id="aUF-d1-5bR">
-                    <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
-                        <items>
-                            <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
-                                <connections>
-                                    <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Zoom" id="R4o-n2-Eq4">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
-                            <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
-                                </connections>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-                <menuItem title="Help" id="wpr-3q-Mcd">
-                    <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
-                        <items>
-                            <menuItem title="ZeroTier One Help" keyEquivalent="?" id="FKE-Sm-Kum">
-                                <connections>
-                                    <action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
-                                </connections>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-            </items>
-        </menu>
-        <window title="ZeroTier One" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="QvC-M9-y7g">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
-            <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="335" y="390" width="480" height="360"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1716" height="1024"/>
-            <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
-                <rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
-                <autoresizingMask key="autoresizingMask"/>
-            </view>
-        </window>
-    </objects>
-</document>

+ 0 - 41
attic/macui/ZeroTier One/Info.plist

@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleExecutable</key>
-	<string>$(EXECUTABLE_NAME)</string>
-	<key>CFBundleIconFile</key>
-	<string>ZeroTierIcon.icns</string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>15</string>
-	<key>LSMinimumSystemVersion</key>
-	<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
-	<key>LSUIElement</key>
-	<true/>
-	<key>NSAppTransportSecurity</key>
-	<dict>
-		<key>NSAllowsArbitraryLoads</key>
-		<true/>
-	</dict>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2016 ZeroTier, Inc. All rights reserved.</string>
-	<key>NSMainNibFile</key>
-	<string>MainMenu</string>
-	<key>NSPrincipalClass</key>
-	<string>NSApplication</string>
-</dict>
-</plist>

+ 0 - 41
attic/macui/ZeroTier One/JoinNetworkViewController.h

@@ -1,41 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Cocoa/Cocoa.h>
-
-
-extern NSString * const JoinedNetworksKey;
-
-@class AppDelegate;
-
-@interface JoinNetworkViewController : NSViewController <NSComboBoxDelegate, NSComboBoxDataSource>
-
-@property (nonatomic, weak) IBOutlet NSComboBox *network;
-@property (nonatomic, weak) IBOutlet NSButton *joinButton;
-@property (nonatomic, weak) IBOutlet NSButton *allowManagedCheckBox;
-@property (nonatomic, weak) IBOutlet NSButton *allowGlobalCheckBox;
-@property (nonatomic, weak) IBOutlet NSButton *allowDefaultCheckBox;
-@property (nonatomic, weak) IBOutlet NSButton *allowDNSCheckBox;
-@property (nonatomic, weak) IBOutlet AppDelegate *appDelegate;
-
-@property (nonatomic) NSMutableArray<NSString*> *values;
-
-- (IBAction)onJoinClicked:(id)sender;
-
-
-@end

+ 0 - 186
attic/macui/ZeroTier One/JoinNetworkViewController.m

@@ -1,186 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import "JoinNetworkViewController.h"
-#import "ServiceCom.h"
-#import "AppDelegate.h"
-
-
-NSString * const JoinedNetworksKey = @"com.zerotier.one.joined-networks";
-
-@interface NSString (extra)
-
-- (BOOL)contains:(NSString*)find;
-
-@end
-
-@implementation NSString (extra)
-
-- (BOOL)contains:(NSString*)find {
-    NSRange range = [self rangeOfString:find];
-    return range.location != NSNotFound;
-}
-
-@end
-
-
-@implementation JoinNetworkViewController
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do view setup here.
-    [self.network setDelegate:self];
-    [self.network setDataSource:self];
-}
-
-- (void)viewWillAppear {
-    [super viewWillAppear];
-
-    self.allowManagedCheckBox.state = NSOnState;
-    self.allowGlobalCheckBox.state = NSOffState;
-    self.allowDefaultCheckBox.state = NSOffState;
-    self.allowDNSCheckBox.state = NSOffState;
-
-    self.network.stringValue = @"";
-
-    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
-    NSMutableArray<NSString*> *vals = [[defaults stringArrayForKey:JoinedNetworksKey] mutableCopy];
-
-    if(vals) {
-        self.values = vals;
-    }
-}
-
-- (void)viewWillDisappear {
-    [super viewWillDisappear];
-
-    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
-    [defaults setObject:self.values forKey:JoinedNetworksKey];
-}
-
-- (IBAction)onJoinClicked:(id)sender {
-    NSString *networkId = self.network.stringValue;
-
-    NSError *error = nil;
-    [[ServiceCom sharedInstance] joinNetwork:networkId
-                                allowManaged:(self.allowManagedCheckBox.state == NSOnState)
-                                 allowGlobal:(self.allowGlobalCheckBox.state == NSOnState)
-                                allowDefault:(self.allowDefaultCheckBox.state == NSOnState)
-                                    allowDNS:(self.allowDNSCheckBox.state == NSOnState)
-                                       error:&error];
-
-    if(error) {
-        NSAlert *alert = [NSAlert alertWithError:error];
-        alert.alertStyle = NSCriticalAlertStyle;
-        [alert addButtonWithTitle:@"Ok"];
-
-        [alert runModal];
-        return;
-    }
-
-    self.network.stringValue = @"";
-
-    if(![self.values containsObject:networkId]) {
-        [self.values insertObject:networkId atIndex:0];
-
-        while([self.values count] > 20) {
-            [self.values removeLastObject];
-        }
-    }
-
-    [self.appDelegate closeJoinNetworkPopover];
-}
-
-// NSComboBoxDelegate methods
-
-- (void)controlTextDidChange:(NSNotification *)obj {
-    NSComboBox *cb = (NSComboBox*)obj.object;
-    NSString *value = cb.stringValue;
-
-    NSString *allowedCharacters = @"abcdefABCDEF0123456789";
-
-    NSString *outValue = @"";
-
-    for(int i = 0; i < [value length]; ++i) {
-        if(![allowedCharacters contains:[NSString stringWithFormat:@"%C", [value characterAtIndex:i]]]) {
-            NSBeep();
-        }
-        else {
-            outValue = [outValue stringByAppendingString:[NSString stringWithFormat:@"%C", [value characterAtIndex:i]]];
-        }
-    }
-
-    if([outValue lengthOfBytesUsingEncoding:NSUTF8StringEncoding] == 16) {
-        self.joinButton.enabled = YES;
-    }
-    else {
-        if([outValue lengthOfBytesUsingEncoding:NSUTF8StringEncoding] > 16) {
-            NSRange range = {0, 16};
-            range = [outValue rangeOfComposedCharacterSequencesForRange:range];
-            outValue = [outValue substringWithRange:range];
-            NSBeep();
-            self.joinButton.enabled = YES;
-        }
-        else {
-            self.joinButton.enabled = NO;
-        }
-    }
-
-    cb.stringValue = outValue;
-}
-
-// end NSComboBoxDelegate methods
-
-// NSComboBoxDataSource methods
-
-- (NSInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox {
-    return [self.values count];
-}
-
-- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index {
-    return [self.values objectAtIndex:index];
-}
-
-- (NSUInteger)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)string {
-    NSUInteger counter = 0;
-
-    for(NSString *val in self.values) {
-        if([val isEqualToString:string]) {
-            return counter;
-        }
-
-        counter += 1;
-    }
-
-    return NSNotFound;
-}
-
-- (NSString*)comboBox:(NSComboBox *)aComboBox completedString:(NSString *)string {
-    for(NSString *val in self.values) {
-        if([val hasPrefix:string]) {
-            return val;
-        }
-    }
-    return nil;
-}
-
-// end NSComboBoxDataSource methods
-
-@end

+ 0 - 91
attic/macui/ZeroTier One/JoinNetworkViewController.xib

@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097.3"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="JoinNetworkViewController" customModule="ZeroTier_One" customModuleProvider="target">
-            <connections>
-                <outlet property="allowDNSCheckBox" destination="LKY-vN-prS" id="COu-3z-092"/>
-                <outlet property="allowDefaultCheckBox" destination="rz3-0a-oNA" id="mYu-Wq-MHW"/>
-                <outlet property="allowGlobalCheckBox" destination="BH2-2O-Qeu" id="alx-Je-q9I"/>
-                <outlet property="allowManagedCheckBox" destination="OQS-QZ-zcY" id="7pz-vO-3IC"/>
-                <outlet property="joinButton" destination="BGy-vd-NQX" id="LGE-2G-7ND"/>
-                <outlet property="network" destination="BQy-d9-BNg" id="Yf7-BG-c84"/>
-                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="397" height="106"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="puT-Yk-CWC">
-                    <rect key="frame" x="18" y="66" width="107" height="17"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Enter Network ID" id="oYH-gS-BX5">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <comboBox verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BQy-d9-BNg">
-                    <rect key="frame" x="131" y="62" width="249" height="26"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesDataSource="YES" numberOfVisibleItems="5" id="n71-4S-AaI">
-                        <font key="font" metaFont="system"/>
-                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </comboBoxCell>
-                </comboBox>
-                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OQS-QZ-zcY">
-                    <rect key="frame" x="18" y="42" width="115" height="18"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <buttonCell key="cell" type="check" title="Allow Managed" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="QEN-MJ-xaj">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                </button>
-                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BH2-2O-Qeu">
-                    <rect key="frame" x="18" y="22" width="97" height="18"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <buttonCell key="cell" type="check" title="Allow Global" bezelStyle="regularSquare" imagePosition="left" inset="2" id="epO-Uh-aHN">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                </button>
-                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rz3-0a-oNA">
-                    <rect key="frame" x="137" y="42" width="141" height="18"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <buttonCell key="cell" type="check" title="Allow Default Route" bezelStyle="regularSquare" imagePosition="left" inset="2" id="Lkd-XI-Kcu">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                </button>
-                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LKY-vN-prS">
-                    <rect key="frame" x="137" y="22" width="86" height="18"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <buttonCell key="cell" type="check" title="Allow DNS" bezelStyle="regularSquare" imagePosition="left" inset="2" id="gGS-NZ-yu1">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                </button>
-                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BGy-vd-NQX">
-                    <rect key="frame" x="302" y="13" width="81" height="32"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <buttonCell key="cell" type="push" title="Join" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="6Rp-TA-XLl">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="onJoinClicked:" target="-2" id="kzC-GT-JKb"/>
-                    </connections>
-                </button>
-            </subviews>
-            <point key="canvasLocation" x="263.5" y="364"/>
-        </customView>
-    </objects>
-</document>

+ 0 - 69
attic/macui/ZeroTier One/Network.h

@@ -1,69 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Foundation/Foundation.h>
-
-enum NetworkStatus {
-    REQUESTING_CONFIGURATION,
-    OK,
-    ACCESS_DENIED,
-    NOT_FOUND,
-    PORT_ERROR,
-    CLIENT_TOO_OLD,
-};
-
-enum NetworkType {
-    PUBLIC,
-    PRIVATE,
-};
-
-@interface Network : NSObject <NSCoding>
-
-@property (readonly) NSArray<NSString*> *assignedAddresses;
-@property (readonly) BOOL bridge;
-@property (readonly) BOOL broadcastEnabled;
-@property (readonly) BOOL dhcp;
-@property (readonly) NSString *mac;
-@property (readonly) int mtu;
-@property (readonly) int netconfRevision;
-@property (readonly) NSString *name;
-@property (readonly) UInt64 nwid;
-@property (readonly) NSString *portDeviceName;
-@property (readonly) int portError;
-@property (readonly) enum NetworkStatus status;
-@property (readonly) enum NetworkType type;
-@property (readonly) BOOL allowManaged;
-@property (readonly) BOOL allowGlobal;
-@property (readonly) BOOL allowDefault;
-@property (readonly) BOOL allowDNS;
-@property (readonly) BOOL connected; // not persisted.  set to YES if loaded via json
-
-- (id)initWithJsonData:(NSDictionary*)jsonData;
-- (id)initWithCoder:(NSCoder *)aDecoder;
-- (void)encodeWithCoder:(NSCoder *)aCoder;
-+ (BOOL)defaultRouteExists:(NSArray<Network *>*)netList;
-- (NSString*)statusString;
-- (NSString*)typeString;
-
-- (BOOL)hasSameNetworkId:(UInt64)networkId;
-
-- (BOOL)isEqualToNetwork:(Network*)network;
-- (BOOL)isEqual:(id)object;
-- (NSUInteger)hash;
-
-@end

+ 0 - 352
attic/macui/ZeroTier One/Network.m

@@ -1,352 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import "Network.h"
-
-NSString *NetworkAddressesKey = @"addresses";
-NSString *NetworkBridgeKey = @"bridge";
-NSString *NetworkBroadcastKey = @"broadcast";
-NSString *NetworkDhcpKey = @"dhcp";
-NSString *NetworkMacKey = @"mac";
-NSString *NetworkMtuKey = @"mtu";
-NSString *NetworkMulticastKey = @"multicast";
-NSString *NetworkNameKey = @"name";
-NSString *NetworkNetconfKey = @"netconf";
-NSString *NetworkNwidKey = @"nwid";
-NSString *NetworkPortNameKey = @"port";
-NSString *NetworkPortErrorKey = @"portError";
-NSString *NetworkStatusKey = @"status";
-NSString *NetworkTypeKey = @"type";
-NSString *NetworkAllowManagedKey = @"allowManaged";
-NSString *NetworkAllowGlobalKey = @"allowGlobal";
-NSString *NetworkAllowDefaultKey = @"allowDefault";
-NSString *NetworkAllowDNSKey = @"allowDNS";
-
-@implementation Network
-
-- (id)initWithJsonData:(NSDictionary*)jsonData
-{
-    self = [super init];
-
-    if(self) {
-        if([jsonData objectForKey:@"assignedAddresses"]) {
-            _assignedAddresses = (NSArray<NSString*>*)[jsonData objectForKey:@"assignedAddresses"];
-        }
-
-        if([jsonData objectForKey:@"bridge"]) {
-            _bridge = [(NSNumber*)[jsonData objectForKey:@"bridge"] boolValue];
-        }
-
-        if([jsonData objectForKey:@"broadcastEnabled"]) {
-            _broadcastEnabled = [(NSNumber*)[jsonData objectForKey:@"broadcastEnabled"] boolValue];
-        }
-
-        if([jsonData objectForKey:@"dhcp"]) {
-            _dhcp = [(NSNumber*)[jsonData objectForKey:@"dhcp"] boolValue];
-        }
-
-        if([jsonData objectForKey:@"mac"]) {
-            _mac = (NSString*)[jsonData objectForKey:@"mac"];
-        }
-
-        if([jsonData objectForKey:@"mtu"]) {
-            _mtu = [(NSNumber*)[jsonData objectForKey:@"mtu"] intValue];
-        }
-
-        if([jsonData objectForKey:@"name"]) {
-            _name = (NSString*)[jsonData objectForKey:@"name"];
-        }
-
-        if([jsonData objectForKey:@"netconfRevision"]) {
-            _netconfRevision = [(NSNumber*)[jsonData objectForKey:@"netconfRevision"] intValue];
-        }
-
-        if([jsonData objectForKey:@"nwid"]) {
-            NSString *networkid = (NSString*)[jsonData objectForKey:@"nwid"];
-
-            NSScanner *scanner = [NSScanner scannerWithString:networkid];
-            [scanner scanHexLongLong:&_nwid];
-        }
-
-        if([jsonData objectForKey:@"portDeviceName"]) {
-            _portDeviceName = (NSString*)[jsonData objectForKey:@"portDeviceName"];
-        }
-
-        if([jsonData objectForKey:@"portError"]) {
-            _portError = [(NSNumber*)[jsonData objectForKey:@"portError"] intValue];
-        }
-
-        if([jsonData objectForKey:@"allowManaged"]) {
-            _allowManaged = [(NSNumber*)[jsonData objectForKey:@"allowManaged"] boolValue];
-        }
-
-        if([jsonData objectForKey:@"allowGlobal"]) {
-            _allowGlobal = [(NSNumber*)[jsonData objectForKey:@"allowGlobal"] boolValue];
-        }
-
-        if([jsonData objectForKey:@"allowDefault"]) {
-            _allowDefault = [(NSNumber*)[jsonData objectForKey:@"allowDefault"] boolValue];
-        }
-        if([jsonData objectForKey:@"allowDNS"]) {
-            _allowDNS = [(NSNumber*)[jsonData objectForKey:@"allowDNS"] boolValue];
-        } else {
-            _allowDNS = false;
-        }
-
-        if([jsonData objectForKey:@"status"]) {
-            NSString *statusStr = (NSString*)[jsonData objectForKey:@"status"];
-            if([statusStr isEqualToString:@"REQUESTING_CONFIGURATION"]) {
-                _status = REQUESTING_CONFIGURATION;
-            }
-            else if([statusStr isEqualToString:@"OK"]) {
-                _status = OK;
-            }
-            else if([statusStr isEqualToString:@"ACCESS_DENIED"]) {
-                _status = ACCESS_DENIED;
-            }
-            else if([statusStr isEqualToString:@"NOT_FOUND"]) {
-                _status = NOT_FOUND;
-            }
-            else if([statusStr isEqualToString:@"PORT_ERROR"]) {
-                _status = PORT_ERROR;
-            }
-            else if([statusStr isEqualToString:@"CLIENT_TOO_OLD"]) {
-                _status = CLIENT_TOO_OLD;
-            }
-        }
-
-        if([jsonData objectForKey:@"type"]) {
-            NSString *typeStr = (NSString*)[jsonData objectForKey:@"type"];
-            if([typeStr isEqualToString:@"PRIVATE"]) {
-                _type = PRIVATE;
-            }
-            else if([typeStr isEqualToString:@"PUBLIC"]) {
-                _type = PUBLIC;
-            }
-        }
-
-        _connected = YES;
-    }
-
-    return self;
-}
-- (id)initWithCoder:(NSCoder *)aDecoder
-{
-    self = [super init];
-
-    if(self) {
-        if([aDecoder containsValueForKey:NetworkAddressesKey]) {
-            _assignedAddresses = (NSArray<NSString*>*)[aDecoder decodeObjectForKey:NetworkAddressesKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkBridgeKey]) {
-            _bridge = [aDecoder decodeBoolForKey:NetworkBridgeKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkBroadcastKey]) {
-            _broadcastEnabled = [aDecoder decodeBoolForKey:NetworkBroadcastKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkDhcpKey]) {
-            _dhcp = [aDecoder decodeBoolForKey:NetworkDhcpKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkMacKey]) {
-            _mac = (NSString*)[aDecoder decodeObjectForKey:NetworkMacKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkMtuKey]) {
-            _mtu = (int)[aDecoder decodeIntegerForKey:NetworkMtuKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkNameKey]) {
-            _name = (NSString*)[aDecoder decodeObjectForKey:NetworkNameKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkNetconfKey]) {
-            _netconfRevision = (int)[aDecoder decodeIntegerForKey:NetworkNetconfKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkNwidKey]) {
-            _nwid = [(NSNumber*)[aDecoder decodeObjectForKey:NetworkNwidKey] unsignedLongLongValue];
-        }
-
-        if([aDecoder containsValueForKey:NetworkPortNameKey]) {
-            _portDeviceName = (NSString*)[aDecoder decodeObjectForKey:NetworkPortNameKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkPortErrorKey]) {
-            _portError = (int)[aDecoder decodeIntegerForKey:NetworkPortErrorKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkStatusKey]) {
-            _status = (enum NetworkStatus)[aDecoder decodeIntegerForKey:NetworkStatusKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkTypeKey]) {
-            _type = (enum NetworkType)[aDecoder decodeIntegerForKey:NetworkTypeKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkAllowManagedKey]) {
-            _allowManaged = [aDecoder decodeBoolForKey:NetworkAllowManagedKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkAllowGlobalKey]) {
-            _allowGlobal = [aDecoder decodeBoolForKey:NetworkAllowGlobalKey];
-        }
-
-        if([aDecoder containsValueForKey:NetworkAllowDefaultKey]) {
-            _allowDefault = [aDecoder decodeBoolForKey:NetworkAllowDefaultKey];
-        }
-        
-        if([aDecoder containsValueForKey:NetworkAllowDNSKey]) {
-            _allowDNS = [aDecoder decodeBoolForKey:NetworkAllowDNSKey];
-        } else {
-            _allowDNS = false;
-        }
-
-        _connected = NO;
-    }
-
-    return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)aCoder
-{
-    [aCoder encodeObject:_assignedAddresses forKey:NetworkAddressesKey];
-    [aCoder encodeBool:_bridge forKey:NetworkBridgeKey];
-    [aCoder encodeBool:_broadcastEnabled forKey:NetworkBroadcastKey];
-    [aCoder encodeBool:_dhcp forKey:NetworkDhcpKey];
-    [aCoder encodeObject:_mac forKey:NetworkMacKey];
-    [aCoder encodeInteger:_mtu forKey:NetworkMtuKey];
-    [aCoder encodeObject:_name forKey:NetworkNameKey];
-    [aCoder encodeInteger:_netconfRevision forKey:NetworkNetconfKey];
-    [aCoder encodeObject:[NSNumber numberWithUnsignedLongLong:_nwid]
-                  forKey:NetworkNwidKey];
-    [aCoder encodeObject:_portDeviceName forKey:NetworkPortNameKey];
-    [aCoder encodeInteger:_portError forKey:NetworkPortErrorKey];
-    [aCoder encodeInteger:_status forKey:NetworkStatusKey];
-    [aCoder encodeInteger:_type forKey:NetworkTypeKey];
-    [aCoder encodeBool:_allowManaged forKey:NetworkAllowManagedKey];
-    [aCoder encodeBool:_allowGlobal forKey:NetworkAllowGlobalKey];
-    [aCoder encodeBool:_allowDefault forKey:NetworkAllowDefaultKey];
-    [aCoder encodeBool:_allowDNS forKey:NetworkAllowDNSKey];
-}
-
-+ (BOOL)defaultRouteExists:(NSArray<Network *>*)netList
-{
-    for(Network *net in netList) {
-        if (net.allowDefault && net.connected) {
-            return YES;
-        }
-    }
-    return NO;
-}
-
-- (NSString*)statusString {
-    switch(_status) {
-        case REQUESTING_CONFIGURATION:
-            return @"REQUESTING_CONFIGURATION";
-        case OK:
-            return @"OK";
-        case ACCESS_DENIED:
-            return @"ACCESS_DENIED";
-        case NOT_FOUND:
-            return @"NOT_FOUND";
-        case PORT_ERROR:
-            return @"PORT_ERROR";
-        case CLIENT_TOO_OLD:
-            return @"CLIENT_TOO_OLD";
-        default:
-            return @"";
-    }
-}
-
-- (NSString*)typeString {
-    switch(_type) {
-        case PUBLIC:
-            return @"PUBLIC";
-        case PRIVATE:
-            return @"PRIVATE";
-        default:
-            return @"";
-    }
-}
-
-- (BOOL)hasSameNetworkId:(UInt64)networkId
-{
-    return self.nwid == networkId;
-}
-
-- (BOOL)isEqualToNetwork:(Network*)network
-{
-    return [self.assignedAddresses isEqualToArray:network.assignedAddresses] &&
-        self.bridge == network.bridge &&
-        self.broadcastEnabled == network.broadcastEnabled &&
-        self.dhcp == network.dhcp &&
-        [self.mac isEqualToString:network.mac] &&
-        self.mtu == network.mtu &&
-        self.netconfRevision == network.netconfRevision &&
-        [self.name isEqualToString:network.name] &&
-        self.nwid == network.nwid &&
-        [self.portDeviceName isEqualToString:network.portDeviceName] &&
-        self.status == network.status &&
-        self.type == network.type &&
-        self.allowManaged == network.allowManaged &&
-        self.allowGlobal == network.allowGlobal &&
-        self.allowDefault == network.allowDefault &&
-        self.allowDNS == network.allowDNS &&
-        self.connected == network.connected;
-}
-
-- (BOOL)isEqual:(id)object
-{
-    if (self == object) {
-        return YES;
-    }
-
-    if (![object isKindOfClass:[Network class]]) {
-        return NO;
-    }
-
-    return [self isEqualToNetwork:object];
-}
-
-- (NSUInteger)hash
-{
-    return [self.assignedAddresses hash] ^
-        self.bridge ^
-        self.broadcastEnabled ^
-        self.dhcp ^
-        [self.mac hash] ^
-        self.mtu ^
-        self.netconfRevision ^
-        [self.name hash] ^
-        self.nwid ^
-        [self.portDeviceName hash] ^
-        self.portError ^
-        self.status ^
-        self.type ^
-        self.allowManaged ^
-        self.allowGlobal ^
-        self.allowDefault ^
-        self.allowDNS ^
-        self.connected;
-}
-
-@end

+ 0 - 51
attic/macui/ZeroTier One/NetworkInfoCell.h

@@ -1,51 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Cocoa/Cocoa.h>
-
-@class ShowNetworksViewController;
-
-@interface NetworkInfoCell : NSTableCellView
-
-@property (weak, nonatomic) ShowNetworksViewController *parent;
-
-@property (weak, nonatomic) IBOutlet NSTextField *networkIdField;
-@property (weak, nonatomic) IBOutlet NSTextField *networkNameField;
-@property (weak, nonatomic) IBOutlet NSTextField *statusField;
-@property (weak, nonatomic) IBOutlet NSTextField *typeField;
-@property (weak, nonatomic) IBOutlet NSTextField *macField;
-@property (weak, nonatomic) IBOutlet NSTextField *mtuField;
-@property (weak, nonatomic) IBOutlet NSTextField *broadcastField;
-@property (weak, nonatomic) IBOutlet NSTextField *bridgingField;
-@property (weak, nonatomic) IBOutlet NSTextField *deviceField;
-@property (weak, nonatomic) IBOutlet NSTextField *addressesField;
-@property (weak, nonatomic) IBOutlet NSButton *allowManaged;
-@property (weak, nonatomic) IBOutlet NSButton *allowGlobal;
-@property (weak, nonatomic) IBOutlet NSButton *allowDefault;
-@property (weak, nonatomic) IBOutlet NSButton *allowDNS;
-@property (weak, nonatomic) IBOutlet NSButton *connectedCheckbox;
-@property (weak, nonatomic) IBOutlet NSButton *deleteButton;
-
-- (IBAction)onConnectCheckStateChanged:(NSButton*)sender;
-- (IBAction)deleteNetwork:(NSButton*)sender;
-- (IBAction)onAllowStatusChanged:(NSButton*)sender;
-
-- (void)joinNetwork:(NSString*)nwid;
-- (void)leaveNetwork:(NSString*)nwid;
-
-@end

+ 0 - 86
attic/macui/ZeroTier One/NetworkInfoCell.m

@@ -1,86 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import "NetworkInfoCell.h"
-#import "ServiceCom.h"
-#import "ShowNetworksViewController.h"
-#import "Network.h"
-
-@implementation NetworkInfoCell
-
-- (void)drawRect:(NSRect)dirtyRect {
-    [super drawRect:dirtyRect];
-    
-    // Drawing code here.
-}
-
-- (IBAction)onConnectCheckStateChanged:(NSButton*)sender
-{
-    if(sender.state == NSOnState) {
-        [self joinNetwork:self.networkIdField.stringValue];
-    }
-    else {
-        [self leaveNetwork:self.networkIdField.stringValue];
-    }
-}
-
-- (IBAction)deleteNetwork:(NSButton*)sender;
-{
-    [self leaveNetwork:self.networkIdField.stringValue];
-    [self.parent deleteNetworkFromList:self.networkIdField.stringValue];
-}
-
-- (IBAction)onAllowStatusChanged:(NSButton*)sender
-{
-    [self joinNetwork:self.networkIdField.stringValue];
-}
-
-- (void)joinNetwork:(NSString*)nwid
-{
-    NSError *error = nil;
-    [[ServiceCom sharedInstance] joinNetwork:nwid
-                                allowManaged:(self.allowManaged.state == NSOnState)
-                                 allowGlobal:(self.allowGlobal.state  == NSOnState)
-                                allowDefault:![Network defaultRouteExists:_parent.networkList] && (self.allowDefault.state == NSOnState)
-                                    allowDNS:(self.allowDNS.state == NSOnState)
-                                       error:&error];
-
-    if (error) {
-        NSAlert *alert = [NSAlert alertWithError:error];
-        alert.alertStyle = NSCriticalAlertStyle;
-        [alert addButtonWithTitle:@"Ok"];
-
-        [alert runModal];
-    }
-}
-
-- (void)leaveNetwork:(NSString*)nwid
-{
-    NSError *error = nil;
-    [[ServiceCom sharedInstance] leaveNetwork:nwid error:&error];
-
-    if (error) {
-        NSAlert *alert = [NSAlert alertWithError:error];
-        alert.alertStyle = NSCriticalAlertStyle;
-        [alert addButtonWithTitle:@"Ok"];
-
-        [alert runModal];
-    }
-}
-
-@end

+ 0 - 45
attic/macui/ZeroTier One/NetworkMonitor.h

@@ -1,45 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Foundation/Foundation.h>
-
-extern NSString * const NetworkUpdateKey;
-extern NSString * const StatusUpdateKey;
-
-@class Network;
-
-@interface NetworkMonitor : NSObject
-{
-    NSMutableArray<Network*> *_savedNetworks;
-    NSArray<Network*> *_receivedNetworks;
-    NSMutableArray<Network*> *_allNetworks;
-
-    NSTimer *_timer;
-}
-
-- (id)init;
-- (void)dealloc;
-
-- (void)start;
-- (void)stop;
-
-- (void)updateNetworkInfo;
-
-- (void)deleteSavedNetwork:(NSString*)networkId;
-
-@end

+ 0 - 253
attic/macui/ZeroTier One/NetworkMonitor.m

@@ -1,253 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import "NetworkMonitor.h"
-#import "Network.h"
-#import "ServiceCom.h"
-#import "NodeStatus.h"
-
-@import AppKit;
-
-
-NSString * const NetworkUpdateKey = @"com.zerotier.one.network-list";
-NSString * const StatusUpdateKey = @"com.zerotier.one.status";
-
-@interface NetworkMonitor (private)
-
-- (NSString*)dataFile;
-- (void)internal_updateNetworkInfo;
-- (NSInteger)findNetworkWithID:(UInt64)networkId;
-- (NSInteger)findSavedNetworkWithID:(UInt64)networkId;
-- (void)saveNetworks;
-
-@end
-
-@implementation NetworkMonitor
-
-- (id)init
-{
-    self = [super init];
-    if(self)
-    {
-        _savedNetworks = [NSMutableArray<Network*> array];
-        _receivedNetworks = [NSArray<Network*> array];
-        _allNetworks = [NSMutableArray<Network*> array];
-        _timer = nil;
-    }
-
-    return self;
-}
-
-- (void)dealloc
-{
-    [_timer invalidate];
-}
-
-- (void)start
-{
-    NSLog(@"ZeroTier monitor started");
-    _timer = [NSTimer scheduledTimerWithTimeInterval:1.0f
-                                              target:self
-                                            selector:@selector(updateNetworkInfo)
-                                            userInfo:nil
-                                             repeats:YES];
-}
-
-- (void)stop
-{
-    NSLog(@"ZeroTier monitor stopped");
-    [_timer invalidate];
-    _timer = nil;
-}
-
-- (void)updateNetworkInfo
-{
-    NSString *filePath = [self dataFile];
-
-    if([[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
-        NSArray<Network*> *networks = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath];
-
-        if(networks != nil) {
-            _savedNetworks = [networks mutableCopy];
-        }
-    }
-
-    NSError *error = nil;
-
-    [[ServiceCom sharedInstance] getNetworklist:^(NSArray<Network *> *networkList) {
-        _receivedNetworks = networkList;
-
-        [[NSOperationQueue mainQueue] addOperationWithBlock:^{
-            [self internal_updateNetworkInfo];
-        } ];
-    } error:&error];
-
-    if(error) {
-        [self stop];
-
-        NSAlert *alert = [NSAlert alertWithError:error];
-        alert.alertStyle = NSCriticalAlertStyle;
-        [alert addButtonWithTitle:@"Quit"];
-        [alert addButtonWithTitle:@"Retry"];
-
-        NSModalResponse res = [alert runModal];
-
-        if(res == NSAlertFirstButtonReturn) {
-            [NSApp performSelector:@selector(terminate:) withObject:nil afterDelay:0.0];
-        }
-        else if(res == NSAlertSecondButtonReturn) {
-            [self start];
-            return;
-        }
-    }
-
-    [[ServiceCom sharedInstance] getNodeStatus:^(NodeStatus *status) {
-        NSDictionary *userInfo = [NSDictionary dictionaryWithObject:status forKey:@"status"];
-
-        [[NSOperationQueue mainQueue] addOperationWithBlock:^{
-            [[NSNotificationCenter defaultCenter] postNotificationName:StatusUpdateKey
-                                                                object:nil
-                                                              userInfo:userInfo];
-        }];
-    } error:&error];
-
-    if (error) {
-        [self stop];
-
-        NSAlert *alert = [NSAlert alertWithError:error];
-        alert.alertStyle = NSCriticalAlertStyle;
-        [alert addButtonWithTitle:@"Quit"];
-        [alert addButtonWithTitle:@"Retry"];
-
-        NSModalResponse res = [alert runModal];
-
-        if(res == NSAlertFirstButtonReturn) {
-            [NSApp performSelector:@selector(terminate:) withObject:nil afterDelay:0.0];
-        }
-        else if(res == NSAlertSecondButtonReturn) {
-            [self start];
-            return;
-        }
-    }
-}
-
-- (void)deleteSavedNetwork:(NSString*)networkId
-{
-    UInt64 nwid = 0;
-    NSScanner *scanner = [NSScanner scannerWithString:networkId];
-    [scanner scanHexLongLong:&nwid];
-
-    NSInteger index = [self findNetworkWithID:nwid];
-
-    if(index != NSNotFound) {
-        [_allNetworks removeObjectAtIndex:index];
-    }
-
-    index = [self findSavedNetworkWithID:nwid];
-
-    if(index != NSNotFound) {
-        [_savedNetworks removeObjectAtIndex:index];
-    }
-
-    [self saveNetworks];
-}
-
-@end
-
-@implementation NetworkMonitor (private)
-- (NSString*)dataFile
-{
-    NSURL *appSupport = [[[NSFileManager defaultManager] URLsForDirectory:NSApplicationSupportDirectory
-                                                               inDomains:NSUserDomainMask] objectAtIndex:0];
-
-    appSupport = [[[appSupport URLByAppendingPathComponent:@"ZeroTier"] URLByAppendingPathComponent:@"One"] URLByAppendingPathComponent:@"networkinfo.dat"];
-    return appSupport.path;
-}
-
-- (void)internal_updateNetworkInfo
-{
-    NSMutableArray<Network*> *networks = [_savedNetworks mutableCopy];
-
-    for(Network *nw in _receivedNetworks) {
-        NSInteger index = [self findSavedNetworkWithID:nw.nwid];
-
-        if(index != NSNotFound) {
-            [networks setObject:nw atIndexedSubscript:index];
-        }
-        else {
-            [networks addObject:nw];
-        }
-    }
-
-    [networks sortUsingComparator:^NSComparisonResult(Network *obj1, Network *obj2) {
-        if(obj1.nwid > obj2.nwid) {
-            return true;
-        }
-        return false;
-    }];
-
-    @synchronized(_allNetworks) {
-        _allNetworks = networks;
-    }
-
-    [self saveNetworks];
-
-    NSDictionary *userInfo = [NSDictionary dictionaryWithObject:networks forKey:@"networks"];
-
-    [[NSNotificationCenter defaultCenter] postNotificationName:NetworkUpdateKey
-                                                        object:nil
-                                                      userInfo:userInfo];
-}
-
-- (NSInteger)findNetworkWithID:(UInt64)networkId
-{
-    for(int i = 0; i < [_allNetworks count]; ++i) {
-        Network *nw = [_allNetworks objectAtIndex:i];
-
-        if(nw.nwid == networkId) {
-            return i;
-        }
-    }
-
-    return NSNotFound;
-}
-
-
-- (NSInteger)findSavedNetworkWithID:(UInt64)networkId
-{
-    for(int i = 0; i < [_savedNetworks count]; ++i) {
-        Network *nw = [_savedNetworks objectAtIndex:i];
-
-        if(nw.nwid == networkId) {
-            return i;
-        }
-    }
-
-    return NSNotFound;
-}
-
-- (void)saveNetworks
-{
-    NSString *filePath = [self dataFile];
-
-    @synchronized(_allNetworks) {
-        [NSKeyedArchiver archiveRootObject:_allNetworks toFile:filePath];
-    }
-}
-
-@end

+ 0 - 35
attic/macui/ZeroTier One/NodeStatus.h

@@ -1,35 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface NodeStatus : NSObject
-
-@property (readonly) NSString *address;
-@property (readonly) NSString *publicIdentity;
-@property (readonly) BOOL online;
-@property (readonly) BOOL tcpFallbackActive;
-@property (readonly) int versionMajor;
-@property (readonly) int versionMinor;
-@property (readonly) int versionRev;
-@property (readonly) NSString *version;
-@property (readonly) UInt64 clock;
-
-- (id)initWithJsonData:(NSDictionary*)jsonData;
-
-@end

+ 0 - 40
attic/macui/ZeroTier One/NodeStatus.m

@@ -1,40 +0,0 @@
-/*
- * ZeroTier One - Network Virtualization Everywhere
- * Copyright (C) 2011-2016  ZeroTier, Inc.  https://www.zerotier.com/
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-#import "NodeStatus.h"
-
-@implementation NodeStatus
-
-- (id)initWithJsonData:(NSDictionary*)jsonData
-{
-    self = [super init];
-
-    if(self) {
-        _address = (NSString*)[jsonData objectForKey:@"address"];
-        _publicIdentity = (NSString*)[jsonData objectForKey:@"publicIdentity"];
-        _online = [(NSNumber*)[jsonData objectForKey:@"online"] boolValue];
-        _tcpFallbackActive = [(NSNumber*)[jsonData objectForKey:@"tcpFallbackActive"] boolValue];
-        _versionMajor = [(NSNumber*)[jsonData objectForKey:@"versionMajor"] intValue];
-        _versionMinor = [(NSNumber*)[jsonData objectForKey:@"versionMinor"] intValue];
-        _versionRev = [(NSNumber*)[jsonData objectForKey:@"versionRev"] intValue];
-        _version = (NSString*)[jsonData objectForKey:@"version"];
-        _clock = [(NSNumber*)[jsonData objectForKey:@"clock"] unsignedLongLongValue];
-    }
-
-    return self;
-}
-@end

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików