mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-09-22 15:29:03 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfee7e0389 | ||
|
|
60f25ccdf9 | ||
|
|
2b0dbead17 | ||
|
|
d0b506c12b | ||
|
|
742261c7fc | ||
|
|
939cdc82a2 | ||
|
|
a207ce13c0 | ||
|
|
17c77da38f | ||
|
|
54313212a4 | ||
|
|
b2673eab55 | ||
|
|
282d41bc94 | ||
|
|
b72c2c6358 | ||
|
|
5581339d5b | ||
|
|
78f3966d66 | ||
|
|
bae9fa1480 | ||
|
|
cef750d1d2 | ||
|
|
be36eda858 | ||
|
|
13fbf9a200 | ||
|
|
f2a03f68bd | ||
|
|
d997c1a32a | ||
|
|
d27251ec4e | ||
|
|
9ae6403346 | ||
|
|
39d411ce0b | ||
|
|
93fe848bb6 | ||
|
|
9d05897f7a | ||
|
|
cbeb9c5236 | ||
|
|
2203958798 | ||
|
|
268ec8d1e0 | ||
|
|
093d745b86 | ||
|
|
655b6d1996 | ||
|
|
833a0621fa | ||
|
|
b5c3a92be2 | ||
|
|
78694bb2f5 | ||
|
|
297cfd86fa | ||
|
|
43b2bf6c16 | ||
|
|
aceb938e07 | ||
|
|
68f44fb932 | ||
|
|
e38619dd02 | ||
|
|
4ec7cd2760 | ||
|
|
b0277ab904 | ||
|
|
87b26b0aaf | ||
|
|
01d13c153d | ||
|
|
c17082a4f8 | ||
|
|
9acfd3eb73 | ||
|
|
0ad84b8723 | ||
|
|
3f912eb4ad | ||
|
|
f1b45f7df0 | ||
|
|
29c18d4bde | ||
|
|
33728840ec | ||
|
|
cd339486b7 | ||
|
|
e54a34d8dd | ||
|
|
d24b192f8c | ||
|
|
0442d7e2d6 | ||
|
|
5b97bb247e | ||
|
|
8a7486577a | ||
|
|
6d17993eb6 | ||
|
|
d0e5da2884 | ||
|
|
d5b50ee466 | ||
|
|
8031fe00c7 | ||
|
|
3f6152806f | ||
|
|
7fdca150a9 | ||
|
|
165de71754 | ||
|
|
6b1a4b6e64 | ||
|
|
aaf0ef6b19 | ||
|
|
fb2745ba3b | ||
|
|
d452ed7db8 | ||
|
|
8f5cd0a361 | ||
|
|
d7bc3c6f4a | ||
|
|
d04e5a1fe0 | ||
|
|
bf5f09a0c7 | ||
|
|
a154d660d9 | ||
|
|
7a49d50187 | ||
|
|
ce0bd93289 | ||
|
|
0fdefdf7a4 | ||
|
|
8236f20759 | ||
|
|
e16b2a8831 | ||
|
|
f7fbc6f633 | ||
|
|
3a9b0cf132 | ||
|
|
2a3e646b94 | ||
|
|
64231aa3f0 | ||
|
|
117e6fb356 | ||
|
|
03ea06fa84 | ||
|
|
525ab3faa9 | ||
|
|
490e86dde3 | ||
|
|
6e076e77d8 | ||
|
|
d75f2f7051 | ||
|
|
aa1be9fcad | ||
|
|
17796aaed4 | ||
|
|
2355fa973e | ||
|
|
694e9f2bdc | ||
|
|
372566295e | ||
|
|
4e85213473 | ||
|
|
d6a346ca6e | ||
|
|
8b65b3e6d7 | ||
|
|
ffffc0179f | ||
|
|
f80ec871f6 | ||
|
|
e0cb5caef2 | ||
|
|
afbbf61588 | ||
|
|
28665079a0 | ||
|
|
80997f652b | ||
|
|
9d67a02b5f | ||
|
|
22efa1ab53 | ||
|
|
f19d1e253a | ||
|
|
b65f7f7895 | ||
|
|
fb49d2ced9 | ||
|
|
434ce96f2c | ||
|
|
6ae2c5f5c7 | ||
|
|
6f4e494e06 | ||
|
|
eb554a504d | ||
|
|
8771418170 | ||
|
|
2f37ea842f | ||
|
|
9232ba1da0 | ||
|
|
a0916b926f | ||
|
|
2da6a7570b | ||
|
|
2498ecbc84 | ||
|
|
4935fdf6e4 | ||
|
|
370dd6c4da | ||
|
|
06ca24e8e2 | ||
|
|
c4425c836a | ||
|
|
f0dd90d9d7 | ||
|
|
6bc5a84a2d | ||
|
|
3375363d93 | ||
|
|
fbb40b98ad | ||
|
|
a365a0e3ba | ||
|
|
45c5b66e9e | ||
|
|
f303c24d3c | ||
|
|
3d4762eab3 | ||
|
|
a5896264fa | ||
|
|
4d1cca1150 | ||
|
|
092e6e947e | ||
|
|
07f505971c | ||
|
|
7eccc5ebf2 | ||
|
|
dab124dfb9 | ||
|
|
8be664cca9 | ||
|
|
866edd41a7 | ||
|
|
412f93122d | ||
|
|
3201d1d493 | ||
|
|
9df7f65dd5 | ||
|
|
e23be8c91a | ||
|
|
99c384e110 | ||
|
|
49076d406e | ||
|
|
9e491decc0 | ||
|
|
ad77d9b014 | ||
|
|
4788d911ad | ||
|
|
80ea7db9c0 | ||
|
|
bacb8f56c3 | ||
|
|
d553555880 | ||
|
|
9e508779c2 | ||
|
|
14d144ea22 | ||
|
|
305ed0b3c5 | ||
|
|
9208c6b4e6 | ||
|
|
def893fe40 | ||
|
|
2a3c9e73e5 | ||
|
|
15854a1b14 | ||
|
|
12a0a9dedd | ||
|
|
5c90afa296 | ||
|
|
68ddba60a3 | ||
|
|
3482d836ae | ||
|
|
60731e6d02 | ||
|
|
c1256fff5b | ||
|
|
ddb77b1454 | ||
|
|
afec5b0f2e | ||
|
|
eb1598831a | ||
|
|
ea73e736c8 | ||
|
|
f2976178c9 | ||
|
|
76638aae76 | ||
|
|
2edaf0588a | ||
|
|
e525e3a571 | ||
|
|
a19c19c58c | ||
|
|
67a71868cb | ||
|
|
029f64495c | ||
|
|
63d6052159 | ||
|
|
50043f9cd6 | ||
|
|
59b1623477 | ||
|
|
22b52858e0 | ||
|
|
baea75f2df | ||
|
|
69c993357d | ||
|
|
fb685bcb1d | ||
|
|
14e4e9e479 | ||
|
|
b99940f8a1 | ||
|
|
3d76d6649f | ||
|
|
7519d8ca2c | ||
|
|
9f28eec95c |
No files matched your search
+17
-21
@@ -1,38 +1,34 @@
|
||||
/ext/llvm-g++-Xcode4.6.2
|
||||
/ext/llvm-g++-Xcode4.6.2.tar.bz2
|
||||
/zerotier-*
|
||||
/build-ZeroTierUI-*
|
||||
/ZeroTierUI/*.user
|
||||
*.o
|
||||
.DS_Store
|
||||
.Apple*
|
||||
*.dSYM
|
||||
netconf-service/netconf-test
|
||||
netconf-service/netconf.service
|
||||
mac-tap/tuntap/src/tap/tap
|
||||
mac-tap/tuntap/tap.kext
|
||||
/netconf-service/netconf-test
|
||||
/netconf-service/netconf.service
|
||||
/ipch
|
||||
/ZeroTierOne.sdf
|
||||
/ZeroTierOne.v11.suo
|
||||
/vsprojects/SelfTest/Debug
|
||||
/vsprojects/SelfTest/Release
|
||||
/vsprojects/ZeroTierOne/Debug
|
||||
/vsprojects/ZeroTierOne/Release
|
||||
/vsprojects/ZeroTierOne/x64
|
||||
/vsprojects/TapDriver/Win32
|
||||
/vsprojects/TapDriver/x64
|
||||
/vsprojects/InstallerUpdater/obj
|
||||
/vsprojects/Service/obj
|
||||
/vsprojects/SelfTest/SelfTest.aps
|
||||
/Build/*
|
||||
/windows/ZeroTierOne.sdf
|
||||
/windows/ZeroTierOne.v11.suo
|
||||
/windows/x64
|
||||
/windows/Win32
|
||||
/windows/*/x64
|
||||
/windows/*/Win32
|
||||
/windows/ZeroTierOne/Release
|
||||
/windows/ZeroTierOneService/obj
|
||||
/windows/ZeroTierOneService/bin
|
||||
/windows/Build
|
||||
/ext/installfiles/windows/ZeroTier One-SetupFiles
|
||||
/ext/installfiles/windows/Prerequisites
|
||||
*.log
|
||||
*.opensdf
|
||||
*.user
|
||||
*.cache
|
||||
*.obj
|
||||
*.tlog
|
||||
/installer-build
|
||||
/zt1-*-install
|
||||
/file2lz4c
|
||||
/build-*
|
||||
/ZeroTierOneInstaller-*
|
||||
.qmake.stash
|
||||
*.autosave
|
||||
/ZeroTier One.dmg
|
||||
+2
-10
@@ -8,21 +8,13 @@ do this eventually.
|
||||
|
||||
-- Linux
|
||||
|
||||
make
|
||||
|
||||
That's it. Add ZT_AUTO_UPDATE=1 to the make command line to build an
|
||||
auto-update-enabled version that will update from ZeroTier's servers.
|
||||
This is disabled by default since such a build will automatically
|
||||
replace itself with our binary distributions.
|
||||
Just type 'make'. You'll need gcc and g++ installed, but ZeroTier One requires
|
||||
no other third party libraries beyond the standard libc, libstdc++, and libm.
|
||||
|
||||
-- MacOS
|
||||
|
||||
make
|
||||
|
||||
The same ZT_AUTO_UPDATE=1 option as Linux supports can be used here to
|
||||
build an auto-update-enabled version. By default auto-updates are not
|
||||
enabled.
|
||||
|
||||
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:
|
||||
|
||||
@@ -3,16 +3,12 @@ ZeroTier One
|
||||
|
||||
ZeroTier One creates flat virtual Ethernet networks of almost unlimited size. [Visit ZeroTier Networks on the web](https://www.zerotier.com/) for more information.
|
||||
|
||||
This project is now in beta, which means that major incompatible protocol shifts should now become considerably more rare. You should still update very often if you plan to use it. Binary packages with auto-update are coming very soon.
|
||||
|
||||
Follow the [ZeroTier blog](http://blog.zerotier.com/) and the [GitHub project](https://github.com/zerotier/ZeroTierOne) to stay up to date.
|
||||
|
||||
See BUILDING.txt and RUNNING.txt for instructions. It currently runs on Mac and Linux. A Windows port is well along the way to completion. If you're brave you can load the Visual Studio 2012 solution and play around.
|
||||
Auto-updating binary packages that install easily [can be found here.](https://www.zerotier.com/download.html) If you want to build from source, clone this repository and see BUILDING.txt and RUNNING.txt.
|
||||
|
||||
Once you have it running you can join the Earth network -- a LAN for the planet -- by using the 'zerotier-cli' tool: 'sudo zerotier-cli join 8056c2e21c000001'. Right now Earth is the only network. Ability to create private networks, as well as some additional special-purpose public ones, will be coming soon. (Note: previous alpha versions auto-joined Earth, but since 0.5.0 it no longer does this.)
|
||||
Once you are up and running, you can [create an account on the network control panel](https://www.zerotier.com/networks.html) if you want to create a private network or you can join [Earth](https://www.zerotier.com/earth.html) by running (on Linux and Mac) `sudo ./zerotier-cli join 8056c2e21c000001`.
|
||||
|
||||
Note that this won't work if your firewall does not allow outbound UDP. It must allow two way UDP conversations on port 9993 at a minimum.
|
||||
|
||||
ZeroTier One is licensed under the GNU General Public License version 3. You are free to use, modify, or redistribute it under the terms of that license. If you would like to embed ZeroTier One in a closed source product or create a closed source derivative product, contact ZeroTier Networks LLC.
|
||||
|
||||
(c)2012-2013 [ZeroTier Networks LLC](https://www.zerotier.com/)
|
||||
+31
-35
@@ -1,15 +1,19 @@
|
||||
First build it -- see BUILDING.txt -- then...
|
||||
This guide is for those building and running from source. See BUILDING.txt
|
||||
first.
|
||||
|
||||
-- MacOS --
|
||||
The wiki at GitHub contains several pages that are probably also of interest:
|
||||
https://github.com/zerotier/ZeroTierOne/wiki
|
||||
|
||||
By convention, ZeroTier One will keep its state here on mac:
|
||||
--- MacOS
|
||||
|
||||
On Mac, the default ZeroTier home is:
|
||||
|
||||
/Library/Application Support/ZeroTier/One
|
||||
|
||||
ZeroTier ships with a kernel extension for its own tap device, which it
|
||||
stores in the above directory. To install this, type:
|
||||
|
||||
sudo make -f Makefile.mac install-mac-tap
|
||||
sudo make install-mac-tap
|
||||
|
||||
This will create the ZeroTier One home above if it does not exist and install
|
||||
the kext there. Note that the kext must be owned by root:wheel. The make
|
||||
@@ -20,14 +24,7 @@ If run with no options, it will use the default home directory above.
|
||||
|
||||
sudo ./zerotier-one &
|
||||
|
||||
Finally, join the Earth network (the big public LAN and the only net for now):
|
||||
|
||||
sudo zerotier-cli join 8056c2e21c000001
|
||||
|
||||
Try pinging earth.zerotier.net and going to http://earth.zerotier.net/ in a
|
||||
browser to see if you're online.
|
||||
|
||||
-- Linux
|
||||
--- LINUX
|
||||
|
||||
On Linux, the default ZeroTier home is:
|
||||
|
||||
@@ -38,31 +35,14 @@ Just type:
|
||||
sudo mkdir /var/lib/zerotier-one
|
||||
sudo ./zerotier-one &
|
||||
|
||||
When run with no options, ZT1 uses its default home path on the current
|
||||
platform. Note that ZT1 requires the Linux tap driver, so it must be
|
||||
available in the kernel or as a module. In most Linux distributions it's
|
||||
included out of the box and should just work.
|
||||
Your system must have the Linux tun/tap driver available (tun). All tested
|
||||
distributions so far ship with this driver as a module that will load
|
||||
automatically.
|
||||
|
||||
Finally, join the Earth network (the big public LAN and the only net for now):
|
||||
UDP port 9993 must be open in your local firewall for this to work properly.
|
||||
How to do this varies by Linux distribution.
|
||||
|
||||
sudo zerotier-cli join bc8f9a8ee3000001
|
||||
|
||||
Try pinging earth.zerotier.net and going to http://earth.zerotier.net/ in a
|
||||
browser to see if you're online.
|
||||
|
||||
-- Windows
|
||||
|
||||
Port in progress, and it's going to pretty much always be more painful to
|
||||
build than *nix systems. Just wait for the binary release unless you're
|
||||
brave, in which case you can load the VS2012 solution and play around.
|
||||
|
||||
-- Open UDP port 9993
|
||||
|
||||
As noted in README.md, to actually function properly, you need to open
|
||||
UDP port 9993 in your firewall. Following are instructions to open UDP port
|
||||
9993 for specific operating systems.
|
||||
|
||||
--- Ubuntu (version 12.04 and possibly other versions, too)
|
||||
- Opening port 9993 on Ubuntu
|
||||
|
||||
Follow the Ubuntu documentation about UFW https://help.ubuntu.com/community/UFW
|
||||
|
||||
@@ -76,3 +56,19 @@ sudo ufw allow 9993/udp
|
||||
|
||||
You should now be able to ping and browse earth.zerotier.net
|
||||
|
||||
--- WINDOWS
|
||||
|
||||
A windows port is in progress.
|
||||
|
||||
--- ONCE IT'S RUNNING:
|
||||
|
||||
To use the command line interface, see this guide:
|
||||
https://github.com/zerotier/ZeroTierOne/wiki/Command-Line-Interface
|
||||
|
||||
If you want to test by joining the Earth network, try:
|
||||
sudo ./zerotier-cli join 8056c2e21c000001
|
||||
|
||||
An interface called 'zt0' should appear and should get an IP address in
|
||||
the 28.0.0.0/7 range (28.* or 29.*) within a few seconds or so. Then try
|
||||
pinging earth.zerotier.net or navigating to http://earth.zerotier.net/ in
|
||||
a web browser.
|
||||
@@ -0,0 +1,9 @@
|
||||
REM If you're an OSS user and want to run this batch file, edit to change the path to Qt.
|
||||
REM Start Visual Studio command prompt and run this from within the ZeroTierUI subfolder.
|
||||
|
||||
CD ..
|
||||
MKDIR build-ZeroTierUI-win32-release
|
||||
CD build-ZeroTierUI-win32-release
|
||||
C:\Qt\5.2.1\Src\qtbase\bin\qmake.exe ..\ZeroTierUI\ZeroTierUI.pro
|
||||
nmake clean
|
||||
nmake
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
+101
-79
@@ -1,98 +1,120 @@
|
||||
QT += core gui widgets
|
||||
QT += core gui widgets network
|
||||
TARGET = "ZeroTier One"
|
||||
TEMPLATE = app
|
||||
|
||||
win32:RC_FILE = ZeroTierUI.rc
|
||||
win32:LIBS += winhttp.lib Iphlpapi.lib ws2_32.lib advapi32.lib Shell32.lib Rpcrt4.lib
|
||||
win32:QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
|
||||
|
||||
mac:ICON = zt1icon.icns
|
||||
mac:QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
|
||||
mac:QMAKE_INFO_PLIST = Info.plist
|
||||
mac:LIBS += -framework Cocoa
|
||||
|
||||
SOURCES += main.cpp\
|
||||
mainwindow.cpp \
|
||||
aboutwindow.cpp \
|
||||
../node/C25519.cpp \
|
||||
../node/CertificateOfMembership.cpp \
|
||||
../node/Defaults.cpp \
|
||||
../node/Demarc.cpp \
|
||||
../node/EthernetTap.cpp \
|
||||
../node/HttpClient.cpp \
|
||||
../node/Identity.cpp \
|
||||
../node/InetAddress.cpp \
|
||||
../node/Logger.cpp \
|
||||
../node/Multicaster.cpp \
|
||||
../node/Network.cpp \
|
||||
../node/NetworkConfig.cpp \
|
||||
../node/Node.cpp \
|
||||
../node/NodeConfig.cpp \
|
||||
../node/Packet.cpp \
|
||||
../node/PacketDecoder.cpp \
|
||||
../node/Peer.cpp \
|
||||
../node/Poly1305.cpp \
|
||||
../node/Salsa20.cpp \
|
||||
../node/Service.cpp \
|
||||
../node/SHA512.cpp \
|
||||
../node/SoftwareUpdater.cpp \
|
||||
../node/Switch.cpp \
|
||||
../node/SysEnv.cpp \
|
||||
../node/Topology.cpp \
|
||||
../node/UdpSocket.cpp \
|
||||
../node/Utils.cpp \
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp \
|
||||
aboutwindow.cpp \
|
||||
../node/C25519.cpp \
|
||||
../node/CertificateOfMembership.cpp \
|
||||
../node/Defaults.cpp \
|
||||
../node/Demarc.cpp \
|
||||
../node/EthernetTap.cpp \
|
||||
../node/HttpClient.cpp \
|
||||
../node/Identity.cpp \
|
||||
../node/InetAddress.cpp \
|
||||
../node/Logger.cpp \
|
||||
../node/Multicaster.cpp \
|
||||
../node/Network.cpp \
|
||||
../node/NetworkConfig.cpp \
|
||||
../node/Node.cpp \
|
||||
../node/NodeConfig.cpp \
|
||||
../node/Packet.cpp \
|
||||
../node/PacketDecoder.cpp \
|
||||
../node/Peer.cpp \
|
||||
../node/Poly1305.cpp \
|
||||
../node/Salsa20.cpp \
|
||||
../node/Service.cpp \
|
||||
../node/SHA512.cpp \
|
||||
../node/SoftwareUpdater.cpp \
|
||||
../node/Switch.cpp \
|
||||
../node/SysEnv.cpp \
|
||||
../node/Topology.cpp \
|
||||
../node/UdpSocket.cpp \
|
||||
../node/Utils.cpp \
|
||||
../ext/lz4/lz4.c \
|
||||
../ext/lz4/lz4hc.c \
|
||||
networkwidget.cpp
|
||||
networkwidget.cpp \
|
||||
installdialog.cpp \
|
||||
licensedialog.cpp \
|
||||
onetimedialog.cpp
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
aboutwindow.h \
|
||||
../node/Node.hpp \
|
||||
../node/Utils.hpp \
|
||||
../node/Defaults.hpp \
|
||||
../node/Address.hpp \
|
||||
../node/Array.hpp \
|
||||
../node/AtomicCounter.hpp \
|
||||
../node/BandwidthAccount.hpp \
|
||||
../node/Buffer.hpp \
|
||||
../node/C25519.hpp \
|
||||
../node/CertificateOfMembership.hpp \
|
||||
../node/CMWC4096.hpp \
|
||||
../node/Condition.hpp \
|
||||
../node/Constants.hpp \
|
||||
../node/Demarc.hpp \
|
||||
../node/Dictionary.hpp \
|
||||
../node/EthernetTap.hpp \
|
||||
../node/HttpClient.hpp \
|
||||
../node/Identity.hpp \
|
||||
../node/InetAddress.hpp \
|
||||
../node/Logger.hpp \
|
||||
../node/MAC.hpp \
|
||||
../node/Multicaster.hpp \
|
||||
../node/MulticastGroup.hpp \
|
||||
../node/Mutex.hpp \
|
||||
../node/Network.hpp \
|
||||
../node/NetworkConfig.hpp \
|
||||
../node/NodeConfig.hpp \
|
||||
../node/NonCopyable.hpp \
|
||||
../node/Packet.hpp \
|
||||
../node/PacketDecoder.hpp \
|
||||
../node/Peer.hpp \
|
||||
../node/Poly1305.hpp \
|
||||
../node/RuntimeEnvironment.hpp \
|
||||
../node/Salsa20.hpp \
|
||||
../node/Service.hpp \
|
||||
../node/SHA512.hpp \
|
||||
../node/SharedPtr.hpp \
|
||||
../node/SoftwareUpdater.hpp \
|
||||
../node/Switch.hpp \
|
||||
../node/SysEnv.hpp \
|
||||
../node/Thread.hpp \
|
||||
../node/Topology.hpp \
|
||||
../node/UdpSocket.hpp \
|
||||
aboutwindow.h \
|
||||
../node/Node.hpp \
|
||||
../node/Utils.hpp \
|
||||
../node/Defaults.hpp \
|
||||
../node/Address.hpp \
|
||||
../node/Array.hpp \
|
||||
../node/AtomicCounter.hpp \
|
||||
../node/BandwidthAccount.hpp \
|
||||
../node/Buffer.hpp \
|
||||
../node/C25519.hpp \
|
||||
../node/CertificateOfMembership.hpp \
|
||||
../node/CMWC4096.hpp \
|
||||
../node/Condition.hpp \
|
||||
../node/Constants.hpp \
|
||||
../node/Demarc.hpp \
|
||||
../node/Dictionary.hpp \
|
||||
../node/EthernetTap.hpp \
|
||||
../node/HttpClient.hpp \
|
||||
../node/Identity.hpp \
|
||||
../node/InetAddress.hpp \
|
||||
../node/Logger.hpp \
|
||||
../node/MAC.hpp \
|
||||
../node/Multicaster.hpp \
|
||||
../node/MulticastGroup.hpp \
|
||||
../node/Mutex.hpp \
|
||||
../node/Network.hpp \
|
||||
../node/NetworkConfig.hpp \
|
||||
../node/NodeConfig.hpp \
|
||||
../node/NonCopyable.hpp \
|
||||
../node/Packet.hpp \
|
||||
../node/PacketDecoder.hpp \
|
||||
../node/Peer.hpp \
|
||||
../node/Poly1305.hpp \
|
||||
../node/RuntimeEnvironment.hpp \
|
||||
../node/Salsa20.hpp \
|
||||
../node/Service.hpp \
|
||||
../node/SHA512.hpp \
|
||||
../node/SharedPtr.hpp \
|
||||
../node/SoftwareUpdater.hpp \
|
||||
../node/Switch.hpp \
|
||||
../node/SysEnv.hpp \
|
||||
../node/Thread.hpp \
|
||||
../node/Topology.hpp \
|
||||
../node/UdpSocket.hpp \
|
||||
../ext/lz4/lz4.h \
|
||||
../ext/lz4/lz4hc.h \
|
||||
networkwidget.h
|
||||
networkwidget.h \
|
||||
installdialog.h \
|
||||
mac_doprivileged.h \
|
||||
licensedialog.h \
|
||||
main.h \
|
||||
onetimedialog.h
|
||||
|
||||
FORMS += mainwindow.ui \
|
||||
aboutwindow.ui \
|
||||
networkwidget.ui
|
||||
aboutwindow.ui \
|
||||
networkwidget.ui \
|
||||
installdialog.ui \
|
||||
licensedialog.ui \
|
||||
quickstartdialog.ui \
|
||||
onetimedialog.ui
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
|
||||
mac:OBJECTIVE_SOURCES += \
|
||||
mac_doprivileged.mm
|
||||
|
||||
OTHER_FILES += \
|
||||
stylesheet.css
|
||||
@@ -1,14 +1,45 @@
|
||||
/*
|
||||
* ZeroTier One - Global Peer to Peer Ethernet
|
||||
* Copyright (C) 2011-2014 ZeroTier Networks LLC
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
* --
|
||||
*
|
||||
* ZeroTier may be used and distributed under the terms of the GPLv3, which
|
||||
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*
|
||||
* If you would like to embed ZeroTier into a commercial application or
|
||||
* redistribute it in a modified binary form, please contact ZeroTier Networks
|
||||
* LLC. Start here: http://www.zerotier.com/
|
||||
*/
|
||||
|
||||
#include "aboutwindow.h"
|
||||
#include "ui_aboutwindow.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include "../node/Defaults.hpp"
|
||||
#include <QFont>
|
||||
|
||||
#include "../node/Constants.hpp"
|
||||
#include "../node/Node.hpp"
|
||||
|
||||
AboutWindow::AboutWindow(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->aboutTextLabel->setText(QString("ZeroTier One\nVersion ")+ZeroTier::Node::versionString()+"\nQt Graphical User Interface\n\n(c)2011-2014 ZeroTier Networks LLC\n\nReleased under the terms of the GNU\nGeneral Public License v3.0, see: http://gplv3.fsf.org for terms.\n\nAuthor(s): Adam Ierymenko");
|
||||
}
|
||||
|
||||
AboutWindow::~AboutWindow()
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
/*
|
||||
* ZeroTier One - Global Peer to Peer Ethernet
|
||||
* Copyright (C) 2011-2014 ZeroTier Networks LLC
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
* --
|
||||
*
|
||||
* ZeroTier may be used and distributed under the terms of the GPLv3, which
|
||||
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*
|
||||
* If you would like to embed ZeroTier into a commercial application or
|
||||
* redistribute it in a modified binary form, please contact ZeroTier Networks
|
||||
* LLC. Start here: http://www.zerotier.com/
|
||||
*/
|
||||
|
||||
#ifndef AboutWindow_H
|
||||
#define AboutWindow_H
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
@@ -151,13 +151,6 @@
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ZeroTier One GUI
|
||||
(c)2012-2013 ZeroTier Networks LLC
|
||||
|
||||
Author(s): Adam Ierymenko
|
||||
Version: 1.0</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
|
||||
@@ -1,50 +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>CFBundleAllowMixedLocalizations</key>
|
||||
<true/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>applet</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>applet</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.zerotier.one.ZeroTierOneMacAuthenticateScript</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>ZeroTier One (Authenticate)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>aplt</string>
|
||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||
<dict>
|
||||
<key>x86_64</key>
|
||||
<string>10.6</string>
|
||||
</dict>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>(c) 2013 ZeroTier Networks LLC</string>
|
||||
<key>WindowState</key>
|
||||
<dict>
|
||||
<key>dividerCollapsed</key>
|
||||
<false/>
|
||||
<key>eventLogLevel</key>
|
||||
<integer>-1</integer>
|
||||
<key>name</key>
|
||||
<string>ScriptWindowState</string>
|
||||
<key>positionOfDivider</key>
|
||||
<real>333</real>
|
||||
<key>savedFrame</key>
|
||||
<string>7 181 602 597 0 0 1280 778 </string>
|
||||
<key>selectedTabView</key>
|
||||
<string>result</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
APPLaplt
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 362 B |
-4
@@ -1,4 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf1265
|
||||
{\fonttbl}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
* ZeroTier One - Global Peer to Peer Ethernet
|
||||
* Copyright (C) 2011-2014 ZeroTier Networks LLC
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
* --
|
||||
*
|
||||
* ZeroTier may be used and distributed under the terms of the GPLv3, which
|
||||
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*
|
||||
* If you would like to embed ZeroTier into a commercial application or
|
||||
* redistribute it in a modified binary form, please contact ZeroTier Networks
|
||||
* LLC. Start here: http://www.zerotier.com/
|
||||
*/
|
||||
|
||||
#include "installdialog.h"
|
||||
#include "mainwindow.h"
|
||||
#include "ui_installdialog.h"
|
||||
|
||||
#include "../node/Constants.hpp"
|
||||
#include "../node/Defaults.hpp"
|
||||
#include "../node/SoftwareUpdater.hpp"
|
||||
|
||||
#ifdef __UNIX_LIKE__
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "mac_doprivileged.h"
|
||||
#endif
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QMessageBox>
|
||||
#include <QByteArray>
|
||||
#include <QSslSocket>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
|
||||
InstallDialog::InstallDialog(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::InstallDialog),
|
||||
nam(new QNetworkAccessManager(this)),
|
||||
phase(FETCHING_NFO)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QObject::connect(nam,SIGNAL(finished(QNetworkReply*)),this,SLOT(on_networkReply(QNetworkReply*)));
|
||||
|
||||
const char *nfoUrl = ZeroTier::ZT_DEFAULTS.updateLatestNfoURL.c_str();
|
||||
if (!*nfoUrl) {
|
||||
QMessageBox::critical(this,"Download Failed","Download failed: internal error: no update URL configured in build!",QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
QNetworkReply *reply = nam->get(QNetworkRequest(QUrl(nfoUrl)));
|
||||
QObject::connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(on_downloadProgress(qint64,qint64)));
|
||||
}
|
||||
|
||||
InstallDialog::~InstallDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void InstallDialog::on_networkReply(QNetworkReply *reply)
|
||||
{
|
||||
reply->deleteLater();
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
QMessageBox::critical(this,"Download Failed",QString("Download failed: ") + reply->errorString() + "\n\nAre you connected to the Internet?",QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
} else {
|
||||
if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute) == 200) {
|
||||
QByteArray installerData(reply->readAll());
|
||||
|
||||
switch(phase) {
|
||||
case FETCHING_NFO: {
|
||||
unsigned int vMajor = 0,vMinor = 0,vRevision = 0;
|
||||
installerData.append((char)0);
|
||||
const char *err = ZeroTier::SoftwareUpdater::parseNfo(installerData.data(),vMajor,vMinor,vRevision,signedBy,signature,url);
|
||||
|
||||
if (err) {
|
||||
QMessageBox::critical(this,"Download Failed","Download failed: there is a problem with the software update web site.\nTry agian later. (invalid .nfo file)",QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
phase = FETCHING_INSTALLER;
|
||||
reply = nam->get(QNetworkRequest(QUrl(url.c_str())));
|
||||
QObject::connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(on_downloadProgress(qint64,qint64)));
|
||||
} break;
|
||||
case FETCHING_INSTALLER: {
|
||||
if (!ZeroTier::SoftwareUpdater::validateUpdate(installerData.data(),installerData.length(),signedBy,signature)) {
|
||||
QMessageBox::critical(this,"Download Failed","Download failed: there is a problem with the software update web site. Try agian later. (downloaded data failed signature check)",QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
{
|
||||
std::string homePath(QDir::homePath().toStdString());
|
||||
QString zt1Caches(QDir::homePath() + "/Library/Caches/ZeroTier/One");
|
||||
QDir::root().mkpath(zt1Caches);
|
||||
std::string instPath((zt1Caches + "/ZeroTierOneInstaller").toStdString());
|
||||
std::string tmpPath((zt1Caches + "/inst.sh").toStdString());
|
||||
|
||||
int outfd = ::open(instPath.c_str(),O_CREAT|O_TRUNC|O_WRONLY,0755);
|
||||
if (outfd <= 0) {
|
||||
QMessageBox::critical(this,"Download Failed",QString("Installation failed: unable to write to ")+instPath.c_str(),QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
return;
|
||||
}
|
||||
if (::write(outfd,installerData.data(),installerData.length()) != installerData.length()) {
|
||||
QMessageBox::critical(this,"Installation Failed",QString("Installation failed: unable to write to ")+instPath.c_str(),QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
return;
|
||||
}
|
||||
::close(outfd);
|
||||
chmod(instPath.c_str(),0755);
|
||||
|
||||
FILE *scr = fopen(tmpPath.c_str(),"w");
|
||||
if (!scr) {
|
||||
QMessageBox::critical(this,"Installation Failed","Cannot write script to temporary Library/Caches/ZeroTier/One folder.",QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(scr,"#!/bin/bash\n");
|
||||
fprintf(scr,"export PATH=\"/bin:/usr/bin:/sbin:/usr/sbin\"\n");
|
||||
fprintf(scr,"'%s'\n",instPath.c_str());
|
||||
fprintf(scr,"if [ -f '/Library/Application Support/ZeroTier/One/authtoken.secret' ]; then\n");
|
||||
fprintf(scr," mkdir -p '%s/Library/Application Support/ZeroTier/One'\n",homePath.c_str());
|
||||
fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier'\n",(int)getuid(),homePath.c_str());
|
||||
fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier'\n",(int)getgid(),homePath.c_str());
|
||||
fprintf(scr," chmod 0700 '%s/Library/Application Support/ZeroTier'\n",homePath.c_str());
|
||||
fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier/One'\n",(int)getuid(),homePath.c_str());
|
||||
fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier/One'\n",(int)getgid(),homePath.c_str());
|
||||
fprintf(scr," chmod 0700 '%s/Library/Application Support/ZeroTier/One'\n",homePath.c_str());
|
||||
fprintf(scr," cp -f '/Library/Application Support/ZeroTier/One/authtoken.secret' '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",homePath.c_str());
|
||||
fprintf(scr," chown %d '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",(int)getuid(),homePath.c_str());
|
||||
fprintf(scr," chgrp %d '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",(int)getgid(),homePath.c_str());
|
||||
fprintf(scr," chmod 0600 '%s/Library/Application Support/ZeroTier/One/authtoken.secret'\n",homePath.c_str());
|
||||
fprintf(scr,"fi\n");
|
||||
fprintf(scr,"exit 0\n");
|
||||
|
||||
fclose(scr);
|
||||
chmod(tmpPath.c_str(),0755);
|
||||
|
||||
macExecutePrivilegedShellCommand((std::string("'")+tmpPath+"' >>/dev/null 2>&1").c_str());
|
||||
|
||||
unlink(tmpPath.c_str());
|
||||
unlink(instPath.c_str());
|
||||
|
||||
// Restart the binary with whatever updates may have occurred
|
||||
std::string appPath(QCoreApplication::applicationFilePath().toStdString());
|
||||
execl(appPath.c_str(),appPath.c_str(),(const char *)0);
|
||||
|
||||
// We only make it here if execl() fails
|
||||
QMessageBox::critical(this,"Re-Launch Failed","An error occurred re-launching ZeroTier One.app. Try launching it manually.",QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
} break;
|
||||
}
|
||||
|
||||
ui->progressBar->setMinimum(0);
|
||||
ui->progressBar->setMaximum(100);
|
||||
ui->progressBar->setValue(0);
|
||||
} else {
|
||||
QMessageBox::critical(this,"Download Failed",QString("Download failed: HTTP status code ") + reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toString(),QMessageBox::Ok,QMessageBox::NoButton);
|
||||
QApplication::exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InstallDialog::on_InstallDialog_rejected()
|
||||
{
|
||||
QApplication::exit();
|
||||
}
|
||||
|
||||
void InstallDialog::on_cancelButton_clicked()
|
||||
{
|
||||
QApplication::exit();
|
||||
}
|
||||
|
||||
void InstallDialog::on_downloadProgress(qint64 bytesReceived,qint64 bytesTotal)
|
||||
{
|
||||
if (bytesTotal <= 0) {
|
||||
ui->progressBar->setValue(0);
|
||||
ui->progressBar->setMinimum(0);
|
||||
ui->progressBar->setMaximum(0);
|
||||
} else {
|
||||
double pct = ((double)bytesReceived / (double)bytesTotal) * 100.0;
|
||||
if (pct > 100.0)
|
||||
pct = 100.0;
|
||||
ui->progressBar->setMinimum(0);
|
||||
ui->progressBar->setMaximum(100);
|
||||
ui->progressBar->setValue((int)pct);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* ZeroTier One - Global Peer to Peer Ethernet
|
||||
* Copyright (C) 2011-2014 ZeroTier Networks LLC
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
* --
|
||||
*
|
||||
* ZeroTier may be used and distributed under the terms of the GPLv3, which
|
||||
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*
|
||||
* If you would like to embed ZeroTier into a commercial application or
|
||||
* redistribute it in a modified binary form, please contact ZeroTier Networks
|
||||
* LLC. Start here: http://www.zerotier.com/
|
||||
*/
|
||||
|
||||
#ifndef INSTALLDIALOG_H
|
||||
#define INSTALLDIALOG_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QUrl>
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../node/Address.hpp"
|
||||
|
||||
// Right now InstallDialog is only used on Mac
|
||||
|
||||
namespace Ui {
|
||||
class InstallDialog;
|
||||
}
|
||||
|
||||
class InstallDialog : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InstallDialog(QWidget *parent = 0);
|
||||
~InstallDialog();
|
||||
|
||||
private slots:
|
||||
void on_networkReply(QNetworkReply *reply);
|
||||
void on_InstallDialog_rejected();
|
||||
void on_cancelButton_clicked();
|
||||
void on_downloadProgress(qint64 bytesReceived,qint64 bytesTotal);
|
||||
|
||||
private:
|
||||
Ui::InstallDialog *ui;
|
||||
QNetworkAccessManager *nam;
|
||||
enum {
|
||||
FETCHING_NFO,
|
||||
FETCHING_INSTALLER
|
||||
} phase;
|
||||
|
||||
ZeroTier::Address signedBy;
|
||||
std::string url,signature;
|
||||
};
|
||||
|
||||
#endif // INSTALLDIALOG_H
|
||||
Loaded 20 of 191 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user