diff --git a/contrib/readme.md b/contrib/readme.md new file mode 100644 index 000000000..09cb78515 --- /dev/null +++ b/contrib/readme.md @@ -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 diff --git a/daemon/lokinetctl.cpp b/daemon/lokinetctl.cpp deleted file mode 100644 index 8eaf099aa..000000000 --- a/daemon/lokinetctl.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include - -namespace -{ - bool - dumpRc(const std::vector& 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())( - "h,help", "help", cxxopts::value())( - "c,config", - "config file", - cxxopts::value()->default_value(llarp::GetDefaultConfigPath().string()))( - "dump", "dump rc file", cxxopts::value>(), "FILE"); - - try - { - const auto result = options.parse(argc, argv); - - if (result.count("verbose") > 0) - { - SetLogLevel(llarp::eLogDebug); - llarp::LogContext::Instance().logStream = - std::make_unique(true, std::cerr); - llarp::LogDebug("debug logging activated"); - } - else - { - SetLogLevel(llarp::eLogError); - llarp::LogContext::Instance().logStream = - std::make_unique(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>())) - { - return 1; - } - } - } - catch (const cxxopts::OptionParseException& ex) - { - std::cerr << ex.what() << std::endl; - std::cout << options.help() << std::endl; - return 1; - } - - return 0; -} diff --git a/daemon/readme.md b/daemon/readme.md new file mode 100644 index 000000000..32bbf198a --- /dev/null +++ b/daemon/readme.md @@ -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. + diff --git a/external/readme.md b/external/readme.md new file mode 100644 index 000000000..681e6e005 --- /dev/null +++ b/external/readme.md @@ -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 diff --git a/jni/readme.md b/jni/readme.md new file mode 100644 index 000000000..0ab7564d7 --- /dev/null +++ b/jni/readme.md @@ -0,0 +1 @@ +jni binding for lokinet vpn using android vpn api diff --git a/llarp/readme.md b/llarp/readme.md new file mode 100644 index 000000000..6861afae4 --- /dev/null +++ b/llarp/readme.md @@ -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) diff --git a/pybind/readme.md b/pybind/readme.md new file mode 100644 index 000000000..105f3b85b --- /dev/null +++ b/pybind/readme.md @@ -0,0 +1 @@ +pybind lokinet module for integration tests and network simulation diff --git a/test/readme.md b/test/readme.md new file mode 100644 index 000000000..a98fb57a4 --- /dev/null +++ b/test/readme.md @@ -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.