mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-18 02:40:13 +00:00
Windows service fix -- it helps if we actually launch the control socket thing.
This commit is contained in:
parent
8bd9f7d51d
commit
5ca20da7af
@ -31,6 +31,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../node/Constants.hpp"
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#define ZT_IPC_ENDPOINT_BASE "\\\\.\\pipe\\ZeroTierOne-"
|
||||
#else
|
||||
|
@ -19,11 +19,11 @@
|
||||
<ROW Property="ARPURLUPDATEINFO" Value="https://www.zerotier.com/download.html"/>
|
||||
<ROW Property="CTRLS" Value="2"/>
|
||||
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||
<ROW Property="Manufacturer" Value="ZeroTier Networks LLC"/>
|
||||
<ROW Property="ProductCode" Value="1033:{E930C7BA-D13E-4150-B817-002B17AD4325} " Type="16"/>
|
||||
<ROW Property="Manufacturer" Value="ZeroTier Networks"/>
|
||||
<ROW Property="ProductCode" Value="1033:{9FB164C8-240F-4F47-AEE7-5380F06EA6B0} " Type="16"/>
|
||||
<ROW Property="ProductLanguage" Value="1033"/>
|
||||
<ROW Property="ProductName" Value="ZeroTier One"/>
|
||||
<ROW Property="ProductVersion" Value="0.9.2" Type="32"/>
|
||||
<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>
|
||||
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
||||
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
|
||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
||||
@ -291,10 +291,10 @@
|
||||
<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 cid="caphyon.advinst.msicomp.XmlElementComponent">
|
||||
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Order="2" Flags="14" Text="2"/>
|
||||
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Order="2" Flags="14" Text="0"/>
|
||||
<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="0"/>
|
||||
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Order="1" Flags="14" Text="9"/>
|
||||
<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="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_2" ParentElement="swidsoftware_licensor" Name="swid:name" Order="0" Flags="14" Text="ZeroTier Networks LLC"/>
|
||||
|
@ -37,6 +37,9 @@
|
||||
#include "../../node/Defaults.hpp"
|
||||
#include "../../node/Utils.hpp"
|
||||
|
||||
#include "../../control/NodeControlClient.hpp"
|
||||
#include "../../control/NodeControlService.hpp"
|
||||
|
||||
#include "../../osnet/WindowsEthernetTapFactory.hpp"
|
||||
#include "../../osnet/WindowsRoutingTable.hpp"
|
||||
#include "../../osnet/NativeSocketManager.hpp"
|
||||
@ -83,6 +86,8 @@ void ZeroTierOneService::threadMain()
|
||||
|
||||
restart_node:
|
||||
try {
|
||||
std::string authToken(ZeroTier::NodeControlClient::getAuthToken((ZeroTier::ZT_DEFAULTS.defaultHomePath + ZT_PATH_SEPARATOR_S + "authtoken.secret").c_str(),true));
|
||||
|
||||
ZeroTier::WindowsEthernetTapFactory tapFactory(ZeroTier::ZT_DEFAULTS.defaultHomePath.c_str());
|
||||
ZeroTier::WindowsRoutingTable routingTable;
|
||||
ZeroTier::NativeSocketManager socketManager(ZT_DEFAULT_UDP_PORT,0);
|
||||
@ -94,6 +99,8 @@ restart_node:
|
||||
_node = new ZeroTier::Node(ZeroTier::ZT_DEFAULTS.defaultHomePath.c_str(),&tapFactory,&routingTable,&socketManager,false,(const char *)0);
|
||||
}
|
||||
|
||||
ZeroTier::NodeControlService controlService(_node,authToken.c_str());
|
||||
|
||||
switch(_node->run()) {
|
||||
|
||||
case ZeroTier::Node::NODE_RESTART_FOR_UPGRADE: {
|
||||
|
Loading…
Reference in New Issue
Block a user