diff --git a/CMakeLists.txt b/CMakeLists.txt
index be34c7e51..e154a45cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.8)
+cmake_minimum_required (VERSION 3.10)
if(${CMAKE_VERSION} VERSION_LESS 3.15)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
@@ -133,7 +133,6 @@ endif()
add_subdirectory(node)
add_subdirectory(controller)
add_subdirectory(osdep)
-add_subdirectory(root)
add_subdirectory(go/native)
#if(WIN32)
@@ -150,8 +149,8 @@ set(
)
configure_file(
- ${CMAKE_SOURCE_DIR}/version.h.in
- ${CMAKE_BINARY_DIR}/version.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/version.h
)
#set(src
diff --git a/root/CMakeLists.txt b/root/CMakeLists.txt
deleted file mode 100644
index 593bc1318..000000000
--- a/root/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-project(zerotier-root)
-
-if(WIN32)
- add_definitions(-DNOMINMAX)
-endif(WIN32)
-
-add_executable(${PROJECT_NAME} root.cpp)
-
-target_link_libraries(${PROJECT_NAME} zt_core zt_osdep pthread resolv jemalloc)
-
-target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
-
-target_include_directories(${PROJECT_NAME} PRIVATE
- ${CMAKE_SOURCE_DIR}/node
- ${CMAKE_SOURCE_DIR}/osdep
- ${CMAKE_SOURCE_DIR}/ext/json
- ${CMAKE_SOURCE_DIR}/ext/cpp-httplib
-)
diff --git a/root/geoip-html.h b/root/geoip-html.h
deleted file mode 100644
index 863f20bb5..000000000
--- a/root/geoip-html.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef ZT_ROOT_GEOIP_HTML_H
-#define ZT_ROOT_GEOIP_HTML_H
-
-#define ZT_GEOIP_HTML_HEAD \
-"\n" \
-"\n" \
-"
\n" \
-" \n" \
-" \n" \
-" \n" \
-" GeoIP Map\n" \
-" \n" \
-" \n" \
-" \n" \
-" \n" \
-" \n" \
-" \n" \
-" \n" \
-" \n" \
-""
-
-#endif
diff --git a/root/root.cpp b/root/root.cpp
deleted file mode 100644
index 796c879f4..000000000
--- a/root/root.cpp
+++ /dev/null
@@ -1,1493 +0,0 @@
-/*
- * Copyright (c)2019 ZeroTier, Inc.
- *
- * Use of this software is governed by the Business Source License included
- * in the LICENSE.TXT file in the project's root directory.
- *
- * Change Date: 2023-01-01
- *
- * On the date above, in accordance with the Business Source License, use
- * of this software will be governed by version 2.0 of the Apache License.
- */
-/****/
-
-/*
- * This is a high-throughput minimal root server. It implements only
- * those functions of a ZT node that a root must perform and does so
- * using highly efficient multithreaded I/O code. It's only been
- * thoroughly tested on Linux but should also run on BSDs.
- *
- * Root configuration file format (JSON):
- *
- * {
- * "name": Name of this root for documentation/UI purposes (string)
- * "port": UDP port (int)
- * "httpPort": Local HTTP port for basic stats (int)
- * "relayMaxHops": Max hops (up to 7)
- * "planetFile": Location of planet file for pre-2.x peers (string)
- * "statsRoot": If present, path to periodically save stats files (string)
- * "s_siblings": [
- * {
- * "name": Sibling name for UI/documentation purposes (string)
- * "id": Full public identity of subling (string)
- * "ip": IP address of sibling (string)
- * "port": port of subling (for ZeroTier UDP) (int)
- * }, ...
- * ]
- * }
- *
- * The only required field is port. If statsRoot is present then files
- * are periodically written there containing the root's current state.
- * It should be a memory filesystem like /dev/shm on Linux as these
- * files are large and rewritten frequently and do not need to be
- * persisted.
- *
- * s_siblings are other root servers that should receive packets to peers
- * that we can't find. This can occur due to e.g. network topology
- * hiccups, IP blockages, etc. s_siblings are used in the order in which
- * they appear with the first alive sibling being used.
- */
-
-#include "../ext/cpp-httplib/httplib.h"
-#include "../ext/json/json.hpp"
-#include "../node/Address.hpp"
-#include "../node/CertificateOfMembership.hpp"
-#include "../node/Constants.hpp"
-#include "../node/Identity.hpp"
-#include "../node/InetAddress.hpp"
-#include "../node/Meter.hpp"
-#include "../node/MulticastGroup.hpp"
-#include "../node/Mutex.hpp"
-#include "../node/Packet.hpp"
-#include "../node/SharedPtr.hpp"
-#include "../node/Utils.hpp"
-#include "../node/AES.hpp"
-#include "../osdep/BlockingQueue.hpp"
-#include "../osdep/OSUtils.hpp"
-#include "geoip-html.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include