mirror of https://github.com/oxen-io/lokinet
Remove obsolete bigs
Removes stuff we didn't end up needing/using: - Lokinet.modulemap - apple bits from lokinet.cpp (we don't use lokinet.cpp at all on macos anymore). - dnsproxy/extension C++ headers - apple-specific network extension config in llarp::config::Config
This commit is contained in:
parent
12e00b7a99
commit
831cc23de1
|
@ -1,10 +1,7 @@
|
||||||
|
|
||||||
add_executable(lokinet-vpn lokinet-vpn.cpp)
|
add_executable(lokinet-vpn lokinet-vpn.cpp)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(LOKINET_SWIFT_SOURCES lokinet.swift)
|
add_executable(lokinet lokinet.swift)
|
||||||
add_executable(lokinet ${LOKINET_SWIFT_SOURCES})
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Lokinet.modulemap.in ${CMAKE_CURRENT_BINARY_DIR}/swift/LokinetExtension/module.modulemap ESCAPE_QUOTES @ONLY)
|
|
||||||
target_include_directories(lokinet PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/swift)
|
|
||||||
enable_lto(lokinet)
|
enable_lto(lokinet)
|
||||||
else()
|
else()
|
||||||
add_executable(lokinet lokinet.cpp)
|
add_executable(lokinet lokinet.cpp)
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
module LokinetExtension {
|
|
||||||
header "@CMAKE_SOURCE_DIR@/include/lokinet-extension.hpp"
|
|
||||||
}
|
|
|
@ -11,10 +11,6 @@
|
||||||
#include <dbghelp.h>
|
#include <dbghelp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#include <llarp/util/logging/apple_logger.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
|
|
||||||
#include <cxxopts.hpp>
|
#include <cxxopts.hpp>
|
||||||
|
@ -400,10 +396,6 @@ lokinet_main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#ifdef __APPLE__
|
|
||||||
llarp::LogContext::Instance().logStream.reset(new llarp::NSLogStream{});
|
|
||||||
#endif
|
|
||||||
|
|
||||||
llarp::RuntimeOptions opts;
|
llarp::RuntimeOptions opts;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include <Foundation/Foundation.h>
|
|
||||||
#include <NetworkExtension/NetworkExtension.h>
|
|
||||||
|
|
||||||
struct DNSImpl;
|
|
||||||
|
|
||||||
@interface DNSProvider : NEDNSProxyProvider
|
|
||||||
{
|
|
||||||
struct DNSImpl* m_Impl;
|
|
||||||
}
|
|
||||||
- (void)startProxyWithOptions:(NSDictionary<NSString*, id>*)options
|
|
||||||
completionHandler:(void (^)(NSError* error))completionHandler;
|
|
||||||
|
|
||||||
- (void)stopProxyWithReason:(NEProviderStopReason)reason
|
|
||||||
completionHandler:(void (^)(void))completionHandler;
|
|
||||||
|
|
||||||
- (BOOL)handleNewFlow:(NEAppProxyFlow*)flow;
|
|
||||||
|
|
||||||
@end
|
|
|
@ -1,21 +0,0 @@
|
||||||
#pragma once
|
|
||||||
#include <Foundation/Foundation.h>
|
|
||||||
#include <NetworkExtension/NetworkExtension.h>
|
|
||||||
|
|
||||||
struct ContextWrapper;
|
|
||||||
|
|
||||||
@interface LLARPPacketTunnel : NEPacketTunnelProvider
|
|
||||||
{
|
|
||||||
struct ContextWrapper* m_Context;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)startTunnelWithOptions:(NSDictionary<NSString*, NSObject*>*)options
|
|
||||||
completionHandler:(void (^)(NSError* error))completionHandler;
|
|
||||||
|
|
||||||
- (void)stopTunnelWithReason:(NEProviderStopReason)reason
|
|
||||||
completionHandler:(void (^)(void))completionHandler;
|
|
||||||
|
|
||||||
- (void)handleAppMessage:(NSData*)messageData
|
|
||||||
completionHandler:(void (^)(NSData* responseData))completionHandler;
|
|
||||||
|
|
||||||
@end
|
|
|
@ -1446,17 +1446,4 @@ namespace llarp
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
std::shared_ptr<Config>
|
|
||||||
Config::NetworkExtensionConfig(std::string exit)
|
|
||||||
{
|
|
||||||
auto config = std::make_shared<Config>(fs::path{});
|
|
||||||
config->Load();
|
|
||||||
config->logging.m_logLevel = eLogInfo;
|
|
||||||
config->bootstrap.files.clear();
|
|
||||||
config->network.m_LNSExitMap.Insert(IPRange{}, exit);
|
|
||||||
return config;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // namespace llarp
|
} // namespace llarp
|
||||||
|
|
|
@ -260,11 +260,6 @@ namespace llarp
|
||||||
static std::shared_ptr<Config>
|
static std::shared_ptr<Config>
|
||||||
EmbeddedConfig();
|
EmbeddedConfig();
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
static std::shared_ptr<Config>
|
|
||||||
NetworkExtensionConfig(std::string exit);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Load (initialize) a default config.
|
/// Load (initialize) a default config.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue