From 7a15d8a7e3fb4934200887666afdf17afb1178e5 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 24 Jul 2015 14:50:44 -0700 Subject: Fix leaving of networks to actually call Network::destroy(). --- osdep/OSUtils.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'osdep') diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp index bfe9b68a..5de35eba 100644 --- a/osdep/OSUtils.hpp +++ b/osdep/OSUtils.hpp @@ -121,10 +121,10 @@ public: /** * Set modes on a file to something secure - * + * * This locks a file so that only the owner can access it. What it actually * does varies by platform. - * + * * @param path Path to lock * @param isDir True if this is a directory */ @@ -252,4 +252,3 @@ private: } // namespace ZeroTier #endif - -- cgit v1.2.3 From 40d5c79b62e7ca7f6da7697e720fb0eb49a26125 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 28 Jul 2015 10:29:25 -0700 Subject: Enable SO_NO_CHECK if available to skip UDP checksum on packet send for slight performance improvement. We do our own cryptographically secure authentication so UDP checksum is worthless. --- osdep/Http.cpp | 2 +- osdep/Phy.hpp | 12 ++++++++++-- selftest.cpp | 2 +- service/OneService.cpp | 2 +- tcp-proxy/tcp-proxy.cpp | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) (limited to 'osdep') diff --git a/osdep/Http.cpp b/osdep/Http.cpp index cd3cf137..d491b062 100644 --- a/osdep/Http.cpp +++ b/osdep/Http.cpp @@ -232,7 +232,7 @@ unsigned int Http::_do( handler.error = false; handler.done = false; - Phy phy(&handler,true); + Phy phy(&handler,true,true); bool instantConnect = false; handler.phy = &phy; diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp index ec01625b..5afd715b 100644 --- a/osdep/Phy.hpp +++ b/osdep/Phy.hpp @@ -144,7 +144,7 @@ private: fd_set _readfds; fd_set _writefds; #if defined(_WIN32) || defined(_WIN64) - fd_set _exceptfds; + fd_set _exceptfds; #endif long _nfds; @@ -152,13 +152,15 @@ private: ZT_PHY_SOCKFD_TYPE _whackSendSocket; bool _noDelay; + bool _noCheck; public: /** * @param handler Pointer of type HANDLER_PTR_TYPE to handler * @param noDelay If true, disable TCP NAGLE algorithm on TCP sockets + * @param noCheck If true, attempt to set UDP SO_NO_CHECK option to disable sending checksums */ - Phy(HANDLER_PTR_TYPE handler,bool noDelay) : + Phy(HANDLER_PTR_TYPE handler,bool noDelay,bool noCheck) : _handler(handler) { FD_ZERO(&_readfds); @@ -202,6 +204,7 @@ public: _whackReceiveSocket = pipes[0]; _whackSendSocket = pipes[1]; _noDelay = noDelay; + _noCheck = noCheck; } ~Phy() @@ -296,6 +299,11 @@ public: #endif #ifdef IP_MTU_DISCOVER f = 0; setsockopt(s,IPPROTO_IP,IP_MTU_DISCOVER,&f,sizeof(f)); +#endif +#ifdef SO_NO_CHECK + if (_noCheck) { + f = 1; setsockopt(s,SOL_SOCKET,SO_NO_CHECK,(void *)&f,sizeof(f)); + } #endif } #endif // Windows or not diff --git a/selftest.cpp b/selftest.cpp index cf20fdf3..714964cb 100644 --- a/selftest.cpp +++ b/selftest.cpp @@ -696,7 +696,7 @@ static int testPhy() std::cout << "[phy] Creating phy endpoint..." << std::endl; TestPhyHandlers testPhyHandlers; - testPhyInstance = new Phy(&testPhyHandlers,false); + testPhyInstance = new Phy(&testPhyHandlers,false,true); std::cout << "[phy] Binding UDP listen socket to 127.0.0.1/60002... "; PhySocket *udpListenSock = testPhyInstance->udpBind((const struct sockaddr *)&bindaddr); diff --git a/service/OneService.cpp b/service/OneService.cpp index d582a893..b83cd83f 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -404,7 +404,7 @@ public: #ifdef ZT_ENABLE_NETWORK_CONTROLLER _controller((_homePath + ZT_PATH_SEPARATOR_S + ZT1_CONTROLLER_DB_PATH).c_str()), #endif - _phy(this,false), + _phy(this,false,true), _overrideRootTopology((overrideRootTopology) ? overrideRootTopology : ""), _node((Node *)0), _controlPlane((ControlPlane *)0), diff --git a/tcp-proxy/tcp-proxy.cpp b/tcp-proxy/tcp-proxy.cpp index 6acf7b42..70c0281a 100644 --- a/tcp-proxy/tcp-proxy.cpp +++ b/tcp-proxy/tcp-proxy.cpp @@ -297,7 +297,7 @@ int main(int argc,char **argv) srand(time((time_t *)0)); TcpProxyService svc; - Phy phy(&svc,false); + Phy phy(&svc,false,true); svc.phy = &phy; svc.udpPortCounter = 1023; -- cgit v1.2.3 From fe6d5b1402307e1be80e6d78b765cf5175288c1f Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 28 Jul 2015 14:32:02 -0700 Subject: UPNP/NAT-PMP support with libminiupnpc (if built with it) -- GitHub issue #64 --- make-mac.mk | 19 +++-- osdep/UPNPClient.cpp | 192 +++++++++++++++++++++++++++++++++++++++++++++++++ osdep/UPNPClient.hpp | 84 ++++++++++++++++++++++ service/OneService.cpp | 21 +++++- 4 files changed, 308 insertions(+), 8 deletions(-) create mode 100644 osdep/UPNPClient.cpp create mode 100644 osdep/UPNPClient.hpp (limited to 'osdep') diff --git a/make-mac.mk b/make-mac.mk index 02d42252..55b117e6 100644 --- a/make-mac.mk +++ b/make-mac.mk @@ -11,7 +11,7 @@ LIBS= ARCH_FLAGS=-arch x86_64 include objects.mk -OBJS+=osdep/OSXEthernetTap.o +OBJS+=osdep/OSXEthernetTap.o # Disable codesign since open source users will not have ZeroTier's certs CODESIGN=echo @@ -21,7 +21,8 @@ CODESIGN_INSTALLER_CERT= # For internal use only -- signs everything with ZeroTier's developer cert ifeq ($(ZT_OFFICIAL_RELEASE),1) - DEFS+=-DZT_OFFICIAL_RELEASE -DZT_AUTO_UPDATE + DEFS+=-DZT_OFFICIAL_RELEASE -DZT_AUTO_UPDATE + ZT_USE_MINIUPNPC=1 CODESIGN=codesign PRODUCTSIGN=productsign CODESIGN_APP_CERT="Developer ID Application: ZeroTier Networks LLC (8ZD9JUCZ4V)" @@ -29,19 +30,25 @@ ifeq ($(ZT_OFFICIAL_RELEASE),1) endif ifeq ($(ZT_AUTO_UPDATE),1) - DEFS+=-DZT_AUTO_UPDATE + DEFS+=-DZT_AUTO_UPDATE +endif + +ifeq ($(ZT_USE_MINIUPNPC),1) + DEFS+=-DZT_USE_MINIUPNPC + LIBS+=/usr/local/lib/libminiupnpc.a + OBJS+=osdep/UPNPClient.o endif # Build with ZT_ENABLE_NETWORK_CONTROLLER=1 to build with the Sqlite network controller ifeq ($(ZT_ENABLE_NETWORK_CONTROLLER),1) - DEFS+=-DZT_ENABLE_NETWORK_CONTROLLER + DEFS+=-DZT_ENABLE_NETWORK_CONTROLLER LIBS+=-L/usr/local/lib -lsqlite3 - OBJS+=controller/SqliteNetworkController.o + OBJS+=controller/SqliteNetworkController.o endif # Debug mode -- dump trace output, build binary with -g ifeq ($(ZT_DEBUG),1) - DEFS+=-DZT_TRACE + DEFS+=-DZT_TRACE CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS) STRIP=echo # The following line enables optimization for the crypto code, since diff --git a/osdep/UPNPClient.cpp b/osdep/UPNPClient.cpp new file mode 100644 index 00000000..20aa9d39 --- /dev/null +++ b/osdep/UPNPClient.cpp @@ -0,0 +1,192 @@ +/* + * 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 . + * + * -- + * + * 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/ + */ + +#ifdef ZT_USE_MINIUPNPC + +// Uncomment to dump debug messages +//#define ZT_UPNP_TRACE 1 + +// Uncomment to build a main() for ad-hoc testing +//#define ZT_UPNP_TEST 1 + +#include +#include +#include + +#include "../node/Utils.hpp" +#include "UPNPClient.hpp" + +#include +#include + +namespace ZeroTier { + +class UPNPClientImpl +{ +public: + UPNPClientImpl(int localUdpPortToMap) : + run(true), + localPort(localUdpPortToMap) + { + } + + void threadMain() + throw() + { + char lanaddr[4096]; + char externalip[4096]; // no range checking? so make these buffers larger than any UDP packet a uPnP server could send us as a precaution :P + char inport[16]; + char outport[16]; + struct UPNPUrls urls; + struct IGDdatas data; + +#ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: started for UDP port %d"ZT_EOL_S,localPort); +#endif + + unsigned int tryPortStart = 0; + Utils::getSecureRandom(&tryPortStart,sizeof(tryPortStart)); + tryPortStart = (tryPortStart % (65535 - 1025)) + 1025; + + while (run) { + { + int upnpError = 0; + UPNPDev *devlist = upnpDiscover(2000,(const char *)0,(const char *)0,0,0,&upnpError); + if (devlist) { +#ifdef ZT_UPNP_TRACE + { + UPNPDev *dev = devlist; + while (dev) { + fprintf(stderr,"UPNPClient: found device at URL '%s': %s"ZT_EOL_S,dev->descURL,dev->st); + dev = dev->pNext; + } + } +#endif + + memset(lanaddr,0,sizeof(lanaddr)); + memset(externalip,0,sizeof(externalip)); + memset(&urls,0,sizeof(urls)); + memset(&data,0,sizeof(data)); + Utils::snprintf(inport,sizeof(inport),"%d",localPort); + + if ((UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr)))&&(lanaddr[0])) { +#ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: my LAN IP address: %s"ZT_EOL_S,lanaddr); +#endif + if ((UPNP_GetExternalIPAddress(urls.controlURL,data.first.servicetype,externalip) == UPNPCOMMAND_SUCCESS)&&(externalip[0])) { +#ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: my external IP address: %s"ZT_EOL_S,externalip); +#endif + + for(int tries=0;tries<64;++tries) { + int tryPort = (int)tryPortStart + tries; + if (tryPort >= 65535) + tryPort = (tryPort - 65535) + 1025; + Utils::snprintf(outport,sizeof(outport),"%u",tryPort); + + int mapResult = 0; + if ((mapResult = UPNP_AddPortMapping(urls.controlURL,data.first.servicetype,outport,inport,lanaddr,"ZeroTier","UDP",(const char *)0,ZT_UPNP_LEASE_DURATION)) == UPNPCOMMAND_SUCCESS) { + #ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: reserved external port: %s"ZT_EOL_S,outport); + #endif + { + Mutex::Lock sl(surface_l); + surface.clear(); + InetAddress tmp(externalip); + tmp.setPort(tryPort); + surface.push_back(tmp); + } + break; + } else { + #ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: UPNP_AddAnyPortMapping(%s) failed: %d"ZT_EOL_S,outport,mapResult); + #endif + Thread::sleep(1000); + } + } + } else { +#ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: UPNP_GetExternalIPAddress failed"ZT_EOL_S); +#endif + } + } else { +#ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: UPNP_GetValidIGD failed"ZT_EOL_S); +#endif + } + + freeUPNPDevlist(devlist); + } else { +#ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: upnpDiscover error code: %d"ZT_EOL_S,upnpError); +#endif + } + } + +#ifdef ZT_UPNP_TRACE + fprintf(stderr,"UPNPClient: rescanning in %d ms"ZT_EOL_S,ZT_UPNP_CLIENT_REFRESH_DELAY); +#endif + Thread::sleep(ZT_UPNP_CLIENT_REFRESH_DELAY); + } + delete this; + } + + volatile bool run; + int localPort; + Mutex surface_l; + std::vector surface; +}; + +UPNPClient::UPNPClient(int localUdpPortToMap) +{ + _impl = new UPNPClientImpl(localUdpPortToMap); + Thread::start(_impl); +} + +UPNPClient::~UPNPClient() +{ + _impl->run = false; +} + +std::vector UPNPClient::get() const +{ + Mutex::Lock _l(_impl->surface_l); + return _impl->surface; +} + +} // namespace ZeroTier + +#ifdef ZT_UPNP_TEST +int main(int argc,char **argv) +{ + ZeroTier::UPNPClient *client = new ZeroTier::UPNPClient(12345); + ZeroTier::Thread::sleep(0xffffffff); // wait forever + return 0; +} +#endif + +#endif // ZT_USE_MINIUPNPC diff --git a/osdep/UPNPClient.hpp b/osdep/UPNPClient.hpp new file mode 100644 index 00000000..28b9979d --- /dev/null +++ b/osdep/UPNPClient.hpp @@ -0,0 +1,84 @@ +/* + * 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 . + * + * -- + * + * 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_UPNPCLIENT_HPP +#define ZT_UPNPCLIENT_HPP + +#ifdef ZT_USE_MINIUPNPC + +#include + +#include "../node/Constants.hpp" +#include "../node/InetAddress.hpp" +#include "../node/Mutex.hpp" +#include "Thread.hpp" + +/** + * How frequently should we refresh our UPNP/NAT-PnP/whatever state? + */ +#define ZT_UPNP_CLIENT_REFRESH_DELAY 600000 + +/** + * UPNP lease duration in seconds (as string) + */ +#define ZT_UPNP_LEASE_DURATION "3600" + +namespace ZeroTier { + +class UPNPClientImpl; + +/** + * UPnP/NAT-PnP daemon thread + */ +class UPNPClient +{ + friend class UPNPClientImpl; + +public: + /** + * Create and start UPNP client service + * + * @param localUdpPortToMap Port we want visible to the outside world + */ + UPNPClient(int localUdpPortToMap); + + ~UPNPClient(); + + /** + * @return All current external mappings for our port + */ + std::vector get() const; + +private: + UPNPClientImpl *_impl; +}; + +} // namespace ZeroTier + +#endif // ZT_USE_MINIUPNPC + +#endif diff --git a/service/OneService.cpp b/service/OneService.cpp index b83cd83f..05fdfb90 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -54,6 +54,7 @@ #include "../osdep/OSUtils.hpp" #include "../osdep/Http.hpp" #include "../osdep/BackgroundResolver.hpp" +#include "../osdep/UPNPClient.hpp" #include "OneService.hpp" #include "ControlPlane.hpp" @@ -415,6 +416,9 @@ public: _tcpFallbackTunnel((TcpConnection *)0), _termReason(ONE_STILL_RUNNING), _port(port), +#ifdef ZT_USE_MINIUPNPC + _upnpClient((int)port), +#endif _run(true) { struct sockaddr_in in4; @@ -511,7 +515,7 @@ public: _lastRestart = clockShouldBe; uint64_t lastTapMulticastGroupCheck = 0; uint64_t lastTcpFallbackResolve = 0; - uint64_t lastLocalInterfaceAddressCheck = 0; + uint64_t lastLocalInterfaceAddressCheck = (OSUtils::now() - ZT1_LOCAL_INTERFACE_CHECK_INTERVAL) + 15000; // do this in 15s to give UPnP time to configure and other things time to settle #ifdef ZT_AUTO_UPDATE uint64_t lastSoftwareUpdateCheck = 0; #endif // ZT_AUTO_UPDATE @@ -576,9 +580,18 @@ public: ztDevices.push_back(t->second->deviceName()); } + _node->clearLocalInterfaceAddresses(); + +#ifdef ZT_USE_MINIUPNPC + std::vector upnpAddresses(_upnpClient.get()); + for(std::vector::const_iterator ext(upnpAddresses.begin());ext!=upnpAddresses.end();++ext) { + printf("Adding UPNP address: %s\n",ext->toString().c_str()); + _node->addLocalInterfaceAddress(reinterpret_cast(&(*ext)),0,ZT1_LOCAL_INTERFACE_ADDRESS_TRUST_NORMAL); + } +#endif + struct ifaddrs *ifatbl = (struct ifaddrs *)0; if ((getifaddrs(&ifatbl) == 0)&&(ifatbl)) { - _node->clearLocalInterfaceAddresses(); struct ifaddrs *ifa = ifatbl; while (ifa) { if ((ifa->ifa_name)&&(ifa->ifa_addr)) { @@ -1242,6 +1255,10 @@ private: unsigned int _port; +#ifdef ZT_USE_MINIUPNPC + UPNPClient _upnpClient; +#endif + bool _run; Mutex _run_m; }; -- cgit v1.2.3 From 14264c2d6f7d20b15081a1db5e8ca4b978d935a0 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 28 Jul 2015 16:50:18 -0700 Subject: Add miniupnpc builds for Windows, fix some Windows build warnings. --- ext/bin/miniupnpc/windows-x64/miniupnpc.lib | Bin 0 -> 731616 bytes ext/bin/miniupnpc/windows-x86/miniupnpc.lib | Bin 0 -> 702786 bytes ext/installfiles/windows/ZeroTier One.aip | 6 +-- osdep/Phy.hpp | 2 +- osdep/UPNPClient.cpp | 10 +++- windows/ZeroTierOne/ZeroTierOne.vcxproj | 46 ++++++++++++----- windows/ZeroTierOne/ZeroTierOne.vcxproj.filters | 63 ++++++++++++++++++++++++ 7 files changed, 109 insertions(+), 18 deletions(-) create mode 100644 ext/bin/miniupnpc/windows-x64/miniupnpc.lib create mode 100644 ext/bin/miniupnpc/windows-x86/miniupnpc.lib (limited to 'osdep') diff --git a/ext/bin/miniupnpc/windows-x64/miniupnpc.lib b/ext/bin/miniupnpc/windows-x64/miniupnpc.lib new file mode 100644 index 00000000..e05fefc8 Binary files /dev/null and b/ext/bin/miniupnpc/windows-x64/miniupnpc.lib differ diff --git a/ext/bin/miniupnpc/windows-x86/miniupnpc.lib b/ext/bin/miniupnpc/windows-x86/miniupnpc.lib new file mode 100644 index 00000000..a7fe4191 Binary files /dev/null and b/ext/bin/miniupnpc/windows-x86/miniupnpc.lib differ diff --git a/ext/installfiles/windows/ZeroTier One.aip b/ext/installfiles/windows/ZeroTier One.aip index ff7ee219..61755698 100644 --- a/ext/installfiles/windows/ZeroTier One.aip +++ b/ext/installfiles/windows/ZeroTier One.aip @@ -23,7 +23,7 @@ - + @@ -87,8 +87,8 @@ - - + + diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp index 5afd715b..2ea68b9d 100644 --- a/osdep/Phy.hpp +++ b/osdep/Phy.hpp @@ -781,7 +781,7 @@ public: // Causes entry to be deleted from list in poll(), ignored elsewhere sws.type = ZT_PHY_SOCKET_CLOSED; - if (sws.sock >= _nfds) { + if ((long)sws.sock >= (long)_nfds) { long nfds = (long)_whackSendSocket; if ((long)_whackReceiveSocket > nfds) nfds = (long)_whackReceiveSocket; diff --git a/osdep/UPNPClient.cpp b/osdep/UPNPClient.cpp index 20aa9d39..ceecb3a3 100644 --- a/osdep/UPNPClient.cpp +++ b/osdep/UPNPClient.cpp @@ -40,8 +40,14 @@ #include "../node/Utils.hpp" #include "UPNPClient.hpp" -#include -#include +#ifdef __WINDOWS__ +#ifndef MINIUPNP_STATICLIB +#define MINIUPNP_STATICLIB +#endif +#endif + +#include "../ext/bin/miniupnpc/include/miniupnpc/miniupnpc.h" +#include "../ext/bin/miniupnpc/include/miniupnpc/upnpcommands.h" namespace ZeroTier { diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj b/windows/ZeroTierOne/ZeroTierOne.vcxproj index 554669b6..14bf7c3e 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj @@ -47,6 +47,7 @@ + true @@ -61,6 +62,22 @@ + + + + + + + + + + + + + + + + @@ -108,6 +125,7 @@ + @@ -193,12 +211,13 @@ Level3 Disabled true - $(SolutionDir)\ext\bin\libcrypto\include - NOMINMAX;ZT_TRACE;%(PreprocessorDefinitions) + + + NOMINMAX;ZT_TRACE;ZT_USE_MINIUPNPC;%(PreprocessorDefinitions) true - wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) + $(SolutionDir)..\ext\bin\miniupnpc\windows-x86\miniupnpc.lib;wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) false @@ -207,12 +226,13 @@ Level3 Disabled true - $(SolutionDir)\ext\bin\libcrypto\include - NOMINMAX;ZT_TRACE;%(PreprocessorDefinitions) + + + NOMINMAX;ZT_TRACE;ZT_USE_MINIUPNPC;%(PreprocessorDefinitions) true - wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) + $(SolutionDir)..\ext\bin\miniupnpc\windows-x64\miniupnpc.lib;wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) false @@ -223,8 +243,9 @@ true true true - $(SolutionDir)\ext\bin\libcrypto\include - ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;NOMINMAX;%(PreprocessorDefinitions) + + + ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;ZT_USE_MINIUPNPC;NOMINMAX;%(PreprocessorDefinitions) MultiThreaded NoExtensions true @@ -236,7 +257,7 @@ true true true - wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) + $(SolutionDir)..\ext\bin\miniupnpc\windows-x86\miniupnpc.lib;wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) false @@ -247,8 +268,9 @@ true true true - $(SolutionDir)\ext\bin\libcrypto\include - ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;NOMINMAX;%(PreprocessorDefinitions) + + + ZT_OFFICIAL_RELEASE;ZT_AUTO_UPDATE;ZT_SALSA20_SSE;ZT_USE_MINIUPNPC;NOMINMAX;%(PreprocessorDefinitions) MultiThreaded NotSet true @@ -260,7 +282,7 @@ true true true - wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) + $(SolutionDir)..\ext\bin\miniupnpc\windows-x64\miniupnpc.lib;wsock32.lib;ws2_32.lib;newdev.lib;Iphlpapi.lib;Rpcrt4.lib;%(AdditionalDependencies) false diff --git a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters index f36b5dc0..abaa8547 100644 --- a/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters +++ b/windows/ZeroTierOne/ZeroTierOne.vcxproj.filters @@ -70,6 +70,15 @@ {bf604491-14c4-4a74-81a6-6105d07c5c7c} + + {5939db69-ab17-47c6-97fb-185e2c678737} + + + {3666f510-b6da-47cb-8039-56441f2dac3e} + + + {1a47071e-e51b-4535-89ae-858946f03118} + @@ -177,6 +186,9 @@ Source Files\osdep + + Source Files\osdep + @@ -347,6 +359,57 @@ Header Files\node + + Header Files\osdep + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + + + Header Files\ext\bin\miniupnpc\include + -- cgit v1.2.3