mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-09-22 15:29:03 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18919465c3 | ||
|
|
bb8bb2727c | ||
|
|
859fe7776c | ||
|
|
55616388ea | ||
|
|
8e1b897f0a | ||
|
|
3745377872 | ||
|
|
01a70d09db | ||
|
|
0afcf4877c | ||
|
|
aa96bdfd1e | ||
|
|
c247a3d991 | ||
|
|
cd907a7662 | ||
|
|
1c88a518cf | ||
|
|
b4be07149f | ||
|
|
335733f110 | ||
|
|
4a370c5f3f | ||
|
|
487eb17ec0 | ||
|
|
9f16707b0b | ||
|
|
bbbc032959 | ||
|
|
e0bdc02139 | ||
|
|
6d7b1c1e5f | ||
|
|
8637d06e0e | ||
|
|
df98e5a635 | ||
|
|
62dd433756 | ||
|
|
e2effbd1ce | ||
|
|
b6248c7cb7 | ||
|
|
f6e7be102a | ||
|
|
c8213a3f58 | ||
|
|
d19516b40a | ||
|
|
ca5334509c | ||
|
|
a0a9d52213 | ||
|
|
2efc9b31bd | ||
|
|
1d9977b8b9 | ||
|
|
edad580c32 | ||
|
|
2536352e5d | ||
|
|
dbb509a302 | ||
|
|
3daf73710a | ||
|
|
d372cd1b17 | ||
|
|
ee7e826f0c | ||
|
|
d7bd3e37cb | ||
|
|
b23748aa5a | ||
|
|
8584515a50 | ||
|
|
08fe84d707 | ||
|
|
150a53eb17 | ||
|
|
1f9a7e26ba | ||
|
|
fc18334dbb | ||
|
|
4ce88d7f72 | ||
|
|
ce1a03bde3 | ||
|
|
d6414c9ff7 | ||
|
|
5076c75b07 | ||
|
|
36af3d92ec | ||
|
|
2ad80063ec | ||
|
|
2fbe1e200b | ||
|
|
53996050a2 | ||
|
|
f5d77a1bc2 | ||
|
|
93a7eef2a5 | ||
|
|
67acba4bc9 | ||
|
|
9979474f1e | ||
|
|
6c53891b44 | ||
|
|
95a23dc7ec | ||
|
|
7c3a446499 | ||
|
|
6a24ac4f00 | ||
|
|
3af55f4423 | ||
|
|
95c0790a88 | ||
|
|
5cabb60a6f | ||
|
|
86056fdbd9 | ||
|
|
8a46452a70 | ||
|
|
20f8668c28 | ||
|
|
7015992b84 | ||
|
|
4be890c171 | ||
|
|
e98fd3dba0 | ||
|
|
f5717f4427 | ||
|
|
5f8a3f4a7f | ||
|
|
499ac2699f | ||
|
|
b342f56bec | ||
|
|
28a73b620e | ||
|
|
e73c4cb68b | ||
|
|
c9c63074bb | ||
|
|
70f368fdc3 | ||
|
|
a7c4cbe53a | ||
|
|
3368330b77 | ||
|
|
b9aeec9f29 | ||
|
|
bf5c07f79a | ||
|
|
63fa4a684d | ||
|
|
3635a940f9 | ||
|
|
71b1eb9d52 | ||
|
|
58c9e90b49 | ||
|
|
d415c61c67 | ||
|
|
2e373f6400 | ||
|
|
421a04b35f | ||
|
|
80d8b7d0ae | ||
|
|
f823fd05ac | ||
|
|
2a6b74746e | ||
|
|
741642ba53 | ||
|
|
8d30d51cf3 | ||
|
|
ee9a811b81 | ||
|
|
f260c2839c | ||
|
|
2ba97fb46b | ||
|
|
9df88a3933 | ||
|
|
3daea24d50 | ||
|
|
7e156b2622 | ||
|
|
e4c5ad9f43 | ||
|
|
439e602d5a | ||
|
|
a53cfc9096 | ||
|
|
e7b515c86c | ||
|
|
304ed641fe | ||
|
|
7a17f6ca80 | ||
|
|
d35d322890 | ||
|
|
dd203f0065 | ||
|
|
fb975ead23 | ||
|
|
a816f56426 | ||
|
|
e6e825da70 | ||
|
|
917b95a1d6 | ||
|
|
b0a83093ce | ||
|
|
57d8730f1b | ||
|
|
af8fcac0fc | ||
|
|
9cf734b74a | ||
|
|
083ae2d097 | ||
|
|
668c428051 | ||
|
|
10fc164fcb | ||
|
|
0c7f8e247c | ||
|
|
b8e9a79d00 | ||
|
|
e4e517e9c3 | ||
|
|
5f4eb1ebc6 | ||
|
|
c345c699fd | ||
|
|
a677597b44 | ||
|
|
1fce55fab1 | ||
|
|
2e85cf18c1 | ||
|
|
76bc9968ff | ||
|
|
557cc359b3 | ||
|
|
102b0865cb | ||
|
|
a793dc2b29 | ||
|
|
a6f4de8172 | ||
|
|
1d36ea8ddf | ||
|
|
ca83f07b54 | ||
|
|
195ded4608 | ||
|
|
97cbd98bc5 | ||
|
|
3e49337d9a | ||
|
|
c6dd5b239f | ||
|
|
aa59c1de10 | ||
|
|
a004878546 | ||
|
|
086050686f | ||
|
|
f934b81703 | ||
|
|
77fd78d5c9 | ||
|
|
a86e1cdb88 | ||
|
|
2510f594e5 | ||
|
|
339b2314ea | ||
|
|
fd2b383c3e | ||
|
|
ae93c95151 | ||
|
|
ffad0b2780 | ||
|
|
bcd079b70e | ||
|
|
9f8069434a | ||
|
|
9e28bbfbb2 | ||
|
|
47f611e7b8 | ||
|
|
b14856da50 | ||
|
|
1111d11be1 | ||
|
|
51295e77d0 | ||
|
|
a20b540fb0 | ||
|
|
ef3e319c64 | ||
|
|
41cd980bf7 |
No files matched your search
+18
@@ -6,3 +6,21 @@ zerotier-*
|
||||
*.dSYM
|
||||
mac-tap/tuntap/src/tap/tap
|
||||
mac-tap/tuntap/tap.kext
|
||||
/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
|
||||
/Build/*
|
||||
*.log
|
||||
*.opensdf
|
||||
*.user
|
||||
*.cache
|
||||
*.obj
|
||||
*.tlog
|
||||
/vsprojects/SelfTest/SelfTest.aps
|
||||
+3
-6
@@ -16,17 +16,14 @@ ZeroTier One includes or links with the following third party software:
|
||||
* LZ4 compression algorithm by Yann Collet (BSD license)
|
||||
http://code.google.com/p/lz4/
|
||||
|
||||
* JsonCPP by Baptiste Lepilleur (public domain)
|
||||
http://jsoncpp.sourceforge.net
|
||||
|
||||
* http-parser, a simple C http parser library (MIT license)
|
||||
https://github.com/joyent/http-parser
|
||||
|
||||
* OpenSSL libcrypto (BSD-style OpenSSL license)
|
||||
http://www.openssl.org/
|
||||
|
||||
* TunTapOSX by Mattias Nissler (with tiny modifications) (BSD license)
|
||||
http://tuntaposx.sourceforge.net
|
||||
|
||||
* tap-windows by the OpenVPN project (forked for ZT1) (GPL)
|
||||
https://github.com/OpenVPN/tap-windows
|
||||
|
||||
* Salsa20 stream cipher by D. J. Bernstein (public domain)
|
||||
http://cr.yp.to/snuffle.html
|
||||
+10
-18
@@ -6,12 +6,12 @@ ARCH=$(shell uname -m)
|
||||
DEFS=-DZT_ARCH="$(ARCH)" -DZT_OSNAME="linux" -DZT_TRACE
|
||||
|
||||
# Uncomment for a release optimized build
|
||||
CFLAGS=-Wall -O3 -fno-unroll-loops -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
STRIP=strip --strip-all
|
||||
#CFLAGS=-Wall -O3 -fno-unroll-loops -fstack-protector -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
#STRIP=strip --strip-all
|
||||
|
||||
# Uncomment for a debug build
|
||||
#CFLAGS=-Wall -g -pthread $(INCLUDES) -DZT_TRACE -DZT_LOG_STDOUT $(DEFS)
|
||||
#STRIP=echo
|
||||
CFLAGS=-Wall -g -pthread $(INCLUDES) -DZT_TRACE $(DEFS)
|
||||
STRIP=echo
|
||||
|
||||
CXXFLAGS=$(CFLAGS) -fno-rtti
|
||||
|
||||
@@ -20,16 +20,20 @@ CXXFLAGS=$(CFLAGS) -fno-rtti
|
||||
# separate binaries for the RedHat and Debian universes to distribute via
|
||||
# auto-update. This way we get one Linux binary for all systems of a given
|
||||
# architecture.
|
||||
LIBS=ext/bin/libcrypto/linux-$(ARCH)/libcrypto.a
|
||||
LIBS=ext/bin/libcrypto/linux-$(ARCH)/libcrypto.a -lm -ldl
|
||||
|
||||
include objects.mk
|
||||
|
||||
all: one launcher
|
||||
all: one cli
|
||||
|
||||
one: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-one main.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-one
|
||||
|
||||
cli: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-cli cli.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-cli
|
||||
|
||||
selftest: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-selftest selftest.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-selftest
|
||||
@@ -38,17 +42,5 @@ idtool: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-idtool idtool.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-idtool
|
||||
|
||||
packtool: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-packtool packtool.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-packtool
|
||||
|
||||
launcher:
|
||||
$(CC) -Os -o zerotier-launcher launcher.c
|
||||
$(STRIP) zerotier-launcher
|
||||
|
||||
launcher-fakebin:
|
||||
$(CC) $(CFLAGS) -DZEROTIER_FAKE_VERSION_MAJOR=1 -DZEROTIER_FAKE_VERSION_MINOR=2 -DZEROTIER_FAKE_VERSION_REVISION=3 -o zerotier-launcher-fakebin-123 launcher-fakebin.c
|
||||
$(CC) $(CFLAGS) -DZEROTIER_FAKE_VERSION_MAJOR=1 -DZEROTIER_FAKE_VERSION_MINOR=2 -DZEROTIER_FAKE_VERSION_REVISION=4 -o zerotier-launcher-fakebin-124 launcher-fakebin.c
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) zerotier-*
|
||||
+9
-17
@@ -5,7 +5,7 @@ INCLUDES=-Iext/bin/libcrypto/include -Iext/jsoncpp/include
|
||||
DEFS=-DZT_ARCH="x86_combined" -DZT_OSNAME="mac" -DZT_TRACE
|
||||
|
||||
# Uncomment for a release optimized universal binary build
|
||||
CFLAGS=-arch i386 -arch x86_64 -Wall -O3 -ftree-vectorize -pthread -mmacosx-version-min=10.6 -DNDEBUG $(INCLUDES) $(DEFS)
|
||||
CFLAGS=-arch i386 -arch x86_64 -Wall -O3 -ftree-vectorize -fstack-protector -pthread -mmacosx-version-min=10.6 -DNDEBUG $(INCLUDES) $(DEFS)
|
||||
STRIP=strip
|
||||
|
||||
# Uncomment for a debug build
|
||||
@@ -13,19 +13,20 @@ STRIP=strip
|
||||
#STRIP=echo
|
||||
|
||||
CXXFLAGS=$(CFLAGS) -fno-rtti
|
||||
|
||||
# We statically link against libcrypto since Apple has apparently decided
|
||||
# to deprecate it and may remove it in future OS releases.
|
||||
LIBS=ext/bin/libcrypto/mac-x86_combined/libcrypto.a
|
||||
LIBS=-lcrypto -lm
|
||||
|
||||
include objects.mk
|
||||
|
||||
all: one launcher mac-tap
|
||||
all: one cli mac-tap
|
||||
|
||||
one: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-one main.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-one
|
||||
|
||||
cli: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-cli cli.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-cli
|
||||
|
||||
selftest: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-selftest selftest.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-selftest
|
||||
@@ -34,10 +35,6 @@ idtool: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-idtool idtool.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-idtool
|
||||
|
||||
packtool: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-packtool packtool.cpp $(OBJS) $(LIBS)
|
||||
$(STRIP) zerotier-packtool
|
||||
|
||||
mac-tap: FORCE
|
||||
cd mac-tap/tuntap ; make tap.kext
|
||||
|
||||
@@ -47,13 +44,8 @@ install-mac-tap: FORCE
|
||||
cp -R mac-tap/tuntap/tap.kext /Library/Application\ Support/ZeroTier/One
|
||||
chown -R root:wheel /Library/Application\ Support/ZeroTier/One/tap.kext
|
||||
|
||||
launcher: FORCE
|
||||
$(CC) -Os -arch i386 -arch x86_64 -o zerotier-launcher launcher.c
|
||||
$(STRIP) zerotier-launcher
|
||||
|
||||
launcher-fakebin:
|
||||
$(CC) $(CFLAGS) -DZEROTIER_FAKE_VERSION_MAJOR=1 -DZEROTIER_FAKE_VERSION_MINOR=2 -DZEROTIER_FAKE_VERSION_REV
|
||||
$(CC) $(CFLAGS) -DZEROTIER_FAKE_VERSION_MAJOR=1 -DZEROTIER_FAKE_VERSION_MINOR=2 -DZEROTIER_FAKE_VERSION_REV
|
||||
makekeypair: $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -o zerotier-makekeypair makekeypair.cpp $(OBJS) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -rf *.dSYM
|
||||
|
||||
@@ -50,9 +50,6 @@ Check out the [blog](http://blog.zerotier.com/) for announcements, in-depth arti
|
||||
**Q:** What about privacy? Does this hide my location on the network?
|
||||
**A:** ZeroTier is not a connection anonymizer. Other than encryption, it doesn't do anything special to hide your identity or network location. If you want strong privacy protection there are already very advanced tools like [Tor](https://www.torproject.org) for that, and this isn't trying to duplicate their functionality. At the same time, ZT does not do anything special to harm your privacy either. It's not spyware or snoop-ware.
|
||||
|
||||
**Q:** You say "almost unlimited size." Isn't multicast and broadcast traffic eventually going to be too much? What happens then?
|
||||
**A:** ZeroTier One uses an algorithm called *implicit social switching*. The overall maximum number of recipients for a multicast is limited, so if there are too many listeners to a given multicast address then obviously not everyone will receive every message. So who does? Social switching causes multicasts to propagate in the direction of peers to whom you have recently communicated. As a result, multicasts tend to propagate along lines of association. The people most likely to get your service announcements are those with whom you frequently connect.
|
||||
|
||||
**Q:** Is this designed to replace IP, BGP, IPv6, routers, etc.?
|
||||
**A:** No. Its purpose is to act as a collaboration tool, a VPN alternative, a network mobility tool, a testbed for the development of software that takes advantage of fully open networking, a virtual LAN party for gamers, and so on, but it's not intended (or able) to replace the core of the Internet.
|
||||
|
||||
@@ -92,6 +89,7 @@ Check out the [blog](http://blog.zerotier.com/) for announcements, in-depth arti
|
||||
|
||||
----
|
||||
|
||||
<a href="http://flattr.com/thing/1611614/ZeroTier-Networks" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
|
||||
<a href="http://flattr.com/thing/1611614/ZeroTier-Networks" target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
|
||||
[](http://githalytics.com/zerotier/ZeroTierOne)
|
||||
|
||||
(c)2012-2013 [ZeroTier Networks LLC](https://www.zerotier.com/)
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SelfTest", "vsprojects\SelfTest\SelfTest.vcxproj", "{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TapDriver", "vsprojects\TapDriver\TapDriver.vcxproj", "{689210B1-467C-4850-BB7D-2E10D5B4A3DA}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TapDriver Package", "vsprojects\TapDriver Package\TapDriver Package.vcxproj", "{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA} = {689210B1-467C-4850-BB7D-2E10D5B4A3DA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroTierOne", "vsprojects\ZeroTierOne\ZeroTierOne.vcxproj", "{B00A4957-5977-4AC1-9EF4-571DC27EADA2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Vista Debug|Win32 = Vista Debug|Win32
|
||||
Vista Debug|x64 = Vista Debug|x64
|
||||
Vista Release|Win32 = Vista Release|Win32
|
||||
Vista Release|x64 = Vista Release|x64
|
||||
Win7 Debug|Win32 = Win7 Debug|Win32
|
||||
Win7 Debug|x64 = Win7 Debug|x64
|
||||
Win7 Release|Win32 = Win7 Release|Win32
|
||||
Win7 Release|x64 = Win7 Release|x64
|
||||
Win8 Debug|Win32 = Win8 Debug|Win32
|
||||
Win8 Debug|x64 = Win8 Debug|x64
|
||||
Win8 Release|Win32 = Win8 Release|Win32
|
||||
Win8 Release|x64 = Win8 Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Debug|Win32.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Debug|Win32.Build.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Release|Win32.Build.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Release|x64.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Debug|Win32.Build.0 = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Release|Win32.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Release|Win32.Build.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Release|Win32.Deploy.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Vista Release|x64.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Debug|Win32.Build.0 = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Release|Win32.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Release|Win32.Build.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Release|Win32.Deploy.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win7 Release|x64.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Debug|Win32.Build.0 = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Debug|x64.ActiveCfg = Debug|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Release|Win32.ActiveCfg = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Release|Win32.Build.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Release|Win32.Deploy.0 = Release|Win32
|
||||
{DCD73B97-0F44-4044-8BA4-95B59CCAB4BD}.Win8 Release|x64.ActiveCfg = Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Debug|Win32.ActiveCfg = Win7 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Debug|Win32.Build.0 = Win7 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Debug|Win32.Deploy.0 = Win7 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Debug|x64.ActiveCfg = Win7 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Debug|x64.Build.0 = Win7 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Debug|x64.Deploy.0 = Win7 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Release|Win32.ActiveCfg = Win8 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Release|Win32.Build.0 = Win8 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Release|Win32.Deploy.0 = Win8 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Release|x64.ActiveCfg = Win7 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Release|x64.Build.0 = Win7 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Release|x64.Deploy.0 = Win7 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Debug|Win32.ActiveCfg = Vista Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Debug|Win32.Build.0 = Vista Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Debug|Win32.Deploy.0 = Vista Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Debug|x64.ActiveCfg = Vista Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Debug|x64.Build.0 = Vista Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Debug|x64.Deploy.0 = Vista Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Release|Win32.ActiveCfg = Vista Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Release|Win32.Build.0 = Vista Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Release|Win32.Deploy.0 = Vista Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Release|x64.ActiveCfg = Vista Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Release|x64.Build.0 = Vista Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Vista Release|x64.Deploy.0 = Vista Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Debug|Win32.ActiveCfg = Win7 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Debug|Win32.Build.0 = Win7 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Debug|Win32.Deploy.0 = Win7 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Debug|x64.ActiveCfg = Win7 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Debug|x64.Build.0 = Win7 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Debug|x64.Deploy.0 = Win7 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Release|Win32.ActiveCfg = Win7 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Release|Win32.Build.0 = Win7 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Release|Win32.Deploy.0 = Win7 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Release|x64.ActiveCfg = Win7 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Release|x64.Build.0 = Win7 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win7 Release|x64.Deploy.0 = Win7 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Debug|x64.Build.0 = Win8 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Release|Win32.Build.0 = Win8 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Release|x64.ActiveCfg = Win8 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Release|x64.Build.0 = Win8 Release|x64
|
||||
{689210B1-467C-4850-BB7D-2E10D5B4A3DA}.Win8 Release|x64.Deploy.0 = Win8 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Debug|Win32.ActiveCfg = Win7 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Debug|Win32.Build.0 = Win7 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Debug|Win32.Deploy.0 = Win7 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Debug|x64.ActiveCfg = Win7 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Debug|x64.Build.0 = Win7 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Debug|x64.Deploy.0 = Win7 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Release|Win32.ActiveCfg = Win8 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Release|Win32.Build.0 = Win8 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Release|Win32.Deploy.0 = Win8 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Release|x64.ActiveCfg = Win7 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Release|x64.Build.0 = Win7 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Release|x64.Deploy.0 = Win7 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Debug|Win32.ActiveCfg = Vista Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Debug|Win32.Build.0 = Vista Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Debug|Win32.Deploy.0 = Vista Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Debug|x64.ActiveCfg = Vista Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Debug|x64.Build.0 = Vista Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Debug|x64.Deploy.0 = Vista Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Release|Win32.ActiveCfg = Vista Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Release|Win32.Build.0 = Vista Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Release|Win32.Deploy.0 = Vista Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Release|x64.ActiveCfg = Vista Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Release|x64.Build.0 = Vista Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Vista Release|x64.Deploy.0 = Vista Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Debug|Win32.ActiveCfg = Win7 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Debug|Win32.Build.0 = Win7 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Debug|Win32.Deploy.0 = Win7 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Debug|x64.ActiveCfg = Win7 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Debug|x64.Build.0 = Win7 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Debug|x64.Deploy.0 = Win7 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Release|Win32.ActiveCfg = Win7 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Release|Win32.Build.0 = Win7 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Release|Win32.Deploy.0 = Win7 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Release|x64.ActiveCfg = Win7 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Release|x64.Build.0 = Win7 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win7 Release|x64.Deploy.0 = Win7 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Debug|x64.Build.0 = Win8 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Release|Win32.Build.0 = Win8 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Release|x64.ActiveCfg = Win8 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Release|x64.Build.0 = Win8 Release|x64
|
||||
{FDA1DD8D-1D56-4BC1-B402-FCC0B550D946}.Win8 Release|x64.Deploy.0 = Win8 Release|x64
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Debug|x64.Build.0 = Debug|x64
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.Build.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|Win32.Deploy.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Debug|Win32.Build.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Release|Win32.ActiveCfg = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Release|Win32.Build.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Release|Win32.Deploy.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Vista Release|x64.ActiveCfg = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Debug|Win32.Build.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Release|Win32.ActiveCfg = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Release|Win32.Build.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Release|Win32.Deploy.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win7 Release|x64.ActiveCfg = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Debug|Win32.Build.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Release|Win32.ActiveCfg = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Release|Win32.Build.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Release|Win32.Deploy.0 = Release|Win32
|
||||
{B00A4957-5977-4AC1-9EF4-571DC27EADA2}.Win8 Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* ZeroTier One - Global Peer to Peer Ethernet
|
||||
* Copyright (C) 2012-2013 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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "node/Node.hpp"
|
||||
#include "node/Constants.hpp"
|
||||
#include "node/Utils.hpp"
|
||||
#include "node/Thread.hpp"
|
||||
#include "node/Condition.hpp"
|
||||
|
||||
using namespace ZeroTier;
|
||||
|
||||
static void printHelp(FILE *out,const char *exename)
|
||||
{
|
||||
fprintf(out,"Usage: %s [-switches] <command>"ZT_EOL_S,exename);
|
||||
fprintf(out,ZT_EOL_S);
|
||||
fprintf(out,"Switches:"ZT_EOL_S);
|
||||
fprintf(out," -t<token> - Specify token on command line"ZT_EOL_S);
|
||||
fprintf(out," -T<file> - Read token from file"ZT_EOL_S);
|
||||
fprintf(out,ZT_EOL_S);
|
||||
fprintf(out,"Use the 'help' command to get help from ZeroTier One itself."ZT_EOL_S);
|
||||
}
|
||||
|
||||
static volatile unsigned int numResults = 0;
|
||||
static Condition doneCondition;
|
||||
|
||||
static void resultHandler(void *arg,unsigned long id,const char *line)
|
||||
{
|
||||
++numResults;
|
||||
if (strlen(line))
|
||||
fprintf(stdout,"%s"ZT_EOL_S,line);
|
||||
else doneCondition.signal();
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
if (argc <= 1) {
|
||||
printHelp(stdout,argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string authToken;
|
||||
std::string command;
|
||||
bool pastSwitches = false;
|
||||
for(int i=1;i<argc;++i) {
|
||||
if ((argv[i][0] == '-')&&(!pastSwitches)) {
|
||||
if (strlen(argv[i]) <= 1) {
|
||||
printHelp(stdout,argv[0]);
|
||||
return -1;
|
||||
}
|
||||
switch(argv[i][1]) {
|
||||
case 't':
|
||||
authToken.assign(argv[i] + 2);
|
||||
break;
|
||||
case 'T':
|
||||
if (!Utils::readFile(argv[i] + 2,authToken)) {
|
||||
fprintf(stdout,"FATAL ERROR: unable to read token from '%s'"ZT_EOL_S,argv[i] + 2);
|
||||
return -2;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
pastSwitches = true;
|
||||
if (command.length())
|
||||
command.push_back(' ');
|
||||
command.append(argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!authToken.length()) {
|
||||
const char *home = getenv("HOME");
|
||||
if (home) {
|
||||
std::string dotZeroTierAuthToken(home);
|
||||
dotZeroTierAuthToken.push_back(ZT_PATH_SEPARATOR);
|
||||
dotZeroTierAuthToken.append(".zerotierOneAuthToken");
|
||||
if (!Utils::readFile(dotZeroTierAuthToken.c_str(),authToken)) {
|
||||
#ifndef __WINDOWS__
|
||||
#ifdef __APPLE__
|
||||
const char *systemAuthTokenPath = "/Library/Application Support/ZeroTier/One/authtoken.secret";
|
||||
#else
|
||||
const char *systemAuthTokenPath = "/var/lib/zerotier-one/authtoken.secret";
|
||||
#endif
|
||||
if (!Utils::readFile(systemAuthTokenPath,authToken)) {
|
||||
fprintf(stdout,"FATAL ERROR: no token specified on command line and could not read '%s' or '%s'"ZT_EOL_S,dotZeroTierAuthToken.c_str(),systemAuthTokenPath);
|
||||
return -2;
|
||||
}
|
||||
#else // __WINDOWS__
|
||||
fprintf(stdout,"FATAL ERROR: no token specified on command line and could not read '%s'"ZT_EOL_S,dotZeroTierAuthToken.c_str());
|
||||
return -2;
|
||||
#endif // __WINDOWS__
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!authToken.length()) {
|
||||
fprintf(stdout,"FATAL ERROR: could not find auth token"ZT_EOL_S);
|
||||
return -2;
|
||||
}
|
||||
|
||||
Node::LocalClient client(authToken.c_str(),&resultHandler,(void *)0);
|
||||
client.send(command.c_str());
|
||||
|
||||
doneCondition.wait(1000);
|
||||
|
||||
if (!numResults) {
|
||||
fprintf(stdout,"ERROR: no results received. Is ZeroTier One running?"ZT_EOL_S);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
This is the Microsoft "devcon" utility, which as far as I know is
|
||||
fair game to redistribute. It's packaged with OpenVPN and several
|
||||
other things and also distributed in source code form as an example
|
||||
program by Microsoft.
|
||||
|
||||
It's used to automatically install the Microsoft Loopback Adapter
|
||||
or remove it when no longer needed.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Symlink
+1
@@ -0,0 +1 @@
|
||||
linux-armv4/
|
||||
@@ -0,0 +1,4 @@
|
||||
make clean
|
||||
./Configure no-sock no-ssl2 no-ssl3 no-err no-krb5 no-engine no-hw no-tlsext no-jpake no-capieng no-idea no-camellia no-seed no-bf no-cast no-des no-rc2 no-rc4 no-rc5 no-md2 no-md4 no-ripemd no-mdc2 no-rsa no-dsa no-dh no-shared no-zlib no-dso no-cms no-ocsp no-txt_db no-pem no-mdc2 no-ui no-ts linux-armv4
|
||||
make depend
|
||||
make build_crypto
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 20 of 154 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user