mirror of https://github.com/oxen-io/lokinet
add directory specific readmes
This commit is contained in:
parent
769bc1e8df
commit
23fd46c0db
|
@ -0,0 +1,75 @@
|
||||||
|
grab bag directory for non core related platform specific non source code
|
||||||
|
|
||||||
|
[Network Manager shims](NetworkManager)
|
||||||
|
|
||||||
|
[apparmor profiles](apparmor)
|
||||||
|
|
||||||
|
[default self signed network bootstrap files](bootstrap)
|
||||||
|
|
||||||
|
[continuous integration scripts](ci)
|
||||||
|
|
||||||
|
[cross compile cmake toolchains](cross)
|
||||||
|
|
||||||
|
[embedded lokinet example code](liblokinet)
|
||||||
|
|
||||||
|
[macos related hacks and associated hellscape items](macos)
|
||||||
|
|
||||||
|
[static deps patch files](patches)
|
||||||
|
|
||||||
|
[python scripts](py)
|
||||||
|
|
||||||
|
[systemd-resolved profiles](systemd-resolved)
|
||||||
|
|
||||||
|
android build shim:
|
||||||
|
|
||||||
|
* android.sh
|
||||||
|
* android-configure.sh
|
||||||
|
|
||||||
|
windows via mingw cross compiler build shim:
|
||||||
|
|
||||||
|
* windows.sh
|
||||||
|
* windows-configure.sh
|
||||||
|
|
||||||
|
macos build shim:
|
||||||
|
|
||||||
|
* mac.sh
|
||||||
|
|
||||||
|
iphone build shim:
|
||||||
|
|
||||||
|
* ios.sh
|
||||||
|
|
||||||
|
linux cross compile build shim:
|
||||||
|
|
||||||
|
* cross.sh
|
||||||
|
|
||||||
|
apply multiple patches script:
|
||||||
|
|
||||||
|
* apply-patches.sh
|
||||||
|
|
||||||
|
[bencode](https://www.bittorrent.org/beps/bep_0003.html#bencoding) pretty-print script:
|
||||||
|
|
||||||
|
* bencode-dump.py
|
||||||
|
|
||||||
|
deb.oxen.io apt repo pubkey:
|
||||||
|
|
||||||
|
* deb.oxen.io.gpg
|
||||||
|
|
||||||
|
clang-format / jsonnetfmt / swiftformat helper, will check or correct code style:
|
||||||
|
|
||||||
|
* format.sh
|
||||||
|
|
||||||
|
git hooks:
|
||||||
|
|
||||||
|
* git-hook-pre-push.sh
|
||||||
|
|
||||||
|
base16 to [z-base32](https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt) converter
|
||||||
|
|
||||||
|
* hex-to-base32z.py
|
||||||
|
|
||||||
|
lokinet logo:
|
||||||
|
|
||||||
|
* lokinet.svg
|
||||||
|
|
||||||
|
cpack installer text:
|
||||||
|
|
||||||
|
* readme-installer.txt
|
|
@ -1,92 +0,0 @@
|
||||||
#include <llarp/config/config.hpp>
|
|
||||||
#include <llarp/router_contact.hpp>
|
|
||||||
#include <llarp/util/logging/logger.hpp>
|
|
||||||
#include <llarp/util/logging/ostream_logger.hpp>
|
|
||||||
|
|
||||||
#include <cxxopts.hpp>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
bool
|
|
||||||
dumpRc(const std::vector<std::string>& files)
|
|
||||||
{
|
|
||||||
nlohmann::json result;
|
|
||||||
for (const auto& file : files)
|
|
||||||
{
|
|
||||||
llarp::RouterContact rc;
|
|
||||||
const bool ret = rc.Read(file.c_str());
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
{
|
|
||||||
result[file] = rc.ToJson();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << "file = " << file << " was not a valid rc file\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::cout << result << "\n";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char* argv[])
|
|
||||||
{
|
|
||||||
cxxopts::Options options(
|
|
||||||
"lokinetctl",
|
|
||||||
"LokiNET is a free, open source, private, "
|
|
||||||
"decentralized, \"market based sybil resistant\" "
|
|
||||||
"and IP based onion routing network");
|
|
||||||
|
|
||||||
options.add_options()("v,verbose", "Verbose", cxxopts::value<bool>())(
|
|
||||||
"h,help", "help", cxxopts::value<bool>())(
|
|
||||||
"c,config",
|
|
||||||
"config file",
|
|
||||||
cxxopts::value<std::string>()->default_value(llarp::GetDefaultConfigPath().string()))(
|
|
||||||
"dump", "dump rc file", cxxopts::value<std::vector<std::string>>(), "FILE");
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
const auto result = options.parse(argc, argv);
|
|
||||||
|
|
||||||
if (result.count("verbose") > 0)
|
|
||||||
{
|
|
||||||
SetLogLevel(llarp::eLogDebug);
|
|
||||||
llarp::LogContext::Instance().logStream =
|
|
||||||
std::make_unique<llarp::OStreamLogStream>(true, std::cerr);
|
|
||||||
llarp::LogDebug("debug logging activated");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetLogLevel(llarp::eLogError);
|
|
||||||
llarp::LogContext::Instance().logStream =
|
|
||||||
std::make_unique<llarp::OStreamLogStream>(true, std::cerr);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.count("help") > 0)
|
|
||||||
{
|
|
||||||
std::cout << options.help() << std::endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.count("dump") > 0)
|
|
||||||
{
|
|
||||||
if (!dumpRc(result["dump"].as<std::vector<std::string>>()))
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (const cxxopts::OptionParseException& ex)
|
|
||||||
{
|
|
||||||
std::cerr << ex.what() << std::endl;
|
|
||||||
std::cout << options.help() << std::endl;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
this contains the main functions for all of our executables
|
||||||
|
|
||||||
|
lokinet.cpp - lokinet full daemon
|
||||||
|
|
||||||
|
lokinet.swift - macos sysex/appex
|
||||||
|
|
||||||
|
lokinet-bootstrap.cpp - lokinet-bootstrap binary (deprecated / to be removed)
|
||||||
|
|
||||||
|
lokinet-vpn.cpp - lokinet-vpn tool for rpc control of lokinet, needs a better name.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
directory for git submodules
|
||||||
|
|
||||||
|
* cpr: curl for people, used by lokinet-bootstrap toolchain (to be removed)
|
||||||
|
* cxxopts: cli argument parser (to be removed)
|
||||||
|
* ghc-filesystem: `std::filesystem` shim lib for older platforms (like macos)
|
||||||
|
* ngtcp2: quic implementation
|
||||||
|
* nlohmann: json parser
|
||||||
|
* oxen-encoding: [bencode](https://www.bittorrent.org/beps/bep_0003.html#bencoding)/endian header-only library
|
||||||
|
* oxen-logging: spdlog wrapper library
|
||||||
|
* oxen-mq: zmq wrapper library for threadpool and rpc
|
||||||
|
* pybind11: for pybind modules
|
||||||
|
* sqlite_orm: for peer stats db
|
||||||
|
* uvw: libuv header only library for main event loop
|
|
@ -0,0 +1 @@
|
||||||
|
jni binding for lokinet vpn using android vpn api
|
|
@ -0,0 +1,55 @@
|
||||||
|
this directory contains the meat of the lokinet core implemenation
|
||||||
|
|
||||||
|
components:
|
||||||
|
|
||||||
|
[apple platform specific bits](apple)
|
||||||
|
|
||||||
|
[configuration bits](config)
|
||||||
|
|
||||||
|
[network consensus parts](consensus)
|
||||||
|
|
||||||
|
[compile time constants](constants)
|
||||||
|
|
||||||
|
[cryptography interface and implementations](crypto)
|
||||||
|
|
||||||
|
[DHT related code](dht)
|
||||||
|
|
||||||
|
[DNS client/server/parsing library](dns)
|
||||||
|
|
||||||
|
[event loop interface and implementations](ev)
|
||||||
|
|
||||||
|
[snode endpoint backend implementation](exit)
|
||||||
|
|
||||||
|
[onion endpoint frontend adapters](handlers)
|
||||||
|
|
||||||
|
[lokinet wire protocol](iwp)
|
||||||
|
|
||||||
|
[lokinet link layer interface types](link)
|
||||||
|
|
||||||
|
[link layer (node to node) messages](messages)
|
||||||
|
|
||||||
|
[platform agnostic-ish network api](net)
|
||||||
|
|
||||||
|
[onion path management](path)
|
||||||
|
|
||||||
|
[peer stats collection (likely to be refactored)](peerstats)
|
||||||
|
|
||||||
|
[quic over lokinet abstraction](quic)
|
||||||
|
|
||||||
|
[central god objects](router)
|
||||||
|
|
||||||
|
[routing (onion routed over paths) messages](routing)
|
||||||
|
|
||||||
|
[rpc client/server](rpc)
|
||||||
|
|
||||||
|
[onion endpoint backend implemenation](service)
|
||||||
|
|
||||||
|
[net simulation code (likely to be binned)](simulation)
|
||||||
|
|
||||||
|
[net simulation tooling (used by pybind)](tooling)
|
||||||
|
|
||||||
|
[utility function dumping ground (to be fixed up)](util)
|
||||||
|
|
||||||
|
[platform specific vpn bits with high level abstractions](vpn)
|
||||||
|
|
||||||
|
[windows platform bits](win32)
|
|
@ -0,0 +1 @@
|
||||||
|
pybind lokinet module for integration tests and network simulation
|
|
@ -0,0 +1,5 @@
|
||||||
|
unit tests and such
|
||||||
|
|
||||||
|
to enable unit tests, add cmake flag `-DWITH_TESTS=ON`
|
||||||
|
|
||||||
|
unit tests can be built and run with the `check` target.
|
Loading…
Reference in New Issue