|
|
|
@ -8,26 +8,7 @@ set(TRANSPORT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../transport) |
|
|
|
# libuasync — low-level runtime library |
|
|
|
# libuasync — low-level runtime library |
|
|
|
# ============================================================================ |
|
|
|
# ============================================================================ |
|
|
|
|
|
|
|
|
|
|
|
set(UASYNC_SOURCES |
|
|
|
file(GLOB UASYNC_SOURCES "${LIB_DIR}/*.c" "${LIB_DIR}/liblmdb/*.c") |
|
|
|
${LIB_DIR}/ll_queue.c |
|
|
|
|
|
|
|
${LIB_DIR}/u_async.c |
|
|
|
|
|
|
|
${LIB_DIR}/debug_config.c |
|
|
|
|
|
|
|
${LIB_DIR}/timeout_heap.c |
|
|
|
|
|
|
|
${LIB_DIR}/memory_pool.c |
|
|
|
|
|
|
|
${LIB_DIR}/sha256.c |
|
|
|
|
|
|
|
${LIB_DIR}/socket_compat.c |
|
|
|
|
|
|
|
${LIB_DIR}/platform_compat.c |
|
|
|
|
|
|
|
${LIB_DIR}/getmyip.c |
|
|
|
|
|
|
|
${LIB_DIR}/swm_min.c |
|
|
|
|
|
|
|
${LIB_DIR}/mem.c |
|
|
|
|
|
|
|
${LIB_DIR}/radix.c |
|
|
|
|
|
|
|
${LIB_DIR}/serialize.c |
|
|
|
|
|
|
|
${LIB_DIR}/json_flat.c |
|
|
|
|
|
|
|
${LIB_DIR}/tcp_io.c |
|
|
|
|
|
|
|
${LIB_DIR}/sqlite3.c |
|
|
|
|
|
|
|
${LIB_DIR}/liblmdb/mdb.c |
|
|
|
|
|
|
|
${LIB_DIR}/liblmdb/midl.c |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_library(uasync STATIC ${UASYNC_SOURCES}) |
|
|
|
add_library(uasync STATIC ${UASYNC_SOURCES}) |
|
|
|
|
|
|
|
|
|
|
|
@ -51,60 +32,12 @@ set_target_properties(uasync PROPERTIES |
|
|
|
# libutun — VPN core library (all src/ except utun.c) |
|
|
|
# libutun — VPN core library (all src/ except utun.c) |
|
|
|
# ============================================================================ |
|
|
|
# ============================================================================ |
|
|
|
|
|
|
|
|
|
|
|
# Common sources (all platforms) |
|
|
|
# Common sources (all platforms) — all .c from src/ except main entry point and ref/ dirs |
|
|
|
set(UTUN_COMMON_SOURCES |
|
|
|
file(GLOB_RECURSE UTUN_COMMON_SOURCES "${SRC_DIR}/*.c") |
|
|
|
${SRC_DIR}/utun_instance.c |
|
|
|
list(FILTER UTUN_COMMON_SOURCES EXCLUDE REGEX "/lwip_orig/") |
|
|
|
${SRC_DIR}/config_parser.c |
|
|
|
list(FILTER UTUN_COMMON_SOURCES EXCLUDE REGEX "/uip/") |
|
|
|
${SRC_DIR}/config_updater.c |
|
|
|
list(FILTER UTUN_COMMON_SOURCES EXCLUDE REGEX "/transport_layer/BBR/") |
|
|
|
${SRC_DIR}/routing_layer/route_lib.c |
|
|
|
list(REMOVE_ITEM UTUN_COMMON_SOURCES "${SRC_DIR}/utun.c") |
|
|
|
${SRC_DIR}/routing_layer/route6_lib.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/topo_group.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/route_ping.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/nat_detection.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/topo_node.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/topo_node_sqlite.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/route_connectivity.c |
|
|
|
|
|
|
|
${SRC_DIR}/db_sync.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/conn_mgr.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/topo_recovery.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/topo_group_connect.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/routing.c |
|
|
|
|
|
|
|
${SRC_DIR}/tun_if.c |
|
|
|
|
|
|
|
${SRC_DIR}/tun_route.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp_connections.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp_bbr.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp_loadbalancer.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp_debug.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp_dump.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/secure_channel.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/crc32.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/stcp_link.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/stcp.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/stcp_server.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/stcp_client.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/pkt_normalizer.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/packet_dump.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp_api.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/etcp_connect.c |
|
|
|
|
|
|
|
${SRC_DIR}/control_server.c |
|
|
|
|
|
|
|
${SRC_DIR}/firewall.c |
|
|
|
|
|
|
|
${SRC_DIR}/eim_nat.c |
|
|
|
|
|
|
|
${SRC_DIR}/nat_transport.c |
|
|
|
|
|
|
|
${SRC_DIR}/transport_layer/dummynet.c |
|
|
|
|
|
|
|
${SRC_DIR}/ntp_time.c |
|
|
|
|
|
|
|
${SRC_DIR}/ntp_node_time.c |
|
|
|
|
|
|
|
${SRC_DIR}/routing_layer/etcp_router.c |
|
|
|
|
|
|
|
${SRC_DIR}/proxy/tcp_proxy_client.c |
|
|
|
|
|
|
|
${SRC_DIR}/proxy/tcp_proxy_server.c |
|
|
|
|
|
|
|
${SRC_DIR}/proxy/udp_proxy.c |
|
|
|
|
|
|
|
${SRC_DIR}/proxy/socks_proxy.c |
|
|
|
|
|
|
|
${SRC_DIR}/proxy/icmp_proxy.c |
|
|
|
|
|
|
|
${SRC_DIR}/lwip_tcp/lwip_pbuf.c |
|
|
|
|
|
|
|
${SRC_DIR}/lwip_tcp/lwip_tcp.c |
|
|
|
|
|
|
|
${SRC_DIR}/lwip_tcp/lwip_tcp_in.c |
|
|
|
|
|
|
|
${SRC_DIR}/lwip_tcp/lwip_tcp_out.c |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Platform-specific TUN implementation |
|
|
|
# Platform-specific TUN implementation |
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
|
|
|
|