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:
Jason Rhinelander 2021-09-02 19:16:43 -03:00
parent 12e00b7a99
commit 831cc23de1
7 changed files with 1 additions and 74 deletions

View File

@ -1,10 +1,7 @@
add_executable(lokinet-vpn lokinet-vpn.cpp)
if(APPLE)
set(LOKINET_SWIFT_SOURCES 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)
add_executable(lokinet lokinet.swift)
enable_lto(lokinet)
else()
add_executable(lokinet lokinet.cpp)

View File

@ -1,4 +0,0 @@
module LokinetExtension {
header "@CMAKE_SOURCE_DIR@/include/lokinet-extension.hpp"
}

View File

@ -11,10 +11,6 @@
#include <dbghelp.h>
#endif
#ifdef __APPLE__
#include <llarp/util/logging/apple_logger.hpp>
#endif
#include <csignal>
#include <cxxopts.hpp>
@ -400,10 +396,6 @@ lokinet_main(int argc, char* argv[])
{
return result;
}
#ifdef __APPLE__
llarp::LogContext::Instance().logStream.reset(new llarp::NSLogStream{});
#endif
llarp::RuntimeOptions opts;
#ifdef _WIN32

View File

@ -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

View File

@ -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

View File

@ -1446,17 +1446,4 @@ namespace llarp
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

View File

@ -260,11 +260,6 @@ namespace llarp
static std::shared_ptr<Config>
EmbeddedConfig();
#ifdef __APPLE__
static std::shared_ptr<Config>
NetworkExtensionConfig(std::string exit);
#endif
private:
/// Load (initialize) a default config.
///