Merge branch 'adamierymenko-dev' into android-jni
Conflicts: .gitignore
11
.gitignore
vendored
@ -1,12 +1,10 @@
|
|||||||
/ext/llvm-g++-Xcode4.6.2
|
/ext/llvm-g++-Xcode4.6.2
|
||||||
/ext/llvm-g++-Xcode4.6.2.tar.bz2
|
/ext/llvm-g++-Xcode4.6.2.tar.bz2
|
||||||
/zerotier-*
|
/zerotier-*
|
||||||
/ZeroTierUI/*.user
|
|
||||||
*.o
|
*.o
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.Apple*
|
.Apple*
|
||||||
*.dSYM
|
*.dSYM
|
||||||
/netconf-service/node_modules
|
|
||||||
/ipch
|
/ipch
|
||||||
/windows/ZeroTierOne.sdf
|
/windows/ZeroTierOne.sdf
|
||||||
/windows/ZeroTierOne.v11.suo
|
/windows/ZeroTierOne.v11.suo
|
||||||
@ -33,12 +31,16 @@
|
|||||||
/ZeroTierOneInstaller-*
|
/ZeroTierOneInstaller-*
|
||||||
.qmake.stash
|
.qmake.stash
|
||||||
*.autosave
|
*.autosave
|
||||||
/ZeroTier One.dmg
|
|
||||||
/root-topology/bin2c
|
/root-topology/bin2c
|
||||||
/root-topology/mktopology
|
/root-topology/mktopology
|
||||||
/root-topology/*.secret
|
/root-topology/*.secret
|
||||||
/root-topology/test/supernodes
|
/root-topology/test/supernodes
|
||||||
/root-topology/test/test-root-topology
|
/root-topology/test/test-root-topology
|
||||||
|
/ext/mac-ui-macgap1-wrapper/MacGap.xcodeproj/project.xcworkspace/xcuserdata/*
|
||||||
|
/ext/mac-ui-macgap1-wrapper/MacGap.xcodeproj/project.xcworkspace/xcuserdata/*
|
||||||
|
/ext/mac-ui-macgap1-wrapper/src/MacGap.xcodeproj/project.xcworkspace/xcuserdata/*
|
||||||
|
/ext/mac-ui-macgap1-wrapper/src/MacGap.xcodeproj/xcuserdata/*
|
||||||
|
/ext/mac-ui-macgap1-wrapper/src/build
|
||||||
java/obj/
|
java/obj/
|
||||||
java/libs/
|
java/libs/
|
||||||
java/bin/
|
java/bin/
|
||||||
@ -48,8 +50,9 @@ windows/ZeroTierOne/Debug/
|
|||||||
java/build_win64/
|
java/build_win64/
|
||||||
java/build_win32/
|
java/build_win32/
|
||||||
/java/mac32_64/
|
/java/mac32_64/
|
||||||
/ext/mac-ui-macgap1-wrapper/MacGap.xcodeproj/project.xcworkspace/xcuserdata/*
|
|
||||||
/ui/.module-cache
|
/ui/.module-cache
|
||||||
/windows/WebUIWrapper/bin
|
/windows/WebUIWrapper/bin
|
||||||
/windows/WebUIWrapper/obj
|
/windows/WebUIWrapper/obj
|
||||||
node_modules
|
node_modules
|
||||||
|
/ZeroTier One.msi
|
||||||
|
/ext/installfiles/windows/*-cache
|
||||||
|
BIN
artwork/ZeroTierIcon.icns
Normal file
@ -1,328 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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>
|
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
|
|
||||||
#include "../version.h"
|
|
||||||
|
|
||||||
#include "Constants.hpp"
|
|
||||||
#include "SoftwareUpdater.hpp"
|
|
||||||
#include "Dictionary.hpp"
|
|
||||||
#include "C25519.hpp"
|
|
||||||
#include "Identity.hpp"
|
|
||||||
#include "Logger.hpp"
|
|
||||||
#include "RuntimeEnvironment.hpp"
|
|
||||||
#include "Thread.hpp"
|
|
||||||
#include "Node.hpp"
|
|
||||||
#include "Utils.hpp"
|
|
||||||
#include "HttpClient.hpp"
|
|
||||||
|
|
||||||
#ifdef __UNIX_LIKE__
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace ZeroTier {
|
|
||||||
|
|
||||||
static inline std::map< Address,Identity > _mkUpdateAuth()
|
|
||||||
{
|
|
||||||
std::map< Address,Identity > ua;
|
|
||||||
|
|
||||||
{ // 0001
|
|
||||||
Identity id("e9bc3707b5:0:c4cef17bde99eadf9748c4fd11b9b06dc5cd8eb429227811d2c336e6b96a8d329e8abd0a4f45e47fe1bcebf878c004c822d952ff77fc2833af4c74e65985c435");
|
|
||||||
ua[id.address()] = id;
|
|
||||||
}
|
|
||||||
{ // 0002
|
|
||||||
Identity id("56520eaf93:0:7d858b47988b34399a9a31136de07b46104d7edb4a98fa1d6da3e583d3a33e48be531532b886f0b12cd16794a66ab9220749ec5112cbe96296b18fe0cc79ca05");
|
|
||||||
ua[id.address()] = id;
|
|
||||||
}
|
|
||||||
{ // 0003
|
|
||||||
Identity id("7c195de2e0:0:9f659071c960f9b0f0b96f9f9ecdaa27c7295feed9c79b7db6eedcc11feb705e6dd85c70fa21655204d24c897865b99eb946b753a2bbcf2be5f5e006ae618c54");
|
|
||||||
ua[id.address()] = id;
|
|
||||||
}
|
|
||||||
{ // 0004
|
|
||||||
Identity id("415f4cfde7:0:54118e87777b0ea5d922c10b337c4f4bd1db7141845bd54004b3255551a6e356ba6b9e1e85357dbfafc45630b8faa2ebf992f31479e9005f0472685f2d8cbd6e");
|
|
||||||
ua[id.address()] = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ua;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline const char *_mkUpdateUrl()
|
|
||||||
{
|
|
||||||
#if defined(__LINUX__) && ( defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(__i386) )
|
|
||||||
if (sizeof(void *) == 8)
|
|
||||||
return "http://download.zerotier.com/ZeroTierOneInstaller-linux-x64-LATEST.nfo";
|
|
||||||
else return "http://download.zerotier.com/ZeroTierOneInstaller-linux-x86-LATEST.nfo";
|
|
||||||
#define GOT_UPDATE_URL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
return "http://download.zerotier.com/ZeroTierOneInstaller-mac-combined-LATEST.nfo";
|
|
||||||
#define GOT_UPDATE_URL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
return "http://download.zerotier.com/ZeroTierOneInstaller-windows-intel-LATEST.nfo";
|
|
||||||
#define GOT_UPDATE_URL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef GOT_UPDATE_URL
|
|
||||||
return "";
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
SoftwareUpdater::SoftwareUpdater(const RuntimeEnvironment *renv) :
|
|
||||||
RR(renv),
|
|
||||||
_myVersion(packVersion(ZEROTIER_ONE_VERSION_MAJOR,ZEROTIER_ONE_VERSION_MINOR,ZEROTIER_ONE_VERSION_REVISION)),
|
|
||||||
_lastUpdateAttempt(0),
|
|
||||||
_status(UPDATE_STATUS_IDLE),
|
|
||||||
_die(false),
|
|
||||||
_lock()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
SoftwareUpdater::~SoftwareUpdater()
|
|
||||||
{
|
|
||||||
_die = true;
|
|
||||||
for(;;) {
|
|
||||||
_lock.lock();
|
|
||||||
bool ip = (_status != UPDATE_STATUS_IDLE);
|
|
||||||
_lock.unlock();
|
|
||||||
if (ip)
|
|
||||||
Thread::sleep(500);
|
|
||||||
else break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SoftwareUpdater::cleanOldUpdates()
|
|
||||||
{
|
|
||||||
std::string updatesDir(RR->homePath + ZT_PATH_SEPARATOR_S + "updates.d");
|
|
||||||
std::map<std::string,bool> dl(Utils::listDirectory(updatesDir.c_str()));
|
|
||||||
for(std::map<std::string,bool>::iterator i(dl.begin());i!=dl.end();++i) {
|
|
||||||
if (!i->second)
|
|
||||||
Utils::rm((updatesDir + ZT_PATH_SEPARATOR_S + i->first).c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SoftwareUpdater::sawRemoteVersion(unsigned int vmaj,unsigned int vmin,unsigned int rev)
|
|
||||||
{
|
|
||||||
const uint64_t tmp = packVersion(vmaj,vmin,rev);
|
|
||||||
if (tmp > _myVersion) {
|
|
||||||
Mutex::Lock _l(_lock);
|
|
||||||
if ((_status == UPDATE_STATUS_IDLE)&&(!_die)&&(ZT_DEFAULTS.updateLatestNfoURL.length())) {
|
|
||||||
const uint64_t now = Utils::now();
|
|
||||||
if ((now - _lastUpdateAttempt) >= ZT_UPDATE_MIN_INTERVAL) {
|
|
||||||
_lastUpdateAttempt = now;
|
|
||||||
_status = UPDATE_STATUS_GETTING_NFO;
|
|
||||||
RR->http->GET(ZT_DEFAULTS.updateLatestNfoURL,HttpClient::NO_HEADERS,ZT_UPDATE_HTTP_TIMEOUT,&_cbHandleGetLatestVersionInfo,this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SoftwareUpdater::checkNow()
|
|
||||||
{
|
|
||||||
Mutex::Lock _l(_lock);
|
|
||||||
if (_status == UPDATE_STATUS_IDLE) {
|
|
||||||
_lastUpdateAttempt = Utils::now();
|
|
||||||
_status = UPDATE_STATUS_GETTING_NFO;
|
|
||||||
RR->http->GET(ZT_DEFAULTS.updateLatestNfoURL,HttpClient::NO_HEADERS,ZT_UPDATE_HTTP_TIMEOUT,&_cbHandleGetLatestVersionInfo,this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *SoftwareUpdater::parseNfo(
|
|
||||||
const char *nfoText,
|
|
||||||
unsigned int &vMajor,
|
|
||||||
unsigned int &vMinor,
|
|
||||||
unsigned int &vRevision,
|
|
||||||
Address &signedBy,
|
|
||||||
std::string &signature,
|
|
||||||
std::string &url)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
Dictionary nfo(nfoText);
|
|
||||||
|
|
||||||
vMajor = Utils::strToUInt(nfo.get("vMajor").c_str());
|
|
||||||
vMinor = Utils::strToUInt(nfo.get("vMinor").c_str());
|
|
||||||
vRevision = Utils::strToUInt(nfo.get("vRevision").c_str());
|
|
||||||
signedBy = nfo.get("signedBy");
|
|
||||||
signature = Utils::unhex(nfo.get("ed25519"));
|
|
||||||
url = nfo.get("url");
|
|
||||||
|
|
||||||
if (signature.length() != ZT_C25519_SIGNATURE_LEN)
|
|
||||||
return "bad ed25519 signature, invalid length";
|
|
||||||
if ((url.length() <= 7)||(url.substr(0,7) != "http://"))
|
|
||||||
return "invalid URL, must begin with http://";
|
|
||||||
|
|
||||||
return (const char *)0;
|
|
||||||
} catch ( ... ) {
|
|
||||||
return "invalid NFO file format or one or more required fields missing";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SoftwareUpdater::validateUpdate(
|
|
||||||
const void *data,
|
|
||||||
unsigned int len,
|
|
||||||
const Address &signedBy,
|
|
||||||
const std::string &signature)
|
|
||||||
{
|
|
||||||
std::map< Address,Identity >::const_iterator updateAuthority = ZT_DEFAULTS.updateAuthorities.find(signedBy);
|
|
||||||
if (updateAuthority == ZT_DEFAULTS.updateAuthorities.end())
|
|
||||||
return false;
|
|
||||||
return updateAuthority->second.verify(data,len,signature.data(),(unsigned int)signature.length());
|
|
||||||
}
|
|
||||||
|
|
||||||
void SoftwareUpdater::_cbHandleGetLatestVersionInfo(void *arg,int code,const std::string &url,const std::string &body)
|
|
||||||
{
|
|
||||||
SoftwareUpdater *upd = (SoftwareUpdater *)arg;
|
|
||||||
const RuntimeEnvironment *RR = (const RuntimeEnvironment *)upd->RR;
|
|
||||||
Mutex::Lock _l(upd->_lock);
|
|
||||||
|
|
||||||
if ((upd->_die)||(upd->_status != UPDATE_STATUS_GETTING_NFO)) {
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (code != 200) {
|
|
||||||
LOG("software update check failed: server responded with code %d",code);
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
unsigned int vMajor = 0,vMinor = 0,vRevision = 0;
|
|
||||||
Address signedBy;
|
|
||||||
std::string signature,url;
|
|
||||||
|
|
||||||
const char *err = parseNfo(body.c_str(),vMajor,vMinor,vRevision,signedBy,signature,url);
|
|
||||||
|
|
||||||
if (err) {
|
|
||||||
LOG("software update check aborted: .nfo file parse error: %s",err);
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ZT_DEFAULTS.updateAuthorities.count(signedBy)) {
|
|
||||||
LOG("software update check aborted: .nfo file specifies unknown signing authority");
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef ZT_ALWAYS_UPDATE /* for testing */
|
|
||||||
if (packVersion(vMajor,vMinor,vRevision) <= upd->_myVersion) {
|
|
||||||
TRACE("software update check complete: version on update site is not newer than my version, no update necessary");
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
upd->_status = UPDATE_STATUS_GETTING_FILE;
|
|
||||||
upd->_signedBy = signedBy;
|
|
||||||
upd->_signature = signature;
|
|
||||||
|
|
||||||
RR->http->GET(url,HttpClient::NO_HEADERS,ZT_UPDATE_HTTP_TIMEOUT,&_cbHandleGetLatestVersionBinary,arg);
|
|
||||||
} catch ( ... ) {
|
|
||||||
LOG("software update check failed: .nfo file invalid or missing field(s)");
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SoftwareUpdater::_cbHandleGetLatestVersionBinary(void *arg,int code,const std::string &url,const std::string &body)
|
|
||||||
{
|
|
||||||
SoftwareUpdater *upd = (SoftwareUpdater *)arg;
|
|
||||||
const RuntimeEnvironment *RR = (const RuntimeEnvironment *)upd->RR;
|
|
||||||
Mutex::Lock _l(upd->_lock);
|
|
||||||
|
|
||||||
if (!validateUpdate(body.data(),(unsigned int)body.length(),upd->_signedBy,upd->_signature)) {
|
|
||||||
LOG("software update failed: update fetched from '%s' failed signature check (image size: %u)",url.c_str(),(unsigned int)body.length());
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t lastSlash = url.rfind('/');
|
|
||||||
if (lastSlash == std::string::npos) { // sanity check, shouldn't happen
|
|
||||||
LOG("software update failed: invalid URL");
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
std::string updatesDir(RR->homePath + ZT_PATH_SEPARATOR_S + "updates.d");
|
|
||||||
std::string updateFilename(url.substr(lastSlash + 1));
|
|
||||||
if ((updateFilename.length() < 3)||(updateFilename.find("..") != std::string::npos)) {
|
|
||||||
LOG("software update failed: invalid URL: filename contains invalid characters");
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for(std::string::iterator c(updateFilename.begin());c!=updateFilename.end();++c) {
|
|
||||||
// Only allow a list of whitelisted characters to make up the filename to prevent any
|
|
||||||
// path shenanigans, esp on Windows where / is not the path separator.
|
|
||||||
if (!strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_.0123456789",*c)) {
|
|
||||||
LOG("software update failed: invalid URL: filename contains invalid characters");
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::string updatePath(updatesDir + ZT_PATH_SEPARATOR_S + updateFilename);
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
CreateDirectoryA(updatesDir.c_str(),NULL);
|
|
||||||
#else
|
|
||||||
mkdir(updatesDir.c_str(),0755);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FILE *upf = fopen(updatePath.c_str(),"wb");
|
|
||||||
if (!upf) {
|
|
||||||
LOG("software update failed: unable to open %s for writing",updatePath.c_str());
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (fwrite(body.data(),body.length(),1,upf) != 1) {
|
|
||||||
LOG("software update failed: unable to write to %s",updatePath.c_str());
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
fclose(upf);
|
|
||||||
Utils::rm(updatePath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fclose(upf);
|
|
||||||
|
|
||||||
#ifdef __UNIX_LIKE__
|
|
||||||
::chmod(updatePath.c_str(),0755);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// We exit with this reason code and the path as the text. It is the
|
|
||||||
// caller's responsibility (main.c) to pick this up and do the right
|
|
||||||
// thing.
|
|
||||||
upd->_status = UPDATE_STATUS_IDLE;
|
|
||||||
RR->node->terminate(Node::NODE_RESTART_FOR_UPGRADE,updatePath.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ZeroTier
|
|
@ -1,186 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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 ZT_SOFTWAREUPDATER_HPP
|
|
||||||
#define ZT_SOFTWAREUPDATER_HPP
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
|
||||||
#include "../node/Mutex.hpp"
|
|
||||||
#include "../node/Address.hpp"
|
|
||||||
|
|
||||||
#include "HttpClient.hpp"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delay between fetches of the root topology update URL
|
|
||||||
*
|
|
||||||
* 86400000 = check once every 24 hours (this doesn't change often)
|
|
||||||
*/
|
|
||||||
#define ZT_UPDATE_ROOT_TOPOLOGY_CHECK_INTERVAL 86400000
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Minimum interval between attempts to do a software update
|
|
||||||
*/
|
|
||||||
#define ZT_UPDATE_MIN_INTERVAL 120000
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Maximum interval between checks for new versions
|
|
||||||
*/
|
|
||||||
#define ZT_UPDATE_MAX_INTERVAL 7200000
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Software update HTTP timeout in seconds
|
|
||||||
*/
|
|
||||||
#define ZT_UPDATE_HTTP_TIMEOUT 120
|
|
||||||
|
|
||||||
namespace ZeroTier {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Software updater
|
|
||||||
*/
|
|
||||||
class SoftwareUpdater
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
SoftwareUpdater();
|
|
||||||
~SoftwareUpdater();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove old updates in updates.d
|
|
||||||
*/
|
|
||||||
void cleanOldUpdates();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called on each version message from a peer
|
|
||||||
*
|
|
||||||
* If a peer has a newer version, that causes an update to be started.
|
|
||||||
*
|
|
||||||
* @param vmaj Peer's major version
|
|
||||||
* @param vmin Peer's minor version
|
|
||||||
* @param rev Peer's revision
|
|
||||||
*/
|
|
||||||
void sawRemoteVersion(unsigned int vmaj,unsigned int vmin,unsigned int rev);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check for updates now regardless of last check time or version
|
|
||||||
*
|
|
||||||
* This only starts a check if one is not in progress. Otherwise it does
|
|
||||||
* nothing.
|
|
||||||
*/
|
|
||||||
void checkNow();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check for updates now if it's been longer than ZT_UPDATE_MAX_INTERVAL
|
|
||||||
*
|
|
||||||
* This is called periodically from the main loop.
|
|
||||||
*/
|
|
||||||
inline void checkIfMaxIntervalExceeded(uint64_t now)
|
|
||||||
{
|
|
||||||
if ((now - _lastUpdateAttempt) >= ZT_UPDATE_MAX_INTERVAL)
|
|
||||||
checkNow();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pack three-component version into a 64-bit integer
|
|
||||||
*
|
|
||||||
* @param vmaj Major version (0..65535)
|
|
||||||
* @param vmin Minor version (0..65535)
|
|
||||||
* @param rev Revision (0..65535)
|
|
||||||
* @return Version packed into an easily comparable 64-bit integer
|
|
||||||
*/
|
|
||||||
static inline uint64_t packVersion(unsigned int vmaj,unsigned int vmin,unsigned int rev)
|
|
||||||
throw()
|
|
||||||
{
|
|
||||||
return ( ((uint64_t)(vmaj & 0xffff) << 32) | ((uint64_t)(vmin & 0xffff) << 16) | (uint64_t)(rev & 0xffff) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse NFO data from .nfo file on software update site
|
|
||||||
*
|
|
||||||
* The first argument is the NFO data, and all the remaining arguments are
|
|
||||||
* result parameters to be filled with results. If an error is returned the
|
|
||||||
* results in the parameters should be considered undefined.
|
|
||||||
*
|
|
||||||
* @param nfo NFO data
|
|
||||||
* @param vMajor Result: major version
|
|
||||||
* @param vMinor Result: minor version
|
|
||||||
* @param vRevision Result: revision number
|
|
||||||
* @param signedBy Result: signing identity
|
|
||||||
* @param signature Result: Ed25519 signature data
|
|
||||||
* @param url Result: URL of update binary
|
|
||||||
* @return NULL on success or error message on failure
|
|
||||||
*/
|
|
||||||
static const char *parseNfo(
|
|
||||||
const char *nfoText,
|
|
||||||
unsigned int &vMajor,
|
|
||||||
unsigned int &vMinor,
|
|
||||||
unsigned int &vRevision,
|
|
||||||
Address &signedBy,
|
|
||||||
std::string &signature,
|
|
||||||
std::string &url);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate an update once downloaded
|
|
||||||
*
|
|
||||||
* This obtains the identity corresponding to the address from the compiled-in
|
|
||||||
* list of valid signing identities.
|
|
||||||
*
|
|
||||||
* @param data Update data
|
|
||||||
* @param len Length of update data
|
|
||||||
* @param signedBy Signing authority address
|
|
||||||
* @param signature Signing authority signature
|
|
||||||
* @return True on validation success, false if rejected
|
|
||||||
*/
|
|
||||||
static bool validateUpdate(
|
|
||||||
const void *data,
|
|
||||||
unsigned int len,
|
|
||||||
const Address &signedBy,
|
|
||||||
const std::string &signature);
|
|
||||||
|
|
||||||
private:
|
|
||||||
static void _cbHandleGetLatestVersionInfo(void *arg,int code,const std::string &url,const std::string &body);
|
|
||||||
static void _cbHandleGetLatestVersionBinary(void *arg,int code,const std::string &url,const std::string &body);
|
|
||||||
|
|
||||||
HttpClient httpClient;
|
|
||||||
const uint64_t _myVersion;
|
|
||||||
volatile uint64_t _lastUpdateAttempt;
|
|
||||||
volatile enum {
|
|
||||||
UPDATE_STATUS_IDLE,
|
|
||||||
UPDATE_STATUS_GETTING_NFO,
|
|
||||||
UPDATE_STATUS_GETTING_FILE
|
|
||||||
} _status;
|
|
||||||
volatile bool _die;
|
|
||||||
Address _signedBy;
|
|
||||||
std::string _signature;
|
|
||||||
Mutex _lock;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace ZeroTier
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
|
||||||
<plist version="0.9">
|
|
||||||
<dict>
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>zt1icon.icns</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleGetInfoString</key>
|
|
||||||
<string>ZeroTier One (Mac GUI)</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>ZeroTier One</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>com.zerotier.ZeroTierOne</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@ -1,6 +0,0 @@
|
|||||||
Qt GUI
|
|
||||||
======
|
|
||||||
|
|
||||||
This is the Qt GUI distributed for Mac and Windows. It should build on Linux too if you've got Qt installed.
|
|
||||||
|
|
||||||
It's a bit ugly and limited and will probably eventually be replaced.
|
|
@ -1,9 +0,0 @@
|
|||||||
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
|
|
Before Width: | Height: | Size: 52 KiB |
@ -1,128 +0,0 @@
|
|||||||
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 \
|
|
||||||
networkwidget.cpp \
|
|
||||||
installdialog.cpp \
|
|
||||||
licensedialog.cpp \
|
|
||||||
onetimedialog.cpp \
|
|
||||||
../control/IpcConnection.cpp \
|
|
||||||
../control/IpcListener.cpp \
|
|
||||||
../control/NodeControlClient.cpp \
|
|
||||||
../control/NodeControlService.cpp \
|
|
||||||
../node/C25519.cpp \
|
|
||||||
../node/CertificateOfMembership.cpp \
|
|
||||||
../node/Defaults.cpp \
|
|
||||||
../node/Dictionary.cpp \
|
|
||||||
../node/HttpClient.cpp \
|
|
||||||
../node/Identity.cpp \
|
|
||||||
../node/IncomingPacket.cpp \
|
|
||||||
../node/InetAddress.cpp \
|
|
||||||
../node/Logger.cpp \
|
|
||||||
../node/Multicaster.cpp \
|
|
||||||
../node/Network.cpp \
|
|
||||||
../node/NetworkConfig.cpp \
|
|
||||||
../node/Node.cpp \
|
|
||||||
../node/NodeConfig.cpp \
|
|
||||||
../node/OutboundMulticast.cpp \
|
|
||||||
../node/Packet.cpp \
|
|
||||||
../node/Peer.cpp \
|
|
||||||
../node/Poly1305.cpp \
|
|
||||||
../node/RoutingTable.cpp \
|
|
||||||
../node/Salsa20.cpp \
|
|
||||||
../node/Service.cpp \
|
|
||||||
../node/SHA512.cpp \
|
|
||||||
../node/SoftwareUpdater.cpp \
|
|
||||||
../node/Switch.cpp \
|
|
||||||
../node/Topology.cpp \
|
|
||||||
../node/Utils.cpp \
|
|
||||||
../ext/lz4/lz4.c
|
|
||||||
|
|
||||||
HEADERS += mainwindow.h \
|
|
||||||
aboutwindow.h \
|
|
||||||
networkwidget.h \
|
|
||||||
installdialog.h \
|
|
||||||
mac_doprivileged.h \
|
|
||||||
licensedialog.h \
|
|
||||||
main.h \
|
|
||||||
onetimedialog.h \
|
|
||||||
../control/IpcConnection.hpp \
|
|
||||||
../control/IpcListener.hpp \
|
|
||||||
../control/NodeControlClient.hpp \
|
|
||||||
../control/NodeControlService.hpp \
|
|
||||||
../node/Address.hpp \
|
|
||||||
../node/AntiRecursion.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/EthernetTap.hpp \
|
|
||||||
../node/EthernetTapFactory.hpp \
|
|
||||||
../node/HttpClient.hpp \
|
|
||||||
../node/Identity.hpp \
|
|
||||||
../node/IncomingPacket.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/Node.hpp \
|
|
||||||
../node/NodeConfig.hpp \
|
|
||||||
../node/NonCopyable.hpp \
|
|
||||||
../node/OutboundMulticast.hpp \
|
|
||||||
../node/Packet.hpp \
|
|
||||||
../node/Path.hpp \
|
|
||||||
../node/Peer.hpp \
|
|
||||||
../node/Poly1305.hpp \
|
|
||||||
../node/RoutingTable.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/Thread.hpp \
|
|
||||||
../node/Topology.hpp \
|
|
||||||
../node/Utils.hpp \
|
|
||||||
../ext/lz4/lz4.h
|
|
||||||
|
|
||||||
FORMS += mainwindow.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 +0,0 @@
|
|||||||
IDI_ICON1 ICON DISCARDABLE "zt1icon.ico"
|
|
@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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 <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()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class AboutWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
class AboutWindow : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit AboutWindow(QWidget *parent = 0);
|
|
||||||
virtual ~AboutWindow();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::AboutWindow *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // AboutWindow_H
|
|
@ -1,254 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>AboutWindow</class>
|
|
||||||
<widget class="QDialog" name="AboutWindow">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>508</width>
|
|
||||||
<height>261</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>About ZeroTier One</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset resource="resources.qrc">
|
|
||||||
<normaloff>:/img/zt1icon.png</normaloff>:/img/zt1icon.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="sizeGripEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="frame">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="iconLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>128</width>
|
|
||||||
<height>128</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>128</width>
|
|
||||||
<height>128</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="resources.qrc">:/img/zt1icon.png</pixmap>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="frame_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Sunken</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="aboutTextLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
<property name="centerButtons">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="resources.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>AboutWindow</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>AboutWindow</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,219 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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
|
|
@ -1,124 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>InstallDialog</class>
|
|
||||||
<widget class="QMainWindow" name="InstallDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>547</width>
|
|
||||||
<height>231</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Install ZeroTier One Service</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset resource="resources.qrc">
|
|
||||||
<normaloff>:/img/zt1icon.png</normaloff>:/img/zt1icon.png</iconset>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="centralWidget">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Since this is your first time running ZeroTier One on this computer, the virtual Ethernet service must be downloaded and installed.
|
|
||||||
|
|
||||||
Please wait while the service downloads, then you will be prompted to enter an administrator password to install it.</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QProgressBar" name="progressBar">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="cancelButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Cancel and Exit</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="resources.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,43 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
#include "licensedialog.h"
|
|
||||||
#include "ui_licensedialog.h"
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
|
||||||
|
|
||||||
LicenseDialog::LicenseDialog(QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::LicenseDialog)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
#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
|
|
||||||
}
|
|
||||||
|
|
||||||
LicenseDialog::~LicenseDialog()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LicenseDialog::on_buttonBox_accepted()
|
|
||||||
{
|
|
||||||
settings->setValue("acceptedLicenseV1",true);
|
|
||||||
settings->sync();
|
|
||||||
|
|
||||||
this->setResult(QDialog::Accepted);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LicenseDialog::on_buttonBox_rejected()
|
|
||||||
{
|
|
||||||
::exit(0);
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
#ifndef LICENSEDIALOG_H
|
|
||||||
#define LICENSEDIALOG_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class LicenseDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
class LicenseDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit LicenseDialog(QWidget *parent = 0);
|
|
||||||
~LicenseDialog();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_buttonBox_accepted();
|
|
||||||
|
|
||||||
void on_buttonBox_rejected();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::LicenseDialog *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // LICENSEDIALOG_H
|
|
@ -1,256 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>LicenseDialog</class>
|
|
||||||
<widget class="QDialog" name="LicenseDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>534</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>ZeroTier One</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset resource="resources.qrc">
|
|
||||||
<normaloff>:/img/zt1icon.png</normaloff>:/img/zt1icon.png</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Do you agree to the terms of the license agreement?</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextEdit" name="licenseDisplayTextEdit">
|
|
||||||
<property name="undoRedoEnabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="html">
|
|
||||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
||||||
<html><head><meta name="qrichtext" content="1" /><title>GNU General Public License v3.0 - GNU Project - Free Software Foundation (FSF)</title><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'.Lucida Grande UI'; font-size:13pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:large; font-weight:600;">GNU GENERAL PUBLIC LICENSE</span></p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 3, 29 June 2007 </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2007 Free Software Foundation, Inc. &lt;<a href="http://fsf.org/"><span style=" text-decoration: underline; color:#0000ff;">http://fsf.org/</span></a>&gt;</p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="preamble"></a><span style=" font-size:large; font-weight:600;">P</span><span style=" font-size:large; font-weight:600;">reamble</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The GNU General Public License is a free, copyleft license for software and other kinds of works. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The precise terms and conditions for copying, distribution and modification follow. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="terms"></a><span style=" font-size:large; font-weight:600;">T</span><span style=" font-size:large; font-weight:600;">ERMS AND CONDITIONS</span> </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section0"></a><span style=" font-size:medium; font-weight:600;">0</span><span style=" font-size:medium; font-weight:600;">. Definitions.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“This License” refers to version 3 of the GNU General Public License. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “covered work” means either the unmodified Program or a work based on the Program. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section1"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">. Source Code.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Corresponding Source for a work in source code form is that same work. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section2"></a><span style=" font-size:medium; font-weight:600;">2</span><span style=" font-size:medium; font-weight:600;">. Basic Permissions.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section3"></a><span style=" font-size:medium; font-weight:600;">3</span><span style=" font-size:medium; font-weight:600;">. Protecting Users' Legal Rights From Anti-Circumvention Law.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section4"></a><span style=" font-size:medium; font-weight:600;">4</span><span style=" font-size:medium; font-weight:600;">. Conveying Verbatim Copies.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section5"></a><span style=" font-size:medium; font-weight:600;">5</span><span style=" font-size:medium; font-weight:600;">. Conveying Modified Source Versions.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: </p>
|
|
||||||
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a) The work must carry prominent notices stating that you modified it, and giving a relevant date. </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. </li></ul>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section6"></a><span style=" font-size:medium; font-weight:600;">6</span><span style=" font-size:medium; font-weight:600;">. Conveying Non-Source Forms.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: </p>
|
|
||||||
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. </li></ul>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section7"></a><span style=" font-size:medium; font-weight:600;">7</span><span style=" font-size:medium; font-weight:600;">. Additional Terms.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: </p>
|
|
||||||
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">d) Limiting the use for publicity purposes of names of licensors or authors of the material; or </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or </li>
|
|
||||||
<li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. </li></ul>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section8"></a><span style=" font-size:medium; font-weight:600;">8</span><span style=" font-size:medium; font-weight:600;">. Termination.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section9"></a><span style=" font-size:medium; font-weight:600;">9</span><span style=" font-size:medium; font-weight:600;">. Acceptance Not Required for Having Copies.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section10"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">0. Automatic Licensing of Downstream Recipients.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section11"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">1. Patents.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section12"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">2. No Surrender of Others' Freedom.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section13"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">3. Use with the GNU Affero General Public License.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section14"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">4. Revised Versions of this License.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section15"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">5. Disclaimer of Warranty.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section16"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">6. Limitation of Liability.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="section17"></a><span style=" font-size:medium; font-weight:600;">1</span><span style=" font-size:medium; font-weight:600;">7. Interpretation of Sections 15 and 16.</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">END OF TERMS AND CONDITIONS </p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a name="howto"></a><span style=" font-size:large; font-weight:600;">H</span><span style=" font-size:large; font-weight:600;">ow to Apply These Terms to Your New Programs</span> </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> &lt;one line to give the program's name and a brief idea of what it does.&gt;</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> Copyright (C) &lt;year&gt; &lt;name of author&gt;</span></p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New,courier';"><br /></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This program is free software: you can redistribute it and/or modify</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> it under the terms of the GNU General Public License as published by</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> the Free Software Foundation, either version 3 of the License, or</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> (at your option) any later version.</span></p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New,courier';"><br /></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This program is distributed in the hope that it will be useful,</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> GNU General Public License for more details.</span></p>
|
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Courier New,courier';"><br /></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> You should have received a copy of the GNU General Public License</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;. </span></p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Also add information on how to contact you by electronic and paper mail. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> &lt;program&gt; Copyright (C) &lt;year&gt; &lt;name of author&gt;</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> This is free software, and you are welcome to redistribute it</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New,courier';"> under certain conditions; type `show c' for details. </span></p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see &lt;<a href="http://www.gnu.org/licenses/"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/licenses/</span></a>&gt;. </p>
|
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read &lt;<a href="http://www.gnu.org/philosophy/why-not-lgpl.html"><span style=" text-decoration: underline; color:#0000ff;">http://www.gnu.org/philosophy/why-not-lgpl.html</span></a>&gt;. </p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::No|QDialogButtonBox::Yes</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="resources.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>LicenseDialog</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>LicenseDialog</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,12 +0,0 @@
|
|||||||
#ifndef mac_doprivileged_h
|
|
||||||
#define mac_doprivileged_h
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
|
|
||||||
// commandAndArgs can contain only single-tic quotes and should redirect its
|
|
||||||
// stdout and stderr somewhere...
|
|
||||||
bool macExecutePrivilegedShellCommand(const char *commandAndArgs);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,24 +0,0 @@
|
|||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "mac_doprivileged.h"
|
|
||||||
|
|
||||||
#undef slots
|
|
||||||
#include <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
bool macExecutePrivilegedShellCommand(const char *commandAndArgs)
|
|
||||||
{
|
|
||||||
char tmp[32768];
|
|
||||||
|
|
||||||
snprintf(tmp,sizeof(tmp),"do shell script \"%s\" with administrator privileges\n",commandAndArgs);
|
|
||||||
tmp[32767] = (char)0;
|
|
||||||
|
|
||||||
NSString *scriptApple = [[NSString alloc] initWithUTF8String:tmp];
|
|
||||||
NSAppleScript *as = [[NSAppleScript alloc] initWithSource:scriptApple];
|
|
||||||
NSDictionary *err = nil;
|
|
||||||
[as executeAndReturnError:&err];
|
|
||||||
[as release];
|
|
||||||
[scriptApple release];
|
|
||||||
|
|
||||||
return (err == nil);
|
|
||||||
}
|
|
@ -1,194 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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>
|
|
||||||
|
|
||||||
#include "mainwindow.h"
|
|
||||||
#include "installdialog.h"
|
|
||||||
#include "licensedialog.h"
|
|
||||||
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QString>
|
|
||||||
#include <QFont>
|
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
|
||||||
#include "../node/Defaults.hpp"
|
|
||||||
|
|
||||||
// Uncomment for testing to disable making sure Windows service is running
|
|
||||||
#define DISABLE_WINDOWS_SERVICE_MANAGEMENT
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
#include <WinSock2.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#include "../windows/ZeroTierOne/ZeroTierOneService.h"
|
|
||||||
|
|
||||||
#ifndef DISABLE_WINDOWS_SERVICE_MANAGEMENT
|
|
||||||
// Returns true if started or already running, false if failed or not installed
|
|
||||||
static bool startWindowsService()
|
|
||||||
{
|
|
||||||
SERVICE_STATUS ssSvcStatus;
|
|
||||||
SC_HANDLE schSCManager = NULL;
|
|
||||||
SC_HANDLE schService = NULL;
|
|
||||||
|
|
||||||
schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
|
|
||||||
if (schSCManager == NULL)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
schService = OpenServiceA(schSCManager, ZT_SERVICE_NAME, SERVICE_QUERY_STATUS | SERVICE_START);
|
|
||||||
if (schService == NULL) {
|
|
||||||
CloseServiceHandle(schSCManager);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int tries = 0;
|
|
||||||
bool running = true;
|
|
||||||
|
|
||||||
for(;;) {
|
|
||||||
memset(&ssSvcStatus,0,sizeof(ssSvcStatus));
|
|
||||||
if ((++tries > 20)||(!QueryServiceStatus(schService,&ssSvcStatus))) {
|
|
||||||
running = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ssSvcStatus.dwCurrentState == SERVICE_RUNNING) {
|
|
||||||
break;
|
|
||||||
} else if (ssSvcStatus.dwCurrentState == SERVICE_START_PENDING) {
|
|
||||||
Sleep(500);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
StartService(schService,0,NULL);
|
|
||||||
Sleep(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
CloseServiceHandle(schService);
|
|
||||||
CloseServiceHandle(schSCManager);
|
|
||||||
return running;
|
|
||||||
}
|
|
||||||
#endif // !DISABLE_WINDOWS_SERVICE_MANAGEMENT
|
|
||||||
#endif // __WINDOWS__
|
|
||||||
|
|
||||||
// Globally visible settings for the app
|
|
||||||
QSettings *settings = (QSettings *)0;
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
QApplication a(argc, argv);
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
// Start up Winsock2
|
|
||||||
{
|
|
||||||
WSADATA wsaData;
|
|
||||||
WSAStartup(MAKEWORD(2,2),&wsaData);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
|
||||||
QFile qss(":css/stylesheet.css");
|
|
||||||
qss.open(QFile::ReadOnly);
|
|
||||||
QString style(qss.readAll());
|
|
||||||
a.setStyleSheet(style);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
// If service isn't installed, download and install it
|
|
||||||
if (!QFile::exists("/Library/Application Support/ZeroTier/One/zerotier-one")) {
|
|
||||||
// InstallDialog is an alternative main window. It will re-launch the app
|
|
||||||
// when done.
|
|
||||||
InstallDialog id;
|
|
||||||
id.setStyleSheet(a.styleSheet());
|
|
||||||
id.show();
|
|
||||||
return a.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// Put QSettings here because this is one of the writable directories allowed
|
|
||||||
// in Apple's app store sandbox specs. We might end up in app store someday.
|
|
||||||
QString zt1AppSupport(QDir::homePath() + "/Library/Application Support/ZeroTier/One");
|
|
||||||
QDir::root().mkpath(zt1AppSupport);
|
|
||||||
settings = new QSettings(zt1AppSupport + "/ui.ini",QSettings::IniFormat);
|
|
||||||
}
|
|
||||||
#else // on non-Apple boxen put it in the standard place using the default format
|
|
||||||
settings = new QSettings("ZeroTier Networks","ZeroTier One");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!settings->value("acceptedLicenseV1",false).toBool()) {
|
|
||||||
LicenseDialog ld;
|
|
||||||
ld.setStyleSheet(a.styleSheet());
|
|
||||||
ld.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(__WINDOWS__) && !defined(DISABLE_WINDOWS_SERVICE_MANAGEMENT)
|
|
||||||
{
|
|
||||||
bool winSvcInstalled = false;
|
|
||||||
while (!startWindowsService()) {
|
|
||||||
if (winSvcInstalled) {
|
|
||||||
// Service was installed and subsequently failed to start again, so
|
|
||||||
// something is wrong!
|
|
||||||
QMessageBox::critical((QWidget *)0,"Service Not Available","Unable to locate or start ZeroTier One service. There may be a problem with the installation. Try installing from the .msi file again or e-mail contact@zerotier.com if you cannot install. (Error: service failed to start)",QMessageBox::Ok);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _WIN64
|
|
||||||
BOOL is64Bit = TRUE;
|
|
||||||
#else
|
|
||||||
BOOL is64Bit = FALSE;
|
|
||||||
IsWow64Process(GetCurrentProcess(),&is64Bit);
|
|
||||||
#endif
|
|
||||||
std::string exe(ZeroTier::ZT_DEFAULTS.defaultHomePath + "\\zerotier-one_");
|
|
||||||
exe.append((is64Bit == TRUE) ? "x64.exe" : "x86.exe");
|
|
||||||
|
|
||||||
if (QFile::exists(exe.c_str())) {
|
|
||||||
STARTUPINFOA si;
|
|
||||||
PROCESS_INFORMATION pi;
|
|
||||||
memset(&si,0,sizeof(si));
|
|
||||||
memset(&pi,0,sizeof(pi));
|
|
||||||
if (CreateProcessA(NULL,const_cast <LPSTR>((exe + " -I").c_str()),NULL,NULL,FALSE,CREATE_NO_WINDOW|CREATE_NEW_PROCESS_GROUP,NULL,NULL,&si,&pi)) {
|
|
||||||
WaitForSingleObject(pi.hProcess,INFINITE);
|
|
||||||
CloseHandle(pi.hProcess);
|
|
||||||
CloseHandle(pi.hThread);
|
|
||||||
winSvcInstalled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!winSvcInstalled) {
|
|
||||||
// Service failed to install -- installation problem like missing .exe
|
|
||||||
QMessageBox::critical((QWidget *)0,"Service Not Available","Unable to locate or start ZeroTier One service. There may be a problem with the installation. Try installing from the .msi file again or e-mail contact@zerotier.com if you cannot install. (Error: service not installed)",QMessageBox::Ok);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MainWindow w;
|
|
||||||
w.show();
|
|
||||||
return a.exec();
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
#ifndef MAIN_H
|
|
||||||
#define MAIN_H
|
|
||||||
|
|
||||||
#include <QSettings>
|
|
||||||
#include <QMainWindow>
|
|
||||||
|
|
||||||
extern QSettings *settings;
|
|
||||||
|
|
||||||
#endif // MAIN_H
|
|
@ -1,424 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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 <string>
|
|
||||||
#include <map>
|
|
||||||
#include <set>
|
|
||||||
#include <vector>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
#include <QClipboard>
|
|
||||||
#include <QMutex>
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QFile>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QProcess>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QScrollBar>
|
|
||||||
#include <QEventLoop>
|
|
||||||
#include <QFont>
|
|
||||||
|
|
||||||
#include "main.h"
|
|
||||||
#include "mainwindow.h"
|
|
||||||
#include "aboutwindow.h"
|
|
||||||
#include "networkwidget.h"
|
|
||||||
#include "ui_mainwindow.h"
|
|
||||||
#include "ui_quickstartdialog.h"
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include "mac_doprivileged.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../node/Utils.hpp"
|
|
||||||
#include "../node/Identity.hpp"
|
|
||||||
#include "../node/Defaults.hpp"
|
|
||||||
|
|
||||||
// Globally visible
|
|
||||||
ZeroTier::NodeControlClient *zeroTierClient = (ZeroTier::NodeControlClient *)0;
|
|
||||||
|
|
||||||
// Main window instance for app
|
|
||||||
QMainWindow *mainWindow = (MainWindow *)0;
|
|
||||||
|
|
||||||
// Handles message from ZeroTier One service
|
|
||||||
static void handleZTMessage(void *arg,const char *line)
|
|
||||||
{
|
|
||||||
static std::vector<std::string> ztReplies;
|
|
||||||
static QMutex ztReplies_m;
|
|
||||||
|
|
||||||
ztReplies_m.lock();
|
|
||||||
|
|
||||||
if (line) {
|
|
||||||
//printf("%s\n",line);
|
|
||||||
if ((line[0] == '.')&&(line[1] == (char)0)) {
|
|
||||||
// The message is packed into an event and sent to the main window where
|
|
||||||
// the actual parsing code lives.
|
|
||||||
MainWindow::ZTMessageEvent *event = new MainWindow::ZTMessageEvent(ztReplies);
|
|
||||||
ztReplies.clear();
|
|
||||||
QCoreApplication::postEvent(mainWindow,event); // must post since this may be another thread
|
|
||||||
} else if (line[0]) {
|
|
||||||
ztReplies.push_back(std::string(line));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ztReplies_m.unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
|
||||||
QMainWindow(parent),
|
|
||||||
ui(new Ui::MainWindow),
|
|
||||||
pollServiceTimerId(-1)
|
|
||||||
{
|
|
||||||
mainWindow = this;
|
|
||||||
|
|
||||||
ui->setupUi(this);
|
|
||||||
if (ui->networkListWidget->verticalScrollBar())
|
|
||||||
ui->networkListWidget->verticalScrollBar()->setSingleStep(8);
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
QWidgetList widgets = this->findChildren<QWidget*>();
|
|
||||||
foreach(QWidget *widget, widgets)
|
|
||||||
widget->setAttribute(Qt::WA_MacShowFocusRect,false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
// Windows operates at a different DPI, so we have to rescale the default Qt
|
|
||||||
// font sizes so everything isn't huge. Yeah.
|
|
||||||
QWidgetList widgets = this->findChildren<QWidget*>();
|
|
||||||
foreach(QWidget *widget, widgets) {
|
|
||||||
if (typeid(*widget) != typeid(*ui->menuFile)) { // menus don't need the DPI shift apparently
|
|
||||||
QFont font(widget->font());
|
|
||||||
font.setPointSizeF(font.pointSizeF() * 0.75);
|
|
||||||
widget->setFont(font);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this->raise();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ui->noNetworksLabel->setVisible(true);
|
|
||||||
ui->noNetworksLabel->setText("Connecting to Service...");
|
|
||||||
ui->bottomContainerWidget->setVisible(false);
|
|
||||||
ui->networkListWidget->setVisible(false);
|
|
||||||
|
|
||||||
this->firstTimerTick = true;
|
|
||||||
this->pollServiceTimerId = this->startTimer(200);
|
|
||||||
this->cyclesSinceResponseFromService = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
delete zeroTierClient;
|
|
||||||
zeroTierClient = (ZeroTier::NodeControlClient *)0;
|
|
||||||
mainWindow = (MainWindow *)0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::timerEvent(QTimerEvent *event) // event can be null since code also calls this directly
|
|
||||||
{
|
|
||||||
if (this->isHidden())
|
|
||||||
return;
|
|
||||||
if (this->pollServiceTimerId < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Show quick start dialog on first launch, then reset timer to normal rate
|
|
||||||
if (this->firstTimerTick) {
|
|
||||||
this->firstTimerTick = false;
|
|
||||||
this->killTimer(this->pollServiceTimerId);
|
|
||||||
if (!settings->value("shown_quickStart",false).toBool()) {
|
|
||||||
on_actionQuick_Start_triggered();
|
|
||||||
settings->setValue("shown_quickStart",true);
|
|
||||||
settings->sync();
|
|
||||||
}
|
|
||||||
this->pollServiceTimerId = this->startTimer(2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!zeroTierClient) {
|
|
||||||
#ifdef __APPLE__
|
|
||||||
if ((!QFile::exists(ZeroTier::NodeControlClient::authTokenDefaultUserPath()))&&(QFile::exists("/Library/Application Support/ZeroTier/One/zerotier-one"))) {
|
|
||||||
// Authorize user by copying auth token into local home directory
|
|
||||||
QMessageBox::information(this,"Authorization Needed","Administrator privileges are required to allow the current user to control ZeroTier One on this computer. (You only have to do this once.)",QMessageBox::Ok,QMessageBox::NoButton);
|
|
||||||
|
|
||||||
std::string homePath(QDir::homePath().toStdString());
|
|
||||||
QString zt1Caches(QDir::homePath() + "/Library/Caches/ZeroTier/One");
|
|
||||||
QDir::root().mkpath(zt1Caches);
|
|
||||||
std::string tmpPath((zt1Caches + "/auth.sh").toStdString());
|
|
||||||
|
|
||||||
FILE *scr = fopen(tmpPath.c_str(),"w");
|
|
||||||
if (!scr) {
|
|
||||||
QMessageBox::critical(this,"Cannot Authorize","Unable to authorize this user to administrate ZeroTier One. (Cannot write 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,"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());
|
|
||||||
}
|
|
||||||
#endif // __APPLE__
|
|
||||||
|
|
||||||
try {
|
|
||||||
std::string buf;
|
|
||||||
if (ZeroTier::Utils::readFile((ZeroTier::ZT_DEFAULTS.defaultHomePath + ZT_PATH_SEPARATOR_S + "identity.public").c_str(),buf)) {
|
|
||||||
ZeroTier::Identity id;
|
|
||||||
if (id.fromString(buf)) {
|
|
||||||
std::string authToken(ZeroTier::NodeControlClient::getAuthToken(ZeroTier::NodeControlClient::authTokenDefaultUserPath(),false));
|
|
||||||
if (!authToken.length())
|
|
||||||
authToken = ZeroTier::NodeControlClient::getAuthToken((ZeroTier::ZT_DEFAULTS.defaultHomePath + ZT_PATH_SEPARATOR_S + "authtoken.secret").c_str(),false);
|
|
||||||
zeroTierClient = new ZeroTier::NodeControlClient((std::string(ZT_IPC_ENDPOINT_BASE) + id.address().toString()).c_str(),authToken.c_str(),&handleZTMessage,this);
|
|
||||||
const char *err = zeroTierClient->error();
|
|
||||||
if (err) {
|
|
||||||
delete zeroTierClient;
|
|
||||||
zeroTierClient = (ZeroTier::NodeControlClient *)0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch ( ... ) {
|
|
||||||
zeroTierClient = (ZeroTier::NodeControlClient *)0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (++this->cyclesSinceResponseFromService >= 3) {
|
|
||||||
if (this->cyclesSinceResponseFromService == 3) {
|
|
||||||
QMessageBox::warning(this,"Service Not Running","Can't connect to the ZeroTier One service. Is it running?",QMessageBox::Ok);
|
|
||||||
}
|
|
||||||
ui->noNetworksLabel->setVisible(true);
|
|
||||||
ui->noNetworksLabel->setText("Connecting to Service...");
|
|
||||||
ui->bottomContainerWidget->setVisible(false);
|
|
||||||
ui->networkListWidget->setVisible(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zeroTierClient) {
|
|
||||||
zeroTierClient->send("info");
|
|
||||||
zeroTierClient->send("listnetworks");
|
|
||||||
zeroTierClient->send("listpeers");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::customEvent(QEvent *event)
|
|
||||||
{
|
|
||||||
ZTMessageEvent *m = (ZTMessageEvent *)event; // only one custom event type so far
|
|
||||||
if (m->ztMessage.size() == 0)
|
|
||||||
return;
|
|
||||||
std::vector<std::string> hdr(ZeroTier::NodeControlClient::splitLine(m->ztMessage[0]));
|
|
||||||
if (hdr.size() < 2)
|
|
||||||
return;
|
|
||||||
if (hdr[0] != "200")
|
|
||||||
return;
|
|
||||||
|
|
||||||
this->cyclesSinceResponseFromService = 0;
|
|
||||||
|
|
||||||
if (hdr[1] == "info") {
|
|
||||||
if (hdr.size() >= 3)
|
|
||||||
this->myAddress = hdr[2].c_str();
|
|
||||||
if (hdr.size() >= 4)
|
|
||||||
this->myStatus = hdr[3].c_str();
|
|
||||||
if (hdr.size() >= 5)
|
|
||||||
this->myVersion = hdr[4].c_str();
|
|
||||||
} else if (hdr[1] == "listnetworks") {
|
|
||||||
std::map< std::string,std::vector<std::string> > newNetworks;
|
|
||||||
for(unsigned long i=1;i<m->ztMessage.size();++i) {
|
|
||||||
std::vector<std::string> l(ZeroTier::NodeControlClient::splitLine(m->ztMessage[i]));
|
|
||||||
// 200 listnetworks <nwid> <name> <mac> <status> <config age> <type> <dev> <ips>
|
|
||||||
if ((l.size() == 10)&&(l[2].length() == 16))
|
|
||||||
newNetworks[l[2]] = l;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newNetworks != networks) {
|
|
||||||
networks = newNetworks;
|
|
||||||
|
|
||||||
for (bool removed=true;removed;) {
|
|
||||||
removed = false;
|
|
||||||
for(int r=0;r<ui->networkListWidget->count();++r) {
|
|
||||||
NetworkWidget *nw = (NetworkWidget *)ui->networkListWidget->itemWidget(ui->networkListWidget->item(r));
|
|
||||||
if (!networks.count(nw->networkId())) {
|
|
||||||
ui->networkListWidget->setVisible(false); // HACK to prevent an occasional crash here, discovered through hours of shotgun debugging... :P
|
|
||||||
delete ui->networkListWidget->takeItem(r);
|
|
||||||
removed = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ui->networkListWidget->setVisible(true);
|
|
||||||
std::set<std::string> alreadyDisplayed;
|
|
||||||
for(int r=0;r<ui->networkListWidget->count();++r) {
|
|
||||||
NetworkWidget *nw = (NetworkWidget *)ui->networkListWidget->itemWidget(ui->networkListWidget->item(r));
|
|
||||||
if (networks.count(nw->networkId()) > 0) {
|
|
||||||
alreadyDisplayed.insert(nw->networkId());
|
|
||||||
std::vector<std::string> &l = networks[nw->networkId()];
|
|
||||||
nw->setNetworkName(l[3]);
|
|
||||||
nw->setMAC(l[4]);
|
|
||||||
nw->setStatus(l[5],l[6]);
|
|
||||||
nw->setNetworkType(l[7]);
|
|
||||||
nw->setNetworkDeviceName(l[8]);
|
|
||||||
nw->setIps(l[9]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(std::map< std::string,std::vector<std::string> >::iterator nwdata(networks.begin());nwdata!=networks.end();++nwdata) {
|
|
||||||
if (alreadyDisplayed.count(nwdata->first) == 0) {
|
|
||||||
std::vector<std::string> &l = nwdata->second;
|
|
||||||
NetworkWidget *nw = new NetworkWidget((QWidget *)0,nwdata->first);
|
|
||||||
nw->setNetworkName(l[3]);
|
|
||||||
nw->setMAC(l[4]);
|
|
||||||
nw->setStatus(l[5],l[6]);
|
|
||||||
nw->setNetworkType(l[7]);
|
|
||||||
nw->setNetworkDeviceName(l[8]);
|
|
||||||
nw->setIps(l[9]);
|
|
||||||
QListWidgetItem *item = new QListWidgetItem();
|
|
||||||
item->setSizeHint(nw->sizeHint());
|
|
||||||
ui->networkListWidget->addItem(item);
|
|
||||||
ui->networkListWidget->setItemWidget(item,nw);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (hdr[1] == "listpeers") {
|
|
||||||
this->numPeers = 0;
|
|
||||||
for(unsigned long i=1;i<m->ztMessage.size();++i)
|
|
||||||
++this->numPeers;
|
|
||||||
} else
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!ui->networkListWidget->count()) {
|
|
||||||
ui->noNetworksLabel->setText("You Have Not Joined Any Networks");
|
|
||||||
ui->noNetworksLabel->setVisible(true);
|
|
||||||
} else ui->noNetworksLabel->setVisible(false);
|
|
||||||
|
|
||||||
if (!ui->bottomContainerWidget->isVisible())
|
|
||||||
ui->bottomContainerWidget->setVisible(true);
|
|
||||||
if (!ui->networkListWidget->isVisible())
|
|
||||||
ui->networkListWidget->setVisible(true);
|
|
||||||
|
|
||||||
if (this->myAddress.size())
|
|
||||||
ui->addressButton->setText(this->myAddress);
|
|
||||||
else ui->addressButton->setText(" ");
|
|
||||||
|
|
||||||
QString st(this->myStatus);
|
|
||||||
st += ", v";
|
|
||||||
st += this->myVersion;
|
|
||||||
st += ", ";
|
|
||||||
st += QString::number(this->numPeers);
|
|
||||||
st += " peers";
|
|
||||||
ui->statusLabel->setText(st);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_joinNetworkButton_clicked()
|
|
||||||
{
|
|
||||||
QString toJoin(ui->networkIdLineEdit->text());
|
|
||||||
ui->networkIdLineEdit->setText(QString());
|
|
||||||
|
|
||||||
if (!zeroTierClient) // sanity check
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (toJoin.size() != 16) {
|
|
||||||
QMessageBox::information(this,"Invalid Network ID","The network ID you entered was not valid. Enter a 16-digit hexadecimal network ID, like '8056c2e21c000001'.",QMessageBox::Ok,QMessageBox::NoButton);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
zeroTierClient->send((QString("join ") + toJoin).toStdString());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_actionAbout_triggered()
|
|
||||||
{
|
|
||||||
AboutWindow *about = new AboutWindow(this);
|
|
||||||
about->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_networkIdLineEdit_textChanged(const QString &text)
|
|
||||||
{
|
|
||||||
QString newText;
|
|
||||||
for(QString::const_iterator i(text.begin());i!=text.end();++i) {
|
|
||||||
switch(i->toLatin1()) {
|
|
||||||
case '0': newText.append('0'); break;
|
|
||||||
case '1': newText.append('1'); break;
|
|
||||||
case '2': newText.append('2'); break;
|
|
||||||
case '3': newText.append('3'); break;
|
|
||||||
case '4': newText.append('4'); break;
|
|
||||||
case '5': newText.append('5'); break;
|
|
||||||
case '6': newText.append('6'); break;
|
|
||||||
case '7': newText.append('7'); break;
|
|
||||||
case '8': newText.append('8'); break;
|
|
||||||
case '9': newText.append('9'); break;
|
|
||||||
case 'a': newText.append('a'); break;
|
|
||||||
case 'b': newText.append('b'); break;
|
|
||||||
case 'c': newText.append('c'); break;
|
|
||||||
case 'd': newText.append('d'); break;
|
|
||||||
case 'e': newText.append('e'); break;
|
|
||||||
case 'f': newText.append('f'); break;
|
|
||||||
case 'A': newText.append('a'); break;
|
|
||||||
case 'B': newText.append('b'); break;
|
|
||||||
case 'C': newText.append('c'); break;
|
|
||||||
case 'D': newText.append('d'); break;
|
|
||||||
case 'E': newText.append('e'); break;
|
|
||||||
case 'F': newText.append('f'); break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (newText.size() > 16)
|
|
||||||
newText.truncate(16);
|
|
||||||
ui->networkIdLineEdit->setText(newText);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_addressButton_clicked()
|
|
||||||
{
|
|
||||||
QApplication::clipboard()->setText(this->myAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::on_actionQuick_Start_triggered()
|
|
||||||
{
|
|
||||||
Ui::QuickstartDialog qd;
|
|
||||||
QDialog *qdd = new QDialog(this);
|
|
||||||
qd.setupUi(qdd);
|
|
||||||
qdd->setModal(false);
|
|
||||||
qdd->show();
|
|
||||||
}
|
|
@ -1,101 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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 MAINWINDOW_H
|
|
||||||
#define MAINWINDOW_H
|
|
||||||
|
|
||||||
#include <QMainWindow>
|
|
||||||
#include <QEvent>
|
|
||||||
#include <QString>
|
|
||||||
#include <QShowEvent>
|
|
||||||
#include <QTimerEvent>
|
|
||||||
#include <QSettings>
|
|
||||||
|
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
|
||||||
#include "../node/Node.hpp"
|
|
||||||
#include "../node/Utils.hpp"
|
|
||||||
#include "../control/NodeControlClient.hpp"
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class MainWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Globally visible instance of local client for communicating with ZT1
|
|
||||||
// Can be null if not connected, or will point to current
|
|
||||||
extern ZeroTier::NodeControlClient *zeroTierClient;
|
|
||||||
|
|
||||||
// Globally visible pointer to main app window
|
|
||||||
extern QMainWindow *mainWindow;
|
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
// Event used to pass messages from the Node::LocalClient thread to the
|
|
||||||
// main window to update network lists and stats.
|
|
||||||
class ZTMessageEvent : public QEvent
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ZTMessageEvent(const std::vector<std::string> &m) :
|
|
||||||
QEvent(QEvent::User),
|
|
||||||
ztMessage(m) {}
|
|
||||||
std::vector<std::string> ztMessage;
|
|
||||||
};
|
|
||||||
|
|
||||||
explicit MainWindow(QWidget *parent = 0);
|
|
||||||
virtual ~MainWindow();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void timerEvent(QTimerEvent *event);
|
|
||||||
virtual void customEvent(QEvent *event);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_joinNetworkButton_clicked();
|
|
||||||
void on_actionAbout_triggered();
|
|
||||||
void on_networkIdLineEdit_textChanged(const QString &text);
|
|
||||||
void on_addressButton_clicked();
|
|
||||||
void on_actionQuick_Start_triggered();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::MainWindow *ui;
|
|
||||||
|
|
||||||
QString myAddress;
|
|
||||||
QString myStatus;
|
|
||||||
QString myVersion;
|
|
||||||
bool firstTimerTick;
|
|
||||||
int pollServiceTimerId;
|
|
||||||
unsigned int numPeers;
|
|
||||||
unsigned int cyclesSinceResponseFromService;
|
|
||||||
std::map< std::string,std::vector<std::string> > networks;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
|
@ -1,306 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>MainWindow</class>
|
|
||||||
<widget class="QMainWindow" name="MainWindow">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>850</width>
|
|
||||||
<height>400</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>ZeroTier One</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset resource="resources.qrc">
|
|
||||||
<normaloff>:/img/zt1icon.png</normaloff>:/img/zt1icon.png</iconset>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="centralWidget">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="noNetworksLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>16</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>You Have Not Joined Any Networks</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>25</number>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="networkListWidget">
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
|
||||||
</property>
|
|
||||||
<property name="autoScroll">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="editTriggers">
|
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
|
||||||
</property>
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::NoSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="uniformItemSizes">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="bottomContainerWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="addressButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Courier</family>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Your 10-digit ZeroTier address; click to copy to clipboard.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">----------</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextOnly</enum>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">clickToCopy</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="statusLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Your network connection status.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="networkIdLineEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Courier</family>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Enter a hexadecimal network ID to join a network.</string>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
|
||||||
<number>16</number>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>(Network ID)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="joinNetworkButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Courier</family>
|
|
||||||
<pointsize>16</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Join this network.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">+</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenuBar" name="menuBar">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>850</width>
|
|
||||||
<height>34</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="layoutDirection">
|
|
||||||
<enum>Qt::LeftToRight</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QMenu" name="menuHelp">
|
|
||||||
<property name="title">
|
|
||||||
<string>Help</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="actionAbout"/>
|
|
||||||
<addaction name="actionQuick_Start"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenu" name="menuFile">
|
|
||||||
<property name="title">
|
|
||||||
<string>File</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionExit"/>
|
|
||||||
</widget>
|
|
||||||
<addaction name="menuFile"/>
|
|
||||||
<addaction name="menuHelp"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QStatusBar" name="statusBar">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<action name="actionAbout">
|
|
||||||
<property name="text">
|
|
||||||
<string>About</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionExit">
|
|
||||||
<property name="text">
|
|
||||||
<string>Exit</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionQuick_Start">
|
|
||||||
<property name="text">
|
|
||||||
<string>Quick Start</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
</widget>
|
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
|
||||||
<resources>
|
|
||||||
<include location="resources.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>actionExit</sender>
|
|
||||||
<signal>triggered()</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>close()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>-1</x>
|
|
||||||
<y>-1</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>333</x>
|
|
||||||
<y>149</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,181 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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 "networkwidget.h"
|
|
||||||
#include "mainwindow.h"
|
|
||||||
#include "ui_networkwidget.h"
|
|
||||||
#include "onetimedialog.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
#include <QClipboard>
|
|
||||||
#include <QString>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QProcess>
|
|
||||||
#include <QList>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QFont>
|
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
|
||||||
|
|
||||||
NetworkWidget::NetworkWidget(QWidget *parent,const std::string &nwid) :
|
|
||||||
QWidget(parent),
|
|
||||||
ui(new Ui::NetworkWidget),
|
|
||||||
networkIdStr(nwid),
|
|
||||||
publicWarningShown(false)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
ui->networkIdButton->setText(QString(nwid.c_str()));
|
|
||||||
|
|
||||||
QFontMetrics fm(ui->ipListWidget->font());
|
|
||||||
int lineHeight = ui->ipListWidget->spacing() + fm.height();
|
|
||||||
ui->ipListWidget->setMinimumHeight(lineHeight * 6);
|
|
||||||
ui->ipListWidget->setMaximumHeight(lineHeight * 6);
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
QWidgetList widgets = this->findChildren<QWidget*>();
|
|
||||||
foreach(QWidget* widget, widgets)
|
|
||||||
widget->setAttribute(Qt::WA_MacShowFocusRect,false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
QWidgetList widgets = this->findChildren<QWidget*>();
|
|
||||||
foreach(QWidget *widget, widgets) {
|
|
||||||
QFont font(widget->font());
|
|
||||||
font.setPointSizeF(font.pointSizeF() * 0.75);
|
|
||||||
widget->setFont(font);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
NetworkWidget::~NetworkWidget()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::setStatus(const std::string &status,const std::string &age)
|
|
||||||
{
|
|
||||||
ui->statusLabel->setText(QString(status.c_str()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::setNetworkName(const std::string &name)
|
|
||||||
{
|
|
||||||
if (name == "?") {
|
|
||||||
ui->nameLabel->setText("... waiting ...");
|
|
||||||
ui->nameLabel->setEnabled(false);
|
|
||||||
} else {
|
|
||||||
ui->nameLabel->setText(QString(name.c_str()));
|
|
||||||
ui->nameLabel->setEnabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::setNetworkType(const std::string &type)
|
|
||||||
{
|
|
||||||
ui->networkTypeLabel->setText(QString(type.c_str()));
|
|
||||||
if (type == "?")
|
|
||||||
ui->networkTypeLabel->setStatusTip("Waiting for configuration...");
|
|
||||||
else if (type == "public") {
|
|
||||||
if ((!publicWarningShown)&&(!settings->value("shown_publicWarning",false).toBool())) {
|
|
||||||
publicWarningShown = true;
|
|
||||||
OneTimeDialog *d = new OneTimeDialog(mainWindow,"shown_publicWarning","Security Notice","Security Notice:"ZT_EOL_S""ZT_EOL_S"You have joined a public network. Anyone can join these. We recommend making sure that your system's automatic software updates are enabled and turning off any shared network services that you do not want people to access.");
|
|
||||||
d->setModal(false);
|
|
||||||
d->show();
|
|
||||||
}
|
|
||||||
ui->networkTypeLabel->setStatusTip("This network can be joined by anyone in the world.");
|
|
||||||
} else if (type == "private")
|
|
||||||
ui->networkTypeLabel->setStatusTip("This network is private; only authorized peers can join.");
|
|
||||||
else ui->networkTypeLabel->setStatusTip("Unknown network type.");
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::setNetworkDeviceName(const std::string &dev)
|
|
||||||
{
|
|
||||||
ui->deviceLabel->setText(QString(dev.c_str()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::setIps(const std::string &commaSeparatedList)
|
|
||||||
{
|
|
||||||
QStringList ips(QString(commaSeparatedList.c_str()).split(QChar(','),QString::SkipEmptyParts));
|
|
||||||
if (commaSeparatedList == "-")
|
|
||||||
ips.clear();
|
|
||||||
|
|
||||||
QStringList tmp;
|
|
||||||
ips.sort();
|
|
||||||
for(QStringList::iterator i(ips.begin());i!=ips.end();++i) {
|
|
||||||
QString ipOnly(*i);
|
|
||||||
int slashIdx = ipOnly.indexOf('/');
|
|
||||||
if (slashIdx > 0)
|
|
||||||
ipOnly.truncate(slashIdx);
|
|
||||||
tmp.append(ipOnly);
|
|
||||||
}
|
|
||||||
ips = tmp;
|
|
||||||
|
|
||||||
for(QStringList::iterator i(ips.begin());i!=ips.end();++i) {
|
|
||||||
if (ui->ipListWidget->findItems(*i,Qt::MatchCaseSensitive).size() == 0)
|
|
||||||
ui->ipListWidget->addItem(*i);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int i=0;i<ui->ipListWidget->count();++i) {
|
|
||||||
QListWidgetItem *item = ui->ipListWidget->item(i);
|
|
||||||
if (!ips.contains(item->text()))
|
|
||||||
ui->ipListWidget->removeItemWidget(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::setMAC(const std::string &mac)
|
|
||||||
{
|
|
||||||
ui->macLabel->setText(QString(mac.c_str()));
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string &NetworkWidget::networkId()
|
|
||||||
{
|
|
||||||
return networkIdStr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::on_leaveNetworkButton_clicked()
|
|
||||||
{
|
|
||||||
if (QMessageBox::question(this,"Leave Network?",QString("Are you sure you want to leave network '") + networkIdStr.c_str() + "'?",QMessageBox::No,QMessageBox::Yes) == QMessageBox::Yes) {
|
|
||||||
this->setEnabled(false);
|
|
||||||
zeroTierClient->send((QString("leave ") + networkIdStr.c_str()).toStdString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::on_networkIdButton_clicked()
|
|
||||||
{
|
|
||||||
QApplication::clipboard()->setText(ui->networkIdButton->text());
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::on_ipListWidget_itemActivated(QListWidgetItem *item)
|
|
||||||
{
|
|
||||||
if (item)
|
|
||||||
QApplication::clipboard()->setText(item->text());
|
|
||||||
}
|
|
||||||
|
|
||||||
void NetworkWidget::on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
|
|
||||||
{
|
|
||||||
if (current)
|
|
||||||
QApplication::clipboard()->setText(current->text());
|
|
||||||
}
|
|
@ -1,69 +0,0 @@
|
|||||||
/*
|
|
||||||
* ZeroTier One - Network Virtualization Everywhere
|
|
||||||
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
|
||||||
*
|
|
||||||
* 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 NETWORK_H
|
|
||||||
#define NETWORK_H
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QListWidgetItem>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class NetworkWidget;
|
|
||||||
}
|
|
||||||
|
|
||||||
class NetworkWidget : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit NetworkWidget(QWidget *parent = 0,const std::string &nwid = std::string());
|
|
||||||
virtual ~NetworkWidget();
|
|
||||||
|
|
||||||
void setStatus(const std::string &status,const std::string &age);
|
|
||||||
void setNetworkName(const std::string &name);
|
|
||||||
void setNetworkType(const std::string &type);
|
|
||||||
void setNetworkDeviceName(const std::string &dev);
|
|
||||||
void setIps(const std::string &commaSeparatedList);
|
|
||||||
void setMAC(const std::string &mac);
|
|
||||||
|
|
||||||
const std::string &networkId();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_leaveNetworkButton_clicked();
|
|
||||||
void on_networkIdButton_clicked();
|
|
||||||
void on_ipListWidget_itemActivated(QListWidgetItem *item);
|
|
||||||
void on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::NetworkWidget *ui;
|
|
||||||
std::string networkIdStr;
|
|
||||||
bool publicWarningShown;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // NETWORK_H
|
|
@ -1,574 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>NetworkWidget</class>
|
|
||||||
<widget class="QWidget" name="NetworkWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>689</width>
|
|
||||||
<height>253</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Network</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">networkListItem</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="leftWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="networkInfoWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="networkIdButton">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Courier</family>
|
|
||||||
<pointsize>13</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Hexadecimal network ID; click to copy to clipboard.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">----------------</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextOnly</enum>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">clickToCopy</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>[</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="nameLabel">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>13</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>This network's short name.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>networkname</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">networkName</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>]</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="networkStatsWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<property name="rowWrapPolicy">
|
|
||||||
<enum>QFormLayout::DontWrapRows</enum>
|
|
||||||
</property>
|
|
||||||
<property name="labelAlignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="formAlignment">
|
|
||||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Type:</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="networkTypeLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>What kind of network? Public or private?</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>?</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Status:</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLabel" name="statusLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Status of this network.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>?</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Device:</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QLabel" name="deviceLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>The name of the network device on your system.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>?</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>MAC:</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QLabel" name="macLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Your system's Ethernet MAC address.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>?</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="rightWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
<underline>false</underline>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">padding: 0.1em 0 0.1em 0;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>IP Addresses</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="ipListWidget">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Courier</family>
|
|
||||||
<pointsize>12</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>IP addresses assigned to this interface; click to copy to clipboard.</string>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="editTriggers">
|
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
|
||||||
</property>
|
|
||||||
<property name="showDropIndicator" stdset="0">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::SingleSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">ipAddressList</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="leaveButtonContainerWidget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>1</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="leaveNetworkButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Leave this network.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Leave Network</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">leaveNetworkButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>ipListWidget</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,37 +0,0 @@
|
|||||||
#include "onetimedialog.h"
|
|
||||||
#include "ui_onetimedialog.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
OneTimeDialog::OneTimeDialog(QWidget *parent,const char *propName,const QString &title,const QString &message) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::OneTimeDialog)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
ui->label->setText(message);
|
|
||||||
this->setWindowTitle(title);
|
|
||||||
_propName = propName;
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
QWidgetList widgets = this->findChildren<QWidget*>();
|
|
||||||
foreach(QWidget *widget, widgets) {
|
|
||||||
QFont font(widget->font());
|
|
||||||
font.setPointSizeF(font.pointSizeF() * 0.75);
|
|
||||||
widget->setFont(font);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
OneTimeDialog::~OneTimeDialog()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OneTimeDialog::on_pushButton_clicked()
|
|
||||||
{
|
|
||||||
if (_propName) {
|
|
||||||
settings->setValue(_propName,ui->checkBox->isChecked());
|
|
||||||
settings->sync();
|
|
||||||
}
|
|
||||||
this->close();
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
#ifndef ONETIMEDIALOG_H
|
|
||||||
#define ONETIMEDIALOG_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class OneTimeDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
class OneTimeDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit OneTimeDialog(QWidget *parent = 0,const char *propName = (const char *)0,const QString &title = QString(),const QString &message = QString());
|
|
||||||
~OneTimeDialog();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_pushButton_clicked();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::OneTimeDialog *ui;
|
|
||||||
const char *_propName;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ONETIMEDIALOG_H
|
|
@ -1,99 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>OneTimeDialog</class>
|
|
||||||
<widget class="QDialog" name="OneTimeDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>496</width>
|
|
||||||
<height>197</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Dialog</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>12</number>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>12</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>12</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Don't Show This Message Again</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>OK</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,170 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>QuickstartDialog</class>
|
|
||||||
<widget class="QDialog" name="QuickstartDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>800</width>
|
|
||||||
<height>480</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Quick Start</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>785</width>
|
|
||||||
<height>800</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background: #000000;</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="pixmap">
|
|
||||||
<pixmap resource="resources.qrc">:/img/ZT1GUI.png</pixmap>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Select Help -> Quick Start to see this screen again.</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>702</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="okButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>OK</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="resources.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>okButton</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>QuickstartDialog</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>753</x>
|
|
||||||
<y>457</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>399</x>
|
|
||||||
<y>239</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,9 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="/img">
|
|
||||||
<file>zt1icon.png</file>
|
|
||||||
<file>ZT1GUI.png</file>
|
|
||||||
</qresource>
|
|
||||||
<qresource prefix="/css">
|
|
||||||
<file>stylesheet.css</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
@ -1,106 +0,0 @@
|
|||||||
QToolButton {
|
|
||||||
margin: 0;
|
|
||||||
padding: 2px;
|
|
||||||
text-align: center;
|
|
||||||
background: palette(button);
|
|
||||||
color: palette(button-text);
|
|
||||||
border: 1px solid transparent;
|
|
||||||
}
|
|
||||||
QToolButton:focus {
|
|
||||||
border: 1px solid #000000;
|
|
||||||
}
|
|
||||||
QToolButton:hover {
|
|
||||||
background: palette(highlight);
|
|
||||||
color: palette(highlight-text);
|
|
||||||
}
|
|
||||||
QToolButton:pressed {
|
|
||||||
border: 1px solid #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton.clickToCopy {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: 0;
|
|
||||||
background: transparent;
|
|
||||||
color: palette(link);
|
|
||||||
}
|
|
||||||
QToolButton.clickToCopy:focus {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
QToolButton.clickToCopy:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
QToolButton.clickToCopy:pressed {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
QToolButton.leaveNetworkButton {
|
|
||||||
margin: 0 4px 3px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMainWindow {
|
|
||||||
background: palette(dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
QListWidget {
|
|
||||||
background: transparent;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
QListWidget::item {
|
|
||||||
background: palette(base);
|
|
||||||
margin: 1px 0 1px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
QListWidget.ipAddressList {
|
|
||||||
background: palette(button);
|
|
||||||
margin: 0 4px 4px 0;
|
|
||||||
}
|
|
||||||
QListWidget.ipAddressList::item {
|
|
||||||
background: transparent;
|
|
||||||
color: palette(link);
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
}
|
|
||||||
QListWidget.ipAddressList::item:selected {
|
|
||||||
background: transparent;
|
|
||||||
border-top: 0;
|
|
||||||
border-left: 0;
|
|
||||||
border-right: 0;
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
}
|
|
||||||
QListWidget.ipAddressList::item:hover {
|
|
||||||
border-bottom: 1px solid palette(link);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStatusBar {
|
|
||||||
background: palette(button);
|
|
||||||
}
|
|
||||||
|
|
||||||
QLabel.networkName {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#networkIdButton {
|
|
||||||
padding: 0.2em 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#joinNetworkButton {
|
|
||||||
margin: 1px;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#noNetworksLabel {
|
|
||||||
background: transparent;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#networkListWidget {
|
|
||||||
background: palette(dark);
|
|
||||||
margin: 0 0 2px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bottomContainerWidget {
|
|
||||||
background: palette(base);
|
|
||||||
}
|
|
Before Width: | Height: | Size: 361 KiB |
Before Width: | Height: | Size: 44 KiB |
@ -3,34 +3,30 @@ Network Controller Implementation
|
|||||||
|
|
||||||
This folder contains code implementing the node/NetworkController.hpp interface to allow ZeroTier nodes to create and manage virtual networks.
|
This folder contains code implementing the node/NetworkController.hpp interface to allow ZeroTier nodes to create and manage virtual networks.
|
||||||
|
|
||||||
The standard implementation uses SQLite3 with the attached schema. A separate service (not included here yet) is used to administrate that database and configure networks.
|
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
By default this code is not built or included in the client. To build on Linux, BSD, or Mac add ZT_ENABLE_NETCONF_MASTER=1 to the make command line. It could be built on Windows as well, but you're on your own there. You'd have to build SQLite3 first, or get a pre-built copy somewhere.
|
By default this code is not built or included in the client. To build on Linux, BSD, or Mac add ZT\_ENABLE\_NETCONF\_MASTER=1 to the make command line. You'll need the development headers for Sqlite3 installed. They ship as part of OSX and Xcode. On Linux or BSD you'll probably need to install a package.
|
||||||
|
|
||||||
### Creating databases
|
### Running
|
||||||
|
|
||||||
If you execute a network controller enabled build of the ZeroTier One service, a *controller.db* will automatically be created and initialize. You can also create one manually with:
|
When started, a controller-enabled build of ZeroTier One will automatically create and initialize a *controller.db* in its home folder. This is where all the controller's data and persistent state lives.
|
||||||
|
|
||||||
sqlite3 -init schema.sql controller.db
|
Since Sqlite3 supports multiple processes attached to the same database, it is safe to back up a running database with the command line *sqlite3* utility:
|
||||||
|
|
||||||
Then type '.quit' to exit the SQLite3 command shell.
|
sqlite3 /path/to/controller.db .dump
|
||||||
|
|
||||||
Since SQLite3 supports multiple concurrent processes attached to the same database, it's easy to have another process administrate network details while the ZeroTier One service serves them. The schema is simple. Folks with some sysadmin expertise should be able to figure out how to populate a database and get something running. We'll probably publish some code for this at some point in the future, but for now it's all tied up with our zerotier.com web backend.
|
In production ZeroTier runs this frequently and keeps many timestamped copies going back about a week. These are also backed up (encrypted) to Amazon S3 along with the rest of our data.
|
||||||
|
|
||||||
One important detail you'll need to know:
|
### Administrating
|
||||||
|
|
||||||
Whenever a network (including associated tables) is changed in any way, its revision number must be incremented. For private networks this is part of the certificate. Certificates are permitted to differ by up to 16 revisions. Therefore, to explicitly and rapidly de-authorize someone you should do a *two-step increment*. This is done with a time delay. First de-authorize the user and increment the revision by one. Then wait 30-60 seconds and increment it by 15. This gives all running clients a chance to get updated certificates before the now-excluded node falls off the revision number horizon. All other changes need only increment once, since a few nodes briefly having a slightly out of date config won't cause any harm.
|
See service/README.md for documentation on the JSON API presented by this network controller implementation. Also see *nodejs-zt1-client* for a NodeJS JavaScript interface.
|
||||||
|
|
||||||
### Reliability
|
### Reliability
|
||||||
|
|
||||||
Network configuration masters can go offline without affecting already-configured members of running networks. You just won't be able to add new members, de-authorize members, or otherwise change any network configuration while the master is offline.
|
Network controllers can go offline without affecting already-configured members of running networks. You just won't be able to change anything and new members will not be able to join.
|
||||||
|
|
||||||
High-availability can be implemented through fail-over. A simple method involves making a frequent backup of the SQLite database (use the SQLite command line client to do this safely) and the network configuration master's working directory. Then, if the master goes down, another instance of it can rapidly be provisioned elsewhere. Since ZeroTier addresses are mobile, the new instance will quickly take over for the old one and service requests.
|
High-availability can be implemented through fail-over. A simple method involves making a frequent backup of the SQLite database (use the SQLite command line client to do this safely) and the network configuration master's working directory. Then, if the master goes down, another instance of it can rapidly be provisioned elsewhere. Since ZeroTier addresses are mobile, the new instance will quickly (usually no more than 30s) take over for the old one and service requests.
|
||||||
|
|
||||||
### Limits
|
### Limits
|
||||||
|
|
||||||
A single network configuration master can administrate up to 2^24 networks as per the ZeroTier protocol limit. The number of clients is theoretically unlimited, but in practice is limited by network bandwidth.
|
A single network configuration master can administrate up to 2^24 (~16m) networks as per the ZeroTier protocol limit. There is no hard limit on the number of clients, though millions or more would impose significant CPU demands on a server. Optimizations could be implemented such as memoization/caching to reduce this.
|
||||||
|
|
||||||
You should keep an eye on CPU utilization and stop adding networks/users to a network configuration master if it gets too high. The bottleneck here is not the SQLite database but the CPU overhead of signing certificates of membership. You'll hit limits there long before hitting any limit associated with SQLite.
|
|
||||||
|
@ -697,6 +697,37 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST(
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!networkExists) {
|
if (!networkExists) {
|
||||||
|
if (path[1].substr(10) == "______") {
|
||||||
|
// A special POST /network/##########______ feature lets users create a network
|
||||||
|
// with an arbitrary unused network ID.
|
||||||
|
nwid = 0;
|
||||||
|
|
||||||
|
uint64_t nwidPrefix = (Utils::hexStrToU64(path[1].substr(0,10).c_str()) << 24) & 0xffffffffff000000ULL;
|
||||||
|
uint64_t nwidPostfix = 0;
|
||||||
|
Utils::getSecureRandom(&nwidPostfix,sizeof(nwidPostfix));
|
||||||
|
nwidPostfix &= 0xffffffULL;
|
||||||
|
uint64_t nwidOriginalPostfix = nwidPostfix;
|
||||||
|
do {
|
||||||
|
uint64_t tryNwid = nwidPrefix | nwidPostfix;
|
||||||
|
Utils::snprintf(nwids,sizeof(nwids),"%.16llx",(unsigned long long)tryNwid);
|
||||||
|
|
||||||
|
sqlite3_reset(_sGetNetworkRevision);
|
||||||
|
sqlite3_bind_text(_sGetNetworkRevision,1,nwids,16,SQLITE_STATIC);
|
||||||
|
if (sqlite3_step(_sGetNetworkRevision) != SQLITE_ROW) {
|
||||||
|
nwid = tryNwid;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
++nwidPostfix;
|
||||||
|
nwidPostfix &= 0xffffffULL;
|
||||||
|
} while (nwidPostfix != nwidOriginalPostfix);
|
||||||
|
|
||||||
|
// 503 means we have no more free IDs for this prefix. You shouldn't host anywhere
|
||||||
|
// near 16 million networks on the same controller, so shouldn't happen.
|
||||||
|
if (!nwid)
|
||||||
|
return 503;
|
||||||
|
}
|
||||||
|
|
||||||
sqlite3_reset(_sCreateNetwork);
|
sqlite3_reset(_sCreateNetwork);
|
||||||
sqlite3_bind_text(_sCreateNetwork,1,nwids,16,SQLITE_STATIC);
|
sqlite3_bind_text(_sCreateNetwork,1,nwids,16,SQLITE_STATIC);
|
||||||
sqlite3_bind_text(_sCreateNetwork,2,nwids,16,SQLITE_STATIC); // default name, will be changed below if a name is specified in JSON
|
sqlite3_bind_text(_sCreateNetwork,2,nwids,16,SQLITE_STATIC); // default name, will be changed below if a name is specified in JSON
|
||||||
|
BIN
ext/bin/tap-windows-ndis6/x64/ZeroTierOne_NDIS6_x64.msi
Normal file
BIN
ext/bin/tap-windows-ndis6/x86/ZeroTierOne_NDIS6_x86.msi
Normal file
@ -120,33 +120,6 @@ case "$system" in
|
|||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Darwin)
|
|
||||||
echo "Assembling mac installer for x86/x64 (combined) version $vmajor.$vminor.$revision"
|
|
||||||
|
|
||||||
mkdir -p 'build-installer/Applications'
|
|
||||||
cp -a 'build-ZeroTierUI-release/ZeroTier One.app' 'build-installer/Applications'
|
|
||||||
mkdir -p 'build-installer/Library/Application Support/ZeroTier/One'
|
|
||||||
cp -fp 'ext/installfiles/mac/uninstall.sh' 'build-installer/Library/Application Support/ZeroTier/One'
|
|
||||||
cp -fp 'ext/installfiles/mac/launch.sh' 'build-installer/Library/Application Support/ZeroTier/One'
|
|
||||||
cp -fp 'zerotier-one' 'build-installer/Library/Application Support/ZeroTier/One'
|
|
||||||
cp -fRp ext/bin/tap-mac/* 'build-installer/Library/Application Support/ZeroTier/One'
|
|
||||||
mkdir -p 'build-installer/Library/LaunchDaemons'
|
|
||||||
cp -fp 'ext/installfiles/mac/com.zerotier.one.plist' 'build-installer/Library/LaunchDaemons'
|
|
||||||
|
|
||||||
targ="ZeroTierOneInstaller-mac-combined-${vmajor}_${vminor}_${revision}"
|
|
||||||
rm -f build-installer-tmp.tar.bz2
|
|
||||||
cd build-installer
|
|
||||||
find . -type f -name .DS_Store -print0 | xargs -0 rm -f
|
|
||||||
tar -cf - * | bzip2 -9 >../build-installer-tmp.tar.bz2
|
|
||||||
cd ..
|
|
||||||
rm -f $targ
|
|
||||||
cat ext/installfiles/mac/install.tmpl.sh build-installer-tmp.tar.bz2 >$targ
|
|
||||||
chmod 0755 $targ
|
|
||||||
rm -f build-installer-tmp.tar.bz2
|
|
||||||
ls -l $targ
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Unsupported platform: $system"
|
echo "Unsupported platform: $system"
|
||||||
exit 2
|
exit 2
|
984
ext/installfiles/mac/ZeroTier One.pkgproj
Executable file
@ -0,0 +1,984 @@
|
|||||||
|
<?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>PROJECT</key>
|
||||||
|
<dict>
|
||||||
|
<key>PACKAGE_FILES</key>
|
||||||
|
<dict>
|
||||||
|
<key>DEFAULT_INSTALL_LOCATION</key>
|
||||||
|
<string>/</string>
|
||||||
|
<key>HIERARCHY</key>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Utilities</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Applications</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>509</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/installfiles/mac/get-proxy-settings.sh</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/installfiles/mac/launch.sh</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/bin/tap-mac/tap.kext</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ui/index.html</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>420</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ui/main.js</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>420</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ui/react.min.js</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>420</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ui/simpleajax.min.js</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>420</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ui/zerotier.css</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>420</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ui/ztui.min.js</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>420</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>ui</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/installfiles/mac/uninstall.sh</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/zerotier-one</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>One</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>ZeroTier</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Application Support</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Automator</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Documentation</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Filesystems</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Frameworks</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Input Methods</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Internet Plug-Ins</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>LaunchAgents</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/installfiles/mac/com.zerotier.one.plist</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>420</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>LaunchDaemons</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>PreferencePanes</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Preferences</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Printers</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>PrivilegedHelperTools</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>QuickLook</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>QuickTime</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Screen Savers</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Scripts</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Services</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Widgets</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Library</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Extensions</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Library</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>System</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CHILDREN</key>
|
||||||
|
<array/>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Shared</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>1023</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>80</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>Users</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>PERMISSIONS</key>
|
||||||
|
<integer>493</integer>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UID</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>PAYLOAD_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>VERSION</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
</dict>
|
||||||
|
<key>PACKAGE_SCRIPTS</key>
|
||||||
|
<dict>
|
||||||
|
<key>POSTINSTALL_PATH</key>
|
||||||
|
<dict>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/installfiles/mac/postinst.sh</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>PREINSTALL_PATH</key>
|
||||||
|
<dict>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>/Users/api/Code/ZeroTierOne/ext/installfiles/mac/preinst.sh</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>RESOURCES</key>
|
||||||
|
<array/>
|
||||||
|
</dict>
|
||||||
|
<key>PACKAGE_SETTINGS</key>
|
||||||
|
<dict>
|
||||||
|
<key>AUTHENTICATION</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>CONCLUSION_ACTION</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>IDENTIFIER</key>
|
||||||
|
<string>com.zerotier.pkg.ZeroTierOne</string>
|
||||||
|
<key>OVERWRITE_PERMISSIONS</key>
|
||||||
|
<false/>
|
||||||
|
<key>VERSION</key>
|
||||||
|
<string>1.0.3</string>
|
||||||
|
</dict>
|
||||||
|
<key>PROJECT_COMMENTS</key>
|
||||||
|
<dict>
|
||||||
|
<key>NOTES</key>
|
||||||
|
<data>
|
||||||
|
PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1M
|
||||||
|
IDQuMDEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQv
|
||||||
|
c3RyaWN0LmR0ZCI+CjxodG1sPgo8aGVhZD4KPG1ldGEgaHR0cC1l
|
||||||
|
cXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7
|
||||||
|
IGNoYXJzZXQ9VVRGLTgiPgo8bWV0YSBodHRwLWVxdWl2PSJDb250
|
||||||
|
ZW50LVN0eWxlLVR5cGUiIGNvbnRlbnQ9InRleHQvY3NzIj4KPHRp
|
||||||
|
dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u
|
||||||
|
dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD
|
||||||
|
b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjEzNDcuNTciPgo8c3R5bGUg
|
||||||
|
dHlwZT0idGV4dC9jc3MiPgpwLnAxIHttYXJnaW46IDAuMHB4IDAu
|
||||||
|
MHB4IDAuMHB4IDAuMHB4OyBmb250OiAxMi4wcHggSGVsdmV0aWNh
|
||||||
|
OyBjb2xvcjogIzAwMDAwMDsgLXdlYmtpdC10ZXh0LXN0cm9rZTog
|
||||||
|
IzAwMDAwMH0Kc3Bhbi5zMSB7Zm9udC1rZXJuaW5nOiBub25lfQo8
|
||||||
|
L3N0eWxlPgo8L2hlYWQ+Cjxib2R5Pgo8cCBjbGFzcz0icDEiPjxz
|
||||||
|
cGFuIGNsYXNzPSJzMSI+WmVyb1RpZXIgT25lIC0gTmV0d29yayBW
|
||||||
|
aXJ0dWFsaXphdGlvbiBFdmVyeXdoZXJlPC9zcGFuPjwvcD4KPHAg
|
||||||
|
Y2xhc3M9InAxIj48c3BhbiBjbGFzcz0iczEiPihjKTIwMTEtMjAx
|
||||||
|
NSBaZXJvVGllciwgSW5jLjwvc3Bhbj48L3A+CjxwIGNsYXNzPSJw
|
||||||
|
MSI+PHNwYW4gY2xhc3M9InMxIj5jb250YWN0QHplcm90aWVyLmNv
|
||||||
|
bTwvc3Bhbj48L3A+CjxwIGNsYXNzPSJwMSI+PHNwYW4gY2xhc3M9
|
||||||
|
InMxIj48YnI+Cjwvc3Bhbj48L3A+CjxwIGNsYXNzPSJwMSI+PHNw
|
||||||
|
YW4gY2xhc3M9InMxIj5UbyB1bmluc3RhbGwgbWFudWFsbHksIHR5
|
||||||
|
cGUgdGhlIGZvbGxvd2luZyBpbiBhIHRlcm1pbmFsIHdpbmRvdzo8
|
||||||
|
L3NwYW4+PC9wPgo8cCBjbGFzcz0icDEiPjxzcGFuIGNsYXNzPSJz
|
||||||
|
MSI+PGJyPgo8L3NwYW4+PC9wPgo8cCBjbGFzcz0icDEiPjxzcGFu
|
||||||
|
IGNsYXNzPSJzMSI+c3VkbyAiL0xpYnJhcnkvQXBwbGljYXRpb24g
|
||||||
|
U3VwcG9ydC9aZXJvVGllci9PbmUvdW5pbnN0YWxsLnNoIjwvc3Bh
|
||||||
|
bj48L3A+CjwvYm9keT4KPC9odG1sPgo=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>PROJECT_SETTINGS</key>
|
||||||
|
<dict>
|
||||||
|
<key>BUILD_PATH</key>
|
||||||
|
<dict>
|
||||||
|
<key>PATH</key>
|
||||||
|
<string>../../..</string>
|
||||||
|
<key>PATH_TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
<key>EXCLUDED_FILES</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>PATTERNS_ARRAY</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>.DS_Store</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>PROTECTED</key>
|
||||||
|
<true/>
|
||||||
|
<key>PROXY_NAME</key>
|
||||||
|
<string>Remove .DS_Store files</string>
|
||||||
|
<key>PROXY_TOOLTIP</key>
|
||||||
|
<string>Remove ".DS_Store" files created by the Finder.</string>
|
||||||
|
<key>STATE</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>PATTERNS_ARRAY</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>.pbdevelopment</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>PROTECTED</key>
|
||||||
|
<true/>
|
||||||
|
<key>PROXY_NAME</key>
|
||||||
|
<string>Remove .pbdevelopment files</string>
|
||||||
|
<key>PROXY_TOOLTIP</key>
|
||||||
|
<string>Remove ".pbdevelopment" files created by ProjectBuilder or Xcode.</string>
|
||||||
|
<key>STATE</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>PATTERNS_ARRAY</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>CVS</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>.cvsignore</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>.cvspass</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>.svn</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>.git</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>.gitignore</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>PROTECTED</key>
|
||||||
|
<true/>
|
||||||
|
<key>PROXY_NAME</key>
|
||||||
|
<string>Remove SCM metadata</string>
|
||||||
|
<key>PROXY_TOOLTIP</key>
|
||||||
|
<string>Remove helper files and folders used by the CVS, SVN or Git Source Code Management systems.</string>
|
||||||
|
<key>STATE</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>PATTERNS_ARRAY</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>classes.nib</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>designable.db</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>info.nib</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>PROTECTED</key>
|
||||||
|
<true/>
|
||||||
|
<key>PROXY_NAME</key>
|
||||||
|
<string>Optimize nib files</string>
|
||||||
|
<key>PROXY_TOOLTIP</key>
|
||||||
|
<string>Remove "classes.nib", "info.nib" and "designable.nib" files within .nib bundles.</string>
|
||||||
|
<key>STATE</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>PATTERNS_ARRAY</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>REGULAR_EXPRESSION</key>
|
||||||
|
<false/>
|
||||||
|
<key>STRING</key>
|
||||||
|
<string>Resources Disabled</string>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>PROTECTED</key>
|
||||||
|
<true/>
|
||||||
|
<key>PROXY_NAME</key>
|
||||||
|
<string>Remove Resources Disabled folders</string>
|
||||||
|
<key>PROXY_TOOLTIP</key>
|
||||||
|
<string>Remove "Resources Disabled" folders.</string>
|
||||||
|
<key>STATE</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>SEPARATOR</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>NAME</key>
|
||||||
|
<string>ZeroTier One</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>TYPE</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>VERSION</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
26
ext/installfiles/mac/get-proxy-settings.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Outputs host and port for system HTTP proxy or zeroes if none or not
|
||||||
|
# configured.
|
||||||
|
|
||||||
|
export PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
|
||||||
|
|
||||||
|
enabled=`system_profiler SPNetworkDataType|grep "HTTP Proxy Enabled"|awk {'sub(/^.*:[ \t]*/, "", $0); print $0;'} 2>/dev/null`
|
||||||
|
port=`system_profiler SPNetworkDataType|grep "HTTP Proxy Port"|awk {'sub(/^.*:[ \t]*/, "", $0); print $0;'} 2>/dev/null`
|
||||||
|
serv=`system_profiler SPNetworkDataType|grep "HTTP Proxy Server"|awk {'sub(/^.*:[ \t]*/, "", $0); print $0;'} 2>/dev/null`
|
||||||
|
|
||||||
|
if [ "$enabled" = "Yes" ]; then
|
||||||
|
if [ "$serv" ]; then
|
||||||
|
if [ ! "$port" ]; then
|
||||||
|
port=80
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $serv $port
|
||||||
|
else
|
||||||
|
echo 0.0.0.0 0
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo 0.0.0.0 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
@ -1,144 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
|
||||||
shopt -s expand_aliases
|
|
||||||
|
|
||||||
dryRun=0
|
|
||||||
|
|
||||||
echo "*** ZeroTier One install/update ***"
|
|
||||||
|
|
||||||
if [ "$UID" -ne 0 ]; then
|
|
||||||
echo "Not running as root so doing dry run (no modifications to system)..."
|
|
||||||
dryRun=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $dryRun -gt 0 ]; then
|
|
||||||
alias ln="echo '>> dry run: ln'"
|
|
||||||
alias rm="echo '>> dry run: rm'"
|
|
||||||
alias mv="echo '>> dry run: mv'"
|
|
||||||
alias cp="echo '>> dry run: cp'"
|
|
||||||
alias chown="echo '>> dry run: chown'"
|
|
||||||
alias chgrp="echo '>> dry run: chgrp'"
|
|
||||||
alias chmod="echo '>> dry run: chmod'"
|
|
||||||
alias launchctl="echo '>> dry run: launchctl'"
|
|
||||||
alias zerotier-cli="echo '>> dry run: zerotier-cli'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
zthome="/Library/Application Support/ZeroTier/One"
|
|
||||||
ztapp="/Applications/ZeroTier One.app"
|
|
||||||
if [ ! -d "$ztapp" ]; then
|
|
||||||
ztapp=`mdfind kMDItemCFBundleIdentifier == 'com.zerotier.ZeroTierOne' | grep -E '.*ZeroTier One[.]app$' | grep -v -F '/build-' | grep -v -F '/Volumes/ZeroTier' | sort | head -n 1`
|
|
||||||
fi
|
|
||||||
|
|
||||||
scriptPath="`dirname "$0"`/`basename "$0"`"
|
|
||||||
if [ ! -r "$scriptPath" ]; then
|
|
||||||
scriptPath="$0"
|
|
||||||
if [ ! -r "$scriptPath" ]; then
|
|
||||||
echo "Installer cannot determine its own path; $scriptPath is not readable."
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
endMarkerIndex=`grep -a -b -E '^################' "$scriptPath" | head -c 16 | cut -d : -f 1`
|
|
||||||
if [ "$endMarkerIndex" -le 100 ]; then
|
|
||||||
echo 'Internal error: unable to find end of script / start of binary data marker.'
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
blobStart=`expr $endMarkerIndex + 17`
|
|
||||||
if [ "$blobStart" -le "$endMarkerIndex" ]; then
|
|
||||||
echo 'Internal error: unable to find end of script / start of binary data marker.'
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 'Extracting files...'
|
|
||||||
if [ $dryRun -gt 0 ]; then
|
|
||||||
echo ">> dry run: tail -c +$blobStart \"$scriptPath\" | bunzip2 -c | tar -xvop -C / -f -"
|
|
||||||
else
|
|
||||||
rm -rf '/tmp/_zt1tmp'
|
|
||||||
mkdir '/tmp/_zt1tmp'
|
|
||||||
tail -c +$blobStart "$scriptPath" | bunzip2 -c | tar -xop -C '/tmp/_zt1tmp' -f -
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd '/tmp/_zt1tmp'
|
|
||||||
|
|
||||||
if [ $dryRun -eq 0 -a ! -d './Applications/ZeroTier One.app' ]; then
|
|
||||||
echo 'Archive extraction failed, cannot find files in /tmp/_zt1tmp.'
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 'Installing zerotier-one service...'
|
|
||||||
|
|
||||||
mkdir -p "$zthome"
|
|
||||||
chown root:admin "$zthome"
|
|
||||||
chmod 0750 "$zthome"
|
|
||||||
cp -fa ./Library/Application\ Support/ZeroTier/One/* "$zthome"
|
|
||||||
chown -R root:wheel "$zthome/tap.kext"
|
|
||||||
chown -R root:wheel "$zthome/pre10.8/tap.kext"
|
|
||||||
|
|
||||||
echo 'Installing/updating ZeroTier One.app...'
|
|
||||||
|
|
||||||
if [ ! -z "$ztapp" -a -d "$ztapp" -a -f "$ztapp/Contents/Info.plist" ]; then
|
|
||||||
# Preserve ownership of current app across updates... that way the admin
|
|
||||||
# user who dragged it into /Applications can just trash it the way they
|
|
||||||
# would any other app. This works (due to mdfind up top) even if they put
|
|
||||||
# it somewhere non-standard on their system.
|
|
||||||
currentAppOwner=`stat -f '%u' "$ztapp"`
|
|
||||||
currentAppGroup=`stat -f '%g' "$ztapp"`
|
|
||||||
|
|
||||||
rm -rf "$ztapp"
|
|
||||||
mv -f './Applications/ZeroTier One.app' "$ztapp"
|
|
||||||
|
|
||||||
if [ ! -z "$currentAppOwner" -a ! -z "$currentAppGroup" ]; then
|
|
||||||
chown -R $currentAppOwner "$ztapp"
|
|
||||||
chgrp -R $currentAppGroup "$ztapp"
|
|
||||||
else
|
|
||||||
chown -R root "$ztapp"
|
|
||||||
chgrp -R admin "$ztapp"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# If there is no existing app, just drop the shipped one into place
|
|
||||||
ztapp="/Applications/ZeroTier One.app"
|
|
||||||
mv -f './Applications/ZeroTier One.app' "$ztapp"
|
|
||||||
chown -R root "$ztapp"
|
|
||||||
chgrp -R admin "$ztapp"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set up symlink that watches for app deletion
|
|
||||||
rm -f "$zthome/shutdownIfUnreadable"
|
|
||||||
ln -sf "$ztapp/Contents/Info.plist" "$zthome/shutdownIfUnreadable"
|
|
||||||
|
|
||||||
echo 'Installing zerotier-cli command line utility...'
|
|
||||||
|
|
||||||
rm -f /usr/bin/zerotier-cli /usr/bin/zerotier-idtool
|
|
||||||
ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" /usr/bin/zerotier-cli
|
|
||||||
ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" /usr/bin/zerotier-idtool
|
|
||||||
|
|
||||||
# This lets the install helper AppleScript thingy go ahead and authorize the
|
|
||||||
# user after the installer is done, skiping that step for the user who did
|
|
||||||
# the service install.
|
|
||||||
if [ ! -f '/Library/Application Support/ZeroTier/One/authtoken.secret' ]; then
|
|
||||||
echo 'Pre-creating authtoken.secret for ZeroTier service...'
|
|
||||||
if [ $dryRun -eq 0 ]; then
|
|
||||||
rm -f '/Library/Application Support/ZeroTier/One/authtoken.secret'
|
|
||||||
head -c 1024 /dev/urandom | md5 | head -c 24 >'/Library/Application Support/ZeroTier/One/authtoken.secret'
|
|
||||||
chmod 0600 '/Library/Application Support/ZeroTier/One/authtoken.secret'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 'Installing and (re-)starting zerotier-one service via launchctl...'
|
|
||||||
|
|
||||||
mv -f './Library/LaunchDaemons/com.zerotier.one.plist' '/Library/LaunchDaemons/'
|
|
||||||
launchctl load /Library/LaunchDaemons/com.zerotier.one.plist
|
|
||||||
|
|
||||||
# launchctl will restart us after exit if this is an online auto-update
|
|
||||||
|
|
||||||
cd /tmp
|
|
||||||
rm -rf _zt1tmp
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
# Do not remove the last line or add a carriage return to it! The installer
|
|
||||||
# looks for an unterminated line beginning with 16 #'s in itself to find
|
|
||||||
# the binary blob data, which is appended after it.
|
|
||||||
|
|
||||||
################
|
|
26
ext/installfiles/mac/postinst.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||||
|
|
||||||
|
launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||||
|
|
||||||
|
cd "/Library/Application Support/ZeroTier/One"
|
||||||
|
rm -rf node.log node.log.old root-topology shutdownIfUnreadable autoupdate.log updates.d
|
||||||
|
if [ ! -f authtoken.secret ]; then
|
||||||
|
head -c 4096 /dev/urandom | md5 | head -c 24 >authtoken.secret
|
||||||
|
chown root authtoken.secret
|
||||||
|
chgrp wheel authtoken.secret
|
||||||
|
chmod 0600 authtoken.secret
|
||||||
|
fi
|
||||||
|
rm -f zerotier-cli zerotier-idtool
|
||||||
|
ln -sf zerotier-one zerotier-cli
|
||||||
|
ln -sf zerotier-one zerotier-idtool
|
||||||
|
|
||||||
|
cd /usr/bin
|
||||||
|
rm -f zerotier-cli zerotier-idtool
|
||||||
|
ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" zerotier-cli
|
||||||
|
ln -sf "/Library/Application Support/ZeroTier/One/zerotier-one" zerotier-idtool
|
||||||
|
|
||||||
|
launchctl load /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||||
|
|
||||||
|
exit 0
|
26
ext/installfiles/mac/preinst.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||||
|
|
||||||
|
if [ -f /Library/LaunchDaemons/com.zerotier.one.plist ]; then
|
||||||
|
launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist >>/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
if [ -d "/Library/Application Support/ZeroTier/One" ]; then
|
||||||
|
cd "/Library/Application Support/ZeroTier/One"
|
||||||
|
if [ -f "zerotier-one.pid" ]; then
|
||||||
|
ztpid=`cat zerotier-one.pid`
|
||||||
|
if [ "$ztpid" -gt "0" ]; then
|
||||||
|
kill `cat zerotier-one.pid`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
cd "/Applications"
|
||||||
|
rm -rf "ZeroTier One.app"
|
||||||
|
|
||||||
|
exit 0
|
@ -0,0 +1,156 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<DOCUMENT Type="Advanced Installer" CreateVersion="12.0" version="12.0" Modules="enterprise" RootPath="." Language="en" Id="{4070644B-EC9F-4962-B14A-770B9E309DC3}">
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
||||||
|
<ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;AutorunComponent;MultipleInstancesComponent;MsiJavaComponent;MsiRegsComponent;MsiExtComponent;MsiAssemblyComponent;MsiServInstComponent;AnalyticsComponent;ActSyncAppComponent;MsiMergeModsComponent;MsiThemeComponent;BackgroundImagesComponent;DictionaryComponent;MsiEnvComponent;ScheduledTasksComponent;CPLAppletComponent;GameUxComponent;FirewallExceptionComponent;UserAccountsComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;SqlConnectionComponent;SharePointSlnComponent;SilverlightSlnComponent;MsiAppSearchComponent"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
||||||
|
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
||||||
|
<ROW Property="ALLUSERS" Value="1"/>
|
||||||
|
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
|
||||||
|
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
|
||||||
|
<ROW Property="ARPNOREPAIR" Value="1"/>
|
||||||
|
<ROW Property="ARPPRODUCTICON" Value="ZeroTierIcon.exe" Type="8"/>
|
||||||
|
<ROW Property="ARPSYSTEMCOMPONENT" Value="1"/>
|
||||||
|
<ROW Property="ARPURLINFOABOUT" Value="https://www.zerotier.com/"/>
|
||||||
|
<ROW Property="LIMITUI" MultiBuildValue="DefaultBuild:1"/>
|
||||||
|
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||||
|
<ROW Property="Manufacturer" Value="ZeroTier"/>
|
||||||
|
<ROW Property="ProductCode" Value="1033:{ABB757F3-6E5B-4FE7-A63A-29609D4D6016} " Type="16"/>
|
||||||
|
<ROW Property="ProductLanguage" Value="1033"/>
|
||||||
|
<ROW Property="ProductName" Value="ZeroTier One Virtual Network Port"/>
|
||||||
|
<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>
|
||||||
|
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
||||||
|
<ROW Property="UpgradeCode" Value="{88AA80DE-14CA-4443-B024-6EC13F3EDDAD}"/>
|
||||||
|
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows 2000, Windows 2000 Service Pack 1, Windows 2000 Service Pack 2, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows XP x86, Windows XP x86 Service Pack 1, Windows XP x86 Service Pack 2, Windows XP x86 Service Pack 3, Windows Server 2003 x86, Windows Server 2003 x86 Service Pack 1, Windows Server 2003 x86 Service Pack 2" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows XP x64, Windows XP x64 Service Pack 1, Windows XP x64 Service Pack 2, Windows Server 2003 x64, Windows Server 2003 x64 Service Pack 1, Windows Server 2003 x64 Service Pack 2" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows XP x64, Windows Server 2003 x64" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows 2000, Windows XP x86, Windows Server 2003 x86" ValueLocId="-"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
||||||
|
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
||||||
|
<ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
|
||||||
|
<ROW Directory="zttap300_Dir" Directory_Parent="APPDIR" DefaultDir="zttap300"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||||
|
<ROW Component="ProductInformation" ComponentId="{FFBF63D7-E03E-4ACA-966A-824C3DF6DEED}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||||
|
<ROW Component="zttap300.inf_2" ComponentId="{CB0C4519-617F-4DB5-9BF5-C6CFC6573F9C}" Directory_="zttap300_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zttap300.inf"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||||
|
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="ProductInformation"/>
|
||||||
|
<ROW Feature="zttap300" Feature_Parent="MainFeature" Title="zttap300" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="zttap300.inf_2"/>
|
||||||
|
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||||
|
<ROW File="zttap300.cat" Component_="zttap300.inf_2" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.cat" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.inf" Component_="zttap300.inf_2" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.inf" SelfReg="false" NextFile="zttap300.sys"/>
|
||||||
|
<ROW File="zttap300.sys" Component_="zttap300.inf_2" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.sys" SelfReg="false" NextFile="zttap300.cat"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
|
||||||
|
<ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="1" PackageFolder="..\..\.." PackageFileName="ZeroTierOne_NDIS6_x64" Languages="en" InstallationType="4" UseLargeSchema="true" MsiPackageType="x64"/>
|
||||||
|
<ATTRIBUTE name="CurrentBuild" value="DefaultBuild"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
||||||
|
<ROW Path="<AI_DICTS>ui.ail"/>
|
||||||
|
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
||||||
|
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="0" Thumbprint="2ad023dc7aa92bf4265b33852a2ed2406d2bee86 Subject: ZeroTier Networks LLC Issuer: DigiCert High Assurance Code Signing CA-1 Valid from 04/24/2015 to 04/01/2016"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
||||||
|
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
||||||
|
<ROW Fragment="FolderDlg.aip" Path="<AI_THEMES>classic\fragments\FolderDlg.aip"/>
|
||||||
|
<ROW Fragment="MaintenanceTypeDlg.aip" Path="<AI_THEMES>classic\fragments\MaintenanceTypeDlg.aip"/>
|
||||||
|
<ROW Fragment="MaintenanceWelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\MaintenanceWelcomeDlg.aip"/>
|
||||||
|
<ROW Fragment="SequenceDialogs.aip" Path="<AI_THEMES>classic\fragments\SequenceDialogs.aip"/>
|
||||||
|
<ROW Fragment="Sequences.aip" Path="<AI_FRAGS>Sequences.aip"/>
|
||||||
|
<ROW Fragment="StaticUIStrings.aip" Path="<AI_FRAGS>StaticUIStrings.aip"/>
|
||||||
|
<ROW Fragment="UI.aip" Path="<AI_THEMES>classic\fragments\UI.aip"/>
|
||||||
|
<ROW Fragment="Validation.aip" Path="<AI_FRAGS>Validation.aip"/>
|
||||||
|
<ROW Fragment="VerifyRemoveDlg.aip" Path="<AI_THEMES>classic\fragments\VerifyRemoveDlg.aip"/>
|
||||||
|
<ROW Fragment="VerifyRepairDlg.aip" Path="<AI_THEMES>classic\fragments\VerifyRepairDlg.aip"/>
|
||||||
|
<ROW Fragment="WelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\WelcomeDlg.aip"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
|
||||||
|
<ROW Name="aicustact.dll" SourcePath="<AI_CUSTACTS>aicustact.dll"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiConditionComponent">
|
||||||
|
<ROW Feature_="zttap300" Level="0" Condition="((VersionNT < 500) OR (NOT VersionNT))"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent">
|
||||||
|
<ROW Dialog_="WelcomeDlg" Control_="Next" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="1"/>
|
||||||
|
<ROW Dialog_="FolderDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL" Ordering="201"/>
|
||||||
|
<ROW Dialog_="FolderDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="197"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="201"/>
|
||||||
|
<ROW Dialog_="MaintenanceWelcomeDlg" Control_="Next" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="99"/>
|
||||||
|
<ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="101"/>
|
||||||
|
<ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="198"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="202"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="501"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceWelcomeDlg" Condition="AI_MAINT" Ordering="1"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="RemoveButton" Event="NewDialog" Argument="VerifyRemoveDlg" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="601"/>
|
||||||
|
<ROW Dialog_="VerifyRemoveDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="1"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="RepairButton" Event="NewDialog" Argument="VerifyRepairDlg" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="601"/>
|
||||||
|
<ROW Dialog_="VerifyRepairDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="1"/>
|
||||||
|
<ROW Dialog_="VerifyRepairDlg" Control_="Repair" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="399" Options="1"/>
|
||||||
|
<ROW Dialog_="VerifyRemoveDlg" Control_="Remove" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="299" Options="1"/>
|
||||||
|
<ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="201"/>
|
||||||
|
<ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
||||||
|
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
||||||
|
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
|
||||||
|
<ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
|
||||||
|
<ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
|
||||||
|
<ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
|
||||||
|
<ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
|
||||||
|
<ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
|
||||||
|
<ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
|
||||||
|
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[ProgramFiles64Folder][Manufacturer]\[ProductName]"/>
|
||||||
|
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
|
||||||
|
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDriverPackagesComponent">
|
||||||
|
<ROW InfFileName="zttap300.inf" Flags="6"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||||
|
<ROW Name="ZeroTierIcon.exe" SourcePath="..\..\..\artwork\ZeroTierIcon.ico" Index="0"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
|
||||||
|
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
||||||
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
|
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
|
||||||
|
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
||||||
|
<ROW Action="AI_ResolveKnownFolders" Sequence="51"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
||||||
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
|
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
|
||||||
|
<ROW Action="AI_DpiContentScale" Sequence="51"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
||||||
|
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel >= 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 2)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel >= 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 2)))) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel >= 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 2))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 3))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 4))) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 2))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 3))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 2))) OR VersionNT64) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent">
|
||||||
|
<ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
|
||||||
|
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
|
||||||
|
<ATTRIBUTE name="UsedTheme" value="classic"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent">
|
||||||
|
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="0.0.1" VersionMax="[|ProductVersion]" Attributes="257" ActionProperty="OLDPRODUCTS"/>
|
||||||
|
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
|
||||||
|
</COMPONENT>
|
||||||
|
</DOCUMENT>
|
@ -0,0 +1,157 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<DOCUMENT Type="Advanced Installer" CreateVersion="12.0" version="12.0" Modules="enterprise" RootPath="." Language="en" Id="{4070644B-EC9F-4962-B14A-770B9E309DC3}">
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
||||||
|
<ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;AutorunComponent;MultipleInstancesComponent;MsiJavaComponent;MsiRegsComponent;MsiExtComponent;MsiAssemblyComponent;MsiServInstComponent;AnalyticsComponent;ActSyncAppComponent;MsiMergeModsComponent;MsiThemeComponent;BackgroundImagesComponent;DictionaryComponent;MsiEnvComponent;ScheduledTasksComponent;CPLAppletComponent;GameUxComponent;FirewallExceptionComponent;UserAccountsComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;SqlConnectionComponent;SharePointSlnComponent;SilverlightSlnComponent;MsiAppSearchComponent"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
||||||
|
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
||||||
|
<ROW Property="ALLUSERS" Value="1"/>
|
||||||
|
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
|
||||||
|
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
|
||||||
|
<ROW Property="ARPNOREPAIR" Value="1"/>
|
||||||
|
<ROW Property="ARPPRODUCTICON" Value="ZeroTierIcon.exe" Type="8"/>
|
||||||
|
<ROW Property="ARPSYSTEMCOMPONENT" Value="1"/>
|
||||||
|
<ROW Property="ARPURLINFOABOUT" Value="https://www.zerotier.com/"/>
|
||||||
|
<ROW Property="AiFeatIcozttap300" Value="ZeroTierIcon.exe" Type="8"/>
|
||||||
|
<ROW Property="LIMITUI" MultiBuildValue="DefaultBuild:1"/>
|
||||||
|
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||||
|
<ROW Property="Manufacturer" Value="ZeroTier"/>
|
||||||
|
<ROW Property="ProductCode" Value="1033:{1B939799-6FE8-4379-A378-1D071825D2B5} " Type="16"/>
|
||||||
|
<ROW Property="ProductLanguage" Value="1033"/>
|
||||||
|
<ROW Property="ProductName" Value="ZeroTier One Virtual Network Port"/>
|
||||||
|
<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>
|
||||||
|
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
||||||
|
<ROW Property="UpgradeCode" Value="{88AA80DE-14CA-4443-B024-6EC13F3EDDAD}"/>
|
||||||
|
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows 2000, Windows 2000 Service Pack 1, Windows 2000 Service Pack 2, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows XP x86, Windows XP x86 Service Pack 1, Windows XP x86 Service Pack 2, Windows XP x86 Service Pack 3, Windows Server 2003 x86, Windows Server 2003 x86 Service Pack 1, Windows Server 2003 x86 Service Pack 2" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows XP x64, Windows XP x64 Service Pack 1, Windows XP x64 Service Pack 2, Windows Server 2003 x64, Windows Server 2003 x64 Service Pack 1, Windows Server 2003 x64 Service Pack 2" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows XP x64, Windows Server 2003 x64" ValueLocId="-"/>
|
||||||
|
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows 2000, Windows XP x86, Windows Server 2003 x86" ValueLocId="-"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
||||||
|
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
||||||
|
<ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
|
||||||
|
<ROW Directory="zttap300_Dir" Directory_Parent="APPDIR" DefaultDir="zttap300"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||||
|
<ROW Component="ProductInformation" ComponentId="{FFBF63D7-E03E-4ACA-966A-824C3DF6DEED}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||||
|
<ROW Component="zttap300.inf_1" ComponentId="{07119034-A51F-4871-B503-09D1340FF248}" Directory_="zttap300_Dir" Attributes="0" Condition="(VersionNT >= 500) AND NOT VersionNT64" KeyPath="zttap300.inf"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||||
|
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="ProductInformation"/>
|
||||||
|
<ROW Feature="zttap300" Feature_Parent="MainFeature" Title="zttap300" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="zttap300.inf_1"/>
|
||||||
|
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||||
|
<ROW File="zttap300.cat" Component_="zttap300.inf_1" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.cat" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.inf" Component_="zttap300.inf_1" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.inf" SelfReg="false" NextFile="zttap300.sys"/>
|
||||||
|
<ROW File="zttap300.sys" Component_="zttap300.inf_1" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.sys" SelfReg="false" NextFile="zttap300.cat"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
|
||||||
|
<ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="1" PackageFolder="..\..\.." PackageFileName="ZeroTierOne_NDIS6_x86" Languages="en" InstallationType="4" UseLargeSchema="true"/>
|
||||||
|
<ATTRIBUTE name="CurrentBuild" value="DefaultBuild"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
||||||
|
<ROW Path="<AI_DICTS>ui.ail"/>
|
||||||
|
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
||||||
|
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="0" Thumbprint="2ad023dc7aa92bf4265b33852a2ed2406d2bee86 Subject: ZeroTier Networks LLC Issuer: DigiCert High Assurance Code Signing CA-1 Valid from 04/24/2015 to 04/01/2016"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
||||||
|
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
||||||
|
<ROW Fragment="FolderDlg.aip" Path="<AI_THEMES>classic\fragments\FolderDlg.aip"/>
|
||||||
|
<ROW Fragment="MaintenanceTypeDlg.aip" Path="<AI_THEMES>classic\fragments\MaintenanceTypeDlg.aip"/>
|
||||||
|
<ROW Fragment="MaintenanceWelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\MaintenanceWelcomeDlg.aip"/>
|
||||||
|
<ROW Fragment="SequenceDialogs.aip" Path="<AI_THEMES>classic\fragments\SequenceDialogs.aip"/>
|
||||||
|
<ROW Fragment="Sequences.aip" Path="<AI_FRAGS>Sequences.aip"/>
|
||||||
|
<ROW Fragment="StaticUIStrings.aip" Path="<AI_FRAGS>StaticUIStrings.aip"/>
|
||||||
|
<ROW Fragment="UI.aip" Path="<AI_THEMES>classic\fragments\UI.aip"/>
|
||||||
|
<ROW Fragment="Validation.aip" Path="<AI_FRAGS>Validation.aip"/>
|
||||||
|
<ROW Fragment="VerifyRemoveDlg.aip" Path="<AI_THEMES>classic\fragments\VerifyRemoveDlg.aip"/>
|
||||||
|
<ROW Fragment="VerifyRepairDlg.aip" Path="<AI_THEMES>classic\fragments\VerifyRepairDlg.aip"/>
|
||||||
|
<ROW Fragment="WelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\WelcomeDlg.aip"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
|
||||||
|
<ROW Name="aicustact.dll" SourcePath="<AI_CUSTACTS>aicustact.dll"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiConditionComponent">
|
||||||
|
<ROW Feature_="zttap300" Level="0" Condition="((VersionNT < 500) OR (NOT VersionNT))"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent">
|
||||||
|
<ROW Dialog_="WelcomeDlg" Control_="Next" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="1"/>
|
||||||
|
<ROW Dialog_="FolderDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL" Ordering="201"/>
|
||||||
|
<ROW Dialog_="FolderDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="197"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="201"/>
|
||||||
|
<ROW Dialog_="MaintenanceWelcomeDlg" Control_="Next" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="99"/>
|
||||||
|
<ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="101"/>
|
||||||
|
<ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="198"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="202"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="501"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceWelcomeDlg" Condition="AI_MAINT" Ordering="1"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="RemoveButton" Event="NewDialog" Argument="VerifyRemoveDlg" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="601"/>
|
||||||
|
<ROW Dialog_="VerifyRemoveDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="1"/>
|
||||||
|
<ROW Dialog_="MaintenanceTypeDlg" Control_="RepairButton" Event="NewDialog" Argument="VerifyRepairDlg" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="601"/>
|
||||||
|
<ROW Dialog_="VerifyRepairDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="1"/>
|
||||||
|
<ROW Dialog_="VerifyRepairDlg" Control_="Repair" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="399" Options="1"/>
|
||||||
|
<ROW Dialog_="VerifyRemoveDlg" Control_="Remove" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="299" Options="1"/>
|
||||||
|
<ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="201"/>
|
||||||
|
<ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
|
||||||
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
||||||
|
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
||||||
|
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
|
||||||
|
<ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
|
||||||
|
<ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
|
||||||
|
<ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
|
||||||
|
<ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
|
||||||
|
<ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
|
||||||
|
<ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
|
||||||
|
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]"/>
|
||||||
|
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
|
||||||
|
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDriverPackagesComponent">
|
||||||
|
<ROW InfFileName="zttap300.inf" Flags="6"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||||
|
<ROW Name="ZeroTierIcon.exe" SourcePath="..\..\..\artwork\ZeroTierIcon.ico" Index="0"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
|
||||||
|
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
||||||
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
|
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
|
||||||
|
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
||||||
|
<ROW Action="AI_ResolveKnownFolders" Sequence="51"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
||||||
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
|
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
|
||||||
|
<ROW Action="AI_DpiContentScale" Sequence="51"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
||||||
|
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel >= 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 2)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel >= 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 2)))) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel >= 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 2))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 3))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 4))) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 2))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 3))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 2))) OR VersionNT64) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent">
|
||||||
|
<ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
|
||||||
|
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
|
||||||
|
<ATTRIBUTE name="UsedTheme" value="classic"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent">
|
||||||
|
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="0.0.1" VersionMax="[|ProductVersion]" Attributes="257" ActionProperty="OLDPRODUCTS"/>
|
||||||
|
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
|
||||||
|
</COMPONENT>
|
||||||
|
</DOCUMENT>
|
@ -1,41 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<DOCUMENT Type="Advanced Installer" CreateVersion="10.9" version="11.4.1" Modules="professional" RootPath="." Language="en" Id="{DC564647-6BF0-4550-87F4-89C938D0159C}">
|
<DOCUMENT Type="Advanced Installer" CreateVersion="10.9" version="12.1" Modules="enterprise" RootPath="." Language="en" Id="{DC564647-6BF0-4550-87F4-89C938D0159C}">
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
||||||
<ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;PreReqComponent;MsiMergeModsComponent;MsiRegsComponent;MsiExtComponent;MsiAssemblyComponent;ActSyncAppComponent;MsiThemeComponent;BackgroundImagesComponent;DictionaryComponent;MsiEnvComponent;CPLAppletComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;MsiAppSearchComponent"/>
|
<ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;AutorunComponent;MultipleInstancesComponent;MsiJavaComponent;MsiRegsComponent;MsiExtComponent;MsiAssemblyComponent;MsiDriverPackagesComponent;AnalyticsComponent;ActSyncAppComponent;MsiMergeModsComponent;MsiThemeComponent;BackgroundImagesComponent;DictionaryComponent;MsiEnvComponent;ScheduledTasksComponent;CPLAppletComponent;GameUxComponent;UserAccountsComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;SqlConnectionComponent;SharePointSlnComponent;SilverlightSlnComponent;MsiAppSearchComponent"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
||||||
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
||||||
|
<ROW Property="AI_EMBD_MSI_EXTR_PATH" Value="[TempFolder]" ValueLocId="-"/>
|
||||||
<ROW Property="AI_EXTERNALUIUNINSTALLERNAME" MultiBuildValue="DefaultBuild:aiui"/>
|
<ROW Property="AI_EXTERNALUIUNINSTALLERNAME" MultiBuildValue="DefaultBuild:aiui"/>
|
||||||
<ROW Property="AI_PRODUCTNAME_ARP" Value="ZeroTier One"/>
|
<ROW Property="AI_PRODUCTNAME_ARP" Value="ZeroTier One"/>
|
||||||
<ROW Property="AI_UNINSTALLER" Value="msiexec.exe"/>
|
<ROW Property="AI_UNINSTALLER" Value="msiexec.exe"/>
|
||||||
<ROW Property="ALLUSERS" Value="1"/>
|
<ROW Property="ALLUSERS" Value="1"/>
|
||||||
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]."/>
|
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]."/>
|
||||||
<ROW Property="ARPCONTACT" Value="contact@zerotier.com"/>
|
<ROW Property="ARPCONTACT" Value="contact@zerotier.com"/>
|
||||||
|
<ROW Property="ARPHELPLINK" Value="https://www.zerotier.com/"/>
|
||||||
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
|
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
|
||||||
<ROW Property="ARPNOREPAIR" Value="1"/>
|
<ROW Property="ARPNOREPAIR" Value="1"/>
|
||||||
<ROW Property="ARPPRODUCTICON" Value="zt1icon.exe" Type="8"/>
|
<ROW Property="ARPPRODUCTICON" Value="ZeroTierIcon.exe" Type="8"/>
|
||||||
<ROW Property="ARPSYSTEMCOMPONENT" Value="1"/>
|
<ROW Property="ARPSYSTEMCOMPONENT" Value="1"/>
|
||||||
<ROW Property="ARPURLINFOABOUT" Value="https://www.zerotier.com/"/>
|
<ROW Property="ARPURLINFOABOUT" Value="https://www.zerotier.com/"/>
|
||||||
<ROW Property="ARPURLUPDATEINFO" Value="https://www.zerotier.com/download.html"/>
|
<ROW Property="ARPURLUPDATEINFO" Value="https://www.zerotier.com/"/>
|
||||||
|
<ROW Property="AiFeatIcoZeroTierOne" Value="ZeroTierIcon.exe" Type="8"/>
|
||||||
<ROW Property="CTRLS" Value="2"/>
|
<ROW Property="CTRLS" Value="2"/>
|
||||||
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||||
<ROW Property="Manufacturer" Value="ZeroTier Networks"/>
|
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
|
||||||
<ROW Property="ProductCode" Value="1033:{64D81151-8C0A-435A-80A7-73767E96760B} " Type="16"/>
|
<ROW Property="ProductCode" Value="1033:{D0B06684-2CB3-4EA8-BC7F-FC24F2C6DA40} " Type="16"/>
|
||||||
<ROW Property="ProductLanguage" Value="1033"/>
|
<ROW Property="ProductLanguage" Value="1033"/>
|
||||||
<ROW Property="ProductName" Value="ZeroTier One"/>
|
<ROW Property="ProductName" Value="ZeroTier One"/>
|
||||||
<ROW Property="ProductVersion" Value="1.0.1" Type="32"/>
|
<ROW Property="ProductVersion" Value="1.0.3" Type="32"/>
|
||||||
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
||||||
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
|
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
|
||||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
||||||
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
|
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
|
||||||
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows 2000, Windows 2000 Service Pack 1, Windows 2000 Service Pack 2, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows XP x86, Windows XP x86 Service Pack 1, Windows XP x86 Service Pack 2, Windows XP x86 Service Pack 3, Windows Server 2003 x86, Windows Server 2003 x86 Service Pack 1, Windows Server 2003 x86 Service Pack 2, Windows Vista x86, Windows Vista x86 Service Pack 1, Windows Vista x86 Service Pack 2" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows 2000, Windows 2000 Service Pack 1, Windows 2000 Service Pack 2, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows XP x86, Windows XP x86 Service Pack 1, Windows XP x86 Service Pack 2, Windows XP x86 Service Pack 3, Windows Server 2003 x86, Windows Server 2003 x86 Service Pack 1, Windows Server 2003 x86 Service Pack 2" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows XP x64, Windows XP x64 Service Pack 1, Windows XP x64 Service Pack 2, Windows Server 2003 x64, Windows Server 2003 x64 Service Pack 1, Windows Server 2003 x64 Service Pack 2, Windows Vista x64, Windows Vista x64 Service Pack 1, Windows Vista x64 Service Pack 2" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows XP x64, Windows XP x64 Service Pack 1, Windows XP x64 Service Pack 2, Windows Server 2003 x64, Windows Server 2003 x64 Service Pack 1, Windows Server 2003 x64 Service Pack 2" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows XP x64, Windows Server 2003 x64, Windows Vista x64" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows XP x64, Windows Server 2003 x64" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows 2000, Windows XP x86, Windows Server 2003 x86, Windows Vista x86" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows 2000, Windows XP x86, Windows Server 2003 x86" ValueLocId="-"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
||||||
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
||||||
@ -48,7 +51,7 @@
|
|||||||
<ROW Directory="networks.d_Dir" Directory_Parent="One_Dir" DefaultDir="networks.d"/>
|
<ROW Directory="networks.d_Dir" Directory_Parent="One_Dir" DefaultDir="networks.d"/>
|
||||||
<ROW Directory="regid.201001.com.zerotier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID2~1.ZER|regid.2010-01.com.zerotier"/>
|
<ROW Directory="regid.201001.com.zerotier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID2~1.ZER|regid.2010-01.com.zerotier"/>
|
||||||
<ROW Directory="tapwindows_Dir" Directory_Parent="One_Dir" DefaultDir="TAP-WI~1|tap-windows"/>
|
<ROW Directory="tapwindows_Dir" Directory_Parent="One_Dir" DefaultDir="TAP-WI~1|tap-windows"/>
|
||||||
<ROW Directory="updates.d_Dir" Directory_Parent="One_Dir" DefaultDir="updates.d"/>
|
<ROW Directory="ui_Dir" Directory_Parent="One_Dir" DefaultDir="ui"/>
|
||||||
<ROW Directory="x64_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x64"/>
|
<ROW Directory="x64_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x64"/>
|
||||||
<ROW Directory="x86_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x86"/>
|
<ROW Directory="x86_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x86"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
@ -56,51 +59,71 @@
|
|||||||
<ROW Component="AI_CustomARPName" ComponentId="{1CA26B88-CA04-448B-8DF1-7848E80EC15D}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
<ROW Component="AI_CustomARPName" ComponentId="{1CA26B88-CA04-448B-8DF1-7848E80EC15D}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
||||||
<ROW Component="AI_DisableModify" ComponentId="{020DCABD-5D56-49B9-AF48-F07F0B55E590}" Directory_="APPDIR" Attributes="4" KeyPath="NoModify" Options="1"/>
|
<ROW Component="AI_DisableModify" ComponentId="{020DCABD-5D56-49B9-AF48-F07F0B55E590}" Directory_="APPDIR" Attributes="4" KeyPath="NoModify" Options="1"/>
|
||||||
<ROW Component="ProductInformation" ComponentId="{DB078D04-EA8E-4A7C-9001-89BAD932F9D9}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
<ROW Component="ProductInformation" ComponentId="{DB078D04-EA8E-4A7C-9001-89BAD932F9D9}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||||
<ROW Component="WdfCoinstaller01011.dll" ComponentId="{A417293D-AA26-447A-9A16-E0BCB2084CBA}" Directory_="x64_Dir" Attributes="256" Condition="VersionNT64" KeyPath="WdfCoinstaller01011.dll"/>
|
<ROW Component="WdfCoinstaller01011.dll" ComponentId="{2E3DD7BE-00C0-44A1-ABA9-6F0468FC9EAA}" Directory_="x64_Dir" Attributes="256" Condition="VersionNT64" KeyPath="WdfCoinstaller01011.dll"/>
|
||||||
<ROW Component="WdfCoinstaller01011.dll_1" ComponentId="{C629091A-4845-4BD8-9E49-3A051FDDBEF9}" Directory_="x86_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="WdfCoinstaller01011.dll_1"/>
|
<ROW Component="WdfCoinstaller01011.dll_1" ComponentId="{137E5A80-62C3-4B30-9900-131919675AC9}" Directory_="x86_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="WdfCoinstaller01011.dll_1"/>
|
||||||
<ROW Component="ZeroTierOne.exe" ComponentId="{18B51525-77BF-4FD9-9C18-A10D4CFC25BA}" Directory_="APPDIR" Attributes="0" KeyPath="ZeroTierOne.exe"/>
|
<ROW Component="ZeroTierOne.exe" ComponentId="{18B51525-77BF-4FD9-9C18-A10D4CFC25BA}" Directory_="APPDIR" Attributes="0" KeyPath="ZeroTierOne.exe"/>
|
||||||
<ROW Component="devcon_x64.exe" ComponentId="{0711ACF9-EEF5-48B0-95D7-8421B74AE314}" Directory_="One_Dir" Attributes="256" Condition="VersionNT64" KeyPath="devcon_x64.exe"/>
|
<ROW Component="devcon_x64.exe" ComponentId="{0711ACF9-EEF5-48B0-95D7-8421B74AE314}" Directory_="One_Dir" Attributes="256" Condition="VersionNT64" KeyPath="devcon_x64.exe"/>
|
||||||
<ROW Component="devcon_x86.exe" ComponentId="{335F6945-AC5D-40DD-B671-C9BA9C304623}" Directory_="One_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="devcon_x86.exe"/>
|
<ROW Component="devcon_x86.exe" ComponentId="{335F6945-AC5D-40DD-B671-C9BA9C304623}" Directory_="One_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="devcon_x86.exe"/>
|
||||||
|
<ROW Component="index.html" ComponentId="{24AB46DC-56EA-4F3C-A8B7-95957509CDD1}" Directory_="ui_Dir" Attributes="0" KeyPath="index.html" Type="0"/>
|
||||||
<ROW Component="networks.d" ComponentId="{EF54D0DF-889F-41DC-AF5C-4E7F96AB1C8B}" Directory_="networks.d_Dir" Attributes="0"/>
|
<ROW Component="networks.d" ComponentId="{EF54D0DF-889F-41DC-AF5C-4E7F96AB1C8B}" Directory_="networks.d_Dir" Attributes="0"/>
|
||||||
<ROW Component="regid.201001.com.zerotier" ComponentId="{A39C80FC-6A8F-454F-9052-10DAC3C3B139}" Directory_="regid.201001.com.zerotier_Dir" Attributes="0"/>
|
<ROW Component="regid.201001.com.zerotier" ComponentId="{A39C80FC-6A8F-454F-9052-10DAC3C3B139}" Directory_="regid.201001.com.zerotier_Dir" Attributes="0"/>
|
||||||
<ROW Component="updates.d" ComponentId="{E07A5480-3942-4529-A976-E7764542274C}" Directory_="updates.d_Dir" Attributes="0"/>
|
|
||||||
<ROW Component="zerotierone_x64.exe" ComponentId="{DFCFB72D-B055-4E60-B6D8-81FF585C2183}" Directory_="One_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zerotierone_x64.exe"/>
|
<ROW Component="zerotierone_x64.exe" ComponentId="{DFCFB72D-B055-4E60-B6D8-81FF585C2183}" Directory_="One_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zerotierone_x64.exe"/>
|
||||||
<ROW Component="zerotierone_x86.exe" ComponentId="{5D2F3366-4FE1-40A4-A81A-66C49FA11F1C}" Directory_="One_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="zerotierone_x86.exe"/>
|
<ROW Component="zerotierone_x86.exe" ComponentId="{5D2F3366-4FE1-40A4-A81A-66C49FA11F1C}" Directory_="One_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="zerotierone_x86.exe"/>
|
||||||
<ROW Component="zttap200.cat" ComponentId="{CCBE3FBA-1D6E-4486-914D-7444954DE12B}" Directory_="x64_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zttap200.cat" Type="0"/>
|
<ROW Component="zttap300.cat" ComponentId="{123CD683-FD99-4F0F-8F9B-0222DF409B09}" Directory_="x64_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zttap300.cat_2" Type="0"/>
|
||||||
<ROW Component="zttap200.cat_1" ComponentId="{BA0FB826-479C-46E8-AB2C-9017D40A99D8}" Directory_="x86_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="zttap200.cat_1" Type="0"/>
|
<ROW Component="zttap300.cat_1" ComponentId="{9F913E48-095B-4EA3-98DA-EDAB1593F3E3}" Directory_="x86_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="zttap300.cat_3" Type="0"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||||
<ROW Feature="ZeroTierOne" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify ProductInformation WdfCoinstaller01011.dll WdfCoinstaller01011.dll_1 ZeroTierOne.exe devcon_x64.exe devcon_x86.exe networks.d regid.201001.com.zerotier updates.d zerotierone_x64.exe zerotierone_x86.exe zttap200.cat zttap200.cat_1"/>
|
<ROW Feature="ZeroTierOne" Title="MainFeature" Description="ZeroTier One" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify ProductInformation WdfCoinstaller01011.dll WdfCoinstaller01011.dll_1 ZeroTierOne.exe devcon_x64.exe devcon_x86.exe index.html networks.d regid.201001.com.zerotier zerotierone_x64.exe zerotierone_x86.exe zttap300.cat zttap300.cat_1"/>
|
||||||
<ATTRIBUTE name="CurrentFeature" value="ZeroTierOne"/>
|
<ATTRIBUTE name="CurrentFeature" value="ZeroTierOne"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||||
<ROW File="WdfCoinstaller01011.dll" Component_="WdfCoinstaller01011.dll" FileName="WDFCOI~1.DLL|WdfCoinstaller01011.dll" Attributes="0" SourcePath="..\..\bin\tap-windows\x64\WdfCoinstaller01011.dll" SelfReg="false" NextFile="zttap200.cat"/>
|
<ROW File="WdfCoinstaller01011.dll" Component_="WdfCoinstaller01011.dll" FileName="WDFCOI~1.DLL|WdfCoinstaller01011.dll" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\WdfCoinstaller01011.dll" SelfReg="false" NextFile="WdfCoinstaller01011.dll_1"/>
|
||||||
<ROW File="WdfCoinstaller01011.dll_1" Component_="WdfCoinstaller01011.dll_1" FileName="WDFCOI~1.DLL|WdfCoinstaller01011.dll" Attributes="0" SourcePath="..\..\bin\tap-windows\x86\WdfCoinstaller01011.dll" SelfReg="false" NextFile="zttap200.cat_1"/>
|
<ROW File="WdfCoinstaller01011.dll_1" Component_="WdfCoinstaller01011.dll_1" FileName="WDFCOI~1.DLL|WdfCoinstaller01011.dll" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\WdfCoinstaller01011.dll" SelfReg="false" NextFile="zttap300.cat_2"/>
|
||||||
<ROW File="ZeroTierOne.exe" Component_="ZeroTierOne.exe" FileName="ZEROTI~1.EXE|ZeroTier One.exe" Attributes="0" SourcePath="..\..\..\build-ZeroTierUI-win32-release\release\ZeroTier One.exe" SelfReg="false" DigSign="true"/>
|
<ROW File="ZeroTierOne.exe" Component_="ZeroTierOne.exe" FileName="ZEROTI~1.EXE|ZeroTier One.exe" Attributes="0" SourcePath="..\..\bin\win-ui-wrapper\ZeroTier One.exe" SelfReg="false" NextFile="WdfCoinstaller01011.dll"/>
|
||||||
<ROW File="devcon_x64.exe" Component_="devcon_x64.exe" FileName="DEVCON~1.EXE|devcon_x64.exe" Attributes="0" SourcePath="..\..\bin\devcon\devcon_x64.exe" SelfReg="false" NextFile="devcon_x86.exe"/>
|
<ROW File="devcon_x64.exe" Component_="devcon_x64.exe" FileName="DEVCON~1.EXE|devcon_x64.exe" Attributes="0" SourcePath="..\..\bin\devcon\devcon_x64.exe" SelfReg="false" NextFile="devcon_x86.exe"/>
|
||||||
<ROW File="devcon_x86.exe" Component_="devcon_x86.exe" FileName="DEVCON~2.EXE|devcon_x86.exe" Attributes="0" SourcePath="..\..\bin\devcon\devcon_x86.exe" SelfReg="false" NextFile="zerotierone_x86.exe"/>
|
<ROW File="devcon_x86.exe" Component_="devcon_x86.exe" FileName="DEVCON~2.EXE|devcon_x86.exe" Attributes="0" SourcePath="..\..\bin\devcon\devcon_x86.exe" SelfReg="false" NextFile="zerotierone_x86.exe"/>
|
||||||
|
<ROW File="index.html" Component_="index.html" FileName="INDEX~1.HTM|index.html" Attributes="0" SourcePath="..\..\..\ui\index.html" SelfReg="false" NextFile="main.js"/>
|
||||||
|
<ROW File="main.js" Component_="index.html" FileName="main.js" Attributes="0" SourcePath="..\..\..\ui\main.js" SelfReg="false" NextFile="react.min.js"/>
|
||||||
|
<ROW File="react.min.js" Component_="index.html" FileName="REACTM~1.JS|react.min.js" Attributes="0" SourcePath="..\..\..\ui\react.min.js" SelfReg="false" NextFile="simpleajax.min.js"/>
|
||||||
|
<ROW File="simpleajax.min.js" Component_="index.html" FileName="SIMPLE~1.JS|simpleajax.min.js" Attributes="0" SourcePath="..\..\..\ui\simpleajax.min.js" SelfReg="false" NextFile="zerotier.css"/>
|
||||||
|
<ROW File="zerotier.css" Component_="index.html" FileName="zerotier.css" Attributes="0" SourcePath="..\..\..\ui\zerotier.css" SelfReg="false" NextFile="ztui.min.js"/>
|
||||||
<ROW File="zerotierone_x64.exe" Component_="zerotierone_x64.exe" FileName="ZEROTI~2.EXE|zerotier-one_x64.exe" Attributes="0" SourcePath="..\..\..\windows\Build\x64\Release\zerotier-one_x64.exe" SelfReg="false" NextFile="ZeroTierOne.exe" DigSign="true"/>
|
<ROW File="zerotierone_x64.exe" Component_="zerotierone_x64.exe" FileName="ZEROTI~2.EXE|zerotier-one_x64.exe" Attributes="0" SourcePath="..\..\..\windows\Build\x64\Release\zerotier-one_x64.exe" SelfReg="false" NextFile="ZeroTierOne.exe" DigSign="true"/>
|
||||||
<ROW File="zerotierone_x86.exe" Component_="zerotierone_x86.exe" FileName="ZEROTI~1.EXE|zerotier-one_x86.exe" Attributes="0" SourcePath="..\..\..\windows\Build\Win32\Release\zerotier-one_x86.exe" SelfReg="false" NextFile="zerotierone_x64.exe" DigSign="true"/>
|
<ROW File="zerotierone_x86.exe" Component_="zerotierone_x86.exe" FileName="ZEROTI~1.EXE|zerotier-one_x86.exe" Attributes="0" SourcePath="..\..\..\windows\Build\Win32\Release\zerotier-one_x86.exe" SelfReg="false" NextFile="zerotierone_x64.exe" DigSign="true"/>
|
||||||
<ROW File="zttap200.cat" Component_="zttap200.cat" FileName="zttap200.cat" Attributes="0" SourcePath="..\..\bin\tap-windows\x64\zttap200.cat" SelfReg="false" NextFile="zttap200.inf"/>
|
<ROW File="zttap300.cat_2" Component_="zttap300.cat" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.cat" SelfReg="false" NextFile="zttap300.sys_2"/>
|
||||||
<ROW File="zttap200.cat_1" Component_="zttap200.cat_1" FileName="zttap200.cat" Attributes="0" SourcePath="..\..\bin\tap-windows\x86\zttap200.cat" SelfReg="false" NextFile="zttap200.inf_1"/>
|
<ROW File="zttap300.cat_3" Component_="zttap300.cat_1" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.cat" SelfReg="false" NextFile="zttap300.sys_3"/>
|
||||||
<ROW File="zttap200.inf" Component_="zttap200.cat" FileName="zttap200.inf" Attributes="0" SourcePath="..\..\bin\tap-windows\x64\zttap200.inf" SelfReg="false" NextFile="zttap200.sys"/>
|
<ROW File="zttap300.inf" Component_="zttap300.cat" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.inf" SelfReg="false" NextFile="zttap300.cat_3"/>
|
||||||
<ROW File="zttap200.inf_1" Component_="zttap200.cat_1" FileName="zttap200.inf" Attributes="0" SourcePath="..\..\bin\tap-windows\x86\zttap200.inf" SelfReg="false" NextFile="zttap200.sys_1"/>
|
<ROW File="zttap300.inf_1" Component_="zttap300.cat_1" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.inf" SelfReg="false" NextFile="index.html"/>
|
||||||
<ROW File="zttap200.sys" Component_="zttap200.cat" FileName="zttap200.sys" Attributes="0" SourcePath="..\..\bin\tap-windows\x64\zttap200.sys" SelfReg="false" NextFile="WdfCoinstaller01011.dll_1"/>
|
<ROW File="zttap300.sys_2" Component_="zttap300.cat" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.sys" SelfReg="false" NextFile="zttap300.inf"/>
|
||||||
<ROW File="zttap200.sys_1" Component_="zttap200.cat_1" FileName="zttap200.sys" Attributes="0" SourcePath="..\..\bin\tap-windows\x86\zttap200.sys" SelfReg="false" NextFile="devcon_x64.exe"/>
|
<ROW File="zttap300.sys_3" Component_="zttap300.cat_1" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.sys" SelfReg="false" NextFile="zttap300.inf_1"/>
|
||||||
|
<ROW File="ztui.min.js" Component_="index.html" FileName="ZTUIMI~1.JS|ztui.min.js" Attributes="0" SourcePath="..\..\..\ui\ztui.min.js" SelfReg="false"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
|
||||||
<ROW BuildKey="DefaultBuild" BuildName="MSI" BuildOrder="1" BuildType="0" PackageFolder="..\..\..\windows\Build" PackageFileName="ZeroTier One" Languages="en" InstallationType="4" ExtUI="true" UseLargeSchema="true"/>
|
<ROW BuildKey="DefaultBuild" BuildName="MSI" BuildOrder="1" BuildType="1" PackageFolder="..\..\.." PackageFileName="ZeroTier One" Languages="en" InstallationType="4" ExtUI="true" UseLargeSchema="true"/>
|
||||||
<ATTRIBUTE name="CurrentBuild" value="DefaultBuild"/>
|
<ATTRIBUTE name="CurrentBuild" value="DefaultBuild"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.CacheComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.CacheComponent">
|
||||||
<ATTRIBUTE name="Enable" value="false"/>
|
<ATTRIBUTE name="Enable" value="false"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.ChainedPackageComponent">
|
||||||
|
<ROW ChainedPackage="ZeroTierOne_NDIS6_x64.msi" Order="1" Options="108" InstallCondition="((NOT Installed) AND (VersionNT64))" RemoveCondition="((REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE) AND (VersionNT64))"/>
|
||||||
|
<ROW ChainedPackage="ZeroTierOne_NDIS6_x86.msi" Order="2" Options="108" InstallCondition="((NOT Installed) AND (NOT VersionNT64))" RemoveCondition="((REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE) AND (NOT VersionNT64))"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.ChainedPackageFileComponent">
|
||||||
|
<ROW FileId="ZeroTierOne_NDIS6_x64.msi" ChainedPackage="ZeroTierOne_NDIS6_x64.msi" Options="1" TargetPath="ZeroTierOne_NDIS6_x64.msi" Content="..\..\bin\tap-windows-ndis6\x64\ZeroTierOne_NDIS6_x64.msi"/>
|
||||||
|
<ROW FileId="ZeroTierOne_NDIS6_x86.msi" ChainedPackage="ZeroTierOne_NDIS6_x86.msi" Options="1" TargetPath="ZeroTierOne_NDIS6_x86.msi" Content="..\..\bin\tap-windows-ndis6\x86\ZeroTierOne_NDIS6_x86.msi"/>
|
||||||
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
||||||
<ROW Path="<AI_DICTS>ui.ail"/>
|
<ROW Path="<AI_DICTS>ui.ail"/>
|
||||||
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
||||||
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="ZeroTier One" SignOptions="7" SignTool="0" Thumbprint="5809bb3255b4f32dd93619c1cf26a7df6c282a89 Subject: ZeroTier Networks LLC Issuer: DigiCert High Assurance Code Signing CA-1 Valid from 12/23/2013 to 02/02/2015"/>
|
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="ZeroTier One" DescriptionUrl="https://www.zerotier.com/" SignOptions="7" SignTool="0" Thumbprint="2ad023dc7aa92bf4265b33852a2ed2406d2bee86 Subject: ZeroTier Networks LLC Issuer: DigiCert High Assurance Code Signing CA-1 Valid from 04/24/2015 to 04/01/2016"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.FirewallExceptionComponent">
|
||||||
|
<ROW FirewallException="ZeroTierOne" DisplayName="ZeroTier One (UDP_9993)" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="1" Profiles="7" Port="9993" Protocol="UDP"/>
|
||||||
|
<ROW FirewallException="ZeroTierOneService_x64" DisplayName="ZeroTier One (Service_x64)" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="((?zerotierone_x64.exe=2) AND ($zerotierone_x64.exe=3))" Profiles="7" AppPath="[#zerotierone_x64.exe]" Protocol="ANY"/>
|
||||||
|
<ROW FirewallException="ZeroTierOneService_x86" DisplayName="ZeroTier One (Service_x86)" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="((?zerotierone_x86.exe=2) AND ($zerotierone_x86.exe=3))" Profiles="7" AppPath="[#zerotierone_x86.exe]" Protocol="ANY"/>
|
||||||
|
<ROW FirewallException="ZeroTierOneTCP_9993" DisplayName="ZeroTier One (TCP_9993)" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="1" Profiles="7" Port="9993" Protocol="TCP"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
||||||
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
||||||
@ -116,6 +139,11 @@
|
|||||||
<ROW Fragment="WelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\WelcomeDlg.aip"/>
|
<ROW Fragment="WelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\WelcomeDlg.aip"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiActionTextComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiActionTextComponent">
|
||||||
|
<ROW Action="AI_FwConfig" Description="Executing Windows Firewall configurations" Template="Configuring Windows Firewall rule: "[1]"" DescriptionLocId="ActionText.Description.AI_FwConfig" TemplateLocId="ActionText.Template.AI_FwConfig"/>
|
||||||
|
<ROW Action="AI_FwInstall" Description="Generating actions to configure Windows Firewall" DescriptionLocId="ActionText.Description.AI_FwInstall"/>
|
||||||
|
<ROW Action="AI_FwRemove" Description="Executing Windows Firewall configurations" Template="Configuring Windows Firewall rule: "[1]"" DescriptionLocId="ActionText.Description.AI_FwRemove" TemplateLocId="ActionText.Template.AI_FwRemove"/>
|
||||||
|
<ROW Action="AI_FwRollback" Description="Rolling back Windows Firewall configurations." Template="Rolling back Windows Firewall configurations." DescriptionLocId="ActionText.Description.AI_FwRollback" TemplateLocId="ActionText.Template.AI_FwRollback"/>
|
||||||
|
<ROW Action="AI_FwUninstall" Description="Generating actions to configure Windows Firewall" DescriptionLocId="ActionText.Description.AI_FwUninstall"/>
|
||||||
<ROW Action="AI_XmlCommit" Description="Committing XML file configurations." Template="Committing XML file configurations." DescriptionLocId="ActionText.Description.AI_XmlCommit" TemplateLocId="ActionText.Template.AI_XmlCommit"/>
|
<ROW Action="AI_XmlCommit" Description="Committing XML file configurations." Template="Committing XML file configurations." DescriptionLocId="ActionText.Description.AI_XmlCommit" TemplateLocId="ActionText.Template.AI_XmlCommit"/>
|
||||||
<ROW Action="AI_XmlConfig" Description="Executing XML file configurations" Template="Configuring XML file: "[1]"" DescriptionLocId="ActionText.Description.AI_XmlConfig" TemplateLocId="ActionText.Template.AI_XmlConfig"/>
|
<ROW Action="AI_XmlConfig" Description="Executing XML file configurations" Template="Configuring XML file: "[1]"" DescriptionLocId="ActionText.Description.AI_XmlConfig" TemplateLocId="ActionText.Template.AI_XmlConfig"/>
|
||||||
<ROW Action="AI_XmlInstall" Description="Generating actions to configure XML files" DescriptionLocId="ActionText.Description.AI_XmlInstall"/>
|
<ROW Action="AI_XmlInstall" Description="Generating actions to configure XML files" DescriptionLocId="ActionText.Description.AI_XmlInstall"/>
|
||||||
@ -125,8 +153,11 @@
|
|||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
|
||||||
<ROW Name="ExternalUICleaner.dll" SourcePath="<AI_CUSTACTS>ExternalUICleaner.dll"/>
|
<ROW Name="ExternalUICleaner.dll" SourcePath="<AI_CUSTACTS>ExternalUICleaner.dll"/>
|
||||||
|
<ROW Name="NetFirewall.dll" SourcePath="<AI_CUSTACTS>NetFirewall.dll"/>
|
||||||
<ROW Name="ShortcutFlags.dll" SourcePath="<AI_CUSTACTS>ShortcutFlags.dll"/>
|
<ROW Name="ShortcutFlags.dll" SourcePath="<AI_CUSTACTS>ShortcutFlags.dll"/>
|
||||||
<ROW Name="aicustact.dll" SourcePath="<AI_CUSTACTS>aicustact.dll"/>
|
<ROW Name="aicustact.dll" SourcePath="<AI_CUSTACTS>aicustact.dll"/>
|
||||||
|
<ROW Name="chainersupport.dll" SourcePath="<AI_CUSTACTS>chainersupport.dll"/>
|
||||||
|
<ROW Name="msichainer.exe" SourcePath="<AI_CUSTACTS>msichainer.exe"/>
|
||||||
<ROW Name="xmlCfg.dll" SourcePath="<AI_CUSTACTS>xmlCfg.dll"/>
|
<ROW Name="xmlCfg.dll" SourcePath="<AI_CUSTACTS>xmlCfg.dll"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlComponent">
|
||||||
@ -163,27 +194,35 @@
|
|||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
||||||
<ROW Directory_="networks.d_Dir" Component_="networks.d" ManualDelete="false"/>
|
<ROW Directory_="networks.d_Dir" Component_="networks.d" ManualDelete="false"/>
|
||||||
<ROW Directory_="updates.d_Dir" Component_="updates.d" ManualDelete="false"/>
|
|
||||||
<ROW Directory_="regid.201001.com.zerotier_Dir" Component_="regid.201001.com.zerotier" ManualDelete="false"/>
|
<ROW Directory_="regid.201001.com.zerotier_Dir" Component_="regid.201001.com.zerotier" ManualDelete="false"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
||||||
<ROW Action="AI_ApplyShortcutFlags" Type="3073" Source="ShortcutFlags.dll" Target="UpdateShortcutFlags" WithoutSeq="true"/>
|
<ROW Action="AI_ApplyShortcutFlags" Type="3073" Source="ShortcutFlags.dll" Target="UpdateShortcutFlags" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
|
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
|
||||||
|
<ROW Action="AI_CommitChainers" Type="11841" Source="chainersupport.dll" Target="CommitChainedPackages" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_DATA_SETTER" Type="51" Source="CustomActionData" Target="[~]"/>
|
<ROW Action="AI_DATA_SETTER" Type="51" Source="CustomActionData" Target="[~]"/>
|
||||||
<ROW Action="AI_DATA_SETTER_1" Type="51" Source="CustomActionData" Target="[~]"/>
|
<ROW Action="AI_DATA_SETTER_1" Type="51" Source="CustomActionData" Target="[~]"/>
|
||||||
<ROW Action="AI_DATA_SETTER_2" Type="51" Source="MakeSureServiceIsStopped" Target="ZeroTierOneService"/>
|
<ROW Action="AI_DATA_SETTER_3" Type="51" Source="CustomActionData" Target="[~]"/>
|
||||||
|
<ROW Action="AI_DATA_SETTER_4" Type="51" Source="CustomActionData" Target="[~]"/>
|
||||||
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
||||||
<ROW Action="AI_DoRemoveExternalUIStub" Type="3585" Source="ExternalUICleaner.dll" Target="DoRemoveExternalUIStub" WithoutSeq="true"/>
|
<ROW Action="AI_DoRemoveExternalUIStub" Type="3585" Source="ExternalUICleaner.dll" Target="DoRemoveExternalUIStub" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
|
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
|
||||||
|
<ROW Action="AI_FwConfig" Type="11265" Source="NetFirewall.dll" Target="OnFwConfig" WithoutSeq="true"/>
|
||||||
|
<ROW Action="AI_FwInstall" Type="1" Source="NetFirewall.dll" Target="OnFwInstall" AdditionalSeq="AI_DATA_SETTER_3"/>
|
||||||
|
<ROW Action="AI_FwRemove" Type="11265" Source="NetFirewall.dll" Target="OnFwRemove" WithoutSeq="true"/>
|
||||||
|
<ROW Action="AI_FwRollback" Type="11521" Source="NetFirewall.dll" Target="OnFwRollback" WithoutSeq="true"/>
|
||||||
|
<ROW Action="AI_FwUninstall" Type="1" Source="NetFirewall.dll" Target="OnFwUninstall" AdditionalSeq="AI_DATA_SETTER_4"/>
|
||||||
<ROW Action="AI_GetArpIconPath" Type="1" Source="aicustact.dll" Target="GetArpIconPath"/>
|
<ROW Action="AI_GetArpIconPath" Type="1" Source="aicustact.dll" Target="GetArpIconPath"/>
|
||||||
<ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
|
<ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_LaunchApp" Type="1" Source="aicustact.dll" Target="[#ZeroTierOne.exe]"/>
|
<ROW Action="AI_LaunchApp" Type="1" Source="aicustact.dll" Target="[#ZeroTierOne.exe]"/>
|
||||||
<ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
|
<ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
|
||||||
|
<ROW Action="AI_PrepareChainers" Type="1" Source="chainersupport.dll" Target="PrepareChainedPackages"/>
|
||||||
<ROW Action="AI_PrepareShortcutFlags" Type="1" Source="ShortcutFlags.dll" Target="PrepareActionData"/>
|
<ROW Action="AI_PrepareShortcutFlags" Type="1" Source="ShortcutFlags.dll" Target="PrepareActionData"/>
|
||||||
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH" Target="[AI_SETUPEXEPATH_ORIGINAL]"/>
|
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH" Target="[AI_SETUPEXEPATH_ORIGINAL]"/>
|
||||||
<ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
|
<ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
|
||||||
<ROW Action="AI_RemoveExternalUIStub" Type="1" Source="ExternalUICleaner.dll" Target="RemoveExternalUIStub"/>
|
<ROW Action="AI_RemoveExternalUIStub" Type="1" Source="ExternalUICleaner.dll" Target="RemoveExternalUIStub"/>
|
||||||
<ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
|
<ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
|
||||||
|
<ROW Action="AI_RollbackChainers" Type="11585" Source="chainersupport.dll" Target="RollbackChainedPackages" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
|
<ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
|
<ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
|
||||||
<ROW Action="AI_XmlCommit" Type="11777" Source="xmlCfg.dll" Target="OnXmlCommit" WithoutSeq="true"/>
|
<ROW Action="AI_XmlCommit" Type="11777" Source="xmlCfg.dll" Target="OnXmlCommit" WithoutSeq="true"/>
|
||||||
@ -192,38 +231,43 @@
|
|||||||
<ROW Action="AI_XmlRemove" Type="11265" Source="xmlCfg.dll" Target="OnXmlRemove" WithoutSeq="true"/>
|
<ROW Action="AI_XmlRemove" Type="11265" Source="xmlCfg.dll" Target="OnXmlRemove" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_XmlRollback" Type="11521" Source="xmlCfg.dll" Target="OnXmlRollback" WithoutSeq="true"/>
|
<ROW Action="AI_XmlRollback" Type="11521" Source="xmlCfg.dll" Target="OnXmlRollback" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_XmlUninstall" Type="1" Source="xmlCfg.dll" Target="OnXmlUninstall" AdditionalSeq="AI_DATA_SETTER_1"/>
|
<ROW Action="AI_XmlUninstall" Type="1" Source="xmlCfg.dll" Target="OnXmlUninstall" AdditionalSeq="AI_DATA_SETTER_1"/>
|
||||||
<ROW Action="MakeSureServiceIsStopped" Type="3137" Source="aicustact.dll" Target="StopWinService" Options="1" AdditionalSeq="AI_DATA_SETTER_2"/>
|
|
||||||
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[ProgramFilesFolder]ZeroTier\One"/>
|
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[ProgramFilesFolder]ZeroTier\One"/>
|
||||||
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]" MultiBuildTarget="DefaultBuild:[ProgramMenuFolder]"/>
|
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]" MultiBuildTarget="DefaultBuild:[ProgramMenuFolder]"/>
|
||||||
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
|
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
|
||||||
<ROW Action="TapDeviceRemove32" Type="3154" Source="devcon_x86.exe" Target="remove zttap200"/>
|
<ROW Action="TapDeviceRemove32_NDIS5" Type="3154" Source="devcon_x86.exe" Target="remove zttap200"/>
|
||||||
<ROW Action="TapDeviceRemove64" Type="3154" Source="devcon_x64.exe" Target="remove zttap200"/>
|
<ROW Action="TapDeviceRemove32_NDIS6" Type="3154" Source="devcon_x86.exe" Target="remove zttap300"/>
|
||||||
<ROW Action="TapDriverInstall32" Type="3602" Source="zerotierone_x86.exe" Target="-D"/>
|
<ROW Action="TapDeviceRemove64_NDIS5" Type="3154" Source="devcon_x64.exe" Target="remove zttap200"/>
|
||||||
<ROW Action="TapDriverInstall64" Type="3602" Source="zerotierone_x64.exe" Target="-D"/>
|
<ROW Action="TapDeviceRemove64_NDIS6" Type="3154" Source="devcon_x64.exe" Target="remove zttap300"/>
|
||||||
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiEmbeddedChainerComponent">
|
||||||
|
<ROW MsiEmbeddedChainer="msichainer.exe" Condition="VersionMsi >= "4.05"" CommandLine="[AI_CHAINER_CMD_LINE]" Source="msichainer.exe" Type="2"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||||
<ROW Name="zt1icon.exe" SourcePath="..\..\..\ZeroTierUI\zt1icon.ico" Index="0"/>
|
<ROW Name="ZeroTierIcon.exe" SourcePath="..\..\..\artwork\ZeroTierIcon.ico" Index="0"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
|
||||||
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
||||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1504"/>
|
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1502"/>
|
||||||
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
||||||
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
|
<ROW Action="AI_ResolveKnownFolders" Sequence="51"/>
|
||||||
<ROW Action="AI_PrepareShortcutFlags" Condition="(VersionNT > 501) AND ((NOT Installed) OR (Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove")))" Sequence="4501"/>
|
<ROW Action="AI_PrepareShortcutFlags" Condition="(VersionNT > 501) AND ((NOT Installed) OR (Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove")))" Sequence="4501"/>
|
||||||
<ROW Action="AI_XmlInstall" Condition="(REMOVE <> "ALL")" Sequence="5102"/>
|
<ROW Action="AI_XmlInstall" Condition="(REMOVE <> "ALL")" Sequence="5102"/>
|
||||||
<ROW Action="AI_DATA_SETTER" Condition="(REMOVE <> "ALL")" Sequence="5101"/>
|
<ROW Action="AI_DATA_SETTER" Condition="(REMOVE <> "ALL")" Sequence="5101"/>
|
||||||
<ROW Action="AI_XmlUninstall" Condition="(REMOVE)" Sequence="3102"/>
|
<ROW Action="AI_XmlUninstall" Condition="(REMOVE)" Sequence="3102"/>
|
||||||
<ROW Action="AI_DATA_SETTER_1" Condition="(REMOVE)" Sequence="3101"/>
|
<ROW Action="AI_DATA_SETTER_1" Condition="(REMOVE)" Sequence="3101"/>
|
||||||
<ROW Action="InstallFinalize" Sequence="6596" SeqType="0" MsiKey="InstallFinalize"/>
|
<ROW Action="InstallFinalize" Sequence="6596" SeqType="0" MsiKey="InstallFinalize"/>
|
||||||
<ROW Action="TapDriverInstall64" Condition="( NOT Installed AND NOT OLDPRODUCTS ) AND ( VersionNT64 )" Sequence="6401"/>
|
|
||||||
<ROW Action="TapDeviceRemove64" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE ) AND ( VersionNT64 )" Sequence="1601"/>
|
|
||||||
<ROW Action="TapDeviceRemove32" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE ) AND ( NOT VersionNT64 )" Sequence="1602"/>
|
|
||||||
<ROW Action="TapDriverInstall32" Condition="( NOT Installed AND NOT OLDPRODUCTS ) AND ( NOT VersionNT64 )" Sequence="6402"/>
|
|
||||||
<ROW Action="MakeSureServiceIsStopped" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE )" Sequence="1503"/>
|
|
||||||
<ROW Action="AI_DATA_SETTER_2" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE )" Sequence="1502"/>
|
|
||||||
<ROW Action="AI_GetArpIconPath" Sequence="51"/>
|
|
||||||
<ROW Action="AI_RemoveExternalUIStub" Condition="(REMOVE="ALL") AND ((VersionNT > 500) OR((VersionNT = 500) AND (ServicePackLevel >= 4)))" Sequence="1501"/>
|
<ROW Action="AI_RemoveExternalUIStub" Condition="(REMOVE="ALL") AND ((VersionNT > 500) OR((VersionNT = 500) AND (ServicePackLevel >= 4)))" Sequence="1501"/>
|
||||||
|
<ROW Action="AI_GetArpIconPath" Sequence="1401"/>
|
||||||
|
<ROW Action="TapDeviceRemove32_NDIS6" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE ) AND ( NOT VersionNT64 )" Sequence="1602"/>
|
||||||
|
<ROW Action="TapDeviceRemove64_NDIS6" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE ) AND ( VersionNT64 )" Sequence="1604"/>
|
||||||
|
<ROW Action="TapDeviceRemove32_NDIS5" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE ) AND ( NOT VersionNT64 )" Sequence="1601"/>
|
||||||
|
<ROW Action="TapDeviceRemove64_NDIS5" Condition="( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) AND NOT UPGRADINGPRODUCTCODE ) AND ( VersionNT64 )" Sequence="1603"/>
|
||||||
|
<ROW Action="AI_PrepareChainers" Condition="VersionMsi >= "4.05"" Sequence="5851"/>
|
||||||
|
<ROW Action="AI_FwInstall" Condition="(VersionNT >= 501) AND (REMOVE <> "ALL")" Sequence="5802"/>
|
||||||
|
<ROW Action="AI_DATA_SETTER_3" Condition="(VersionNT >= 501) AND (REMOVE <> "ALL")" Sequence="5801"/>
|
||||||
|
<ROW Action="AI_FwUninstall" Condition="(VersionNT >= 501) AND (REMOVE="ALL")" Sequence="1702"/>
|
||||||
|
<ROW Action="AI_DATA_SETTER_4" Condition="(VersionNT >= 501) AND (REMOVE="ALL")" Sequence="1701"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
||||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
@ -234,8 +278,8 @@
|
|||||||
<ROW Action="ExecuteAction" Sequence="1299" SeqType="0" MsiKey="ExecuteAction"/>
|
<ROW Action="ExecuteAction" Sequence="1299" SeqType="0" MsiKey="ExecuteAction"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
||||||
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel >= 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 2)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel >= 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 2)))) AND ((VersionNT64 <> 600) OR (((VersionNT64 = 600) AND (ServicePackLevel >= 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 600) OR (((VersionNT64 = 600) AND (ServicePackLevel <> 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 600) OR (((VersionNT64 = 600) AND (ServicePackLevel <> 2)) OR (MsiNTProductType <> 1))) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel >= 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 1)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR (((VersionNT64 = 502) AND (ServicePackLevel <> 2)) OR (MsiNTProductType <> 1))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel >= 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 1)))) AND ((VersionNT64 <> 502) OR ((VersionNT64 = 502) AND ((MsiNTProductType = 1) OR (ServicePackLevel <> 2)))) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel >= 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 2))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 3))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 4))) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 2))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 3))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 2))) OR VersionNT64) AND (((VersionNT <> 600) OR (((VersionNT = 600) AND (ServicePackLevel >= 1)) OR (MsiNTProductType <> 1))) OR VersionNT64) AND (((VersionNT <> 600) OR (((VersionNT = 600) AND (ServicePackLevel <> 1)) OR (MsiNTProductType <> 1))) OR VersionNT64) AND (((VersionNT <> 600) OR (((VersionNT = 600) AND (ServicePackLevel <> 2)) OR (MsiNTProductType <> 1))) OR VersionNT64) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel >= 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 1))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 2))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 3))) AND ((VersionNT <> 500) OR ((VersionNT = 500) AND (ServicePackLevel <> 4))) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 2))) OR VersionNT64) AND (((VersionNT <> 501) OR ((VersionNT = 501) AND (ServicePackLevel <> 3))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel >= 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 1))) OR VersionNT64) AND (((VersionNT <> 502) OR ((VersionNT = 502) AND (ServicePackLevel <> 2))) OR VersionNT64) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]" DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
@ -263,15 +307,15 @@
|
|||||||
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#7" Component_="AI_CustomARPName"/>
|
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#7" Component_="AI_CustomARPName"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiServCtrlComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiServCtrlComponent">
|
||||||
<ROW ServiceControl="zerotierone_x64.exe" Name="ZeroTierOneService" Event="161" Wait="1" Component_="zerotierone_x64.exe"/>
|
<ROW ServiceControl="zerotierone_x64.exe" Name="ZeroTierOneService" Event="163" Wait="1" Component_="zerotierone_x64.exe"/>
|
||||||
<ROW ServiceControl="zerotierone_x86.exe" Name="ZeroTierOneService" Event="161" Wait="1" Component_="zerotierone_x86.exe"/>
|
<ROW ServiceControl="zerotierone_x86.exe" Name="ZeroTierOneService" Event="163" Wait="1" Component_="zerotierone_x86.exe"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiServInstComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiServInstComponent">
|
||||||
<ROW ServiceInstall="zerotierone_x64.exe" Name="ZeroTierOneService" DisplayName="ZeroTier One" ServiceType="16" StartType="2" ErrorControl="32769" Component_="zerotierone_x64.exe" Description="Ethernet Virtualization Service"/>
|
<ROW ServiceInstall="zerotierone_x64.exe" Name="ZeroTierOneService" DisplayName="ZeroTier One" ServiceType="16" StartType="2" ErrorControl="32769" Component_="zerotierone_x64.exe" Description="Ethernet Virtualization Service"/>
|
||||||
<ROW ServiceInstall="zerotierone_x86.exe" Name="ZeroTierOneService" DisplayName="ZeroTier One" ServiceType="16" StartType="2" ErrorControl="32769" Component_="zerotierone_x86.exe" Description="Ethernet Virtualization Service"/>
|
<ROW ServiceInstall="zerotierone_x86.exe" Name="ZeroTierOneService" DisplayName="ZeroTier One" ServiceType="16" StartType="2" ErrorControl="32769" Component_="zerotierone_x86.exe" Description="Ethernet Virtualization Service"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiShortsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiShortsComponent">
|
||||||
<ROW Shortcut="ZeroTierOne" Directory_="ProgramMenuFolder" Name="ZEROTI~1|ZeroTier One" Component_="ZeroTierOne.exe" Target="[#ZeroTierOne.exe]" Description="Ethernet Virtualization Control Panel" Hotkey="0" Icon_="zt1icon.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR" CustomFlags="1"/>
|
<ROW Shortcut="ZeroTierOne" Directory_="ProgramMenuFolder" Name="ZEROTI~1|ZeroTier One" Component_="ZeroTierOne.exe" Target="[#ZeroTierOne.exe]" Description="Ethernet Virtualization Control Panel" Hotkey="0" Icon_="ZeroTierIcon.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR" CustomFlags="1"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
|
||||||
<ATTRIBUTE name="UsedTheme" value="classic"/>
|
<ATTRIBUTE name="UsedTheme" value="classic"/>
|
||||||
@ -291,14 +335,14 @@
|
|||||||
<ROW XmlAttribute="xsischemaLocation" XmlElement="swidsoftware_identification_tag" Name="xsi:schemaLocation" Flags="14" Order="3" Value="http://standards.iso.org/iso/19770/-2/2008/schema.xsd software_identification_tag.xsd"/>
|
<ROW XmlAttribute="xsischemaLocation" XmlElement="swidsoftware_identification_tag" Name="xsi:schemaLocation" Flags="14" Order="3" Value="http://standards.iso.org/iso/19770/-2/2008/schema.xsd software_identification_tag.xsd"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
|
||||||
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Order="2" Flags="14" Text="1"/>
|
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Order="2" Flags="14" Text="3"/>
|
||||||
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Order="0" Flags="14" Text="false"/>
|
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Order="0" Flags="14" Text="false"/>
|
||||||
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Order="0" Flags="14" Text="1"/>
|
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Order="0" Flags="14" Text="1"/>
|
||||||
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Order="1" Flags="14" Text="0"/>
|
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Order="1" Flags="14" Text="0"/>
|
||||||
<ROW XmlElement="swidname" ParentElement="swidproduct_version" Name="swid:name" Order="0" Flags="14" Text="[ProductVersion]"/>
|
<ROW XmlElement="swidname" ParentElement="swidproduct_version" Name="swid:name" Order="0" Flags="14" Text="[ProductVersion]"/>
|
||||||
<ROW XmlElement="swidname_1" ParentElement="swidsoftware_creator" Name="swid:name" Order="0" Flags="14" Text="ZeroTier Networks LLC"/>
|
<ROW XmlElement="swidname_1" ParentElement="swidsoftware_creator" Name="swid:name" Order="0" Flags="14" Text="ZeroTier, Inc."/>
|
||||||
<ROW XmlElement="swidname_2" ParentElement="swidsoftware_licensor" Name="swid:name" Order="0" Flags="14" Text="ZeroTier Networks LLC"/>
|
<ROW XmlElement="swidname_2" ParentElement="swidsoftware_licensor" Name="swid:name" Order="0" Flags="14" Text="ZeroTier, Inc."/>
|
||||||
<ROW XmlElement="swidname_3" ParentElement="swidtag_creator" Name="swid:name" Order="0" Flags="14" Text="ZeroTier Networks LLC"/>
|
<ROW XmlElement="swidname_3" ParentElement="swidtag_creator" Name="swid:name" Order="0" Flags="14" Text="ZeroTier, Inc."/>
|
||||||
<ROW XmlElement="swidnumeric" ParentElement="swidproduct_version" Name="swid:numeric" Order="1" Flags="14"/>
|
<ROW XmlElement="swidnumeric" ParentElement="swidproduct_version" Name="swid:numeric" Order="1" Flags="14"/>
|
||||||
<ROW XmlElement="swidproduct_title" ParentElement="swidsoftware_identification_tag" Name="swid:product_title" Order="1" Flags="14" Text="[ProductName]"/>
|
<ROW XmlElement="swidproduct_title" ParentElement="swidsoftware_identification_tag" Name="swid:product_title" Order="1" Flags="14" Text="[ProductName]"/>
|
||||||
<ROW XmlElement="swidproduct_version" ParentElement="swidsoftware_identification_tag" Name="swid:product_version" Order="2" Flags="14"/>
|
<ROW XmlElement="swidproduct_version" ParentElement="swidsoftware_identification_tag" Name="swid:product_version" Order="2" Flags="14"/>
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
<?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>BuildMachineOSBuild</key>
|
||||||
|
<string>14D136</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>ZeroTier One</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>ZeroTierIcon</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.zerotier.ZeroTier-One</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>ZeroTier One</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>DTCompiler</key>
|
||||||
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||||
|
<key>DTPlatformBuild</key>
|
||||||
|
<string>6D1002</string>
|
||||||
|
<key>DTPlatformVersion</key>
|
||||||
|
<string>GM</string>
|
||||||
|
<key>DTSDKBuild</key>
|
||||||
|
<string>14D125</string>
|
||||||
|
<key>DTSDKName</key>
|
||||||
|
<string>macosx10.10</string>
|
||||||
|
<key>DTXcode</key>
|
||||||
|
<string>0631</string>
|
||||||
|
<key>DTXcodeBuild</key>
|
||||||
|
<string>6D1002</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.utilities</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.7</string>
|
||||||
|
<key>NSMainNibFile</key>
|
||||||
|
<string>MainMenu</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
BIN
ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/MacOS/ZeroTier One
Executable file
@ -0,0 +1 @@
|
|||||||
|
APPL????
|
@ -0,0 +1,13 @@
|
|||||||
|
{\rtf1\ansi\ansicpg1252\cocoartf1347\cocoasubrtf570
|
||||||
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\vieww9600\viewh8400\viewkind0
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||||
|
|
||||||
|
\f0\b\fs24 \cf0 (c)2011-2015 ZeroTier, Inc.\
|
||||||
|
Licensed under the GNU GPLv3\
|
||||||
|
\
|
||||||
|
UI Wrapper MacGap (c) Twitter, Inc.\
|
||||||
|
Licensed under the MIT License\
|
||||||
|
http://macgap.com/\
|
||||||
|
}
|
BIN
ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/en.lproj/MainMenu.nib
generated
Normal file
BIN
ext/mac-ui-macgap1-wrapper/bin/ZeroTier One.app/Contents/Resources/en.lproj/Window.nib
generated
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<?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>files</key>
|
||||||
|
<dict>
|
||||||
|
<key>Resources/ZeroTierIcon.icns</key>
|
||||||
|
<data>
|
||||||
|
c0nINjNjYDIqCTiZLGdiX/EfUHY=
|
||||||
|
</data>
|
||||||
|
<key>Resources/en.lproj/Credits.rtf</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
ePttkAH2X1GJ6OL0UhDBAktxB3Y=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/en.lproj/InfoPlist.strings</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
MiLKDDnrUKr4EmuvhS5VQwxHGK8=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/en.lproj/MainMenu.nib</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
w39AcLl09V6R06zh3yafl7/Epns=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/en.lproj/Window.nib</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
42zB9+COYMmPW0WlnU1juN2B9SA=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>files2</key>
|
||||||
|
<dict>
|
||||||
|
<key>Resources/ZeroTierIcon.icns</key>
|
||||||
|
<data>
|
||||||
|
c0nINjNjYDIqCTiZLGdiX/EfUHY=
|
||||||
|
</data>
|
||||||
|
<key>Resources/en.lproj/Credits.rtf</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
ePttkAH2X1GJ6OL0UhDBAktxB3Y=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/en.lproj/InfoPlist.strings</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
MiLKDDnrUKr4EmuvhS5VQwxHGK8=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/en.lproj/MainMenu.nib</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
w39AcLl09V6R06zh3yafl7/Epns=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/en.lproj/Window.nib</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
42zB9+COYMmPW0WlnU1juN2B9SA=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>rules</key>
|
||||||
|
<dict>
|
||||||
|
<key>^Resources/</key>
|
||||||
|
<true/>
|
||||||
|
<key>^Resources/.*\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1100</real>
|
||||||
|
</dict>
|
||||||
|
<key>^version.plist$</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>rules2</key>
|
||||||
|
<dict>
|
||||||
|
<key>.*\.dSYM($|/)</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>11</real>
|
||||||
|
</dict>
|
||||||
|
<key>^(.*/)?\.DS_Store$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>2000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||||
|
<dict>
|
||||||
|
<key>nested</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>10</real>
|
||||||
|
</dict>
|
||||||
|
<key>^.*</key>
|
||||||
|
<true/>
|
||||||
|
<key>^Info\.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^PkgInfo$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1100</real>
|
||||||
|
</dict>
|
||||||
|
<key>^[^/]+$</key>
|
||||||
|
<dict>
|
||||||
|
<key>nested</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>10</real>
|
||||||
|
</dict>
|
||||||
|
<key>^embedded\.provisionprofile$</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^version\.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -19,7 +19,7 @@
|
|||||||
88C0646014BDE10A00E4BCE2 /* Window.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C0645F14BDE10A00E4BCE2 /* Window.m */; };
|
88C0646014BDE10A00E4BCE2 /* Window.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C0645F14BDE10A00E4BCE2 /* Window.m */; };
|
||||||
88C0646614BDEC5800E4BCE2 /* Window.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88C0646414BDEC5800E4BCE2 /* Window.xib */; };
|
88C0646614BDEC5800E4BCE2 /* Window.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88C0646414BDEC5800E4BCE2 /* Window.xib */; };
|
||||||
88C0646D14BDF6A600E4BCE2 /* WindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C0646C14BDF6A600E4BCE2 /* WindowController.m */; };
|
88C0646D14BDF6A600E4BCE2 /* WindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C0646C14BDF6A600E4BCE2 /* WindowController.m */; };
|
||||||
C13A649D1AFB171100CB31FE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C13A649C1AFB171100CB31FE /* Images.xcassets */; };
|
C14EFCA71B0986AF00894B5F /* ZeroTierIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = C14EFCA61B0986AF00894B5F /* ZeroTierIcon.icns */; };
|
||||||
C1C2B9911AFB0CF10060D7C2 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1C2B9901AFB0CF10060D7C2 /* Security.framework */; };
|
C1C2B9911AFB0CF10060D7C2 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1C2B9901AFB0CF10060D7C2 /* Security.framework */; };
|
||||||
F2B80016179E0FC100B069A8 /* Clipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = F2B80015179E0FC100B069A8 /* Clipboard.m */; };
|
F2B80016179E0FC100B069A8 /* Clipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = F2B80015179E0FC100B069A8 /* Clipboard.m */; };
|
||||||
FA32509D14BA813600BF0781 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA32509C14BA813600BF0781 /* WebKit.framework */; };
|
FA32509D14BA813600BF0781 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA32509C14BA813600BF0781 /* WebKit.framework */; };
|
||||||
@ -30,8 +30,6 @@
|
|||||||
FA3250D514BA860800BF0781 /* Dock.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3250CB14BA860800BF0781 /* Dock.m */; };
|
FA3250D514BA860800BF0781 /* Dock.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3250CB14BA860800BF0781 /* Dock.m */; };
|
||||||
FA3250D914BA860800BF0781 /* Path.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3250CF14BA860800BF0781 /* Path.m */; };
|
FA3250D914BA860800BF0781 /* Path.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3250CF14BA860800BF0781 /* Path.m */; };
|
||||||
FA3250DB14BA860800BF0781 /* Sound.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3250D114BA860800BF0781 /* Sound.m */; };
|
FA3250DB14BA860800BF0781 /* Sound.m in Sources */ = {isa = PBXBuildFile; fileRef = FA3250D114BA860800BF0781 /* Sound.m */; };
|
||||||
FA3250E514BA883A00BF0781 /* public in Resources */ = {isa = PBXBuildFile; fileRef = FA3250E414BA883A00BF0781 /* public */; };
|
|
||||||
FA3250E714BA8BCE00BF0781 /* application.icns in Resources */ = {isa = PBXBuildFile; fileRef = FA3250E614BA8BCE00BF0781 /* application.icns */; };
|
|
||||||
FA3F7742168F70790027B324 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA3F7741168F70780027B324 /* Cocoa.framework */; };
|
FA3F7742168F70790027B324 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA3F7741168F70780027B324 /* Cocoa.framework */; };
|
||||||
FAE451C914BA79C600190544 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = FAE451C714BA79C600190544 /* InfoPlist.strings */; };
|
FAE451C914BA79C600190544 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = FAE451C714BA79C600190544 /* InfoPlist.strings */; };
|
||||||
FAE451CB14BA79C600190544 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FAE451CA14BA79C600190544 /* main.m */; };
|
FAE451CB14BA79C600190544 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FAE451CA14BA79C600190544 /* main.m */; };
|
||||||
@ -75,7 +73,7 @@
|
|||||||
88C0646514BDEC5800E4BCE2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Window.xib; sourceTree = "<group>"; };
|
88C0646514BDEC5800E4BCE2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/Window.xib; sourceTree = "<group>"; };
|
||||||
88C0646B14BDF6A600E4BCE2 /* WindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowController.h; sourceTree = "<group>"; };
|
88C0646B14BDF6A600E4BCE2 /* WindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowController.h; sourceTree = "<group>"; };
|
||||||
88C0646C14BDF6A600E4BCE2 /* WindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WindowController.m; sourceTree = "<group>"; };
|
88C0646C14BDF6A600E4BCE2 /* WindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WindowController.m; sourceTree = "<group>"; };
|
||||||
C13A649C1AFB171100CB31FE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
C14EFCA61B0986AF00894B5F /* ZeroTierIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = ZeroTierIcon.icns; path = ../../../../artwork/ZeroTierIcon.icns; sourceTree = "<group>"; };
|
||||||
C1C2B9901AFB0CF10060D7C2 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
C1C2B9901AFB0CF10060D7C2 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||||
F2B80014179E0FC100B069A8 /* Clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clipboard.h; sourceTree = "<group>"; };
|
F2B80014179E0FC100B069A8 /* Clipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clipboard.h; sourceTree = "<group>"; };
|
||||||
F2B80015179E0FC100B069A8 /* Clipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Clipboard.m; sourceTree = "<group>"; };
|
F2B80015179E0FC100B069A8 /* Clipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Clipboard.m; sourceTree = "<group>"; };
|
||||||
@ -95,8 +93,6 @@
|
|||||||
FA3250CF14BA860800BF0781 /* Path.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = Path.m; path = Classes/Commands/Path.m; sourceTree = "<group>"; };
|
FA3250CF14BA860800BF0781 /* Path.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = Path.m; path = Classes/Commands/Path.m; sourceTree = "<group>"; };
|
||||||
FA3250D014BA860800BF0781 /* Sound.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Sound.h; path = Classes/Commands/Sound.h; sourceTree = "<group>"; };
|
FA3250D014BA860800BF0781 /* Sound.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Sound.h; path = Classes/Commands/Sound.h; sourceTree = "<group>"; };
|
||||||
FA3250D114BA860800BF0781 /* Sound.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = Sound.m; path = Classes/Commands/Sound.m; sourceTree = "<group>"; };
|
FA3250D114BA860800BF0781 /* Sound.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = Sound.m; path = Classes/Commands/Sound.m; sourceTree = "<group>"; };
|
||||||
FA3250E414BA883A00BF0781 /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
|
|
||||||
FA3250E614BA8BCE00BF0781 /* application.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = application.icns; sourceTree = SOURCE_ROOT; };
|
|
||||||
FA3F7741168F70780027B324 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
|
FA3F7741168F70780027B324 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
FAE451BA14BA79C600190544 /* ZeroTier One.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ZeroTier One.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
FAE451BA14BA79C600190544 /* ZeroTier One.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ZeroTier One.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
FAE451BE14BA79C600190544 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
FAE451BE14BA79C600190544 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||||
@ -184,7 +180,6 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
FA3F7741168F70780027B324 /* Cocoa.framework */,
|
FA3F7741168F70780027B324 /* Cocoa.framework */,
|
||||||
FA3250E414BA883A00BF0781 /* public */,
|
|
||||||
FAE451C414BA79C600190544 /* MacGap */,
|
FAE451C414BA79C600190544 /* MacGap */,
|
||||||
FAE451BD14BA79C600190544 /* Frameworks */,
|
FAE451BD14BA79C600190544 /* Frameworks */,
|
||||||
FAE451BB14BA79C600190544 /* Products */,
|
FAE451BB14BA79C600190544 /* Products */,
|
||||||
@ -227,9 +222,9 @@
|
|||||||
FA3250E014BA87B800BF0781 /* Classes */,
|
FA3250E014BA87B800BF0781 /* Classes */,
|
||||||
FAE451D014BA79C600190544 /* AppDelegate.h */,
|
FAE451D014BA79C600190544 /* AppDelegate.h */,
|
||||||
FAE451D114BA79C600190544 /* AppDelegate.m */,
|
FAE451D114BA79C600190544 /* AppDelegate.m */,
|
||||||
|
C14EFCA61B0986AF00894B5F /* ZeroTierIcon.icns */,
|
||||||
FAE451D314BA79C600190544 /* MainMenu.xib */,
|
FAE451D314BA79C600190544 /* MainMenu.xib */,
|
||||||
88C0646414BDEC5800E4BCE2 /* Window.xib */,
|
88C0646414BDEC5800E4BCE2 /* Window.xib */,
|
||||||
C13A649C1AFB171100CB31FE /* Images.xcassets */,
|
|
||||||
FAE451C514BA79C600190544 /* Supporting Files */,
|
FAE451C514BA79C600190544 /* Supporting Files */,
|
||||||
);
|
);
|
||||||
path = MacGap;
|
path = MacGap;
|
||||||
@ -238,7 +233,6 @@
|
|||||||
FAE451C514BA79C600190544 /* Supporting Files */ = {
|
FAE451C514BA79C600190544 /* Supporting Files */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
FA3250E614BA8BCE00BF0781 /* application.icns */,
|
|
||||||
FAE451C614BA79C600190544 /* MacGap-Info.plist */,
|
FAE451C614BA79C600190544 /* MacGap-Info.plist */,
|
||||||
FAE451C714BA79C600190544 /* InfoPlist.strings */,
|
FAE451C714BA79C600190544 /* InfoPlist.strings */,
|
||||||
FAE451CA14BA79C600190544 /* main.m */,
|
FAE451CA14BA79C600190544 /* main.m */,
|
||||||
@ -300,12 +294,10 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
FA3250E514BA883A00BF0781 /* public in Resources */,
|
C14EFCA71B0986AF00894B5F /* ZeroTierIcon.icns in Resources */,
|
||||||
FAE451C914BA79C600190544 /* InfoPlist.strings in Resources */,
|
FAE451C914BA79C600190544 /* InfoPlist.strings in Resources */,
|
||||||
C13A649D1AFB171100CB31FE /* Images.xcassets in Resources */,
|
|
||||||
FAE451CF14BA79C600190544 /* Credits.rtf in Resources */,
|
FAE451CF14BA79C600190544 /* Credits.rtf in Resources */,
|
||||||
FAE451D514BA79C600190544 /* MainMenu.xib in Resources */,
|
FAE451D514BA79C600190544 /* MainMenu.xib in Resources */,
|
||||||
FA3250E714BA8BCE00BF0781 /* application.icns in Resources */,
|
|
||||||
88C0646614BDEC5800E4BCE2 /* Window.xib in Resources */,
|
88C0646614BDEC5800E4BCE2 /* Window.xib in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@ -430,7 +422,6 @@
|
|||||||
FAE451D914BA79C600190544 /* Debug */ = {
|
FAE451D914BA79C600190544 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||||
CLANG_CXX_LIBRARY = "compiler-default";
|
CLANG_CXX_LIBRARY = "compiler-default";
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
@ -452,7 +443,6 @@
|
|||||||
FAE451DA14BA79C600190544 /* Release */ = {
|
FAE451DA14BA79C600190544 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
|
||||||
CLANG_CXX_LIBRARY = "compiler-default";
|
CLANG_CXX_LIBRARY = "compiler-default";
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
<string>http://adam.ierymenko@git.int.zerotier.com/zerotier/zerotierone</string>
|
<string>http://adam.ierymenko@git.int.zerotier.com/zerotier/zerotierone</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>IDESourceControlProjectPath</key>
|
<key>IDESourceControlProjectPath</key>
|
||||||
<string>ext/mac-ui-macgap1-wrapper/MacGap.xcodeproj</string>
|
<string>ext/mac-ui-macgap1-wrapper/src/MacGap.xcodeproj</string>
|
||||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>ABA3617E9F0148F844A82502F0D808DE6591AA97</key>
|
<key>ABA3617E9F0148F844A82502F0D808DE6591AA97</key>
|
||||||
<string>../../../..</string>
|
<string>../../../../..</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>IDESourceControlProjectURL</key>
|
<key>IDESourceControlProjectURL</key>
|
||||||
<string>http://adam.ierymenko@git.int.zerotier.com/zerotier/zerotierone</string>
|
<string>http://adam.ierymenko@git.int.zerotier.com/zerotier/zerotierone</string>
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"idiom" : "mac",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "16x16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "16x16",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "application16x16.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "32x32",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "application32x32.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "mac",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "32x32"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "128x128",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "application128x128.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "mac",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "128x128"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "256x256",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "application256x256.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "mac",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "256x256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "512x512",
|
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "application512x512.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "mac",
|
|
||||||
"scale" : "2x",
|
|
||||||
"size" : "512x512"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 56 KiB |
@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>ZeroTierIcon</string>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
||||||
<data>
|
<data>
|
||||||
<int key="IBDocument.SystemTarget">1080</int>
|
<int key="IBDocument.SystemTarget">1070</int>
|
||||||
<string key="IBDocument.SystemVersion">14D136</string>
|
<string key="IBDocument.SystemVersion">14D136</string>
|
||||||
<string key="IBDocument.InterfaceBuilderVersion">7702</string>
|
<string key="IBDocument.InterfaceBuilderVersion">7702</string>
|
||||||
<string key="IBDocument.AppKitVersion">1347.57</string>
|
<string key="IBDocument.AppKitVersion">1347.57</string>
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>MacGap</title>
|
|
||||||
<style type="text/css" media="screen">
|
|
||||||
html, body {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
background: #FFF;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
color: #E0E0E0;
|
|
||||||
margin: 18% 0;
|
|
||||||
text-align: center;
|
|
||||||
font-family: helvetica;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8">
|
|
||||||
macgap.notice.notify({title: 'MacGap', content: 'Hello World'});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<h1>MacGap</h1>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -723,14 +723,14 @@ typedef int (*ZT1_DataStorePutFunction)(ZT1_Node *,void *,const char *,const voi
|
|||||||
/**
|
/**
|
||||||
* Function to send a ZeroTier packet out over the wire
|
* Function to send a ZeroTier packet out over the wire
|
||||||
*
|
*
|
||||||
* Parameters: (1) node, (2) user ptr, (3) address, (4) link desperation,
|
* Parameters: (1) node, (2) user ptr, (3) address, (4) packet data,
|
||||||
* (5) packet data, (6) packet data length.
|
* (5) packet data length.
|
||||||
*
|
*
|
||||||
* The function must return zero on success and may return any error code
|
* The function must return zero on success and may return any error code
|
||||||
* on failure. Note that success does not (of course) guarantee packet
|
* on failure. Note that success does not (of course) guarantee packet
|
||||||
* delivery. It only means that the packet appears to have been sent.
|
* delivery. It only means that the packet appears to have been sent.
|
||||||
*/
|
*/
|
||||||
typedef int (*ZT1_WirePacketSendFunction)(ZT1_Node *,void *,const struct sockaddr_storage *,unsigned int,const void *,unsigned int);
|
typedef int (*ZT1_WirePacketSendFunction)(ZT1_Node *,void *,const struct sockaddr_storage *,const void *,unsigned int);
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* C Node API */
|
/* C Node API */
|
||||||
@ -780,7 +780,6 @@ void ZT1_Node_delete(ZT1_Node *node);
|
|||||||
* @param node Node instance
|
* @param node Node instance
|
||||||
* @param now Current clock in milliseconds
|
* @param now Current clock in milliseconds
|
||||||
* @param remoteAddress Origin of packet
|
* @param remoteAddress Origin of packet
|
||||||
* @param linkDesperation Link desperation metric for link or protocol over which packet arrived
|
|
||||||
* @param packetData Packet data
|
* @param packetData Packet data
|
||||||
* @param packetLength Packet length
|
* @param packetLength Packet length
|
||||||
* @param nextBackgroundTaskDeadline Value/result: set to deadline for next call to processBackgroundTasks()
|
* @param nextBackgroundTaskDeadline Value/result: set to deadline for next call to processBackgroundTasks()
|
||||||
@ -790,7 +789,6 @@ enum ZT1_ResultCode ZT1_Node_processWirePacket(
|
|||||||
ZT1_Node *node,
|
ZT1_Node *node,
|
||||||
uint64_t now,
|
uint64_t now,
|
||||||
const struct sockaddr_storage *remoteAddress,
|
const struct sockaddr_storage *remoteAddress,
|
||||||
unsigned int linkDesperation,
|
|
||||||
const void *packetData,
|
const void *packetData,
|
||||||
unsigned int packetLength,
|
unsigned int packetLength,
|
||||||
volatile uint64_t *nextBackgroundTaskDeadline);
|
volatile uint64_t *nextBackgroundTaskDeadline);
|
||||||
|
46
make-mac.mk
@ -8,16 +8,14 @@ ARCH_FLAGS=-arch x86_64
|
|||||||
|
|
||||||
include objects.mk
|
include objects.mk
|
||||||
OBJS+=osdep/OSXEthernetTap.o
|
OBJS+=osdep/OSXEthernetTap.o
|
||||||
#TESTNET_OBJS=testnet/SimNet.o testnet/SimNetSocketManager.o testnet/TestEthernetTap.o
|
|
||||||
|
|
||||||
# Disable codesign since open source users will not have ZeroTier's certs
|
# Disable codesign since open source users will not have ZeroTier's certs
|
||||||
CODESIGN=echo
|
CODESIGN=echo
|
||||||
CODESIGN_CERT=
|
CODESIGN_CERT=
|
||||||
|
|
||||||
|
# For internal use only -- signs everything with ZeroTier's developer cert
|
||||||
ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
ifeq ($(ZT_OFFICIAL_RELEASE),1)
|
||||||
# For use by ZeroTier Networks -- sign with developer cert
|
DEFS+=-DZT_OFFICIAL_RELEASE -DZT_AUTO_UPDATE
|
||||||
ZT_AUTO_UPDATE=1
|
|
||||||
DEFS+=-DZT_OFFICIAL_RELEASE
|
|
||||||
CODESIGN=codesign
|
CODESIGN=codesign
|
||||||
CODESIGN_CERT="Developer ID Application: ZeroTier Networks LLC (8ZD9JUCZ4V)"
|
CODESIGN_CERT="Developer ID Application: ZeroTier Networks LLC (8ZD9JUCZ4V)"
|
||||||
endif
|
endif
|
||||||
@ -36,6 +34,7 @@ endif
|
|||||||
# Enable SSE-optimized Salsa20 -- all Intel macs support SSE2
|
# Enable SSE-optimized Salsa20 -- all Intel macs support SSE2
|
||||||
DEFS+=-DZT_SALSA20_SSE
|
DEFS+=-DZT_SALSA20_SSE
|
||||||
|
|
||||||
|
# Debug mode -- dump trace output, build binary with -g
|
||||||
ifeq ($(ZT_DEBUG),1)
|
ifeq ($(ZT_DEBUG),1)
|
||||||
DEFS+=-DZT_TRACE
|
DEFS+=-DZT_TRACE
|
||||||
CFLAGS=-Wall -g -pthread $(INCLUDES) $(DEFS)
|
CFLAGS=-Wall -g -pthread $(INCLUDES) $(DEFS)
|
||||||
@ -57,43 +56,28 @@ one: $(OBJS) one.o
|
|||||||
$(STRIP) zerotier-one
|
$(STRIP) zerotier-one
|
||||||
ln -sf zerotier-one zerotier-idtool
|
ln -sf zerotier-one zerotier-idtool
|
||||||
ln -sf zerotier-one zerotier-cli
|
ln -sf zerotier-one zerotier-cli
|
||||||
|
$(CODESIGN) -f -s $(CODESIGN_CERT) zerotier-one
|
||||||
|
$(CODESIGN) -vvv zerotier-one
|
||||||
|
|
||||||
selftest: $(OBJS) selftest.o
|
selftest: $(OBJS) selftest.o
|
||||||
$(CXX) $(CXXFLAGS) -o zerotier-selftest selftest.o $(OBJS) $(LIBS)
|
$(CXX) $(CXXFLAGS) -o zerotier-selftest selftest.o $(OBJS) $(LIBS)
|
||||||
$(STRIP) zerotier-selftest
|
$(STRIP) zerotier-selftest
|
||||||
|
|
||||||
#testnet: $(TESTNET_OBJS) $(OBJS) testnet.o
|
# Requires Packages: http://s.sudre.free.fr/Software/Packages/about.html
|
||||||
# $(CXX) $(CXXFLAGS) -o zerotier-testnet testnet.o $(OBJS) $(TESTNET_OBJS) $(LIBS)
|
mac-dist-pkg: FORCE
|
||||||
# $(STRIP) zerotier-testnet
|
cd ext/installfiles/mac ; packagesbuild "ZeroTier One.pkgproj"
|
||||||
|
$(CODESIGN) -f -s $(CODESIGN_CERT) "ZeroTier One.pkg"
|
||||||
|
$(CODESIGN) -vvv "ZeroTier One.pkg"
|
||||||
|
|
||||||
# Requires that ../Qt be symlinked to the Qt root to use for UI build
|
# For internal use only
|
||||||
#mac-ui: FORCE
|
official: FORCE
|
||||||
# mkdir -p build-ZeroTierUI-release
|
make clean
|
||||||
# cd build-ZeroTierUI-release ; ../../Qt/bin/qmake ../ZeroTierUI/ZeroTierUI.pro ; make -j 4
|
make -j 4 ZT_OFFICIAL_RELEASE=1
|
||||||
# strip "build-ZeroTierUI-release/ZeroTier One.app/Contents/MacOS/ZeroTier One"
|
make ZT_OFFICIAL_RELEASE=1 mac-dist-pkg
|
||||||
# find "build-ZeroTierUI-release/ZeroTier One.app" -type f -name '.DS_Store' -print0 | xargs -0 rm -f
|
|
||||||
# $(CODESIGN) -f -s $(CODESIGN_CERT) "build-ZeroTierUI-release/ZeroTier One.app"
|
|
||||||
# $(CODESIGN) -vvv "build-ZeroTierUI-release/ZeroTier One.app"
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.dSYM build-* *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o zerotier-one zerotier-idtool zerotier-selftest zerotier-cli ZeroTierOneInstaller-*
|
rm -rf *.dSYM build-* *.pkg *.dmg *.o node/*.o controller/*.o service/*.o osdep/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o zerotier-one zerotier-idtool zerotier-selftest zerotier-cli ZeroTierOneInstaller-*
|
||||||
|
|
||||||
# For our use -- builds official signed binary, packages in installer and download DMG
|
|
||||||
official: FORCE
|
|
||||||
make -j 4 ZT_OFFICIAL_RELEASE=1
|
|
||||||
./buildinstaller.sh
|
|
||||||
# make mac-dmg ZT_OFFICIAL_RELEASE=1
|
|
||||||
|
|
||||||
#mac-dmg: FORCE
|
|
||||||
# mkdir -p build-ZeroTierOne-dmg
|
|
||||||
# cd build-ZeroTierOne-dmg ; ln -sf /Applications Applications
|
|
||||||
# cp -a "build-ZeroTierUI-release/ZeroTier One.app" build-ZeroTierOne-dmg/
|
|
||||||
# rm -f /tmp/tmp.dmg
|
|
||||||
# hdiutil create /tmp/tmp.dmg -ov -volname "ZeroTier One" -fs HFS+ -srcfolder ./build-ZeroTierOne-dmg
|
|
||||||
# hdiutil convert /tmp/tmp.dmg -format UDZO -o "ZeroTier One.dmg"
|
|
||||||
# $(CODESIGN) -f -s $(CODESIGN_CERT) "ZeroTier One.dmg"
|
|
||||||
# rm -f /tmp/tmp.dmg
|
|
||||||
|
|
||||||
# For those building from source -- installs signed binary tap driver in system ZT home
|
# For those building from source -- installs signed binary tap driver in system ZT home
|
||||||
install-mac-tap: FORCE
|
install-mac-tap: FORCE
|
||||||
mkdir -p /Library/Application\ Support/ZeroTier/One
|
mkdir -p /Library/Application\ Support/ZeroTier/One
|
||||||
|
@ -269,11 +269,6 @@
|
|||||||
*/
|
*/
|
||||||
#define ZT_NETWORK_AUTOCONF_DELAY 60000
|
#define ZT_NETWORK_AUTOCONF_DELAY 60000
|
||||||
|
|
||||||
/**
|
|
||||||
* Increment core desperation after this multiple of ping checks without responses from upstream peers
|
|
||||||
*/
|
|
||||||
#define ZT_CORE_DESPERATION_INCREMENT 2
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timeout for overall peer activity (measured from last receive)
|
* Timeout for overall peer activity (measured from last receive)
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ bool IncomingPacket::tryDecode(const RuntimeEnvironment *RR)
|
|||||||
switch(verb()) {
|
switch(verb()) {
|
||||||
//case Packet::VERB_NOP:
|
//case Packet::VERB_NOP:
|
||||||
default: // ignore unknown verbs, but if they pass auth check they are "received"
|
default: // ignore unknown verbs, but if they pass auth check they are "received"
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),verb(),0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),verb(),0,Packet::VERB_NOP);
|
||||||
return true;
|
return true;
|
||||||
case Packet::VERB_HELLO: return _doHELLO(RR);
|
case Packet::VERB_HELLO: return _doHELLO(RR);
|
||||||
case Packet::VERB_ERROR: return _doERROR(RR,peer);
|
case Packet::VERB_ERROR: return _doERROR(RR,peer);
|
||||||
@ -140,7 +140,7 @@ bool IncomingPacket::_doERROR(const RuntimeEnvironment *RR,const SharedPtr<Peer>
|
|||||||
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_NETWORK_MEMBERSHIP_CERTIFICATE);
|
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_NETWORK_MEMBERSHIP_CERTIFICATE);
|
||||||
nconf->com().serialize(outp);
|
nconf->com().serialize(outp);
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
@ -158,7 +158,7 @@ bool IncomingPacket::_doERROR(const RuntimeEnvironment *RR,const SharedPtr<Peer>
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_ERROR,inRePacketId,inReVerb);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_ERROR,inRePacketId,inReVerb);
|
||||||
} catch (std::exception &ex) {
|
} catch (std::exception &ex) {
|
||||||
TRACE("dropped ERROR from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
TRACE("dropped ERROR from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -219,7 +219,7 @@ bool IncomingPacket::_doHELLO(const RuntimeEnvironment *RR)
|
|||||||
outp.append(packetId());
|
outp.append(packetId());
|
||||||
outp.append((unsigned char)Packet::ERROR_IDENTITY_COLLISION);
|
outp.append((unsigned char)Packet::ERROR_IDENTITY_COLLISION);
|
||||||
outp.armor(key,true);
|
outp.armor(key,true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
} else {
|
} else {
|
||||||
RR->node->postEvent(ZT1_EVENT_AUTHENTICATION_FAILURE,(const void *)&_remoteAddress);
|
RR->node->postEvent(ZT1_EVENT_AUTHENTICATION_FAILURE,(const void *)&_remoteAddress);
|
||||||
TRACE("rejected HELLO from %s(%s): packet failed authentication",id.address().toString().c_str(),_remoteAddress.toString().c_str());
|
TRACE("rejected HELLO from %s(%s): packet failed authentication",id.address().toString().c_str(),_remoteAddress.toString().c_str());
|
||||||
@ -264,7 +264,7 @@ bool IncomingPacket::_doHELLO(const RuntimeEnvironment *RR)
|
|||||||
|
|
||||||
// VALID -- continues here
|
// VALID -- continues here
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_HELLO,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_HELLO,0,Packet::VERB_NOP);
|
||||||
peer->setRemoteVersion(protoVersion,vMajor,vMinor,vRevision);
|
peer->setRemoteVersion(protoVersion,vMajor,vMinor,vRevision);
|
||||||
|
|
||||||
bool trusted = false;
|
bool trusted = false;
|
||||||
@ -302,7 +302,7 @@ bool IncomingPacket::_doHELLO(const RuntimeEnvironment *RR)
|
|||||||
}
|
}
|
||||||
|
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
} catch (std::exception &ex) {
|
} catch (std::exception &ex) {
|
||||||
TRACE("dropped HELLO from %s(%s): %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
TRACE("dropped HELLO from %s(%s): %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -397,7 +397,7 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,const SharedPtr<Peer> &p
|
|||||||
outp.append((uint16_t)0); // no meta-data
|
outp.append((uint16_t)0); // no meta-data
|
||||||
outp.append((uint64_t)nc->revision());
|
outp.append((uint64_t)nc->revision());
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TRACE("got network configuration for network %.16llx from %s",(unsigned long long)nw->id(),source().toString().c_str());
|
TRACE("got network configuration for network %.16llx from %s",(unsigned long long)nw->id(),source().toString().c_str());
|
||||||
@ -443,7 +443,7 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,const SharedPtr<Peer> &p
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_OK,inRePacketId,inReVerb);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_OK,inRePacketId,inReVerb);
|
||||||
} catch (std::exception &ex) {
|
} catch (std::exception &ex) {
|
||||||
TRACE("dropped OK from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
TRACE("dropped OK from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -463,7 +463,7 @@ bool IncomingPacket::_doWHOIS(const RuntimeEnvironment *RR,const SharedPtr<Peer>
|
|||||||
outp.append(packetId());
|
outp.append(packetId());
|
||||||
queried->identity().serialize(outp,false);
|
queried->identity().serialize(outp,false);
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
} else {
|
} else {
|
||||||
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_ERROR);
|
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_ERROR);
|
||||||
outp.append((unsigned char)Packet::VERB_WHOIS);
|
outp.append((unsigned char)Packet::VERB_WHOIS);
|
||||||
@ -471,12 +471,12 @@ bool IncomingPacket::_doWHOIS(const RuntimeEnvironment *RR,const SharedPtr<Peer>
|
|||||||
outp.append((unsigned char)Packet::ERROR_OBJ_NOT_FOUND);
|
outp.append((unsigned char)Packet::ERROR_OBJ_NOT_FOUND);
|
||||||
outp.append(payload(),ZT_ADDRESS_LENGTH);
|
outp.append(payload(),ZT_ADDRESS_LENGTH);
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TRACE("dropped WHOIS from %s(%s): missing or invalid address",source().toString().c_str(),_remoteAddress.toString().c_str());
|
TRACE("dropped WHOIS from %s(%s): missing or invalid address",source().toString().c_str(),_remoteAddress.toString().c_str());
|
||||||
}
|
}
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_WHOIS,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_WHOIS,0,Packet::VERB_NOP);
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
TRACE("dropped WHOIS from %s(%s): unexpected exception",source().toString().c_str(),_remoteAddress.toString().c_str());
|
TRACE("dropped WHOIS from %s(%s): unexpected exception",source().toString().c_str(),_remoteAddress.toString().c_str());
|
||||||
}
|
}
|
||||||
@ -508,8 +508,8 @@ bool IncomingPacket::_doRENDEZVOUS(const RuntimeEnvironment *RR,const SharedPtr<
|
|||||||
if ((port > 0)&&((addrlen == 4)||(addrlen == 16))) {
|
if ((port > 0)&&((addrlen == 4)||(addrlen == 16))) {
|
||||||
InetAddress atAddr(field(ZT_PROTO_VERB_RENDEZVOUS_IDX_ADDRESS,addrlen),addrlen,port);
|
InetAddress atAddr(field(ZT_PROTO_VERB_RENDEZVOUS_IDX_ADDRESS,addrlen),addrlen,port);
|
||||||
TRACE("RENDEZVOUS from %s says %s might be at %s, starting NAT-t",peer->address().toString().c_str(),with.toString().c_str(),atAddr.toString().c_str());
|
TRACE("RENDEZVOUS from %s says %s might be at %s, starting NAT-t",peer->address().toString().c_str(),with.toString().c_str(),atAddr.toString().c_str());
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_RENDEZVOUS,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_RENDEZVOUS,0,Packet::VERB_NOP);
|
||||||
RR->sw->contact(withPeer,atAddr,_linkDesperation);
|
RR->sw->contact(withPeer,atAddr);
|
||||||
} else {
|
} else {
|
||||||
TRACE("dropped corrupt RENDEZVOUS from %s(%s) (bad address or port)",peer->address().toString().c_str(),_remoteAddress.toString().c_str());
|
TRACE("dropped corrupt RENDEZVOUS from %s(%s) (bad address or port)",peer->address().toString().c_str(),_remoteAddress.toString().c_str());
|
||||||
}
|
}
|
||||||
@ -549,7 +549,7 @@ bool IncomingPacket::_doFRAME(const RuntimeEnvironment *RR,const SharedPtr<Peer>
|
|||||||
RR->node->putFrame(network->id(),MAC(peer->address(),network->id()),network->mac(),etherType,0,field(ZT_PROTO_VERB_FRAME_IDX_PAYLOAD,payloadLen),payloadLen);
|
RR->node->putFrame(network->id(),MAC(peer->address(),network->id()),network->mac(),etherType,0,field(ZT_PROTO_VERB_FRAME_IDX_PAYLOAD,payloadLen),payloadLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_FRAME,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_FRAME,0,Packet::VERB_NOP);
|
||||||
} else {
|
} else {
|
||||||
TRACE("dropped FRAME from %s(%s): we are not connected to network %.16llx",source().toString().c_str(),_remoteAddress.toString().c_str(),at<uint64_t>(ZT_PROTO_VERB_FRAME_IDX_NETWORK_ID));
|
TRACE("dropped FRAME from %s(%s): we are not connected to network %.16llx",source().toString().c_str(),_remoteAddress.toString().c_str(),at<uint64_t>(ZT_PROTO_VERB_FRAME_IDX_NETWORK_ID));
|
||||||
}
|
}
|
||||||
@ -625,7 +625,7 @@ bool IncomingPacket::_doEXT_FRAME(const RuntimeEnvironment *RR,const SharedPtr<P
|
|||||||
RR->node->putFrame(network->id(),from,to,etherType,0,field(comLen + ZT_PROTO_VERB_EXT_FRAME_IDX_PAYLOAD,payloadLen),payloadLen);
|
RR->node->putFrame(network->id(),from,to,etherType,0,field(comLen + ZT_PROTO_VERB_EXT_FRAME_IDX_PAYLOAD,payloadLen),payloadLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_EXT_FRAME,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_EXT_FRAME,0,Packet::VERB_NOP);
|
||||||
} else {
|
} else {
|
||||||
TRACE("dropped EXT_FRAME from %s(%s): we are not connected to network %.16llx",source().toString().c_str(),_remoteAddress.toString().c_str(),at<uint64_t>(ZT_PROTO_VERB_FRAME_IDX_NETWORK_ID));
|
TRACE("dropped EXT_FRAME from %s(%s): we are not connected to network %.16llx",source().toString().c_str(),_remoteAddress.toString().c_str(),at<uint64_t>(ZT_PROTO_VERB_FRAME_IDX_NETWORK_ID));
|
||||||
}
|
}
|
||||||
@ -646,7 +646,7 @@ bool IncomingPacket::_doMULTICAST_LIKE(const RuntimeEnvironment *RR,const Shared
|
|||||||
for(unsigned int ptr=ZT_PACKET_IDX_PAYLOAD;ptr<size();ptr+=18)
|
for(unsigned int ptr=ZT_PACKET_IDX_PAYLOAD;ptr<size();ptr+=18)
|
||||||
RR->mc->add(now,at<uint64_t>(ptr),MulticastGroup(MAC(field(ptr + 8,6),6),at<uint32_t>(ptr + 14)),peer->address());
|
RR->mc->add(now,at<uint64_t>(ptr),MulticastGroup(MAC(field(ptr + 8,6),6),at<uint32_t>(ptr + 14)),peer->address());
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_MULTICAST_LIKE,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_MULTICAST_LIKE,0,Packet::VERB_NOP);
|
||||||
} catch (std::exception &ex) {
|
} catch (std::exception &ex) {
|
||||||
TRACE("dropped MULTICAST_LIKE from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
TRACE("dropped MULTICAST_LIKE from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -670,7 +670,7 @@ bool IncomingPacket::_doNETWORK_MEMBERSHIP_CERTIFICATE(const RuntimeEnvironment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_NETWORK_MEMBERSHIP_CERTIFICATE,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_NETWORK_MEMBERSHIP_CERTIFICATE,0,Packet::VERB_NOP);
|
||||||
} catch (std::exception &ex) {
|
} catch (std::exception &ex) {
|
||||||
TRACE("dropped NETWORK_MEMBERSHIP_CERTIFICATE from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
TRACE("dropped NETWORK_MEMBERSHIP_CERTIFICATE from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),ex.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -689,7 +689,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons
|
|||||||
|
|
||||||
const unsigned int h = hops();
|
const unsigned int h = hops();
|
||||||
const uint64_t pid = packetId();
|
const uint64_t pid = packetId();
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,h,pid,Packet::VERB_NETWORK_CONFIG_REQUEST,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,h,pid,Packet::VERB_NETWORK_CONFIG_REQUEST,0,Packet::VERB_NOP);
|
||||||
|
|
||||||
if (RR->localNetworkController) {
|
if (RR->localNetworkController) {
|
||||||
Dictionary netconf;
|
Dictionary netconf;
|
||||||
@ -709,7 +709,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons
|
|||||||
if (outp.size() > ZT_PROTO_MAX_PACKET_LENGTH) {
|
if (outp.size() > ZT_PROTO_MAX_PACKET_LENGTH) {
|
||||||
TRACE("NETWORK_CONFIG_REQUEST failed: internal error: netconf size %u is too large",(unsigned int)netconfStr.length());
|
TRACE("NETWORK_CONFIG_REQUEST failed: internal error: netconf size %u is too large",(unsigned int)netconfStr.length());
|
||||||
} else {
|
} else {
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
@ -722,7 +722,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons
|
|||||||
outp.append((unsigned char)Packet::ERROR_OBJ_NOT_FOUND);
|
outp.append((unsigned char)Packet::ERROR_OBJ_NOT_FOUND);
|
||||||
outp.append(nwid);
|
outp.append(nwid);
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
} break;
|
} break;
|
||||||
case NetworkController::NETCONF_QUERY_ACCESS_DENIED: {
|
case NetworkController::NETCONF_QUERY_ACCESS_DENIED: {
|
||||||
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_ERROR);
|
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_ERROR);
|
||||||
@ -731,7 +731,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons
|
|||||||
outp.append((unsigned char)Packet::ERROR_NETWORK_ACCESS_DENIED_);
|
outp.append((unsigned char)Packet::ERROR_NETWORK_ACCESS_DENIED_);
|
||||||
outp.append(nwid);
|
outp.append(nwid);
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
} break;
|
} break;
|
||||||
case NetworkController::NETCONF_QUERY_INTERNAL_SERVER_ERROR:
|
case NetworkController::NETCONF_QUERY_INTERNAL_SERVER_ERROR:
|
||||||
TRACE("NETWORK_CONFIG_REQUEST failed: internal error: %s",netconf.get("error","(unknown)").c_str());
|
TRACE("NETWORK_CONFIG_REQUEST failed: internal error: %s",netconf.get("error","(unknown)").c_str());
|
||||||
@ -747,7 +747,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons
|
|||||||
outp.append((unsigned char)Packet::ERROR_UNSUPPORTED_OPERATION);
|
outp.append((unsigned char)Packet::ERROR_UNSUPPORTED_OPERATION);
|
||||||
outp.append(nwid);
|
outp.append(nwid);
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
} catch (std::exception &exc) {
|
} catch (std::exception &exc) {
|
||||||
TRACE("dropped NETWORK_CONFIG_REQUEST from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
TRACE("dropped NETWORK_CONFIG_REQUEST from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
||||||
@ -768,7 +768,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REFRESH(const RuntimeEnvironment *RR,cons
|
|||||||
nw->requestConfiguration();
|
nw->requestConfiguration();
|
||||||
ptr += 8;
|
ptr += 8;
|
||||||
}
|
}
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_NETWORK_CONFIG_REFRESH,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_NETWORK_CONFIG_REFRESH,0,Packet::VERB_NOP);
|
||||||
} catch (std::exception &exc) {
|
} catch (std::exception &exc) {
|
||||||
TRACE("dropped NETWORK_CONFIG_REFRESH from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
TRACE("dropped NETWORK_CONFIG_REFRESH from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -795,11 +795,11 @@ bool IncomingPacket::_doMULTICAST_GATHER(const RuntimeEnvironment *RR,const Shar
|
|||||||
outp.append((uint32_t)mg.adi());
|
outp.append((uint32_t)mg.adi());
|
||||||
if (RR->mc->gather(peer->address(),nwid,mg,outp,gatherLimit)) {
|
if (RR->mc->gather(peer->address(),nwid,mg,outp,gatherLimit)) {
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_MULTICAST_GATHER,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_MULTICAST_GATHER,0,Packet::VERB_NOP);
|
||||||
} catch (std::exception &exc) {
|
} catch (std::exception &exc) {
|
||||||
TRACE("dropped MULTICAST_GATHER from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
TRACE("dropped MULTICAST_GATHER from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -886,12 +886,12 @@ bool IncomingPacket::_doMULTICAST_FRAME(const RuntimeEnvironment *RR,const Share
|
|||||||
outp.append((unsigned char)0x02); // flag 0x02 = contains gather results
|
outp.append((unsigned char)0x02); // flag 0x02 = contains gather results
|
||||||
if (RR->mc->gather(peer->address(),nwid,to,outp,gatherLimit)) {
|
if (RR->mc->gather(peer->address(),nwid,to,outp,gatherLimit)) {
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // else ignore -- not a member of this network
|
} // else ignore -- not a member of this network
|
||||||
|
|
||||||
peer->received(RR,_remoteAddress,_linkDesperation,hops(),packetId(),Packet::VERB_MULTICAST_FRAME,0,Packet::VERB_NOP);
|
peer->received(RR,_remoteAddress,hops(),packetId(),Packet::VERB_MULTICAST_FRAME,0,Packet::VERB_NOP);
|
||||||
} catch (std::exception &exc) {
|
} catch (std::exception &exc) {
|
||||||
TRACE("dropped MULTICAST_FRAME from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
TRACE("dropped MULTICAST_FRAME from %s(%s): unexpected exception: %s",source().toString().c_str(),_remoteAddress.toString().c_str(),exc.what());
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
@ -908,7 +908,7 @@ void IncomingPacket::_sendErrorNeedCertificate(const RuntimeEnvironment *RR,cons
|
|||||||
outp.append((unsigned char)Packet::ERROR_NEED_MEMBERSHIP_CERTIFICATE);
|
outp.append((unsigned char)Packet::ERROR_NEED_MEMBERSHIP_CERTIFICATE);
|
||||||
outp.append(nwid);
|
outp.append(nwid);
|
||||||
outp.armor(peer->key(),true);
|
outp.armor(peer->key(),true);
|
||||||
RR->node->putPacket(_remoteAddress,outp.data(),outp.size(),_linkDesperation);
|
RR->node->putPacket(_remoteAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ZeroTier
|
} // namespace ZeroTier
|
||||||
|
@ -73,15 +73,13 @@ public:
|
|||||||
* @param data Packet data
|
* @param data Packet data
|
||||||
* @param len Packet length
|
* @param len Packet length
|
||||||
* @param remoteAddress Address from which packet came
|
* @param remoteAddress Address from which packet came
|
||||||
* @param linkDesperation Link desperation for link over which packet was received
|
|
||||||
* @param now Current time
|
* @param now Current time
|
||||||
* @throws std::out_of_range Range error processing packet
|
* @throws std::out_of_range Range error processing packet
|
||||||
*/
|
*/
|
||||||
IncomingPacket(const void *data,unsigned int len,const InetAddress &remoteAddress,unsigned int linkDesperation,uint64_t now) :
|
IncomingPacket(const void *data,unsigned int len,const InetAddress &remoteAddress,uint64_t now) :
|
||||||
Packet(data,len),
|
Packet(data,len),
|
||||||
_receiveTime(now),
|
_receiveTime(now),
|
||||||
_remoteAddress(remoteAddress),
|
_remoteAddress(remoteAddress),
|
||||||
_linkDesperation(linkDesperation),
|
|
||||||
__refCount()
|
__refCount()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -129,7 +127,6 @@ private:
|
|||||||
|
|
||||||
uint64_t _receiveTime;
|
uint64_t _receiveTime;
|
||||||
InetAddress _remoteAddress;
|
InetAddress _remoteAddress;
|
||||||
unsigned int _linkDesperation;
|
|
||||||
AtomicCounter __refCount;
|
AtomicCounter __refCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -137,8 +137,7 @@ void InetAddress::set(const void *ipBytes,unsigned int ipLen,unsigned int port)
|
|||||||
reinterpret_cast<struct sockaddr_in *>(this)->sin_port = Utils::hton((uint16_t)port);
|
reinterpret_cast<struct sockaddr_in *>(this)->sin_port = Utils::hton((uint16_t)port);
|
||||||
} else if (ipLen == 16) {
|
} else if (ipLen == 16) {
|
||||||
ss_family = AF_INET6;
|
ss_family = AF_INET6;
|
||||||
(reinterpret_cast<uint64_t *>(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr))[0] = ((const uint64_t *)ipBytes)[0];
|
memcpy(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr,ipBytes,16);
|
||||||
(reinterpret_cast<uint64_t *>(reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_addr.s6_addr))[1] = ((const uint64_t *)ipBytes)[1];
|
|
||||||
reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_port = Utils::hton((uint16_t)port);
|
reinterpret_cast<struct sockaddr_in6 *>(this)->sin6_port = Utils::hton((uint16_t)port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,8 +80,7 @@ Node::Node(
|
|||||||
_startTimeAfterInactivity(0),
|
_startTimeAfterInactivity(0),
|
||||||
_lastPingCheck(0),
|
_lastPingCheck(0),
|
||||||
_lastHousekeepingRun(0),
|
_lastHousekeepingRun(0),
|
||||||
_lastBeacon(0),
|
_lastBeacon(0)
|
||||||
_coreDesperation(0)
|
|
||||||
{
|
{
|
||||||
_newestVersionSeen[0] = ZEROTIER_ONE_VERSION_MAJOR;
|
_newestVersionSeen[0] = ZEROTIER_ONE_VERSION_MAJOR;
|
||||||
_newestVersionSeen[1] = ZEROTIER_ONE_VERSION_MINOR;
|
_newestVersionSeen[1] = ZEROTIER_ONE_VERSION_MINOR;
|
||||||
@ -155,13 +154,12 @@ Node::~Node()
|
|||||||
ZT1_ResultCode Node::processWirePacket(
|
ZT1_ResultCode Node::processWirePacket(
|
||||||
uint64_t now,
|
uint64_t now,
|
||||||
const struct sockaddr_storage *remoteAddress,
|
const struct sockaddr_storage *remoteAddress,
|
||||||
unsigned int linkDesperation,
|
|
||||||
const void *packetData,
|
const void *packetData,
|
||||||
unsigned int packetLength,
|
unsigned int packetLength,
|
||||||
volatile uint64_t *nextBackgroundTaskDeadline)
|
volatile uint64_t *nextBackgroundTaskDeadline)
|
||||||
{
|
{
|
||||||
_now = now;
|
_now = now;
|
||||||
RR->sw->onRemotePacket(*(reinterpret_cast<const InetAddress *>(remoteAddress)),linkDesperation,packetData,packetLength);
|
RR->sw->onRemotePacket(*(reinterpret_cast<const InetAddress *>(remoteAddress)),packetData,packetLength);
|
||||||
return ZT1_RESULT_OK;
|
return ZT1_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,8 +217,7 @@ ZT1_ResultCode Node::processBackgroundTasks(uint64_t now,volatile uint64_t *next
|
|||||||
if ((now - _lastPingCheck) >= ZT_PING_CHECK_INVERVAL) {
|
if ((now - _lastPingCheck) >= ZT_PING_CHECK_INVERVAL) {
|
||||||
_lastPingCheck = now;
|
_lastPingCheck = now;
|
||||||
|
|
||||||
// This is used as a floor for the desperation and online status
|
// This is used to compute whether we appear to be "online" or not
|
||||||
// calculations if we just started up or have been asleep.
|
|
||||||
if ((now - _startTimeAfterInactivity) > (ZT_PING_CHECK_INVERVAL * 3))
|
if ((now - _startTimeAfterInactivity) > (ZT_PING_CHECK_INVERVAL * 3))
|
||||||
_startTimeAfterInactivity = now;
|
_startTimeAfterInactivity = now;
|
||||||
|
|
||||||
@ -229,7 +226,6 @@ ZT1_ResultCode Node::processBackgroundTasks(uint64_t now,volatile uint64_t *next
|
|||||||
RR->topology->eachPeer<_PingPeersThatNeedPing &>(pfunc);
|
RR->topology->eachPeer<_PingPeersThatNeedPing &>(pfunc);
|
||||||
|
|
||||||
const uint64_t lastActivityAgo = now - std::max(_startTimeAfterInactivity,pfunc.lastReceiveFromUpstream);
|
const uint64_t lastActivityAgo = now - std::max(_startTimeAfterInactivity,pfunc.lastReceiveFromUpstream);
|
||||||
_coreDesperation = (unsigned int)(lastActivityAgo / (ZT_PING_CHECK_INVERVAL * ZT_CORE_DESPERATION_INCREMENT));
|
|
||||||
bool oldOnline = _online;
|
bool oldOnline = _online;
|
||||||
_online = (lastActivityAgo < ZT_PEER_ACTIVITY_TIMEOUT);
|
_online = (lastActivityAgo < ZT_PEER_ACTIVITY_TIMEOUT);
|
||||||
if (oldOnline != _online)
|
if (oldOnline != _online)
|
||||||
@ -251,11 +247,13 @@ ZT1_ResultCode Node::processBackgroundTasks(uint64_t now,volatile uint64_t *next
|
|||||||
if ((now - _lastBeacon) >= ZT_BEACON_INTERVAL) {
|
if ((now - _lastBeacon) >= ZT_BEACON_INTERVAL) {
|
||||||
_lastBeacon = now;
|
_lastBeacon = now;
|
||||||
char beacon[13];
|
char beacon[13];
|
||||||
*(reinterpret_cast<uint32_t *>(beacon)) = RR->prng->next32();
|
void *p = beacon;
|
||||||
*(reinterpret_cast<uint32_t *>(beacon + 4)) = RR->prng->next32();
|
*(reinterpret_cast<uint32_t *>(p)) = RR->prng->next32();
|
||||||
|
p = beacon + 4;
|
||||||
|
*(reinterpret_cast<uint32_t *>(p)) = RR->prng->next32();
|
||||||
RR->identity.address().copyTo(beacon + 8,5);
|
RR->identity.address().copyTo(beacon + 8,5);
|
||||||
RR->antiRec->logOutgoingZT(beacon,13);
|
RR->antiRec->logOutgoingZT(beacon,13);
|
||||||
putPacket(ZT_DEFAULTS.v4Broadcast,beacon,13,0);
|
putPacket(ZT_DEFAULTS.v4Broadcast,beacon,13);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,7 +439,7 @@ std::string Node::dataStoreGet(const char *name)
|
|||||||
|
|
||||||
void Node::postNewerVersionIfNewer(unsigned int major,unsigned int minor,unsigned int rev)
|
void Node::postNewerVersionIfNewer(unsigned int major,unsigned int minor,unsigned int rev)
|
||||||
{
|
{
|
||||||
if (Peer::compareVersion(major,minor,rev,_newestVersionSeen[0],_newestVersionSeen[1],_newestVersionSeen[2]) > 0) {
|
if (Utils::compareVersion(major,minor,rev,_newestVersionSeen[0],_newestVersionSeen[1],_newestVersionSeen[2]) > 0) {
|
||||||
_newestVersionSeen[0] = major;
|
_newestVersionSeen[0] = major;
|
||||||
_newestVersionSeen[1] = minor;
|
_newestVersionSeen[1] = minor;
|
||||||
_newestVersionSeen[2] = rev;
|
_newestVersionSeen[2] = rev;
|
||||||
@ -526,13 +524,12 @@ enum ZT1_ResultCode ZT1_Node_processWirePacket(
|
|||||||
ZT1_Node *node,
|
ZT1_Node *node,
|
||||||
uint64_t now,
|
uint64_t now,
|
||||||
const struct sockaddr_storage *remoteAddress,
|
const struct sockaddr_storage *remoteAddress,
|
||||||
unsigned int linkDesperation,
|
|
||||||
const void *packetData,
|
const void *packetData,
|
||||||
unsigned int packetLength,
|
unsigned int packetLength,
|
||||||
volatile uint64_t *nextBackgroundTaskDeadline)
|
volatile uint64_t *nextBackgroundTaskDeadline)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return reinterpret_cast<ZeroTier::Node *>(node)->processWirePacket(now,remoteAddress,linkDesperation,packetData,packetLength,nextBackgroundTaskDeadline);
|
return reinterpret_cast<ZeroTier::Node *>(node)->processWirePacket(now,remoteAddress,packetData,packetLength,nextBackgroundTaskDeadline);
|
||||||
} catch (std::bad_alloc &exc) {
|
} catch (std::bad_alloc &exc) {
|
||||||
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
return ZT1_RESULT_FATAL_ERROR_OUT_OF_MEMORY;
|
||||||
} catch ( ... ) {
|
} catch ( ... ) {
|
||||||
|
@ -79,7 +79,6 @@ public:
|
|||||||
ZT1_ResultCode processWirePacket(
|
ZT1_ResultCode processWirePacket(
|
||||||
uint64_t now,
|
uint64_t now,
|
||||||
const struct sockaddr_storage *remoteAddress,
|
const struct sockaddr_storage *remoteAddress,
|
||||||
unsigned int linkDesperation,
|
|
||||||
const void *packetData,
|
const void *packetData,
|
||||||
unsigned int packetLength,
|
unsigned int packetLength,
|
||||||
volatile uint64_t *nextBackgroundTaskDeadline);
|
volatile uint64_t *nextBackgroundTaskDeadline);
|
||||||
@ -119,16 +118,14 @@ public:
|
|||||||
* @param addr Destination address
|
* @param addr Destination address
|
||||||
* @param data Packet data
|
* @param data Packet data
|
||||||
* @param len Packet length
|
* @param len Packet length
|
||||||
* @param desperation Link desperation for reaching this address
|
|
||||||
* @return True if packet appears to have been sent
|
* @return True if packet appears to have been sent
|
||||||
*/
|
*/
|
||||||
inline bool putPacket(const InetAddress &addr,const void *data,unsigned int len,unsigned int desperation)
|
inline bool putPacket(const InetAddress &addr,const void *data,unsigned int len)
|
||||||
{
|
{
|
||||||
return (_wirePacketSendFunction(
|
return (_wirePacketSendFunction(
|
||||||
reinterpret_cast<ZT1_Node *>(this),
|
reinterpret_cast<ZT1_Node *>(this),
|
||||||
_uPtr,
|
_uPtr,
|
||||||
reinterpret_cast<const struct sockaddr_storage *>(&addr),
|
reinterpret_cast<const struct sockaddr_storage *>(&addr),
|
||||||
desperation,
|
|
||||||
data,
|
data,
|
||||||
len) == 0);
|
len) == 0);
|
||||||
}
|
}
|
||||||
@ -174,23 +171,6 @@ public:
|
|||||||
return nw;
|
return nw;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get an overall current level of desperation
|
|
||||||
*
|
|
||||||
* The current level of desperation is based on how recently an upstream
|
|
||||||
* (a.k.a. supernode) peer has spoken to us. As such, it will change and
|
|
||||||
* return to 0 once something like tunneling (higher desperation link) is
|
|
||||||
* active. As a result, actual link desperation for outgoing messages
|
|
||||||
* should be the max of either this or the most recent link desperation
|
|
||||||
* for an incoming message from a given address. See Path.hpp and Peer.hpp.
|
|
||||||
*
|
|
||||||
* In other words think of this as 'the desperation we should try to
|
|
||||||
* escalate to right now.'
|
|
||||||
*
|
|
||||||
* @return Overall system level of desperation
|
|
||||||
*/
|
|
||||||
inline unsigned int coreDesperation() const throw() { return _coreDesperation; }
|
|
||||||
|
|
||||||
inline bool dataStorePut(const char *name,const void *data,unsigned int len,bool secure) { return (_dataStorePutFunction(reinterpret_cast<ZT1_Node *>(this),_uPtr,name,data,len,(int)secure) == 0); }
|
inline bool dataStorePut(const char *name,const void *data,unsigned int len,bool secure) { return (_dataStorePutFunction(reinterpret_cast<ZT1_Node *>(this),_uPtr,name,data,len,(int)secure) == 0); }
|
||||||
inline bool dataStorePut(const char *name,const std::string &data,bool secure) { return dataStorePut(name,(const void *)data.data(),(unsigned int)data.length(),secure); }
|
inline bool dataStorePut(const char *name,const std::string &data,bool secure) { return dataStorePut(name,(const void *)data.data(),(unsigned int)data.length(),secure); }
|
||||||
inline void dataStoreDelete(const char *name) { _dataStorePutFunction(reinterpret_cast<ZT1_Node *>(this),_uPtr,name,(const void *)0,0,0); }
|
inline void dataStoreDelete(const char *name) { _dataStorePutFunction(reinterpret_cast<ZT1_Node *>(this),_uPtr,name,(const void *)0,0,0); }
|
||||||
@ -253,7 +233,6 @@ private:
|
|||||||
uint64_t _lastPingCheck;
|
uint64_t _lastPingCheck;
|
||||||
uint64_t _lastHousekeepingRun;
|
uint64_t _lastHousekeepingRun;
|
||||||
uint64_t _lastBeacon;
|
uint64_t _lastBeacon;
|
||||||
unsigned int _coreDesperation;
|
|
||||||
unsigned int _newestVersionSeen[3]; // major, minor, revision
|
unsigned int _newestVersionSeen[3]; // major, minor, revision
|
||||||
bool _online;
|
bool _online;
|
||||||
};
|
};
|
||||||
|
@ -57,7 +57,6 @@ public:
|
|||||||
_addr(),
|
_addr(),
|
||||||
_lastSend(0),
|
_lastSend(0),
|
||||||
_lastReceived(0),
|
_lastReceived(0),
|
||||||
_lastReceiveDesperation(0),
|
|
||||||
_fixed(false) {}
|
_fixed(false) {}
|
||||||
|
|
||||||
Path(const Path &p) throw() { memcpy(this,&p,sizeof(Path)); }
|
Path(const Path &p) throw() { memcpy(this,&p,sizeof(Path)); }
|
||||||
@ -66,7 +65,6 @@ public:
|
|||||||
_addr(addr),
|
_addr(addr),
|
||||||
_lastSend(0),
|
_lastSend(0),
|
||||||
_lastReceived(0),
|
_lastReceived(0),
|
||||||
_lastReceiveDesperation(0),
|
|
||||||
_fixed(fixed) {}
|
_fixed(fixed) {}
|
||||||
|
|
||||||
inline void init(const InetAddress &addr,bool fixed)
|
inline void init(const InetAddress &addr,bool fixed)
|
||||||
@ -74,7 +72,6 @@ public:
|
|||||||
_addr = addr;
|
_addr = addr;
|
||||||
_lastSend = 0;
|
_lastSend = 0;
|
||||||
_lastReceived = 0;
|
_lastReceived = 0;
|
||||||
_lastReceiveDesperation = 0;
|
|
||||||
_fixed = fixed;
|
_fixed = fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,13 +104,11 @@ public:
|
|||||||
* Called when a packet is received from this path
|
* Called when a packet is received from this path
|
||||||
*
|
*
|
||||||
* @param t Time of receive
|
* @param t Time of receive
|
||||||
* @param d Link desperation of receive
|
|
||||||
*/
|
*/
|
||||||
inline void received(uint64_t t,unsigned int d)
|
inline void received(uint64_t t)
|
||||||
throw()
|
throw()
|
||||||
{
|
{
|
||||||
_lastReceived = t;
|
_lastReceived = t;
|
||||||
_lastReceiveDesperation = d;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,11 +121,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
inline void setFixed(bool f) throw() { _fixed = f; }
|
inline void setFixed(bool f) throw() { _fixed = f; }
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Last desperation reported via incoming link
|
|
||||||
*/
|
|
||||||
inline unsigned int lastReceiveDesperation() const throw() { return _lastReceiveDesperation; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param now Current time
|
* @param now Current time
|
||||||
* @return True if this path is fixed or has received data in last ACTIVITY_TIMEOUT ms
|
* @return True if this path is fixed or has received data in last ACTIVITY_TIMEOUT ms
|
||||||
@ -152,7 +142,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
inline bool send(const RuntimeEnvironment *RR,const void *data,unsigned int len,uint64_t now)
|
inline bool send(const RuntimeEnvironment *RR,const void *data,unsigned int len,uint64_t now)
|
||||||
{
|
{
|
||||||
if (RR->node->putPacket(_addr,data,len,std::max(RR->node->coreDesperation(),_lastReceiveDesperation))) {
|
if (RR->node->putPacket(_addr,data,len)) {
|
||||||
sent(now);
|
sent(now);
|
||||||
RR->antiRec->logOutgoingZT(data,len);
|
RR->antiRec->logOutgoingZT(data,len);
|
||||||
return true;
|
return true;
|
||||||
@ -187,7 +177,6 @@ private:
|
|||||||
InetAddress _addr;
|
InetAddress _addr;
|
||||||
uint64_t _lastSend;
|
uint64_t _lastSend;
|
||||||
uint64_t _lastReceived;
|
uint64_t _lastReceived;
|
||||||
unsigned int _lastReceiveDesperation;
|
|
||||||
bool _fixed;
|
bool _fixed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@ Peer::Peer(const Identity &myIdentity,const Identity &peerIdentity)
|
|||||||
void Peer::received(
|
void Peer::received(
|
||||||
const RuntimeEnvironment *RR,
|
const RuntimeEnvironment *RR,
|
||||||
const InetAddress &remoteAddr,
|
const InetAddress &remoteAddr,
|
||||||
int linkDesperation,
|
|
||||||
unsigned int hops,
|
unsigned int hops,
|
||||||
uint64_t packetId,
|
uint64_t packetId,
|
||||||
Packet::Verb verb,
|
Packet::Verb verb,
|
||||||
@ -78,7 +77,7 @@ void Peer::received(
|
|||||||
unsigned int np = _numPaths;
|
unsigned int np = _numPaths;
|
||||||
for(unsigned int p=0;p<np;++p) {
|
for(unsigned int p=0;p<np;++p) {
|
||||||
if (_paths[p].address() == remoteAddr) {
|
if (_paths[p].address() == remoteAddr) {
|
||||||
_paths[p].received(now,linkDesperation);
|
_paths[p].received(now);
|
||||||
pathIsConfirmed = true;
|
pathIsConfirmed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -103,7 +102,7 @@ void Peer::received(
|
|||||||
}
|
}
|
||||||
if (slot) {
|
if (slot) {
|
||||||
slot->init(remoteAddr,false);
|
slot->init(remoteAddr,false);
|
||||||
slot->received(now,linkDesperation);
|
slot->received(now);
|
||||||
_numPaths = np;
|
_numPaths = np;
|
||||||
pathIsConfirmed = true;
|
pathIsConfirmed = true;
|
||||||
}
|
}
|
||||||
@ -115,7 +114,7 @@ void Peer::received(
|
|||||||
if ((now - _lastPathConfirmationSent) >= ZT_MIN_PATH_CONFIRMATION_INTERVAL) {
|
if ((now - _lastPathConfirmationSent) >= ZT_MIN_PATH_CONFIRMATION_INTERVAL) {
|
||||||
_lastPathConfirmationSent = now;
|
_lastPathConfirmationSent = now;
|
||||||
TRACE("got %s via unknown path %s(%s), confirming...",Packet::verbString(verb),_id.address().toString().c_str(),remoteAddr.toString().c_str());
|
TRACE("got %s via unknown path %s(%s), confirming...",Packet::verbString(verb),_id.address().toString().c_str(),remoteAddr.toString().c_str());
|
||||||
attemptToContactAt(RR,remoteAddr,linkDesperation,now);
|
attemptToContactAt(RR,remoteAddr,now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -137,7 +136,7 @@ void Peer::received(
|
|||||||
for(std::vector<MulticastGroup>::const_iterator mg(mgs.begin());mg!=mgs.end();++mg) {
|
for(std::vector<MulticastGroup>::const_iterator mg(mgs.begin());mg!=mgs.end();++mg) {
|
||||||
if ((outp.size() + 18) > ZT_UDP_DEFAULT_PAYLOAD_MTU) {
|
if ((outp.size() + 18) > ZT_UDP_DEFAULT_PAYLOAD_MTU) {
|
||||||
outp.armor(_key,true);
|
outp.armor(_key,true);
|
||||||
RR->node->putPacket(remoteAddr,outp.data(),outp.size(),linkDesperation);
|
RR->node->putPacket(remoteAddr,outp.data(),outp.size());
|
||||||
outp.reset(_id.address(),RR->identity.address(),Packet::VERB_MULTICAST_LIKE);
|
outp.reset(_id.address(),RR->identity.address(),Packet::VERB_MULTICAST_LIKE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +149,7 @@ void Peer::received(
|
|||||||
}
|
}
|
||||||
if (outp.size() > ZT_PROTO_MIN_PACKET_LENGTH) {
|
if (outp.size() > ZT_PROTO_MIN_PACKET_LENGTH) {
|
||||||
outp.armor(_key,true);
|
outp.armor(_key,true);
|
||||||
RR->node->putPacket(remoteAddr,outp.data(),outp.size(),linkDesperation);
|
RR->node->putPacket(remoteAddr,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -161,7 +160,7 @@ void Peer::received(
|
|||||||
_lastMulticastFrame = now;
|
_lastMulticastFrame = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Peer::attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &atAddress,unsigned int linkDesperation,uint64_t now)
|
void Peer::attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &atAddress,uint64_t now)
|
||||||
{
|
{
|
||||||
Packet outp(_id.address(),RR->identity.address(),Packet::VERB_HELLO);
|
Packet outp(_id.address(),RR->identity.address(),Packet::VERB_HELLO);
|
||||||
outp.append((unsigned char)ZT_PROTO_VERSION);
|
outp.append((unsigned char)ZT_PROTO_VERSION);
|
||||||
@ -189,28 +188,23 @@ void Peer::attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &at
|
|||||||
}
|
}
|
||||||
|
|
||||||
outp.armor(_key,false); // HELLO is sent in the clear
|
outp.armor(_key,false); // HELLO is sent in the clear
|
||||||
RR->node->putPacket(atAddress,outp.data(),outp.size(),linkDesperation);
|
RR->node->putPacket(atAddress,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now)
|
void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now)
|
||||||
{
|
{
|
||||||
Path *const bestPath = getBestPath(now);
|
Path *const bestPath = getBestPath(now);
|
||||||
if ((bestPath)&&(bestPath->active(now))) {
|
if ((bestPath)&&(bestPath->active(now))) {
|
||||||
const unsigned int desp = std::max(RR->node->coreDesperation(),bestPath->lastReceiveDesperation());
|
|
||||||
if ((now - bestPath->lastReceived()) >= ZT_PEER_DIRECT_PING_DELAY) {
|
if ((now - bestPath->lastReceived()) >= ZT_PEER_DIRECT_PING_DELAY) {
|
||||||
TRACE("PING %s(%s) desperation == %u",_id.address().toString().c_str(),bestPath->address().toString().c_str(),desp);
|
TRACE("PING %s(%s)",_id.address().toString().c_str(),bestPath->address().toString().c_str());
|
||||||
attemptToContactAt(RR,bestPath->address(),desp,now);
|
attemptToContactAt(RR,bestPath->address(),now);
|
||||||
bestPath->sent(now);
|
bestPath->sent(now);
|
||||||
} else if ((now - bestPath->lastSend()) >= ZT_NAT_KEEPALIVE_DELAY) {
|
} else if ((now - bestPath->lastSend()) >= ZT_NAT_KEEPALIVE_DELAY) {
|
||||||
// We only do keepalive if desperation is zero right now, since higher
|
|
||||||
// desperation paths involve things like tunneling that do not need it.
|
|
||||||
if (desp == 0) {
|
|
||||||
TRACE("NAT keepalive %s(%s)",_id.address().toString().c_str(),bestPath->address().toString().c_str());
|
TRACE("NAT keepalive %s(%s)",_id.address().toString().c_str(),bestPath->address().toString().c_str());
|
||||||
RR->node->putPacket(bestPath->address(),"",0,0);
|
RR->node->putPacket(bestPath->address(),"",0);
|
||||||
bestPath->sent(now);
|
bestPath->sent(now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Peer::addPath(const Path &newp)
|
void Peer::addPath(const Path &newp)
|
||||||
@ -269,7 +263,7 @@ bool Peer::resetWithinScope(const RuntimeEnvironment *RR,InetAddress::IpScope sc
|
|||||||
while (x < np) {
|
while (x < np) {
|
||||||
if (_paths[x].address().ipScope() == scope) {
|
if (_paths[x].address().ipScope() == scope) {
|
||||||
if (_paths[x].fixed()) {
|
if (_paths[x].fixed()) {
|
||||||
attemptToContactAt(RR,_paths[x].address(),_paths[x].lastReceiveDesperation(),now);
|
attemptToContactAt(RR,_paths[x].address(),now);
|
||||||
_paths[y++] = _paths[x]; // keep fixed paths
|
_paths[y++] = _paths[x]; // keep fixed paths
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -281,11 +275,11 @@ bool Peer::resetWithinScope(const RuntimeEnvironment *RR,InetAddress::IpScope sc
|
|||||||
return (y < np);
|
return (y < np);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Peer::getBestActiveAddresses(uint64_t now,InetAddress &v4,InetAddress &v6,unsigned int maxDesperation) const
|
void Peer::getBestActiveAddresses(uint64_t now,InetAddress &v4,InetAddress &v6) const
|
||||||
{
|
{
|
||||||
uint64_t bestV4 = 0,bestV6 = 0;
|
uint64_t bestV4 = 0,bestV6 = 0;
|
||||||
for(unsigned int p=0,np=_numPaths;p<np;++p) {
|
for(unsigned int p=0,np=_numPaths;p<np;++p) {
|
||||||
if ((_paths[p].active(now))&&(_paths[p].lastReceiveDesperation() <= maxDesperation)) {
|
if (_paths[p].active(now)) {
|
||||||
uint64_t lr = _paths[p].lastReceived();
|
uint64_t lr = _paths[p].lastReceived();
|
||||||
if (lr) {
|
if (lr) {
|
||||||
if (_paths[p].address().isV4()) {
|
if (_paths[p].address().isV4()) {
|
||||||
|
@ -109,7 +109,6 @@ public:
|
|||||||
*
|
*
|
||||||
* @param RR Runtime environment
|
* @param RR Runtime environment
|
||||||
* @param remoteAddr Internet address of sender
|
* @param remoteAddr Internet address of sender
|
||||||
* @param linkDesperation Link desperation level
|
|
||||||
* @param hops ZeroTier (not IP) hops
|
* @param hops ZeroTier (not IP) hops
|
||||||
* @param packetId Packet ID
|
* @param packetId Packet ID
|
||||||
* @param verb Packet verb
|
* @param verb Packet verb
|
||||||
@ -119,7 +118,6 @@ public:
|
|||||||
void received(
|
void received(
|
||||||
const RuntimeEnvironment *RR,
|
const RuntimeEnvironment *RR,
|
||||||
const InetAddress &remoteAddr,
|
const InetAddress &remoteAddr,
|
||||||
int linkDesperation,
|
|
||||||
unsigned int hops,
|
unsigned int hops,
|
||||||
uint64_t packetId,
|
uint64_t packetId,
|
||||||
Packet::Verb verb,
|
Packet::Verb verb,
|
||||||
@ -172,10 +170,9 @@ public:
|
|||||||
*
|
*
|
||||||
* @param RR Runtime environment
|
* @param RR Runtime environment
|
||||||
* @param atAddress Destination address
|
* @param atAddress Destination address
|
||||||
* @param linkDesperation Link desperation
|
|
||||||
* @param now Current time
|
* @param now Current time
|
||||||
*/
|
*/
|
||||||
void attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &atAddress,unsigned int linkDesperation,uint64_t now);
|
void attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &atAddress,uint64_t now);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send pings or keepalives depending on configured timeouts
|
* Send pings or keepalives depending on configured timeouts
|
||||||
@ -382,9 +379,8 @@ public:
|
|||||||
* @param now Current time
|
* @param now Current time
|
||||||
* @param v4 Result parameter to receive active IPv4 address, if any
|
* @param v4 Result parameter to receive active IPv4 address, if any
|
||||||
* @param v6 Result parameter to receive active IPv6 address, if any
|
* @param v6 Result parameter to receive active IPv6 address, if any
|
||||||
* @param maxDesperation Maximum link desperation to consider
|
|
||||||
*/
|
*/
|
||||||
void getBestActiveAddresses(uint64_t now,InetAddress &v4,InetAddress &v6,unsigned int maxDesperation) const;
|
void getBestActiveAddresses(uint64_t now,InetAddress &v4,InetAddress &v6) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a common set of addresses by which two peers can link, if any
|
* Find a common set of addresses by which two peers can link, if any
|
||||||
@ -392,14 +388,13 @@ public:
|
|||||||
* @param a Peer A
|
* @param a Peer A
|
||||||
* @param b Peer B
|
* @param b Peer B
|
||||||
* @param now Current time
|
* @param now Current time
|
||||||
* @param maxDesperation Maximum link desperation to consider
|
|
||||||
* @return Pair: B's address (to send to A), A's address (to send to B)
|
* @return Pair: B's address (to send to A), A's address (to send to B)
|
||||||
*/
|
*/
|
||||||
static inline std::pair<InetAddress,InetAddress> findCommonGround(const Peer &a,const Peer &b,uint64_t now,unsigned int maxDesperation)
|
static inline std::pair<InetAddress,InetAddress> findCommonGround(const Peer &a,const Peer &b,uint64_t now)
|
||||||
{
|
{
|
||||||
std::pair<InetAddress,InetAddress> v4,v6;
|
std::pair<InetAddress,InetAddress> v4,v6;
|
||||||
b.getBestActiveAddresses(now,v4.first,v6.first,maxDesperation);
|
b.getBestActiveAddresses(now,v4.first,v6.first);
|
||||||
a.getBestActiveAddresses(now,v4.second,v6.second,maxDesperation);
|
a.getBestActiveAddresses(now,v4.second,v6.second);
|
||||||
if ((v6.first)&&(v6.second)) // prefer IPv6 if both have it since NAT-t is (almost) unnecessary
|
if ((v6.first)&&(v6.second)) // prefer IPv6 if both have it since NAT-t is (almost) unnecessary
|
||||||
return v6;
|
return v6;
|
||||||
else if ((v4.first)&&(v4.second))
|
else if ((v4.first)&&(v4.second))
|
||||||
@ -407,31 +402,6 @@ public:
|
|||||||
else return std::pair<InetAddress,InetAddress>();
|
else return std::pair<InetAddress,InetAddress>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Compare Peer version tuples
|
|
||||||
*/
|
|
||||||
static inline int compareVersion(unsigned int maj1,unsigned int min1,unsigned int rev1,unsigned int maj2,unsigned int min2,unsigned int rev2)
|
|
||||||
throw()
|
|
||||||
{
|
|
||||||
if (maj1 > maj2)
|
|
||||||
return 1;
|
|
||||||
else if (maj1 < maj2)
|
|
||||||
return -1;
|
|
||||||
else {
|
|
||||||
if (min1 > min2)
|
|
||||||
return 1;
|
|
||||||
else if (min1 < min2)
|
|
||||||
return -1;
|
|
||||||
else {
|
|
||||||
if (rev1 > rev2)
|
|
||||||
return 1;
|
|
||||||
else if (rev1 < rev2)
|
|
||||||
return -1;
|
|
||||||
else return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _announceMulticastGroups(const RuntimeEnvironment *RR,uint64_t now);
|
void _announceMulticastGroups(const RuntimeEnvironment *RR,uint64_t now);
|
||||||
|
|
||||||
|
@ -58,16 +58,16 @@ Switch::~Switch()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void Switch::onRemotePacket(const InetAddress &fromAddr,int linkDesperation,const void *data,unsigned int len)
|
void Switch::onRemotePacket(const InetAddress &fromAddr,const void *data,unsigned int len)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (len == ZT_PROTO_BEACON_LENGTH) {
|
if (len == ZT_PROTO_BEACON_LENGTH) {
|
||||||
_handleBeacon(fromAddr,linkDesperation,Buffer<ZT_PROTO_BEACON_LENGTH>(data,len));
|
_handleBeacon(fromAddr,Buffer<ZT_PROTO_BEACON_LENGTH>(data,len));
|
||||||
} else if (len > ZT_PROTO_MIN_FRAGMENT_LENGTH) {
|
} else if (len > ZT_PROTO_MIN_FRAGMENT_LENGTH) {
|
||||||
if (((const unsigned char *)data)[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR) {
|
if (((const unsigned char *)data)[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR) {
|
||||||
_handleRemotePacketFragment(fromAddr,linkDesperation,data,len);
|
_handleRemotePacketFragment(fromAddr,data,len);
|
||||||
} else if (len >= ZT_PROTO_MIN_PACKET_LENGTH) {
|
} else if (len >= ZT_PROTO_MIN_PACKET_LENGTH) {
|
||||||
_handleRemotePacketHead(fromAddr,linkDesperation,data,len);
|
_handleRemotePacketHead(fromAddr,data,len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (std::exception &ex) {
|
} catch (std::exception &ex) {
|
||||||
@ -291,8 +291,7 @@ bool Switch::unite(const Address &p1,const Address &p2,bool force)
|
|||||||
|
|
||||||
const uint64_t now = RR->node->now();
|
const uint64_t now = RR->node->now();
|
||||||
|
|
||||||
// Right now we only unite desperation == 0 links, which will be direct
|
std::pair<InetAddress,InetAddress> cg(Peer::findCommonGround(*p1p,*p2p,now));
|
||||||
std::pair<InetAddress,InetAddress> cg(Peer::findCommonGround(*p1p,*p2p,now,0));
|
|
||||||
if (!(cg.first))
|
if (!(cg.first))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -369,18 +368,18 @@ bool Switch::unite(const Address &p1,const Address &p2,bool force)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Switch::contact(const SharedPtr<Peer> &peer,const InetAddress &atAddr,unsigned int maxDesperation)
|
void Switch::contact(const SharedPtr<Peer> &peer,const InetAddress &atAddr)
|
||||||
{
|
{
|
||||||
TRACE("sending NAT-t message to %s(%s)",peer->address().toString().c_str(),atAddr.toString().c_str());
|
TRACE("sending NAT-t message to %s(%s)",peer->address().toString().c_str(),atAddr.toString().c_str());
|
||||||
const uint64_t now = RR->node->now();
|
const uint64_t now = RR->node->now();
|
||||||
|
|
||||||
// Attempt to contact at zero desperation first
|
// Attempt to contact directly
|
||||||
peer->attemptToContactAt(RR,atAddr,0,now);
|
peer->attemptToContactAt(RR,atAddr,now);
|
||||||
|
|
||||||
// If we have not punched through after this timeout, open refreshing can of whupass
|
// If we have not punched through after this timeout, open refreshing can of whupass
|
||||||
{
|
{
|
||||||
Mutex::Lock _l(_contactQueue_m);
|
Mutex::Lock _l(_contactQueue_m);
|
||||||
_contactQueue.push_back(ContactQueueEntry(peer,now + ZT_NAT_T_TACTICAL_ESCALATION_DELAY,atAddr,maxDesperation));
|
_contactQueue.push_back(ContactQueueEntry(peer,now + ZT_NAT_T_TACTICAL_ESCALATION_DELAY,atAddr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -450,7 +449,7 @@ unsigned long Switch::doTimerTasks(uint64_t now)
|
|||||||
|
|
||||||
case 0: {
|
case 0: {
|
||||||
// First strategy: rifle method: direct packet to known port
|
// First strategy: rifle method: direct packet to known port
|
||||||
qi->peer->attemptToContactAt(RR,qi->inaddr,qi->currentDesperation,now);
|
qi->peer->attemptToContactAt(RR,qi->inaddr,now);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case 1: {
|
case 1: {
|
||||||
@ -460,7 +459,7 @@ unsigned long Switch::doTimerTasks(uint64_t now)
|
|||||||
for(int i=0;i<9;++i) {
|
for(int i=0;i<9;++i) {
|
||||||
if (++p > 0xffff) break;
|
if (++p > 0xffff) break;
|
||||||
tmpaddr.setPort((unsigned int)p);
|
tmpaddr.setPort((unsigned int)p);
|
||||||
qi->peer->attemptToContactAt(RR,tmpaddr,qi->currentDesperation,now);
|
qi->peer->attemptToContactAt(RR,tmpaddr,now);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
@ -471,19 +470,12 @@ unsigned long Switch::doTimerTasks(uint64_t now)
|
|||||||
for(int i=0;i<3;++i) {
|
for(int i=0;i<3;++i) {
|
||||||
if (--p < 1024) break;
|
if (--p < 1024) break;
|
||||||
tmpaddr.setPort((unsigned int)p);
|
tmpaddr.setPort((unsigned int)p);
|
||||||
qi->peer->attemptToContactAt(RR,tmpaddr,qi->currentDesperation,now);
|
qi->peer->attemptToContactAt(RR,tmpaddr,now);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Escalate link desperation after all strategies attempted
|
// We've tried all strategies
|
||||||
++qi->currentDesperation;
|
|
||||||
if (qi->currentDesperation > qi->maxDesperation) {
|
|
||||||
// We've tried all strategies at all levels of desperation, give up.
|
|
||||||
_contactQueue.erase(qi++);
|
_contactQueue.erase(qi++);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
|
||||||
// Otherwise restart at new link desperation level (e.g. try a tougher transport)
|
|
||||||
qi->strategyIteration = 0;
|
|
||||||
}
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -572,7 +564,7 @@ const char *Switch::etherTypeName(const unsigned int etherType)
|
|||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|
||||||
void Switch::_handleRemotePacketFragment(const InetAddress &fromAddr,int linkDesperation,const void *data,unsigned int len)
|
void Switch::_handleRemotePacketFragment(const InetAddress &fromAddr,const void *data,unsigned int len)
|
||||||
{
|
{
|
||||||
Packet::Fragment fragment(data,len);
|
Packet::Fragment fragment(data,len);
|
||||||
Address destination(fragment.destination());
|
Address destination(fragment.destination());
|
||||||
@ -644,9 +636,9 @@ void Switch::_handleRemotePacketFragment(const InetAddress &fromAddr,int linkDes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Switch::_handleRemotePacketHead(const InetAddress &fromAddr,int linkDesperation,const void *data,unsigned int len)
|
void Switch::_handleRemotePacketHead(const InetAddress &fromAddr,const void *data,unsigned int len)
|
||||||
{
|
{
|
||||||
SharedPtr<IncomingPacket> packet(new IncomingPacket(data,len,fromAddr,linkDesperation,RR->node->now()));
|
SharedPtr<IncomingPacket> packet(new IncomingPacket(data,len,fromAddr,RR->node->now()));
|
||||||
|
|
||||||
Address source(packet->source());
|
Address source(packet->source());
|
||||||
Address destination(packet->destination());
|
Address destination(packet->destination());
|
||||||
@ -714,7 +706,7 @@ void Switch::_handleRemotePacketHead(const InetAddress &fromAddr,int linkDespera
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Switch::_handleBeacon(const InetAddress &fromAddr,int linkDesperation,const Buffer<ZT_PROTO_BEACON_LENGTH> &data)
|
void Switch::_handleBeacon(const InetAddress &fromAddr,const Buffer<ZT_PROTO_BEACON_LENGTH> &data)
|
||||||
{
|
{
|
||||||
Address beaconAddr(data.field(ZT_PROTO_BEACON_IDX_ADDRESS,ZT_ADDRESS_LENGTH),ZT_ADDRESS_LENGTH);
|
Address beaconAddr(data.field(ZT_PROTO_BEACON_IDX_ADDRESS,ZT_ADDRESS_LENGTH),ZT_ADDRESS_LENGTH);
|
||||||
if (beaconAddr == RR->identity.address())
|
if (beaconAddr == RR->identity.address())
|
||||||
@ -726,7 +718,7 @@ void Switch::_handleBeacon(const InetAddress &fromAddr,int linkDesperation,const
|
|||||||
_lastBeacon = now;
|
_lastBeacon = now;
|
||||||
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_NOP);
|
Packet outp(peer->address(),RR->identity.address(),Packet::VERB_NOP);
|
||||||
outp.armor(peer->key(),false);
|
outp.armor(peer->key(),false);
|
||||||
RR->node->putPacket(fromAddr,outp.data(),outp.size(),linkDesperation);
|
RR->node->putPacket(fromAddr,outp.data(),outp.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,11 +79,10 @@ public:
|
|||||||
* Called when a packet is received from the real network
|
* Called when a packet is received from the real network
|
||||||
*
|
*
|
||||||
* @param fromAddr Internet IP address of origin
|
* @param fromAddr Internet IP address of origin
|
||||||
* @param linkDesperation Link desperation of path over which packet was received
|
|
||||||
* @param data Packet data
|
* @param data Packet data
|
||||||
* @param len Packet length
|
* @param len Packet length
|
||||||
*/
|
*/
|
||||||
void onRemotePacket(const InetAddress &fromAddr,int linkDesperation,const void *data,unsigned int len);
|
void onRemotePacket(const InetAddress &fromAddr,const void *data,unsigned int len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a packet comes from a local Ethernet tap
|
* Called when a packet comes from a local Ethernet tap
|
||||||
@ -136,9 +135,8 @@ public:
|
|||||||
*
|
*
|
||||||
* @param peer Peer to contact
|
* @param peer Peer to contact
|
||||||
* @param atAddr Address of peer
|
* @param atAddr Address of peer
|
||||||
* @param linkDesperation Attempt up to given max desperation
|
|
||||||
*/
|
*/
|
||||||
void contact(const SharedPtr<Peer> &peer,const InetAddress &atAddr,unsigned int maxDesperation);
|
void contact(const SharedPtr<Peer> &peer,const InetAddress &atAddr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request WHOIS on a given address
|
* Request WHOIS on a given address
|
||||||
@ -182,9 +180,9 @@ public:
|
|||||||
throw();
|
throw();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _handleRemotePacketFragment(const InetAddress &fromAddr,int linkDesperation,const void *data,unsigned int len);
|
void _handleRemotePacketFragment(const InetAddress &fromAddr,const void *data,unsigned int len);
|
||||||
void _handleRemotePacketHead(const InetAddress &fromAddr,int linkDesperation,const void *data,unsigned int len);
|
void _handleRemotePacketHead(const InetAddress &fromAddr,const void *data,unsigned int len);
|
||||||
void _handleBeacon(const InetAddress &fromAddr,int linkDesperation,const Buffer<ZT_PROTO_BEACON_LENGTH> &data);
|
void _handleBeacon(const InetAddress &fromAddr,const Buffer<ZT_PROTO_BEACON_LENGTH> &data);
|
||||||
|
|
||||||
Address _sendWhoisRequest(
|
Address _sendWhoisRequest(
|
||||||
const Address &addr,
|
const Address &addr,
|
||||||
@ -248,19 +246,15 @@ private:
|
|||||||
struct ContactQueueEntry
|
struct ContactQueueEntry
|
||||||
{
|
{
|
||||||
ContactQueueEntry() {}
|
ContactQueueEntry() {}
|
||||||
ContactQueueEntry(const SharedPtr<Peer> &p,uint64_t ft,const InetAddress &a,unsigned int md) :
|
ContactQueueEntry(const SharedPtr<Peer> &p,uint64_t ft,const InetAddress &a) :
|
||||||
peer(p),
|
peer(p),
|
||||||
fireAtTime(ft),
|
fireAtTime(ft),
|
||||||
inaddr(a),
|
inaddr(a),
|
||||||
maxDesperation(md),
|
strategyIteration(1) {} // start with 2nd strategy, since first was tried at inception
|
||||||
currentDesperation(0),
|
|
||||||
strategyIteration(1) {} // start with 2nd strategy, zero desperation, since we've already tried 0/0
|
|
||||||
|
|
||||||
SharedPtr<Peer> peer;
|
SharedPtr<Peer> peer;
|
||||||
uint64_t fireAtTime;
|
uint64_t fireAtTime;
|
||||||
InetAddress inaddr;
|
InetAddress inaddr;
|
||||||
unsigned int maxDesperation;
|
|
||||||
unsigned int currentDesperation;
|
|
||||||
unsigned int strategyIteration;
|
unsigned int strategyIteration;
|
||||||
};
|
};
|
||||||
std::list<ContactQueueEntry> _contactQueue;
|
std::list<ContactQueueEntry> _contactQueue;
|
||||||
|
@ -381,6 +381,33 @@ public:
|
|||||||
}
|
}
|
||||||
static inline int64_t ntoh(int64_t n) throw() { return (int64_t)ntoh((uint64_t)n); }
|
static inline int64_t ntoh(int64_t n) throw() { return (int64_t)ntoh((uint64_t)n); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare Peer version tuples
|
||||||
|
*
|
||||||
|
* @return -1, 0, or 1 based on whether first tuple is less than, equal to, or greater than second
|
||||||
|
*/
|
||||||
|
static inline int compareVersion(unsigned int maj1,unsigned int min1,unsigned int rev1,unsigned int maj2,unsigned int min2,unsigned int rev2)
|
||||||
|
throw()
|
||||||
|
{
|
||||||
|
if (maj1 > maj2)
|
||||||
|
return 1;
|
||||||
|
else if (maj1 < maj2)
|
||||||
|
return -1;
|
||||||
|
else {
|
||||||
|
if (min1 > min2)
|
||||||
|
return 1;
|
||||||
|
else if (min1 < min2)
|
||||||
|
return -1;
|
||||||
|
else {
|
||||||
|
if (rev1 > rev2)
|
||||||
|
return 1;
|
||||||
|
else if (rev1 < rev2)
|
||||||
|
return -1;
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hexadecimal characters 0-f
|
* Hexadecimal characters 0-f
|
||||||
*/
|
*/
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"author": "ZeroTier, Inc.",
|
"author": "ZeroTier, Inc.",
|
||||||
"license": "BSD",
|
"license": "BSD",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"async": "^0.9.0",
|
||||||
"request": "^2.55.0"
|
"request": "^2.55.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ OBJS=\
|
|||||||
node/Switch.o \
|
node/Switch.o \
|
||||||
node/Topology.o \
|
node/Topology.o \
|
||||||
node/Utils.o \
|
node/Utils.o \
|
||||||
|
osdep/BackgroundResolver.o \
|
||||||
osdep/Http.o \
|
osdep/Http.o \
|
||||||
osdep/OSUtils.o \
|
osdep/OSUtils.o \
|
||||||
service/ControlPlane.o \
|
service/ControlPlane.o \
|
||||||
|
54
one.cpp
@ -72,12 +72,7 @@
|
|||||||
|
|
||||||
#include "service/OneService.hpp"
|
#include "service/OneService.hpp"
|
||||||
|
|
||||||
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
|
||||||
#include "controller/SqliteNetworkController.hpp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ZT1_PID_PATH "zerotier-one.pid"
|
#define ZT1_PID_PATH "zerotier-one.pid"
|
||||||
#define ZT1_CONTROLLER_DB_PATH "controller.db"
|
|
||||||
|
|
||||||
using namespace ZeroTier;
|
using namespace ZeroTier;
|
||||||
|
|
||||||
@ -151,7 +146,7 @@ static int cli(int argc,char **argv)
|
|||||||
json = true;
|
json = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p': // port for HTTP
|
case 'p':
|
||||||
port = Utils::strToUInt(argv[i] + 2);
|
port = Utils::strToUInt(argv[i] + 2);
|
||||||
if ((port > 0xffff)||(port == 0)) {
|
if ((port > 0xffff)||(port == 0)) {
|
||||||
cliPrintHelp(argv[0],stdout);
|
cliPrintHelp(argv[0],stdout);
|
||||||
@ -159,7 +154,7 @@ static int cli(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'D': // Home path
|
case 'D':
|
||||||
if (argv[i][2]) {
|
if (argv[i][2]) {
|
||||||
homeDir = argv[i] + 2;
|
homeDir = argv[i] + 2;
|
||||||
} else {
|
} else {
|
||||||
@ -168,7 +163,7 @@ static int cli(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'H': // HTTP IP
|
case 'H':
|
||||||
if (argv[i][2]) {
|
if (argv[i][2]) {
|
||||||
ip = argv[i] + 2;
|
ip = argv[i] + 2;
|
||||||
} else {
|
} else {
|
||||||
@ -177,7 +172,7 @@ static int cli(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'T': // Override root topology
|
case 'T':
|
||||||
if (argv[i][2]) {
|
if (argv[i][2]) {
|
||||||
authToken = argv[i] + 2;
|
authToken = argv[i] + 2;
|
||||||
} else {
|
} else {
|
||||||
@ -186,7 +181,7 @@ static int cli(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v': // Display version
|
case 'v':
|
||||||
if (argv[i][2]) {
|
if (argv[i][2]) {
|
||||||
cliPrintHelp(argv[0],stdout);
|
cliPrintHelp(argv[0],stdout);
|
||||||
return 1;
|
return 1;
|
||||||
@ -227,6 +222,20 @@ static int cli(int argc,char **argv)
|
|||||||
|
|
||||||
if (!authToken.length()) {
|
if (!authToken.length()) {
|
||||||
OSUtils::readFile((homeDir + ZT_PATH_SEPARATOR_S + "authtoken.secret").c_str(),authToken);
|
OSUtils::readFile((homeDir + ZT_PATH_SEPARATOR_S + "authtoken.secret").c_str(),authToken);
|
||||||
|
#ifdef __UNIX_LIKE__
|
||||||
|
if (!authToken.length()) {
|
||||||
|
const char *hd = getenv("HOME");
|
||||||
|
if (hd) {
|
||||||
|
char p[4096];
|
||||||
|
#ifdef __APPLE__
|
||||||
|
Utils::snprintf(p,sizeof(p),"%s/Library/Application Support/ZeroTier/One/authtoken.secret",hd);
|
||||||
|
#else
|
||||||
|
Utils::snprintf(p,sizeof(p),"%s/.zeroTierOneAuthToken",hd);
|
||||||
|
#endif
|
||||||
|
OSUtils::readFile(p,authToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (!authToken.length()) {
|
if (!authToken.length()) {
|
||||||
fprintf(stderr,"%s: missing authentication token and authtoken.secret not found (or readable) in %s"ZT_EOL_S,argv[0],homeDir.c_str());
|
fprintf(stderr,"%s: missing authentication token and authtoken.secret not found (or readable) in %s"ZT_EOL_S,argv[0],homeDir.c_str());
|
||||||
return 2;
|
return 2;
|
||||||
@ -741,6 +750,7 @@ static BOOL WINAPI _winConsoleCtrlHandler(DWORD dwCtrlType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pokes a hole in the Windows firewall (advfirewall) for the running program
|
// Pokes a hole in the Windows firewall (advfirewall) for the running program
|
||||||
|
/* -- now done by Advanced Installer
|
||||||
static void _winPokeAHole()
|
static void _winPokeAHole()
|
||||||
{
|
{
|
||||||
char myPath[MAX_PATH];
|
char myPath[MAX_PATH];
|
||||||
@ -777,6 +787,7 @@ static void _winPokeAHole()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Returns true if this is running as the local administrator
|
// Returns true if this is running as the local administrator
|
||||||
static BOOL IsCurrentUserLocalAdministrator(void)
|
static BOOL IsCurrentUserLocalAdministrator(void)
|
||||||
@ -877,6 +888,9 @@ static void printHelp(const char *cn,FILE *out)
|
|||||||
{
|
{
|
||||||
fprintf(out,"ZeroTier One version %d.%d.%d"ZT_EOL_S"(c)2011-2015 ZeroTier, Inc."ZT_EOL_S,ZEROTIER_ONE_VERSION_MAJOR,ZEROTIER_ONE_VERSION_MINOR,ZEROTIER_ONE_VERSION_REVISION);
|
fprintf(out,"ZeroTier One version %d.%d.%d"ZT_EOL_S"(c)2011-2015 ZeroTier, Inc."ZT_EOL_S,ZEROTIER_ONE_VERSION_MAJOR,ZEROTIER_ONE_VERSION_MINOR,ZEROTIER_ONE_VERSION_REVISION);
|
||||||
fprintf(out,"Licensed under the GNU General Public License v3"ZT_EOL_S""ZT_EOL_S);
|
fprintf(out,"Licensed under the GNU General Public License v3"ZT_EOL_S""ZT_EOL_S);
|
||||||
|
std::string updateUrl(OneService::autoUpdateUrl());
|
||||||
|
if (updateUrl.length())
|
||||||
|
fprintf(out,"Automatic update enabled:"ZT_EOL_S" %s"ZT_EOL_S""ZT_EOL_S,updateUrl.c_str());
|
||||||
fprintf(out,"Usage: %s [-switches] [home directory]"ZT_EOL_S""ZT_EOL_S,cn);
|
fprintf(out,"Usage: %s [-switches] [home directory]"ZT_EOL_S""ZT_EOL_S,cn);
|
||||||
fprintf(out,"Available switches:"ZT_EOL_S);
|
fprintf(out,"Available switches:"ZT_EOL_S);
|
||||||
fprintf(out," -h - Display this help"ZT_EOL_S);
|
fprintf(out," -h - Display this help"ZT_EOL_S);
|
||||||
@ -1112,13 +1126,13 @@ int main(int argc,char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_winPokeAHole();
|
//_winPokeAHole();
|
||||||
}
|
}
|
||||||
SetConsoleCtrlHandler(&_winConsoleCtrlHandler,TRUE);
|
SetConsoleCtrlHandler(&_winConsoleCtrlHandler,TRUE);
|
||||||
// continues on to ordinary command line execution code below...
|
// continues on to ordinary command line execution code below...
|
||||||
} else {
|
} else {
|
||||||
// Running from service manager
|
// Running from service manager
|
||||||
_winPokeAHole();
|
//_winPokeAHole();
|
||||||
ZeroTierOneService zt1Service;
|
ZeroTierOneService zt1Service;
|
||||||
if (CServiceBase::Run(zt1Service) == TRUE) {
|
if (CServiceBase::Run(zt1Service) == TRUE) {
|
||||||
return 0;
|
return 0;
|
||||||
@ -1129,19 +1143,6 @@ int main(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
#endif // __WINDOWS__
|
#endif // __WINDOWS__
|
||||||
|
|
||||||
NetworkController *controller = (NetworkController *)0;
|
|
||||||
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
|
||||||
try {
|
|
||||||
controller = new SqliteNetworkController((homeDir + ZT_PATH_SEPARATOR_S + ZT1_CONTROLLER_DB_PATH).c_str());
|
|
||||||
} catch (std::exception &exc) {
|
|
||||||
fprintf(stderr,"%s: failure initializing SqliteNetworkController: %s"ZT_EOL_S,argv[0],exc.what());
|
|
||||||
return 1;
|
|
||||||
} catch ( ... ) {
|
|
||||||
fprintf(stderr,"%s: failure initializing SqliteNetworkController: unknown exception"ZT_EOL_S,argv[0]);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif // ZT_ENABLE_NETWORK_CONTROLLER
|
|
||||||
|
|
||||||
#ifdef __UNIX_LIKE__
|
#ifdef __UNIX_LIKE__
|
||||||
std::string pidPath(homeDir + ZT_PATH_SEPARATOR_S + ZT1_PID_PATH);
|
std::string pidPath(homeDir + ZT_PATH_SEPARATOR_S + ZT1_PID_PATH);
|
||||||
{
|
{
|
||||||
@ -1158,7 +1159,7 @@ int main(int argc,char **argv)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
for(;;) {
|
for(;;) {
|
||||||
zt1Service = OneService::newInstance(homeDir.c_str(),port,controller,(overrideRootTopology.length() > 0) ? overrideRootTopology.c_str() : (const char *)0);
|
zt1Service = OneService::newInstance(homeDir.c_str(),port,(overrideRootTopology.length() > 0) ? overrideRootTopology.c_str() : (const char *)0);
|
||||||
switch(zt1Service->run()) {
|
switch(zt1Service->run()) {
|
||||||
case OneService::ONE_STILL_RUNNING: // shouldn't happen, run() won't return until done
|
case OneService::ONE_STILL_RUNNING: // shouldn't happen, run() won't return until done
|
||||||
case OneService::ONE_NORMAL_TERMINATION:
|
case OneService::ONE_NORMAL_TERMINATION:
|
||||||
@ -1191,7 +1192,6 @@ int main(int argc,char **argv)
|
|||||||
|
|
||||||
delete zt1Service;
|
delete zt1Service;
|
||||||
zt1Service = (OneService *)0;
|
zt1Service = (OneService *)0;
|
||||||
delete controller;
|
|
||||||
|
|
||||||
#ifdef __UNIX_LIKE__
|
#ifdef __UNIX_LIKE__
|
||||||
OSUtils::rm(pidPath.c_str());
|
OSUtils::rm(pidPath.c_str());
|
||||||
|
@ -59,10 +59,12 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "../node/Constants.hpp"
|
#include "../node/Constants.hpp"
|
||||||
#include "../node/Utils.hpp"
|
#include "../node/Utils.hpp"
|
||||||
#include "../node/Mutex.hpp"
|
#include "../node/Mutex.hpp"
|
||||||
|
#include "OSUtils.hpp"
|
||||||
#include "BSDEthernetTap.hpp"
|
#include "BSDEthernetTap.hpp"
|
||||||
|
|
||||||
#define ZT_BASE32_CHARS "0123456789abcdefghijklmnopqrstuv"
|
#define ZT_BASE32_CHARS "0123456789abcdefghijklmnopqrstuv"
|
||||||
@ -73,17 +75,17 @@ static const ZeroTier::MulticastGroup _blindWildcardMulticastGroup(ZeroTier::MAC
|
|||||||
namespace ZeroTier {
|
namespace ZeroTier {
|
||||||
|
|
||||||
BSDEthernetTap::BSDEthernetTap(
|
BSDEthernetTap::BSDEthernetTap(
|
||||||
|
const char *homePath,
|
||||||
const MAC &mac,
|
const MAC &mac,
|
||||||
unsigned int mtu,
|
unsigned int mtu,
|
||||||
unsigned int metric,
|
unsigned int metric,
|
||||||
uint64_t nwid,
|
uint64_t nwid,
|
||||||
const char *desiredDevice,
|
|
||||||
const char *friendlyName,
|
const char *friendlyName,
|
||||||
void (*handler)(void *,const MAC &,const MAC &,unsigned int,const Buffer<4096> &),
|
void (*handler)(void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int),
|
||||||
void *arg) :
|
void *arg) :
|
||||||
EthernetTap("BSDEthernetTap",mac,mtu,metric),
|
|
||||||
_handler(handler),
|
_handler(handler),
|
||||||
_arg(arg),
|
_arg(arg),
|
||||||
|
_nwid(nwid),
|
||||||
_mtu(mtu),
|
_mtu(mtu),
|
||||||
_metric(metric),
|
_metric(metric),
|
||||||
_fd(0),
|
_fd(0),
|
||||||
@ -117,11 +119,11 @@ BSDEthernetTap::BSDEthernetTap(
|
|||||||
|
|
||||||
// On BSD we create taps and they can have high numbers, so use ones starting
|
// On BSD we create taps and they can have high numbers, so use ones starting
|
||||||
// at 9993 to not conflict with other stuff. Then we rename it to zt<base32 of nwid>
|
// at 9993 to not conflict with other stuff. Then we rename it to zt<base32 of nwid>
|
||||||
std::map<std::string,bool> devFiles(Utils::listDirectory("/dev"));
|
std::vector<std::string> devFiles(OSUtils::listDirectory("/dev"));
|
||||||
for(int i=9993;i<(9993+128);++i) {
|
for(int i=9993;i<(9993+128);++i) {
|
||||||
Utils::snprintf(tmpdevname,sizeof(tmpdevname),"tap%d",i);
|
Utils::snprintf(tmpdevname,sizeof(tmpdevname),"tap%d",i);
|
||||||
Utils::snprintf(devpath,sizeof(devpath),"/dev/%s",tmpdevname);
|
Utils::snprintf(devpath,sizeof(devpath),"/dev/%s",tmpdevname);
|
||||||
if (devFiles.count(std::string(tmpdevname)) == 0) {
|
if (std::find(devFiles.begin(),devFiles.end(),std::string(tmpdevname)) == devFiles.end()) {
|
||||||
long cpid = (long)vfork();
|
long cpid = (long)vfork();
|
||||||
if (cpid == 0) {
|
if (cpid == 0) {
|
||||||
::execl("/sbin/ifconfig","/sbin/ifconfig",tmpdevname,"create",(const char *)0);
|
::execl("/sbin/ifconfig","/sbin/ifconfig",tmpdevname,"create",(const char *)0);
|
||||||
@ -207,7 +209,6 @@ BSDEthernetTap::~BSDEthernetTap()
|
|||||||
void BSDEthernetTap::setEnabled(bool en)
|
void BSDEthernetTap::setEnabled(bool en)
|
||||||
{
|
{
|
||||||
_enabled = en;
|
_enabled = en;
|
||||||
// TODO: interface status change
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BSDEthernetTap::enabled() const
|
bool BSDEthernetTap::enabled() const
|
||||||
@ -229,17 +230,17 @@ static bool ___removeIp(const std::string &_dev,const InetAddress &ip)
|
|||||||
return false; // never reached, make compiler shut up about return value
|
return false; // never reached, make compiler shut up about return value
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BSDEthernetTap::addIP(const InetAddress &ip)
|
bool BSDEthernetTap::addIp(const InetAddress &ip)
|
||||||
{
|
{
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::set<InetAddress> allIps(ips());
|
std::vector<InetAddress> allIps(ips());
|
||||||
if (allIps.count(ip) > 0)
|
if (std::find(allIps.begin(),allIps.end(),ip) != allIps.end())
|
||||||
return true; // IP/netmask already assigned
|
return true; // IP/netmask already assigned
|
||||||
|
|
||||||
// Remove and reconfigure if address is the same but netmask is different
|
// Remove and reconfigure if address is the same but netmask is different
|
||||||
for(std::set<InetAddress>::iterator i(allIps.begin());i!=allIps.end();++i) {
|
for(std::vector<InetAddress>::iterator i(allIps.begin());i!=allIps.end();++i) {
|
||||||
if ((i->ipsEqual(ip))&&(i->netmaskBits() != ip.netmaskBits())) {
|
if ((i->ipsEqual(ip))&&(i->netmaskBits() != ip.netmaskBits())) {
|
||||||
if (___removeIp(_dev,*i))
|
if (___removeIp(_dev,*i))
|
||||||
break;
|
break;
|
||||||
@ -258,22 +259,25 @@ bool BSDEthernetTap::addIP(const InetAddress &ip)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BSDEthernetTap::removeIP(const InetAddress &ip)
|
bool BSDEthernetTap::removeIp(const InetAddress &ip)
|
||||||
{
|
{
|
||||||
if (ips().count(ip) > 0) {
|
if (!ip)
|
||||||
|
return false;
|
||||||
|
std::vector<InetAddress> allIps(ips());
|
||||||
|
if (std::find(allIps.begin(),allIps.end(),ip) != allIps.end()) {
|
||||||
if (___removeIp(_dev,ip))
|
if (___removeIp(_dev,ip))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::set<InetAddress> BSDEthernetTap::ips() const
|
std::vector<InetAddress> BSDEthernetTap::ips() const
|
||||||
{
|
{
|
||||||
struct ifaddrs *ifa = (struct ifaddrs *)0;
|
struct ifaddrs *ifa = (struct ifaddrs *)0;
|
||||||
if (getifaddrs(&ifa))
|
if (getifaddrs(&ifa))
|
||||||
return std::set<InetAddress>();
|
return std::vector<InetAddress>();
|
||||||
|
|
||||||
std::set<InetAddress> r;
|
std::vector<InetAddress> r;
|
||||||
|
|
||||||
struct ifaddrs *p = ifa;
|
struct ifaddrs *p = ifa;
|
||||||
while (p) {
|
while (p) {
|
||||||
@ -282,14 +286,14 @@ std::set<InetAddress> BSDEthernetTap::ips() const
|
|||||||
case AF_INET: {
|
case AF_INET: {
|
||||||
struct sockaddr_in *sin = (struct sockaddr_in *)p->ifa_addr;
|
struct sockaddr_in *sin = (struct sockaddr_in *)p->ifa_addr;
|
||||||
struct sockaddr_in *nm = (struct sockaddr_in *)p->ifa_netmask;
|
struct sockaddr_in *nm = (struct sockaddr_in *)p->ifa_netmask;
|
||||||
r.insert(InetAddress(&(sin->sin_addr.s_addr),4,Utils::countBits((uint32_t)nm->sin_addr.s_addr)));
|
r.push_back(InetAddress(&(sin->sin_addr.s_addr),4,Utils::countBits((uint32_t)nm->sin_addr.s_addr)));
|
||||||
} break;
|
} break;
|
||||||
case AF_INET6: {
|
case AF_INET6: {
|
||||||
struct sockaddr_in6 *sin = (struct sockaddr_in6 *)p->ifa_addr;
|
struct sockaddr_in6 *sin = (struct sockaddr_in6 *)p->ifa_addr;
|
||||||
struct sockaddr_in6 *nm = (struct sockaddr_in6 *)p->ifa_netmask;
|
struct sockaddr_in6 *nm = (struct sockaddr_in6 *)p->ifa_netmask;
|
||||||
uint32_t b[4];
|
uint32_t b[4];
|
||||||
memcpy(b,nm->sin6_addr.s6_addr,sizeof(b));
|
memcpy(b,nm->sin6_addr.s6_addr,sizeof(b));
|
||||||
r.insert(InetAddress(sin->sin6_addr.s6_addr,16,Utils::countBits(b[0]) + Utils::countBits(b[1]) + Utils::countBits(b[2]) + Utils::countBits(b[3])));
|
r.push_back(InetAddress(sin->sin6_addr.s6_addr,16,Utils::countBits(b[0]) + Utils::countBits(b[1]) + Utils::countBits(b[2]) + Utils::countBits(b[3])));
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -299,6 +303,9 @@ std::set<InetAddress> BSDEthernetTap::ips() const
|
|||||||
if (ifa)
|
if (ifa)
|
||||||
freeifaddrs(ifa);
|
freeifaddrs(ifa);
|
||||||
|
|
||||||
|
std::sort(r.begin(),r.end());
|
||||||
|
std::unique(r.begin(),r.end());
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,6 +331,45 @@ void BSDEthernetTap::setFriendlyName(const char *friendlyName)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BSDEthernetTap::scanMulticastGroups(std::vector<MulticastGroup> &added,std::vector<MulticastGroup> &removed)
|
||||||
|
{
|
||||||
|
std::vector<MulticastGroup> newGroups;
|
||||||
|
|
||||||
|
struct ifmaddrs *ifmap = (struct ifmaddrs *)0;
|
||||||
|
if (!getifmaddrs(&ifmap)) {
|
||||||
|
struct ifmaddrs *p = ifmap;
|
||||||
|
while (p) {
|
||||||
|
if (p->ifma_addr->sa_family == AF_LINK) {
|
||||||
|
struct sockaddr_dl *in = (struct sockaddr_dl *)p->ifma_name;
|
||||||
|
struct sockaddr_dl *la = (struct sockaddr_dl *)p->ifma_addr;
|
||||||
|
if ((la->sdl_alen == 6)&&(in->sdl_nlen <= _dev.length())&&(!memcmp(_dev.data(),in->sdl_data,in->sdl_nlen)))
|
||||||
|
newGroups.push_back(MulticastGroup(MAC(la->sdl_data + la->sdl_nlen,6),0));
|
||||||
|
}
|
||||||
|
p = p->ifma_next;
|
||||||
|
}
|
||||||
|
freeifmaddrs(ifmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<InetAddress> allIps(ips());
|
||||||
|
for(std::vector<InetAddress>::iterator ip(allIps.begin());ip!=allIps.end();++ip)
|
||||||
|
newGroups.push_back(MulticastGroup::deriveMulticastGroupForAddressResolution(*ip));
|
||||||
|
|
||||||
|
std::sort(newGroups.begin(),newGroups.end());
|
||||||
|
std::unique(newGroups.begin(),newGroups.end());
|
||||||
|
|
||||||
|
for(std::vector<MulticastGroup>::iterator m(newGroups.begin());m!=newGroups.end();++m) {
|
||||||
|
if (!std::binary_search(_multicastGroups.begin(),_multicastGroups.end(),*m))
|
||||||
|
added.push_back(*m);
|
||||||
|
}
|
||||||
|
for(std::vector<MulticastGroup>::iterator m(_multicastGroups.begin());m!=_multicastGroups.end();++m) {
|
||||||
|
if (!std::binary_search(newGroups.begin(),newGroups.end(),*m))
|
||||||
|
removed.push_back(*m);
|
||||||
|
}
|
||||||
|
|
||||||
|
_multicastGroups.swap(newGroups);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
bool BSDEthernetTap::updateMulticastGroups(std::set<MulticastGroup> &groups)
|
bool BSDEthernetTap::updateMulticastGroups(std::set<MulticastGroup> &groups)
|
||||||
{
|
{
|
||||||
std::set<MulticastGroup> newGroups;
|
std::set<MulticastGroup> newGroups;
|
||||||
@ -365,11 +411,7 @@ bool BSDEthernetTap::updateMulticastGroups(std::set<MulticastGroup> &groups)
|
|||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
bool BSDEthernetTap::injectPacketFromHost(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BSDEthernetTap::threadMain()
|
void BSDEthernetTap::threadMain()
|
||||||
throw()
|
throw()
|
||||||
@ -378,7 +420,6 @@ void BSDEthernetTap::threadMain()
|
|||||||
MAC to,from;
|
MAC to,from;
|
||||||
int n,nfds,r;
|
int n,nfds,r;
|
||||||
char getBuf[8194];
|
char getBuf[8194];
|
||||||
Buffer<4096> data;
|
|
||||||
|
|
||||||
// Wait for a moment after startup -- wait for Network to finish
|
// Wait for a moment after startup -- wait for Network to finish
|
||||||
// constructing itself.
|
// constructing itself.
|
||||||
@ -415,8 +456,8 @@ void BSDEthernetTap::threadMain()
|
|||||||
to.setTo(getBuf,6);
|
to.setTo(getBuf,6);
|
||||||
from.setTo(getBuf + 6,6);
|
from.setTo(getBuf + 6,6);
|
||||||
unsigned int etherType = ntohs(((const uint16_t *)getBuf)[6]);
|
unsigned int etherType = ntohs(((const uint16_t *)getBuf)[6]);
|
||||||
data.copyFrom(getBuf + 14,(unsigned int)r - 14);
|
// TODO: VLAN support
|
||||||
_handler(_arg,from,to,etherType,data);
|
_handler(_arg,_nwid,from,to,etherType,0,(const void *)(getBuf + 14),r - 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = 0;
|
r = 0;
|
||||||
|
@ -31,47 +31,52 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "EthernetTap.hpp"
|
#include "../node/Constants.hpp"
|
||||||
|
#include "../node/MulticastGroup.hpp"
|
||||||
|
#include "../node/MAC.hpp"
|
||||||
#include "Thread.hpp"
|
#include "Thread.hpp"
|
||||||
|
|
||||||
namespace ZeroTier {
|
namespace ZeroTier {
|
||||||
|
|
||||||
class BSDEthernetTap : public EthernetTap
|
class BSDEthernetTap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BSDEthernetTap(
|
BSDEthernetTap(
|
||||||
|
const char *homePath,
|
||||||
const MAC &mac,
|
const MAC &mac,
|
||||||
unsigned int mtu,
|
unsigned int mtu,
|
||||||
unsigned int metric,
|
unsigned int metric,
|
||||||
uint64_t nwid,
|
uint64_t nwid,
|
||||||
const char *desiredDevice,
|
|
||||||
const char *friendlyName,
|
const char *friendlyName,
|
||||||
void (*handler)(void *,const MAC &,const MAC &,unsigned int,const Buffer<4096> &),
|
void (*handler)(void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int),
|
||||||
void *arg);
|
void *arg);
|
||||||
|
|
||||||
virtual ~BSDEthernetTap();
|
~BSDEthernetTap();
|
||||||
|
|
||||||
virtual void setEnabled(bool en);
|
void setEnabled(bool en);
|
||||||
virtual bool enabled() const;
|
bool enabled() const;
|
||||||
virtual bool addIP(const InetAddress &ip);
|
bool addIp(const InetAddress &ip);
|
||||||
virtual bool removeIP(const InetAddress &ip);
|
bool removeIp(const InetAddress &ip);
|
||||||
virtual std::set<InetAddress> ips() const;
|
std::vector<InetAddress> ips() const;
|
||||||
virtual void put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len);
|
void put(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len);
|
||||||
virtual std::string deviceName() const;
|
std::string deviceName() const;
|
||||||
virtual void setFriendlyName(const char *friendlyName);
|
void setFriendlyName(const char *friendlyName);
|
||||||
virtual bool updateMulticastGroups(std::set<MulticastGroup> &groups);
|
void scanMulticastGroups(std::vector<MulticastGroup> &added,std::vector<MulticastGroup> &removed);
|
||||||
virtual bool injectPacketFromHost(const MAC &from,const MAC &to,unsigned int etherType,const void *data,unsigned int len);
|
|
||||||
|
|
||||||
void threadMain()
|
void threadMain()
|
||||||
throw();
|
throw();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void (*_handler)(void *,const MAC &,const MAC &,unsigned int,const Buffer<4096> &);
|
void (*_handler)(void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int);
|
||||||
void *_arg;
|
void *_arg;
|
||||||
|
uint64_t _nwid;
|
||||||
Thread _thread;
|
Thread _thread;
|
||||||
std::string _dev;
|
std::string _dev;
|
||||||
|
std::vector<MulticastGroup> _multicastGroups;
|
||||||
unsigned int _mtu;
|
unsigned int _mtu;
|
||||||
unsigned int _metric;
|
unsigned int _metric;
|
||||||
int _fd;
|
int _fd;
|
||||||
|
130
osdep/BackgroundResolver.cpp
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
/*
|
||||||
|
* ZeroTier One - Network Virtualization Everywhere
|
||||||
|
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
||||||
|
*
|
||||||
|
* 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 "OSUtils.hpp"
|
||||||
|
#include "Thread.hpp"
|
||||||
|
#include "BackgroundResolver.hpp"
|
||||||
|
|
||||||
|
namespace ZeroTier {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We can't actually abort a job. This is a legacy characteristic of the
|
||||||
|
* ancient synchronous resolver APIs. So to abort jobs, we just abandon
|
||||||
|
* them by setting their parent to null.
|
||||||
|
*/
|
||||||
|
class BackgroundResolverJob
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
std::string name;
|
||||||
|
BackgroundResolver *volatile parent;
|
||||||
|
Mutex lock;
|
||||||
|
|
||||||
|
void threadMain()
|
||||||
|
throw()
|
||||||
|
{
|
||||||
|
std::vector<InetAddress> ips;
|
||||||
|
try {
|
||||||
|
ips = OSUtils::resolve(name.c_str());
|
||||||
|
} catch ( ... ) {}
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(lock);
|
||||||
|
BackgroundResolver *p = parent;
|
||||||
|
if (p)
|
||||||
|
p->_postResult(ips);
|
||||||
|
}
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
BackgroundResolver::BackgroundResolver(const char *name) :
|
||||||
|
_name(name),
|
||||||
|
_job((BackgroundResolverJob *)0),
|
||||||
|
_callback(0),
|
||||||
|
_arg((void *)0),
|
||||||
|
_ips(),
|
||||||
|
_lock()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
BackgroundResolver::~BackgroundResolver()
|
||||||
|
{
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<InetAddress> BackgroundResolver::get() const
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(_lock);
|
||||||
|
return _ips;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BackgroundResolver::resolveNow(void (*callback)(BackgroundResolver *,void *),void *arg)
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(_lock);
|
||||||
|
|
||||||
|
if (_job) {
|
||||||
|
Mutex::Lock _l2(_job->lock);
|
||||||
|
_job->parent = (BackgroundResolver *)0;
|
||||||
|
_job = (BackgroundResolverJob *)0;
|
||||||
|
}
|
||||||
|
|
||||||
|
BackgroundResolverJob *j = new BackgroundResolverJob();
|
||||||
|
j->name = _name;
|
||||||
|
j->parent = this;
|
||||||
|
|
||||||
|
_job = j;
|
||||||
|
_callback = callback;
|
||||||
|
_arg = arg;
|
||||||
|
|
||||||
|
_jobThread = Thread::start(j);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BackgroundResolver::abort()
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(_lock);
|
||||||
|
if (_job) {
|
||||||
|
Mutex::Lock _l2(_job->lock);
|
||||||
|
_job->parent = (BackgroundResolver *)0;
|
||||||
|
_job = (BackgroundResolverJob *)0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BackgroundResolver::_postResult(const std::vector<InetAddress> &ips)
|
||||||
|
{
|
||||||
|
void (*cb)(BackgroundResolver *,void *);
|
||||||
|
void *a;
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(_lock);
|
||||||
|
_job = (BackgroundResolverJob *)0;
|
||||||
|
cb = _callback;
|
||||||
|
a = _arg;
|
||||||
|
_ips = ips;
|
||||||
|
}
|
||||||
|
if (cb)
|
||||||
|
cb(this,a);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace ZeroTier
|
127
osdep/BackgroundResolver.hpp
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
/*
|
||||||
|
* ZeroTier One - Network Virtualization Everywhere
|
||||||
|
* Copyright (C) 2011-2015 ZeroTier, Inc.
|
||||||
|
*
|
||||||
|
* 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 ZT_BACKGROUNDRESOLVER_HPP
|
||||||
|
#define ZT_BACKGROUNDRESOLVER_HPP
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "../node/Constants.hpp"
|
||||||
|
#include "../node/Mutex.hpp"
|
||||||
|
#include "../node/InetAddress.hpp"
|
||||||
|
#include "../node/NonCopyable.hpp"
|
||||||
|
#include "Thread.hpp"
|
||||||
|
|
||||||
|
namespace ZeroTier {
|
||||||
|
|
||||||
|
class BackgroundResolverJob;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple background resolver
|
||||||
|
*/
|
||||||
|
class BackgroundResolver : NonCopyable
|
||||||
|
{
|
||||||
|
friend class BackgroundResolverJob;
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Construct a new resolver
|
||||||
|
*
|
||||||
|
* resolveNow() must be called to actually initiate background resolution.
|
||||||
|
*
|
||||||
|
* @param name Name to resolve
|
||||||
|
*/
|
||||||
|
BackgroundResolver(const char *name);
|
||||||
|
|
||||||
|
~BackgroundResolver();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Most recent resolver results or empty vector if none
|
||||||
|
*/
|
||||||
|
std::vector<InetAddress> get() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Launch a background resolve job now
|
||||||
|
*
|
||||||
|
* If a resolve job is currently in progress, it is aborted and another
|
||||||
|
* job is started.
|
||||||
|
*
|
||||||
|
* Note that jobs can't actually be aborted due to the limitations of the
|
||||||
|
* ancient synchronous OS resolver APIs. As a result, in progress jobs
|
||||||
|
* that are aborted are simply abandoned. Don't call this too frequently
|
||||||
|
* or background threads might pile up.
|
||||||
|
*
|
||||||
|
* @param callback Callback function to receive notification or NULL if none
|
||||||
|
* @praam arg Second argument to callback function
|
||||||
|
*/
|
||||||
|
void resolveNow(void (*callback)(BackgroundResolver *,void *) = 0,void *arg = 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abort (abandon) any current resolve jobs
|
||||||
|
*/
|
||||||
|
void abort();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return True if a background job is in progress
|
||||||
|
*/
|
||||||
|
inline bool running() const
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(_lock);
|
||||||
|
return (_job != (BackgroundResolverJob *)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wait for pending job to complete (if any)
|
||||||
|
*/
|
||||||
|
inline void wait() const
|
||||||
|
{
|
||||||
|
Thread t;
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(_lock);
|
||||||
|
if (!_job)
|
||||||
|
return;
|
||||||
|
t = _jobThread;
|
||||||
|
}
|
||||||
|
Thread::join(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void _postResult(const std::vector<InetAddress> &ips);
|
||||||
|
|
||||||
|
std::string _name;
|
||||||
|
BackgroundResolverJob *_job;
|
||||||
|
Thread _jobThread;
|
||||||
|
void (*_callback)(BackgroundResolver *,void *);
|
||||||
|
void *_arg;
|
||||||
|
std::vector<InetAddress> _ips;
|
||||||
|
Mutex _lock;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace ZeroTier
|
||||||
|
|
||||||
|
#endif
|
@ -33,6 +33,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
|
|
||||||
|
@ -578,11 +578,6 @@ void WindowsEthernetTap::threadMain()
|
|||||||
HANDLE wait4[3];
|
HANDLE wait4[3];
|
||||||
char *tapReadBuf = (char *)0;
|
char *tapReadBuf = (char *)0;
|
||||||
|
|
||||||
if (!_enableTapDevice()) {
|
|
||||||
_enabled = false;
|
|
||||||
return; // only happens if devcon is missing or totally fails
|
|
||||||
}
|
|
||||||
|
|
||||||
/* No idea why I did this. I did it a long time ago and there was only a
|
/* No idea why I did this. I did it a long time ago and there was only a
|
||||||
* a snarky comment. But I'd never do crap like this without a reason, so
|
* a snarky comment. But I'd never do crap like this without a reason, so
|
||||||
* I am leaving it alone with a more descriptive snarky comment. */
|
* I am leaving it alone with a more descriptive snarky comment. */
|
||||||
@ -594,10 +589,20 @@ void WindowsEthernetTap::threadMain()
|
|||||||
|
|
||||||
Utils::snprintf(tapPath,sizeof(tapPath),"\\\\.\\Global\\%s.tap",_netCfgInstanceId.c_str());
|
Utils::snprintf(tapPath,sizeof(tapPath),"\\\\.\\Global\\%s.tap",_netCfgInstanceId.c_str());
|
||||||
int prevTapResetStatus = _systemTapResetStatus;
|
int prevTapResetStatus = _systemTapResetStatus;
|
||||||
|
bool throwOneAway = true; // Restart once on startup, because Windows.
|
||||||
|
bool powerCycle = true; // If true, "power cycle" the device, because Windows.
|
||||||
while (_run) {
|
while (_run) {
|
||||||
|
if (powerCycle) {
|
||||||
|
_disableTapDevice();
|
||||||
|
Sleep(500);
|
||||||
|
_enableTapDevice();
|
||||||
|
Sleep(500);
|
||||||
|
}
|
||||||
|
|
||||||
_tap = CreateFileA(tapPath,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_SYSTEM|FILE_FLAG_OVERLAPPED,NULL);
|
_tap = CreateFileA(tapPath,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_SYSTEM|FILE_FLAG_OVERLAPPED,NULL);
|
||||||
if (_tap == INVALID_HANDLE_VALUE) {
|
if (_tap == INVALID_HANDLE_VALUE) {
|
||||||
fprintf(stderr,"Error opening %s -- retrying.\r\n",tapPath);
|
fprintf(stderr,"Error opening %s -- retrying.\r\n",tapPath);
|
||||||
|
powerCycle = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -698,7 +703,9 @@ void WindowsEthernetTap::threadMain()
|
|||||||
ReadFile(_tap,tapReadBuf,sizeof(tapReadBuf),NULL,&tapOvlRead);
|
ReadFile(_tap,tapReadBuf,sizeof(tapReadBuf),NULL,&tapOvlRead);
|
||||||
bool writeInProgress = false;
|
bool writeInProgress = false;
|
||||||
while (_run) {
|
while (_run) {
|
||||||
if (prevTapResetStatus != _systemTapResetStatus) {
|
if ((prevTapResetStatus != _systemTapResetStatus)||(throwOneAway)) {
|
||||||
|
powerCycle = throwOneAway;
|
||||||
|
throwOneAway = false;
|
||||||
prevTapResetStatus = _systemTapResetStatus;
|
prevTapResetStatus = _systemTapResetStatus;
|
||||||
break; // this will cause us to close and reopen the tap
|
break; // this will cause us to close and reopen the tap
|
||||||
}
|
}
|
||||||
|
25
selftest.cpp
@ -55,6 +55,7 @@
|
|||||||
#include "osdep/OSUtils.hpp"
|
#include "osdep/OSUtils.hpp"
|
||||||
#include "osdep/Phy.hpp"
|
#include "osdep/Phy.hpp"
|
||||||
#include "osdep/Http.hpp"
|
#include "osdep/Http.hpp"
|
||||||
|
#include "osdep/BackgroundResolver.hpp"
|
||||||
|
|
||||||
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
#include "controller/SqliteNetworkController.hpp"
|
#include "controller/SqliteNetworkController.hpp"
|
||||||
@ -510,16 +511,14 @@ static int testCertificate()
|
|||||||
|
|
||||||
static int testPacket()
|
static int testPacket()
|
||||||
{
|
{
|
||||||
unsigned char salsaKey[32],hmacKey[32];
|
unsigned char salsaKey[32];
|
||||||
Packet a,b;
|
Packet a,b;
|
||||||
|
|
||||||
a.burn();
|
a.burn();
|
||||||
b.burn();
|
b.burn();
|
||||||
|
|
||||||
for(unsigned int i=0;i<32;++i) {
|
for(unsigned int i=0;i<32;++i)
|
||||||
salsaKey[i] = (unsigned char)rand();
|
salsaKey[i] = (unsigned char)rand();
|
||||||
hmacKey[i] = (unsigned char)rand();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "[packet] Testing Packet encoder/decoder... ";
|
std::cout << "[packet] Testing Packet encoder/decoder... ";
|
||||||
|
|
||||||
@ -771,6 +770,23 @@ static int testSqliteNetworkController()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int testResolver()
|
||||||
|
{
|
||||||
|
std::cout << "[resolver] Testing BackgroundResolver..."; std::cout.flush();
|
||||||
|
|
||||||
|
BackgroundResolver r("tcp-fallback.zerotier.com");
|
||||||
|
r.resolveNow();
|
||||||
|
r.wait();
|
||||||
|
|
||||||
|
std::vector<InetAddress> ips(r.get());
|
||||||
|
for(std::vector<InetAddress>::const_iterator ip(ips.begin());ip!=ips.end();++ip) {
|
||||||
|
std::cout << ' ' << ip->toString();
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int testHttp()
|
static int testHttp()
|
||||||
{
|
{
|
||||||
std::map<std::string,std::string> requestHeaders,responseHeaders;
|
std::map<std::string,std::string> requestHeaders,responseHeaders;
|
||||||
@ -875,6 +891,7 @@ int main(int argc,char **argv)
|
|||||||
r |= testIdentity();
|
r |= testIdentity();
|
||||||
r |= testCertificate();
|
r |= testCertificate();
|
||||||
r |= testPhy();
|
r |= testPhy();
|
||||||
|
r |= testResolver();
|
||||||
r |= testHttp();
|
r |= testHttp();
|
||||||
|
|
||||||
if (r)
|
if (r)
|
||||||
|
@ -33,7 +33,9 @@
|
|||||||
|
|
||||||
#include "../ext/http-parser/http_parser.h"
|
#include "../ext/http-parser/http_parser.h"
|
||||||
|
|
||||||
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
#include "../controller/SqliteNetworkController.hpp"
|
#include "../controller/SqliteNetworkController.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../node/InetAddress.hpp"
|
#include "../node/InetAddress.hpp"
|
||||||
#include "../node/Node.hpp"
|
#include "../node/Node.hpp"
|
||||||
@ -245,6 +247,9 @@ static void _jsonAppend(unsigned int depth,std::string &buf,const ZT1_Peer *peer
|
|||||||
ControlPlane::ControlPlane(OneService *svc,Node *n,const char *uiStaticPath) :
|
ControlPlane::ControlPlane(OneService *svc,Node *n,const char *uiStaticPath) :
|
||||||
_svc(svc),
|
_svc(svc),
|
||||||
_node(n),
|
_node(n),
|
||||||
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
|
_controller((SqliteNetworkController *)0),
|
||||||
|
#endif
|
||||||
_uiStaticPath((uiStaticPath) ? uiStaticPath : "")
|
_uiStaticPath((uiStaticPath) ? uiStaticPath : "")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -445,10 +450,13 @@ unsigned int ControlPlane::handleRequest(
|
|||||||
responseContentType = "text/plain";
|
responseContentType = "text/plain";
|
||||||
scode = 200;
|
scode = 200;
|
||||||
} else {
|
} else {
|
||||||
std::map<std::string,SqliteNetworkController *>::const_iterator ss(_subsystems.find(ps[0]));
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
if (ss != _subsystems.end())
|
if (_controller)
|
||||||
scode = ss->second->handleControlPlaneHttpGET(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
|
_controller->handleControlPlaneHttpGET(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
|
||||||
else scode = 404;
|
else scode = 404;
|
||||||
|
#else
|
||||||
|
scode = 404;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} else scode = 401; // isAuth == false
|
} else scode = 401; // isAuth == false
|
||||||
@ -478,10 +486,13 @@ unsigned int ControlPlane::handleRequest(
|
|||||||
} else scode = 500;
|
} else scode = 500;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::map<std::string,SqliteNetworkController *>::const_iterator ss(_subsystems.find(ps[0]));
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
if (ss != _subsystems.end())
|
if (_controller)
|
||||||
scode = ss->second->handleControlPlaneHttpPOST(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
|
_controller->handleControlPlaneHttpPOST(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
|
||||||
else scode = 404;
|
else scode = 404;
|
||||||
|
#else
|
||||||
|
scode = 404;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} else scode = 401; // isAuth == false
|
} else scode = 401; // isAuth == false
|
||||||
@ -510,10 +521,13 @@ unsigned int ControlPlane::handleRequest(
|
|||||||
_node->freeQueryResult((void *)nws);
|
_node->freeQueryResult((void *)nws);
|
||||||
} else scode = 500;
|
} else scode = 500;
|
||||||
} else {
|
} else {
|
||||||
std::map<std::string,SqliteNetworkController *>::const_iterator ss(_subsystems.find(ps[0]));
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
if (ss != _subsystems.end())
|
if (_controller)
|
||||||
scode = ss->second->handleControlPlaneHttpDELETE(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
|
_controller->handleControlPlaneHttpDELETE(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
|
||||||
else scode = 404;
|
else scode = 404;
|
||||||
|
#else
|
||||||
|
scode = 404;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -52,6 +52,19 @@ public:
|
|||||||
ControlPlane(OneService *svc,Node *n,const char *uiStaticPath);
|
ControlPlane(OneService *svc,Node *n,const char *uiStaticPath);
|
||||||
~ControlPlane();
|
~ControlPlane();
|
||||||
|
|
||||||
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
|
/**
|
||||||
|
* Set controller, which will be available under /controller
|
||||||
|
*
|
||||||
|
* @param c Network controller instance
|
||||||
|
*/
|
||||||
|
inline void setController(SqliteNetworkController *c)
|
||||||
|
{
|
||||||
|
Mutex::Lock _l(_lock);
|
||||||
|
_controller = c;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an authentication token for API access
|
* Add an authentication token for API access
|
||||||
*/
|
*/
|
||||||
@ -61,23 +74,6 @@ public:
|
|||||||
_authTokens.insert(std::string(tok));
|
_authTokens.insert(std::string(tok));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Mount a subsystem under a prefix
|
|
||||||
*
|
|
||||||
* Note that the prefix must not contain a dot -- this is reserved for
|
|
||||||
* static pages -- and must not be a reserved prefix such as /peer
|
|
||||||
* or /network. Do not include path / characters in the prefix. Example
|
|
||||||
* would be 'controller' for SqliteNetworkController.
|
|
||||||
*
|
|
||||||
* @param prefix First element in URI path
|
|
||||||
* @param subsys Object to call for results of GET and POST/PUT operations
|
|
||||||
*/
|
|
||||||
inline void mount(const char *prefix,SqliteNetworkController *subsys)
|
|
||||||
{
|
|
||||||
Mutex::Lock _l(_lock);
|
|
||||||
_subsystems[std::string(prefix)] = subsys;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle HTTP request
|
* Handle HTTP request
|
||||||
*
|
*
|
||||||
@ -102,9 +98,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
OneService *const _svc;
|
OneService *const _svc;
|
||||||
Node *const _node;
|
Node *const _node;
|
||||||
|
#ifdef ZT_ENABLE_NETWORK_CONTROLLER
|
||||||
|
SqliteNetworkController *_controller;
|
||||||
|
#endif
|
||||||
std::string _uiStaticPath;
|
std::string _uiStaticPath;
|
||||||
std::set<std::string> _authTokens;
|
std::set<std::string> _authTokens;
|
||||||
std::map<std::string,SqliteNetworkController *> _subsystems;
|
|
||||||
Mutex _lock;
|
Mutex _lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|