mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 04:57:53 +00:00
Fix for UI client.
This commit is contained in:
parent
5ca20da7af
commit
8f29f19e98
@ -64,6 +64,7 @@
|
|||||||
|
|
||||||
#include "../node/Utils.hpp"
|
#include "../node/Utils.hpp"
|
||||||
#include "../node/Identity.hpp"
|
#include "../node/Identity.hpp"
|
||||||
|
#include "../node/Defaults.hpp"
|
||||||
|
|
||||||
// Globally visible
|
// Globally visible
|
||||||
ZeroTier::NodeControlClient *zeroTierClient = (ZeroTier::NodeControlClient *)0;
|
ZeroTier::NodeControlClient *zeroTierClient = (ZeroTier::NodeControlClient *)0;
|
||||||
@ -209,10 +210,12 @@ void MainWindow::timerEvent(QTimerEvent *event) // event can be null since code
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
std::string buf;
|
std::string buf;
|
||||||
if (ZeroTier::Utils::readFile("/Library/Application Support/ZeroTier/One/identity.public",buf)) {
|
if (ZeroTier::Utils::readFile((ZeroTier::ZT_DEFAULTS.defaultHomePath + ZT_PATH_SEPARATOR_S + "identity.public").c_str(),buf)) {
|
||||||
ZeroTier::Identity id;
|
ZeroTier::Identity id;
|
||||||
if (id.fromString(buf)) {
|
if (id.fromString(buf)) {
|
||||||
std::string authToken(ZeroTier::NodeControlClient::getAuthToken(ZeroTier::NodeControlClient::authTokenDefaultUserPath(),false));
|
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);
|
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();
|
const char *err = zeroTierClient->error();
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<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 Networks"/>
|
||||||
<ROW Property="ProductCode" Value="1033:{9FB164C8-240F-4F47-AEE7-5380F06EA6B0} " Type="16"/>
|
<ROW Property="ProductCode" Value="1033:{AB3E4590-967B-4EAB-B380-E9070680A484} " 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.0" Type="32"/>
|
<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user