diff --git a/.gitignore b/.gitignore
index 3aa462cef..1cdc1ba81 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,8 @@
-zerotier-*
-/Makefile
+/ext/llvm-g++-Xcode4.6.2
+/ext/llvm-g++-Xcode4.6.2.tar.bz2
+/zerotier-*
+/build-ZeroTierUI-*
+/ZeroTierUI/*.user
*.o
.DS_Store
.Apple*
@@ -20,6 +23,7 @@ mac-tap/tuntap/tap.kext
/vsprojects/TapDriver/x64
/vsprojects/InstallerUpdater/obj
/vsprojects/Service/obj
+/vsprojects/SelfTest/SelfTest.aps
/Build/*
*.log
*.opensdf
@@ -27,4 +31,6 @@ mac-tap/tuntap/tap.kext
*.cache
*.obj
*.tlog
-/vsprojects/SelfTest/SelfTest.aps
+/installer-build
+/zt1-*-install
+/file2lz4c
diff --git a/BUILDING.txt b/BUILDING.txt
index 761a50de3..53c9d1a0c 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -18,6 +18,18 @@ make -f Makefile.linux
Edit Makefile.linux if you want to change between debug or release build.
+If you are building ext/tap-mac you will need a different version of the
+OSX gcc compiler chain than what currently ships (clang). We've got a copy
+available here:
+
+http://download.zerotier.com/dev/llvm-g++-Xcode4.6.2.tar.bz2
+
+Un-tar this into ext/ (it's excluded in .gitignore) and then 'make' in
+ext/tap-mac/tuntap/src/tap.
+
+Most users should not need to build tap-mac, since a binary is included
+in ext/bin.
+
-- Windows
Here be dragons.
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..ac50884cd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+# Common makefile -- loads make rules for each platform
+
+OSTYPE=$(shell uname -s)
+
+ifeq ($(OSTYPE),Darwin)
+ include make-mac.mk
+endif
+
+ifeq ($(OSTYPE),Linux)
+ include make-linux.mk
+endif
diff --git a/ZeroTierUI/Info.plist b/ZeroTierUI/Info.plist
new file mode 100644
index 000000000..06f680c64
--- /dev/null
+++ b/ZeroTierUI/Info.plist
@@ -0,0 +1,20 @@
+
+
+
+
+ NSPrincipalClass
+ NSApplication
+ CFBundleIconFile
+ zt1icon.icns
+ CFBundlePackageType
+ APPL
+ CFBundleGetInfoString
+ ZeroTier One (Mac GUI)
+ CFBundleSignature
+ ????
+ CFBundleExecutable
+ ZeroTier One
+ CFBundleIdentifier
+ com.zerotier.ZeroTierOne
+
+
diff --git a/ZeroTierUI/ZeroTierUI.pro b/ZeroTierUI/ZeroTierUI.pro
new file mode 100644
index 000000000..0bfcb819b
--- /dev/null
+++ b/ZeroTierUI/ZeroTierUI.pro
@@ -0,0 +1,31 @@
+QT += core gui widgets
+TARGET = "ZeroTier One"
+TEMPLATE = app
+
+win32:RC_FILE = ZeroTierUI.rc
+mac:ICON = zt1icon.icns
+mac:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
+mac:QMAKE_INFO_PLIST = Info.plist
+
+# ZeroTier One must be built before building this, since it links in the
+# client code and some stuff from Utils to talk to the running service.
+LIBS += ../node/*.o
+
+SOURCES += main.cpp\
+ mainwindow.cpp \
+ network.cpp \
+ aboutwindow.cpp
+
+HEADERS += mainwindow.h \
+ network.h \
+ aboutwindow.h \
+ ../node/Node.hpp \
+ ../node/Utils.hpp \
+ ../node/Defaults.hpp
+
+FORMS += mainwindow.ui \
+ network.ui \
+ aboutwindow.ui
+
+RESOURCES += \
+ resources.qrc
diff --git a/ZeroTierUI/ZeroTierUI.rc b/ZeroTierUI/ZeroTierUI.rc
new file mode 100644
index 000000000..2c5365c0f
--- /dev/null
+++ b/ZeroTierUI/ZeroTierUI.rc
@@ -0,0 +1 @@
+IDI_ICON1 ICON DISCARDABLE "zt1icon.ico"
diff --git a/ZeroTierUI/aboutwindow.cpp b/ZeroTierUI/aboutwindow.cpp
new file mode 100644
index 000000000..1a2b22907
--- /dev/null
+++ b/ZeroTierUI/aboutwindow.cpp
@@ -0,0 +1,31 @@
+#include "aboutwindow.h"
+#include "ui_aboutwindow.h"
+
+#include
+#include "../node/Defaults.hpp"
+
+AboutWindow::AboutWindow(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::AboutWindow)
+{
+ ui->setupUi(this);
+#ifndef __APPLE__
+ ui->uninstallButton->hide();
+#endif
+}
+
+AboutWindow::~AboutWindow()
+{
+ delete ui;
+}
+
+void AboutWindow::on_uninstallButton_clicked()
+{
+ // Apple only... other OSes have more intrinsic mechanisms for uninstalling.
+ QMessageBox::information(
+ this,
+ "Uninstalling ZeroTier One",
+ QString("Uninstalling ZeroTier One is easy!\n\nJust remove ZeroTier One from your Applications folder and the service will automatically shut down within a few seconds. Then, on your next reboot, all other support files will be automatically deleted.\n\nIf you wish to uninstall the service and support files now, you can run the 'uninstall.sh' script found in ") + ZeroTier::ZT_DEFAULTS.defaultHomePath.c_str() + " using the 'sudo' command in a terminal.",
+ QMessageBox::Ok,
+ QMessageBox::NoButton);
+}
diff --git a/ZeroTierUI/aboutwindow.h b/ZeroTierUI/aboutwindow.h
new file mode 100644
index 000000000..6c883b9ba
--- /dev/null
+++ b/ZeroTierUI/aboutwindow.h
@@ -0,0 +1,25 @@
+#ifndef AboutWindow_H
+#define AboutWindow_H
+
+#include
+
+namespace Ui {
+class AboutWindow;
+}
+
+class AboutWindow : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit AboutWindow(QWidget *parent = 0);
+ virtual ~AboutWindow();
+
+private slots:
+ void on_uninstallButton_clicked();
+
+private:
+ Ui::AboutWindow *ui;
+};
+
+#endif // AboutWindow_H
diff --git a/ZeroTierUI/aboutwindow.ui b/ZeroTierUI/aboutwindow.ui
new file mode 100644
index 000000000..84aab4347
--- /dev/null
+++ b/ZeroTierUI/aboutwindow.ui
@@ -0,0 +1,271 @@
+
+
+ AboutWindow
+
+
+
+ 0
+ 0
+ 508
+ 261
+
+
+
+ About ZeroTier One
+
+
+
+ :/img/zt1icon.png:/img/zt1icon.png
+
+
+ true
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
+ 6
+
+
-
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 128
+ 128
+
+
+
+
+ 128
+ 128
+
+
+
+
+
+
+ Qt::PlainText
+
+
+ :/img/zt1icon.png
+
+
+ true
+
+
+ Qt::NoTextInteraction
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ false
+
+
+
+ ZeroTier One GUI
+(c)2012-2013 ZeroTier Networks LLC
+
+Author(s): Adam Ierymenko
+Version: 1.0
+
+
+ Qt::PlainText
+
+
+ Qt::AlignHCenter|Qt::AlignTop
+
+
+ Qt::NoTextInteraction
+
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Uninstall
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Ok
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ AboutWindow
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ AboutWindow
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
diff --git a/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Info.plist b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Info.plist
new file mode 100644
index 000000000..0f32d0efe
--- /dev/null
+++ b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Info.plist
@@ -0,0 +1,50 @@
+
+
+
+
+ CFBundleAllowMixedLocalizations
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ applet
+ CFBundleIconFile
+ applet
+ CFBundleIdentifier
+ com.zerotier.one.ZeroTierOneMacAuthenticateScript
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ ZeroTier One (Authenticate)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ aplt
+ LSMinimumSystemVersionByArchitecture
+
+ x86_64
+ 10.6
+
+ LSRequiresCarbon
+
+ NSHumanReadableCopyright
+ (c) 2013 ZeroTier Networks LLC
+ WindowState
+
+ dividerCollapsed
+
+ eventLogLevel
+ -1
+ name
+ ScriptWindowState
+ positionOfDivider
+ 333
+ savedFrame
+ 7 181 602 597 0 0 1280 778
+ selectedTabView
+ result
+
+
+
diff --git a/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/MacOS/applet b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/MacOS/applet
new file mode 100755
index 000000000..8057b9e3b
Binary files /dev/null and b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/MacOS/applet differ
diff --git a/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/PkgInfo b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/PkgInfo
new file mode 100644
index 000000000..3253614c4
--- /dev/null
+++ b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/PkgInfo
@@ -0,0 +1 @@
+APPLaplt
\ No newline at end of file
diff --git a/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/Scripts/main.scpt b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/Scripts/main.scpt
new file mode 100644
index 000000000..cb578574d
Binary files /dev/null and b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/Scripts/main.scpt differ
diff --git a/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/applet.icns b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/applet.icns
new file mode 100644
index 000000000..0cdd17086
Binary files /dev/null and b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/applet.icns differ
diff --git a/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/applet.rsrc b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/applet.rsrc
new file mode 100644
index 000000000..a528ee8a9
Binary files /dev/null and b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/applet.rsrc differ
diff --git a/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/description.rtfd/TXT.rtf b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/description.rtfd/TXT.rtf
new file mode 100644
index 000000000..09700b2f2
--- /dev/null
+++ b/ZeroTierUI/helpers/mac/ZeroTier One (Authenticate).app/Contents/Resources/description.rtfd/TXT.rtf
@@ -0,0 +1,4 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1265
+{\fonttbl}
+{\colortbl;\red255\green255\blue255;}
+}
\ No newline at end of file
diff --git a/ZeroTierUI/main.cpp b/ZeroTierUI/main.cpp
new file mode 100644
index 000000000..a080bdd29
--- /dev/null
+++ b/ZeroTierUI/main.cpp
@@ -0,0 +1,11 @@
+#include "mainwindow.h"
+#include
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+
+ return a.exec();
+}
diff --git a/ZeroTierUI/mainwindow.cpp b/ZeroTierUI/mainwindow.cpp
new file mode 100644
index 000000000..6e972c73c
--- /dev/null
+++ b/ZeroTierUI/mainwindow.cpp
@@ -0,0 +1,272 @@
+#include "mainwindow.h"
+#include "aboutwindow.h"
+#include "network.h"
+#include "ui_mainwindow.h"
+
+#include
+#include