mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-09-22 15:29:03 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f8364ba59 | ||
|
|
eadff71d37 | ||
|
|
af62a6cade | ||
|
|
de4e29288d | ||
|
|
44d58ee871 | ||
|
|
9d5819ff44 | ||
|
|
08d7fe0432 | ||
|
|
9f2571cc01 | ||
|
|
b4b2e2ed9f | ||
|
|
17ebd0afc7 | ||
|
|
351b7f3a09 | ||
|
|
721625d512 | ||
|
|
282114e96c | ||
|
|
95d123cfc2 | ||
|
|
f5cbb45ab9 | ||
|
|
b7b9b9c0b7 | ||
|
|
715afc0314 | ||
|
|
f281886bfd | ||
|
|
4f0fcc582e | ||
|
|
aa59cfd545 | ||
|
|
f696299cfc | ||
|
|
b0719eacf9 | ||
|
|
c2187c8759 | ||
|
|
56296f96db | ||
|
|
be6b61b1bc | ||
|
|
f8d4611d15 | ||
|
|
f25bd41a03 | ||
|
|
fe3ad5e2cc | ||
|
|
502ea66f15 | ||
|
|
673aab5ba2 | ||
|
|
77457cbff1 | ||
|
|
db0d17cebb | ||
|
|
dd58006d65 | ||
|
|
f0ebb0b0f1 | ||
|
|
8c9d3146df | ||
|
|
117f977ce3 | ||
|
|
d8e5d9d6e8 | ||
|
|
1f5feb75fb | ||
|
|
05031ff938 | ||
|
|
adfb71fa6b | ||
|
|
37341048a9 | ||
|
|
b3491f9de1 | ||
|
|
80fc584923 | ||
|
|
b7389995f4 | ||
|
|
92d9ad4a7f | ||
|
|
8a804b5257 | ||
|
|
e3c5ada3a7 | ||
|
|
7adf0eac7e | ||
|
|
df0a8e8450 | ||
|
|
526435859f | ||
|
|
98d426e1d5 | ||
|
|
b80c229d87 | ||
|
|
9b93141dd0 | ||
|
|
59ebc9d41e | ||
|
|
f0199d6770 | ||
|
|
f2d372545a | ||
|
|
9809511c4c | ||
|
|
538e8a86c8 | ||
|
|
27aa6ea44e | ||
|
|
7475c4047e | ||
|
|
5e58a7d54a | ||
|
|
6a174483d8 | ||
|
|
a76d9d4408 | ||
|
|
1189f4a568 | ||
|
|
51766e6549 | ||
|
|
d315156733 | ||
|
|
4c4675e3ac | ||
|
|
49ef980ecf | ||
|
|
12692c551e | ||
|
|
00f9305ad8 | ||
|
|
0097949ba9 | ||
|
|
1b33a9e807 | ||
|
|
4a0b33561c | ||
|
|
96faaa85cf | ||
|
|
f82c7006ea | ||
|
|
681af253ef | ||
|
|
88bdb81791 | ||
|
|
458f6ae7c3 | ||
|
|
999e963533 | ||
|
|
5336f2600a | ||
|
|
38433e85bf | ||
|
|
c3cbc92757 | ||
|
|
45a1e048bb | ||
|
|
40bd460b1c | ||
|
|
ae7143d693 | ||
|
|
aead1050fb | ||
|
|
6e485833ef | ||
|
|
be0a8ec1f1 | ||
|
|
11e1f7a3fb | ||
|
|
0b0d5fabac | ||
|
|
35aa0921ee | ||
|
|
2f8936181c | ||
|
|
4c3fb8cf10 | ||
|
|
c3cea55493 | ||
|
|
5d467f0f45 | ||
|
|
2162a419e3 | ||
|
|
f15271f31f | ||
|
|
9d6488c31a | ||
|
|
adc922d7fb | ||
|
|
cf4700bc26 | ||
|
|
367b5439e1 | ||
|
|
6802da457e | ||
|
|
5682f0b772 | ||
|
|
08b7bb3c7a | ||
|
|
d6a4f8d77b | ||
|
|
c30f9832b0 | ||
|
|
d44e1349d8 | ||
|
|
6f831d5370 | ||
|
|
4e1f49258b | ||
|
|
fb31f93c52 | ||
|
|
f720f04fa0 | ||
|
|
7a56c3c396 | ||
|
|
994565bdeb | ||
|
|
67498e576c | ||
|
|
eae130467b | ||
|
|
f764cf8d31 | ||
|
|
49247180dc | ||
|
|
914bebba31 | ||
|
|
4b773b61f5 | ||
|
|
657f6ae342 | ||
|
|
2861229558 | ||
|
|
f939d0ee62 | ||
|
|
77c58e741d | ||
|
|
66a38a9e7c | ||
|
|
31ddc49da2 | ||
|
|
317995b921 | ||
|
|
beb7b5bbe5 | ||
|
|
05f5755bb1 | ||
|
|
cfd92cb18d | ||
|
|
2456d3a197 | ||
|
|
f0b821f880 | ||
|
|
319f9a9346 | ||
|
|
596e5dd583 | ||
|
|
b958a2d30c | ||
|
|
e270887391 | ||
|
|
986773cc9c | ||
|
|
ecbcc9eb2c | ||
|
|
1ad29fe31f | ||
|
|
42f6aae259 | ||
|
|
de485ad900 | ||
|
|
99c5fae9da | ||
|
|
98f0418fb9 | ||
|
|
d7977fa3e1 | ||
|
|
1e6475fad6 | ||
|
|
d5f95b721d | ||
|
|
ae2eeff5c6 | ||
|
|
08da4b8c7b | ||
|
|
0ba0c6d04d | ||
|
|
93f24ea86a | ||
|
|
f8eae84e15 | ||
|
|
7831c4bfef | ||
|
|
5f45977e3e | ||
|
|
d187ec82d4 | ||
|
|
42c3474223 | ||
|
|
aee742e767 | ||
|
|
c9294c1a78 | ||
|
|
b117ff5435 | ||
|
|
119ef5ecbf | ||
|
|
8fb442d81a | ||
|
|
73153b89b4 | ||
|
|
d9836adbf6 | ||
|
|
420edf23ad | ||
|
|
6c5f6feb5e | ||
|
|
a1c1c82b0d | ||
|
|
83a0d988ec | ||
|
|
a8c12369fd | ||
|
|
28a6d328a5 | ||
|
|
dd404b8ba3 | ||
|
|
1c636afe3f | ||
|
|
48a1799f49 | ||
|
|
bf24de43fe | ||
|
|
76d9ea911d | ||
|
|
ff773def26 | ||
|
|
5abfb11813 | ||
|
|
0b8d6c7f4a | ||
|
|
6c60305a96 | ||
|
|
19c4d82512 | ||
|
|
e11149bcae | ||
|
|
fe85426df6 | ||
|
|
158002d2d1 | ||
|
|
c96d3ebf8c | ||
|
|
b1088a6bd7 | ||
|
|
f0223490be | ||
|
|
81e5690410 | ||
|
|
700a450806 | ||
|
|
0e1fc06a6f | ||
|
|
c3b41c289d | ||
|
|
6ab95e0391 | ||
|
|
67b3fa9311 | ||
|
|
316e8d1939 | ||
|
|
f13493edb2 | ||
|
|
595b386afc | ||
|
|
8e587ae481 | ||
|
|
acb056e3b1 | ||
|
|
5ef2c6fd6f | ||
|
|
1a0572d7e7 | ||
|
|
7957ab6b1d | ||
|
|
e8b613e625 | ||
|
|
9c68a343f6 | ||
|
|
881ff08269 | ||
|
|
e3239d23f4 | ||
|
|
f9c92b0351 | ||
|
|
b73c36acbf | ||
|
|
181369964f | ||
|
|
d2c5d71502 | ||
|
|
c231510f8b | ||
|
|
2ac56fd120 | ||
|
|
e6b23059ac | ||
|
|
04169b5150 | ||
|
|
daaec84c6b | ||
|
|
73c1d43f2f | ||
|
|
ab5a460177 | ||
|
|
67a85221d5 | ||
|
|
328be8f846 | ||
|
|
d9b91758e0 | ||
|
|
4e26ade2df | ||
|
|
8d3eb1a258 | ||
|
|
33ad3deaee | ||
|
|
ba3f04deed | ||
|
|
45e823d27c | ||
|
|
70b736f440 | ||
|
|
97e6b38144 | ||
|
|
7a45ff460d | ||
|
|
6f5a4d7e29 | ||
|
|
4d0ad9abb6 | ||
|
|
15e8c18106 | ||
|
|
1c555e4b96 | ||
|
|
6fdb360e2a | ||
|
|
0d847d9410 | ||
|
|
abc82d6a52 | ||
|
|
acf7d70d24 | ||
|
|
3be4c38946 | ||
|
|
6a1bd52854 | ||
|
|
0b75992737 | ||
|
|
91fef21973 | ||
|
|
dc0f3559be | ||
|
|
bb25128406 | ||
|
|
bf5d8de999 | ||
|
|
1a0a6755b1 | ||
|
|
8adbbe092d | ||
|
|
bd749e040d | ||
|
|
7e80d7e551 | ||
|
|
ce09d00679 | ||
|
|
dbd7a06ea9 | ||
|
|
74c2e644a9 | ||
|
|
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 | ||
|
|
17126b0c6d | ||
|
|
c37cb60d3c | ||
|
|
6c587b1c57 | ||
|
|
5917453611 | ||
|
|
cc2a1444ae | ||
|
|
10df5dcf70 | ||
|
|
8055635e85 |
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/node_modules
|
||||
/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
|
||||
/root-topology/*.secret
|
||||
+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:
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
ZeroTier One
|
||||
ZeroTier One - Ethernet Virtualization
|
||||
======
|
||||
|
||||
ZeroTier One creates flat virtual Ethernet networks of almost unlimited size. [Visit ZeroTier Networks on the web](https://www.zerotier.com/) for more information.
|
||||
ZeroTier One is an ethernet virtualization engine. It creates virtual LANs of almost unlimited size that span physical network boundaries.
|
||||
|
||||
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.
|
||||
The underlying protocol is peer to peer with managed anchor points ("supernodes") for instant-on communication, assisted NAT traversal, and relaying for users who cannot make P2P connections. All unicast packets are encrypted end-to-end using private keys that only you control. Multicast and broadcast work as they would on a normal LAN, except that traffic is throttled and intelligently prioritized on large networks to stay within bandwidth limits while preserving essential functionality (multicast triage algorithm). Its behavior is not unlike some enterprise-grade intelligent ethernet switches designed for huge wired networks such as university LANs.
|
||||
|
||||
Follow the [ZeroTier blog](http://blog.zerotier.com/) and the [GitHub project](https://github.com/zerotier/ZeroTierOne) to stay up to date.
|
||||
[Visit ZeroTier Networks on the web](https://www.zerotier.com/) for more information. Follow the [ZeroTier blog](https://www.zerotier.com/blog/) and the [GitHub project](https://github.com/zerotier/ZeroTierOne) to stay up to date. See the GitHub-hosted wiki (sidebar) for technical info and help for various platforms.
|
||||
|
||||
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) Packages for popular Linux distributions that neatly wrap the Linux installer/uninstaller are coming soon. If you want to build from source, clone this repository and see BUILDING.txt and RUNNING.txt. If you build manually you'll have to update manually.
|
||||
|
||||
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`. (Earth is a public virtual network, meaning that it has no access control and allows anyone to join. Make sure your system is up to date and you have no unprotected network services listening.)
|
||||
|
||||
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.
|
||||
Note: If UDP traffic over port 9993 (at a minimum) is not permitted by your local or network firewall(s), ZeroTier One will fall back to TCP tunneling to supernodes over port 443 and will not be able to make direct NAT-t connections to other peers. This fallback mode slows things down considerably. If you're getting very poor performance check your firewall settings. You can see if fallback mode is active by checking for outbound TCP connections from the zerotier-one process to port 443 on five or six hosts in the zerotier.com domain. (See Defaults.cpp for a list of these hosts.)
|
||||
|
||||
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.
|
||||
Most users will use IPv4 and/or IPv6 over ZeroTier One, but since it virtualizes at the ethernet (layer 2) level it can technically host almost any protocol. Users have made classic multiplayer games work over IPX, for example. Services like DHCP and IPv6 NDP for link-local addresses can work automatically.
|
||||
|
||||
(c)2012-2013 [ZeroTier Networks LLC](https://www.zerotier.com/)
|
||||
The service is free for public networks and for managed private networks up to ten users. The code is open source and is licensed under the GNU GPL v3 (not LGPL). If you'd like to embed it in a closed-source commercial product, please e-mail [contact@zerotier.com](mailto:contact@zerotier.com) to discuss licensing.
|
||||
+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.
+106
-78
@@ -1,98 +1,126 @@
|
||||
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 \
|
||||
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 \
|
||||
networkwidget.cpp \
|
||||
installdialog.cpp \
|
||||
licensedialog.cpp \
|
||||
onetimedialog.cpp \
|
||||
../node/C25519.cpp \
|
||||
../node/CertificateOfMembership.cpp \
|
||||
../node/Defaults.cpp \
|
||||
../node/HttpClient.cpp \
|
||||
../node/Identity.cpp \
|
||||
../node/InetAddress.cpp \
|
||||
../node/IpcConnection.cpp \
|
||||
../node/IpcListener.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/RoutingTable.cpp \
|
||||
../node/Salsa20.cpp \
|
||||
../node/Service.cpp \
|
||||
../node/SHA512.cpp \
|
||||
../node/SocketManager.cpp \
|
||||
../node/SoftwareUpdater.cpp \
|
||||
../node/Switch.cpp \
|
||||
../node/TcpSocket.cpp \
|
||||
../node/Topology.cpp \
|
||||
../node/UdpSocket.cpp \
|
||||
../node/Utils.cpp \
|
||||
../ext/lz4/lz4.c \
|
||||
../ext/lz4/lz4hc.c \
|
||||
networkwidget.cpp
|
||||
../node/Dictionary.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 \
|
||||
networkwidget.h \
|
||||
installdialog.h \
|
||||
mac_doprivileged.h \
|
||||
licensedialog.h \
|
||||
main.h \
|
||||
onetimedialog.h \
|
||||
../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/Constants.hpp \
|
||||
../node/Defaults.hpp \
|
||||
../node/Dictionary.hpp \
|
||||
../node/HttpClient.hpp \
|
||||
../node/Identity.hpp \
|
||||
../node/InetAddress.hpp \
|
||||
../node/IpcConnection.hpp \
|
||||
../node/IpcListener.hpp \
|
||||
../node/Logger.hpp \
|
||||
../node/MAC.hpp \
|
||||
../node/Multicaster.hpp \
|
||||
../node/MulticastGroup.hpp \
|
||||
../node/Mutex.hpp \
|
||||
../node/Network.hpp \
|
||||
../node/NetworkConfig.hpp \
|
||||
../node/Node.hpp \
|
||||
../node/NodeConfig.hpp \
|
||||
../node/NonCopyable.hpp \
|
||||
../node/Packet.hpp \
|
||||
../node/PacketDecoder.hpp \
|
||||
../node/Path.hpp \
|
||||
../node/Peer.hpp \
|
||||
../node/Poly1305.hpp \
|
||||
../node/RuntimeEnvironment.hpp \
|
||||
../node/Salsa20.hpp \
|
||||
../node/Service.hpp \
|
||||
../node/SHA512.hpp \
|
||||
../node/SharedPtr.hpp \
|
||||
../node/Socket.hpp \
|
||||
../node/SocketManager.hpp \
|
||||
../node/SoftwareUpdater.hpp \
|
||||
../node/Switch.hpp \
|
||||
../node/RoutingTable.hpp \
|
||||
../node/TcpSocket.hpp \
|
||||
../node/Thread.hpp \
|
||||
../node/Topology.hpp \
|
||||
../node/UdpSocket.hpp \
|
||||
../node/Utils.hpp \
|
||||
../ext/lz4/lz4.h \
|
||||
../ext/lz4/lz4hc.h \
|
||||
networkwidget.h
|
||||
../node/EthernetTap.hpp \
|
||||
../node/EthernetTapFactory.hpp
|
||||
|
||||
FORMS += mainwindow.ui \
|
||||
aboutwindow.ui \
|
||||
networkwidget.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,57 @@
|
||||
/*
|
||||
* 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()+"\nDesktop 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");
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
/*
|
||||
QWidgetList widgets = this->findChildren<QWidget*>();
|
||||
foreach(QWidget *widget, widgets) {
|
||||
QFont font(widget->font());
|
||||
font.setPointSizeF(font.pointSizeF() * 0.75);
|
||||
widget->setFont(font);
|
||||
}
|
||||
*/
|
||||
this->raise();
|
||||
#endif
|
||||
}
|
||||
|
||||
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 255 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user