Commit Graph

4132 Commits (dfb62d06ce44b1c0032311e11a86273a76836e13)

Author SHA1 Message Date
Stephen Shelton 159447b984
Don't "safely" visit relays in RouterHive 4 years ago
Stephen Shelton 305795315b
Specify disabling RC gossiping (testing only) properly 4 years ago
Stephen Shelton 0f074cff8c
Remove ambguity WRT loading and passing of Config 4 years ago
Stephen Shelton f607b99dbe
Fixes to Context::Configure with default config 4 years ago
Stephen Shelton ced2ac64fb
Remove last remnants of 'worker' 4 years ago
Stephen Shelton cdaa28bfd3
Use QueueDiskIO instead of diskworker for db flushing 4 years ago
Stephen Shelton 88c3e9ce00
Remove worker thread parameter from Router constructors 4 years ago
Stephen Shelton ec20d94c6b
Fix Context::Configure() 4 years ago
Stephen Shelton ed47ba998f
Minor fixes around Context 4 years ago
Stephen Shelton 552dcce5fd
Use inheritance to handle Hive injection 4 years ago
Stephen Shelton b0d8568452
Remove llarp C API usage from RouterHive 4 years ago
Stephen Shelton 84c83a2400
Add specialized subclass of Router for Hive 4 years ago
Stephen Shelton e38a507551
<3 Windows (prefer fs::path::string() over native()) 4 years ago
Stephen Shelton 93bafcf142
Set up sqlite3 deps 'if NOT TAGRET sqlite3' 4 years ago
Stephen Shelton 186a35c0e2
Appease clang (fixes for minor compilation errors) 4 years ago
Stephen Shelton fd230dd93b
<3 apple 4 years ago
Stephen Shelton 6e1a23cdc7
Use pkg_check_modules instead of find_package for sqlite3 4 years ago
Stephen Shelton 0ecdda7a89
make format 4 years ago
Stephen Shelton 4aa6f8e2df
Use find_package() for sqlite3 4 years ago
Stephen Shelton aeb0c2be3a
Remove ability to stop routers from gossiping for now 4 years ago
Stephen Shelton bdac43e19f
Peer stats test which artificially stops a router from gossiping its RC 4 years ago
Stephen Shelton 63f41d6a98
Introduce mutex for hive's routers 4 years ago
Stephen Shelton 3b6f84c68c
Peek at peer stats db in test_peer_stats 4 years ago
Stephen Shelton c4cbbd6731
RouterHive: store router contexts by routerId instead of index 4 years ago
Stephen Shelton d1b629f494
RouterHive ConnectionAttemptEvent 4 years ago
Stephen Shelton d69d538f1a
Add missing files 4 years ago
Stephen Shelton b2a72dd46a
Initial test_peer_stats hive test 4 years ago
Stephen Shelton 2453fff10b
Piggyback on link callbacks to add peer stats 4 years ago
Stephen Shelton cb8e5354f5
Add some breadcrumbs about how ILinkLayer's callbacks are used 4 years ago
Stephen Shelton c9faddc8e4
Use fs::path since mac doesn't support std::filesystem 4 years ago
Stephen Shelton 5a8f390b3b
Make mutex mutable, fix typo 4 years ago
Stephen Shelton 023e061146
Make [router]:enable-peer-stats only valid for client 4 years ago
Stephen Shelton 54017652d6
log-- 4 years ago
Stephen Shelton d897099e1d
Track traffic peerstats 4 years ago
Stephen Shelton 77b98459dd
Implement RouterID serialization in sqlite_orm 4 years ago
Stephen Shelton a9ce319e76
Make llarp_time_t serializable in sqlite_orm 4 years ago
Stephen Shelton aa1c8f257f
Sort out peerstats receive <-> expiry windows 4 years ago
Stephen Shelton 4b4284ccf4
PeerDb sqlite optimizations 4 years ago
Stephen Shelton 5e05defc76
Add API query for peer stats, other related fixes 4 years ago
Stephen Shelton 595288e046
Add PeerDb::handleGossipedRC 4 years ago
Stephen Shelton 7109ddc951
Add PeerDb::modifyPeerStats() 4 years ago
Stephen Shelton 4f4192e272
constexpr 4 years ago
Stephen Shelton 2a30e7dac2
Add PeerDb to Router 4 years ago
Stephen Shelton cc6e9c882a
Use foo.snode as peerstats unique id, test file-backed db 4 years ago
Stephen Shelton a30806b375
Some sqlite_orm related fixes 4 years ago
Stephen Shelton 8adb6295fc
Initialize sqlite_orm and start interacting with it 4 years ago
Stephen Shelton 73c9ddff52
Begin peer stats infrastructure 4 years ago
Jeff Becker 2c0c6aa819
log error instead of executing job 4 years ago
Jeff Becker d7ff6c579c
address feedback from jason
* split up ipv6 netmask
* revert iwp ack interval change
* c++17-isms in ip range map
* lambda-ize nodedb
* mutable lambdas in transit hops
* perfect forwarding of args in abstract router
* mutable lambdas in lokid rpc client
* notes in readme about nproc
4 years ago
Jeff Becker d85c7bc628
remove wrapper and just use a lambda that throws on non empty value 4 years ago
Jeff Becker a0dc2e795c
add a wrapper that always throws with a custom error message
use that wrapper for lokid.jsonrpc
4 years ago
Jeff Becker a9109aa91b
* deprecate old unused lokid rpc options
* use lokimq::address in config and in lokid rpc
* bump lokimq submodule
4 years ago
Jeff Becker 80919a3b76
address feedback.
* use exceptions when fetching identity key instead of std::optional, will throw on fail
* fix up config options for endpoint auth and add better docs
* add llarp::serive::AuthType enum for controlling what kind of endpoint auth to use
4 years ago
Jason Rhinelander a7c42ab2bd
Use lokimq's hex/base32z encoding/decoding 4 years ago
Jeff Becker e85efcf7ce
move include so it's included on all platforms including windows 4 years ago
Jeff Becker 00aa78c80a
it's safe to call reply from another thread because all it does is fufill a promoise 4 years ago
Jeff Becker 0f21eeccb0
* rework exit codepath to allow multiple exits
* rework net code for ip ranges to be cleaner
* clean up endpoint auth code
* refactor config to validate network configs before setting up endpoints
* remove buildone from path/pathbuilder.cpp so we don't spam connection attempts
4 years ago
Jeff Becker 3cdca30a74
more auth shit 4 years ago
Jeff Becker 0d6e3bcd89
fix crashing tests 4 years ago
Jeff Becker 98a3b45f16
disable logging to see why ci tests die like a sucka 4 years ago
Jeff Becker 63b56d55a9
check pw and pw_dir to be not null so that if either are null it bails to else block 4 years ago
Jeff Becker 2371e416bd
dont use $HOME when checking for default data dir 4 years ago
Jeff Becker e13e886df9
fix up event loop crap so that unit tests pass 4 years ago
Jeff Becker e95b9d530e
fix unit tests, make them pass 4 years ago
Jeff Becker 1779f33506
fix makefile fromat target
use lokimq::address instead of std::string or std::string_view
4 years ago
Jeff Becker ca9e015ca4
virtual destructor 4 years ago
Jeff Becker 397d558af8
wtf 4 years ago
Jeff Becker 59eb1b0842
make format 4 years ago
Jeff Becker f1e7fc2cba
make format and update submodule 4 years ago
Jeff Becker f4971a88fd
use lokimq workers instead of llarp:🧵:ThreadPool 4 years ago
Jeff Becker 5abf111159
endpoint auth whitelist 4 years ago
Jeff Becker 9f11b03016
enable exit node again 4 years ago
Jeff Becker a42d3d51c3
more 4 years ago
Jeff Becker 1e8368b636
make it compile 4 years ago
Jeff Becker 61c5808765
exit authentication (initial) 4 years ago
Jeff Becker be01808a6b
more 4 years ago
Jeff Becker c5dbb670ca
set sane defaults for config, implement lmq rpc server, update lokinetmon 4 years ago
Jeff Becker 6bbf7beaf5
add stubs for lmq rpc server 4 years ago
Jeff Becker 1175a583d2
initial working code 4 years ago
Stephen Shelton 13b0a4f2fc
WIP: LokidRpcClient 4 years ago
Jeff Becker 9bfff61d08
initial wack at lokimq 4 years ago
Stephen Shelton fd4b03f896
WIP: LokidRpcClient 4 years ago
Stephen Shelton 17026a0b21
Remove libabyss and rpc::Caller/rpc::Server 4 years ago
Jeff Becker 749c5a813c
require at least 2 hops because otherwise stuff wont publish 4 years ago
Jeff Becker d5b4dbe052
more 4 years ago
Jeff Becker b1259e25c5
set sane defaults for config, implement lmq rpc server, update lokinetmon 4 years ago
Jeff Becker fb8b8e2e56
add stubs for lmq rpc server 4 years ago
Jeff Becker ad882d0d70
initial working code 4 years ago
Stephen Shelton 78256e3228
WIP: LokidRpcClient 4 years ago
Jeff Becker 0006751d80
initial wack at lokimq 4 years ago
Stephen Shelton 91725a8530
WIP: LokidRpcClient 4 years ago
Stephen Shelton 11951510bf
Remove libabyss and rpc::Caller/rpc::Server 4 years ago
Stephen Shelton 0aa43c6b07
Pass RuntimeOptions instead of 'bool isRelay' 4 years ago
Stephen Shelton daecd6eda5
Remove llarp_config and llarp_main 4 years ago
Stephen Shelton d85e48c9d0
Use llarp::Context::CallSafe() for vpn AsyncClose() 4 years ago
Stephen Shelton b5d6a73ffd
Rip out most of C API 4 years ago
Thomas Winget 32843510bb libunbound can now be built as a static dep 4 years ago
Thomas Winget 8f0330c9f2 std::vector instead of std::array 4 years ago
Thomas Winget b875d40491 restructure how upstream dns replies are handled
llarp::dns::Message does not fully support DNS packets,
so converting the upstream response to one will not work
for all query types.  Also it is kinda silly to begin with,
as the upstream reply is already a network packet, ready to go.
4 years ago
Thomas Winget 221e9ff5de make format 4 years ago
Thomas Winget df284cb757 proper CMake finding and using of libunbound 4 years ago
Thomas Winget c2a30692cf Implement upstream DNS using libunbound 4 years ago
Rick V dc52f8c2fe remove stray path separator 4 years ago
Rick V 2fe4c15792 why jeff why 4 years ago
Rick V a787db9b35 fix ipv4_hdr 4 years ago
Rick V 6d5155def4
jeff pls 4 years ago
Jeff Becker 6984cda3a6
add pybind and router hive to ci 4 years ago
Jeff Becker 3358a3371e
restore correct logstream 4 years ago
Jeff Becker 3d2990f90d
use llarp::LogSilencer to shut up loging in unit tests 4 years ago
Jeff Becker a73335579a
silence logging in regression test 4 years ago
Jeff Becker 800668348a
add regression test for key backup bug 4 years ago
Jeff Becker 019168fef0
remove unused local variable 4 years ago
Jeff Becker 1899debfb5
unfug transit hops 4 years ago
Stephen Shelton 193060d602
Undo client-related changes to RC creation
This partially reverts changes from
1497b829bd and intsead only prevents
clients from saving their RC to disk.
4 years ago
Jeff 098df580e8
Merge pull request #1298 from majestrate/unfug-transit-hops-2020-06-04
Unfug transit hops
4 years ago
Jeff Becker 9fb681eb7c
typo 4 years ago
Jeff Becker fe1dae8f30
fix transit hop job queuing 4 years ago
Stephen Shelton 980853804d
Remove log statement 4 years ago
Stephen Shelton cecafb3215
Undo unintentional revert? 4 years ago
Stephen Shelton 43ffe23f66
Remove obnoxious log statement 4 years ago
Stephen Shelton d8b12ce764
Let KeyManager assemble key filenames 4 years ago
Stephen Shelton 1497b829bd
Ignore our self.signed file if we're a client 4 years ago
Jeff bb14b44bcf
Merge pull request #1296 from majestrate/fix-one-hop-path-building-2020-06-02
fix one hop mode path builds
4 years ago
Jeff Becker ac26037c34
when in 1 hop mode we where hitting a case where we were failing to build paths
this was because we were trying to diversify the endpoints used which is not
appicable in 1 hop mode because first hops are sticky.
4 years ago
Stephen Shelton 91a2af0eda
Sanity checks around shared_from_this() 4 years ago
Jeff 45cda241f0
Merge pull request #1272 from majestrate/exit-nodes-2020-05-16
exit traffic via snapps
4 years ago
Jeff Becker f40ffc0fd6
simplify header for tom. 4 years ago
Jeff Becker 95e55a2544
consistent spelling and use std::max 4 years ago
Jeff Becker c6885ec285
remove Endpoint::GetExitRouters() 4 years ago
Jeff Becker 44c790b65c
revert back to for loop for simplicity 4 years ago
Jeff Becker acecb23eb3
make libuv event loop logic queue size configurable.
remove logic constructor that is no-op.
add constant for default logic queue size
add constant for transit hop queue size
4 years ago
Rick V 1340cd0dce remove some string conversions entirely 4 years ago
Rick V 5529371637 RouterContact::[Read|Write] now take a fs::path const ref 4 years ago
Rick V f62214cf8c
first pass fix wstring path conversions 4 years ago
Jeff Becker c47a210302
remove a std::move that prevents copy elision 4 years ago
Jeff Becker f25e9bb01f
use std::list here too 4 years ago
Jeff Becker db00d080f6
use std::list instead of std::vector because idfk man 4 years ago
Jeff Becker 9298313066
use std::move 4 years ago
Jeff Becker 96cbab33c3
style: put iterator erase in for loop update 4 years ago
Jeff Becker 44ff3a9928
copy assignment so we don't crash 4 years ago
Jeff Becker 149a01c80f
dont use std::bind, use lambda 4 years ago
Jeff Becker 403bc74493
unbreak unit tests 4 years ago
Jeff Becker f0eca908a4
use static_assert instead 4 years ago
Jeff Becker 4ad8ae253d
align to either 64bit or max_align_t which ever is smaller, for 32 bit. 4 years ago
Jeff Becker 7a5c193e4f
remove unused member 4 years ago
Jeff Becker 25a4bbd5ca
use std::swap 4 years ago
Jeff Becker 4a378ae934
remove logic thread from logic as it is now a thin wrapper arround the event loop 4 years ago
Jeff Becker eb0abbf1ff
add eraseif to decaying hashset 4 years ago
Jeff Becker 39f8f17b53
dont set callback if non provided 4 years ago
Jeff Becker 1230b81517
make format 4 years ago
Jeff Becker b8da447053
use const iterators explicitly 4 years ago
Jeff Becker b8d262573a
use std::vector instead of thrashing heap with allocation 4 years ago
Jeff Becker c826d0a0b1
increase transit hop limits 4 years ago
Jeff Becker 3a776b3ed1
bounds checks and such 4 years ago
Jeff Becker a45f92dca7
use random good path for outbound traffic so that it uses an even spread accross
all paths
4 years ago
Jeff Becker 382e4215a8
path testing interval increase to reduce bandwidth use 4 years ago
Jeff Becker 00143e63f4
put replay filters on transit hops to reduce retransmissions. 4 years ago
Jeff Becker 114bdd5ce5
add move and copy constructors/assigment operators to ip_address 4 years ago
Jeff Becker 3eb006f78c
iwp/libuv cleanup: remove llarp_pkt_list and all users of it as it's broke 4 years ago
Jeff Becker 6af498092b
exit traffic via loki addresses 4 years ago
Jason Rhinelander 854619f04f Workaround for ghc::filesystem (mac) compatibility 4 years ago
Jason Rhinelander d05e6716cb Remove llarp::str(string_view)
It was a workaround for pre-C++17 std::string which didn't support
passing a string_view to various functions/operators.  There's only one
place left that needs an explicit conversion, and that's where it is
used as a map key; so just be explicit there and remove llarp::str()
everywhere else.
4 years ago
Jason Rhinelander 3bb24580a4 make format 4 years ago
Jason Rhinelander ebd2142114 Don't use std::optional::value() because f u macos
This replaces all use of std::optional's `opt.value()` with `*opt`
because macOS is great and the ghost of Steve Jobs says that actually
supporting std::optional's value() method is not for chumps before macOS
10.14.  So don't use it because Apple is great.

Pretty much all of our use of it actually is done better with operator*
anyway (since operator* doesn't do a check that the optional has a
value).

Also replaced *most* of the `has_value()` calls with direct bool
context, except for one in the config section which looked really
confusing at a glance without a has_value().
4 years ago
Jason Rhinelander 7f9160bb6e Untangle some interdependencies
macOS doing a shared library build is not working without untangling
some of the interdependencies.  This commit does that, at least enough
to get macOS to compile.

This isn't the cleanest as currently implemented (we have some net/
things in `liblokinet-platform` and some in `liblokinet`, and likewise
ev/vpnio.cpp is in `liblokinet` while the rest of `ev/*` is in
`liblokinet-platform`).
4 years ago
Jason Rhinelander 97088719e0 Avoid reserved __identifiers
Identifier names with `__` in them are reserved for the implementation.
One leading underscore followed by a lower-case letter is fine though
(leading underscore followed by *upper*-case is, however, also
reserved).
4 years ago
Jason Rhinelander 60d704b25d Remove dead code 4 years ago
Jason Rhinelander f9bbc30c3d IsIPv4Bogon: constexpr array instead of a function-local static vector
The fixed-size array + not needing to do an atomic operation in the
function should allow better compiler optimization.

(And with C++17 the type and size are inferred).
4 years ago
Jason Rhinelander bdc9c7bfa8 Move IPRange out of net.hpp; free up TruncateV6 etc.
- Move IPRange into its own net/ip_range.hpp

- Move the static net::IPPacket::TruncateV6, etc. functions to free
net::TruncateV6, etc. functions (now from net/ip.hpp instead of
net/ip_packet.hpp).

- Make net::TruncateV6 and net::ExpandV4 constexpr.

- Add IPRange::FromIPv4 factory function (to replace the iprange_ipv4
free function)
4 years ago
Jason Rhinelander 72bf215da4 Move IPPacket header (part 1)
Rename net/ip.{cpp,hpp} to net/ip_packet.{cpp,hpp}.

(Doing this in two commits because I want to repurpose ip.hpp/ip.cpp,
and want git to figure out the history properly).
4 years ago
Jason Rhinelander be9ddf2ae1 Bring back ghc::filesystem for broke AF macos
macOS doesn't provide `<filesystem>` support when targetting anything
earlier than 10.15.
4 years ago
Stephen Shelton ffdeca5378
Initialize all primitive values in Config 4 years ago
Stephen Shelton ac225eb65e
Testing: explicitly initialize variable 4 years ago
Jason Rhinelander 604501b07f Fix cmake curl definition 4 years ago
Jeff abc127a78a
Merge pull request #1276 from despair86/sockaddr-fix
fix sockaddr on win32
4 years ago
Rick V 918a09c0cf fix sockaddr win32 and collapse headers on the unix side 4 years ago
Jason Rhinelander 28362fd6a6 Clean up curl define
It doesn't have to be win32-specific, we could (for example) use this on
mac as well to build without curl/SN support.
4 years ago
Jason Rhinelander 856cf82c0e Only link curl if we set up a curl target
Should fix win32 (which doesn't link to curl).
4 years ago
Jason Rhinelander c5faa86926 cmake refactor
Refactors many things in cmake to improve and simplify:

- don't use variable indirection for target names; target names are
*already* a variable of sorts.  (e.g. ${UTIL_LIB} is now just
lokinet-util).  cmake/basic_definitions.cmake is now gone.

- fix LTO enabling to use the standard cmake (3.9+) LTO mechanism rather
than shoving a bunch of flag hacks through link_libraries and
add_compile_options.  This also now enables LTO when building a shared
library (because previously the -flto hacks were only turned on in the
static code for some reason).

- build liblokinet as *either* shared library or static library, but not
both.  Building both makes things more complicated because they had
different names (lokinet-shared or lokinet-static) and seems pointless:
you generally want one or the other.  Now there is just the liblokinet
target, which will be shared or static depending on the value of
BUILD_SHARED_LIBS.

- Simplify lokinet-cryptography AVX2 code: just build *one* library, and
add in the additional AVX2 files when possible, rather than building two
and needing to merge them.

- Compress STATIC_LINK and STATIC_LINK_RUNTIME into just STATIC_LINK.
It makes no sense to use one of these (_RUNTIME) on Windows and the
other on non-Windows when they appear to try to do the same thing.

- remove a bunch of annotations from `endif(FOO)` -> `endif()`.

- move all the tuntap compilation code (including OS-specific source
file selection) into vendor/CMakeLists.txt and build tuntap as an
intermediate OBJECT library rather than keeping a global variable in 5
different files.

- move release motto define to root cmake; it made no sense being
duplicated in both unix.cmake and win32.cmake

- fix add_log_tag to not stomp on any existing source compile flags with
its definition.  Also use proper compile definition property instead of
cramming it into compile flags.

- make optimization/linker flags less hacky.  There's no reason for us
to force particular optimization flags because the cmake build type
already does that (e.g. -DCMAKE_BUILD_TYPE=Release does -O3).  Not doing
that also silences a bunch of cmake warnings because it thinks "-O0 -g3"
etc.  are link libraries (which is reasonable: that's what the code was
telling cmake they are).

- sets the default build type to RelWithDebInfo which gives us `-O2 -g`
if you don't specify a build type.

- Move PIC up (so that the things loaded in unix.cmake, notably libuv,
have it set).

- Add a custom `curl` interface library that carries the correct link
target and include paths for curl (system or bundled).
4 years ago
Jason Rhinelander ab4ee954b9 Remove DEBIAN option
This hasn't been used in a long time; the debian packaging lives in
separate branches instead.
4 years ago
Jason Rhinelander a45bec7c4f Removed RPI definition
This was a long-obsolete fix for things that don't matter anymore.
4 years ago
Jason Rhinelander 26ecf23ad8 Silence various warnings 4 years ago
Jason Rhinelander e03dfc751c Remove crypto_noop
It isn't used anywhere, and has bitrotted (it is marked final, but is
missing some required abstract method instances).
4 years ago
Jeff Becker fc5b28b66f
const correctness 4 years ago
Jeff Becker e56faba23d
make format 4 years ago
Jeff Becker 1780e86faa
fix up unit tests, make them all pass 4 years ago
Jeff Becker f04407f183
use only 1 uv_async_t for event loop wakeups
flush logic calls in there too as this was causing unit tests to hang
4 years ago
Jeff ad9edc4ecf
Merge pull request #1266 from majestrate/issue-1264-fix-setting-upstream-dns-2020-05-14
default to port 53 in dns section entries
4 years ago
Stephen Shelton ed31cdaacf
Cosmetic fixes 4 years ago
Jeff Becker 555b9721ce
keyfile was being initialized before being set by configure call.
this made it so that snapps always use ephemeral keys.
this fixes this.
4 years ago
Jeff Becker 09a356a8a4
dont use static local lambda 4 years ago
Jeff Becker edb5c9e873
keyfile was being initialized before being set by configure call.
this made it so that snapps always use ephemeral keys.
this fixes this.
4 years ago
Jeff Becker ebed21c392
DRY 4 years ago
Jeff Becker 3753dfbddb
IpAddresses in dns section config were not defaulting to port 53 when no port was provided.
Fixes #1264
4 years ago
Jason Rhinelander 6686668b48 Annotate netid mismatch message with (theirs)/(ours)
Every time I see this I don't know which one is wrong.  This helps.
4 years ago
Jason Rhinelander dccc663f31 Miss Match demands her name be removed from the code
(i.e. fix speeling mistack: missmatch -> mismatch)
4 years ago
Jeff e6a85d7176
Merge pull request #1263 from jagerman/c++17-niceties
C++17 niceties
4 years ago
Jason Rhinelander e470a6d73e C++17 niceties
- class template argument deduction lets us write `std::unique_lock
  foo{mutex}` instead of `std::unique_lock<mutex_type> foo{mutex}` which
  makes the `unique_lock` and `shared_lock` functions unnecessary.

- Replace GNU-specific warn_unused_result attribute with C++17-standard
  [[nodiscard]]

- Remove pre-C++17 workaround code for fold expressions, void_t
4 years ago
Jeff a5b09c47e1
Merge pull request #1262 from notlesh/bandaids-for-sockaddr-refactor-2020-05-11
Bandaids for sockaddr refactor 2020 05 11
4 years ago
Stephen Shelton 4dd4327f36
IpAddress::toString() support for IPv6 4 years ago
Stephen Shelton 043f993e41
Return stream in operator<<(stream, IpAddress) 4 years ago
Stephen Shelton 0a40892867
Implement SockAddr operator<() and operator==() 4 years ago
Stephen Shelton 1c7d57f207
Don't forget to return 4 years ago
Stephen Shelton c0f58c8159
Properly read in ExitInfo's address 4 years ago
Stephen Shelton e85105e738
Implement SockAddr's operator<<ostream 4 years ago
Stephen Shelton dfe71309f1
Add to/from in6_addr to SockAddr 4 years ago
Stephen Shelton fd145d6eeb
Make FIXME throws uniquely identifiable 4 years ago
Stephen Shelton 839fb42ba4
Hard code RPC's expectedHostname to 'localhost' 4 years ago
Stephen Shelton 0cd5d7a060
Derp 4 years ago
Stephen Shelton cd44caccaf
Attempt to get this SockAddr refactor up and running 4 years ago
Stephen Shelton 78d09f2ae5
Support SockAddr in from sockaddr and friends 4 years ago
Stephen Shelton e944bcb28a
Unit tests and fixes for SockAddr::fromString() 4 years ago
Stephen Shelton 0b54087689
Begin implementing SockAddr 4 years ago
Stephen Shelton aee96e53a3
Refactor Addr -> IpAddress/SockAddr 4 years ago
Jeff Becker 01cc2c86bf
format 4 years ago
Jeff Becker 635dc4fe13
unbreak router hive
llarp/config/config.cpp:
respect [network]:type option

llarp/handlers/exit.cpp:
when [network]:type is null dont init tun interface

llarp/service/context.cpp:
respect [network]:type option
change endpoint name back to "default"

llarp/tooling/router_hive.cpp:
dont use LogicCall for obtaining RCs from underlying relays, it crashes the mainloop and it's probably safe to readonly access RCs.

pybind/common.hpp:
remove typecasters as we use C++17 now

pybind/llarp/config.cpp:
remove SnappConfig
wire up NetworkConfig

pybind/llarp/handlers/pyhandler.hpp:
remove SnappConfig from constructor

pybind/llarp/handlers/pyhandler.cpp:
update constructor implementation to match header

test/hive/hive.py:
remove broke endpoint related code
wire up null endpoint option using NetworkConfig
use index at 0 for relays and clients instead of 1
dont add a python endpoint to all clients
4 years ago
Stephen Shelton 1cab83ad01
Expand upon IpAddress header, take in feedback 4 years ago
Stephen Shelton dff170712f
Gut Addr, replace with stubbed SockAddr and IpAddress 4 years ago
Jeff Becker 7e4fdc5b0e
check for zero address for bogons 4 years ago
Jeff Becker f1edca9fa1
additional cleanup of cruft 4 years ago
Jeff Becker c425355a6b
set data dir in in loadconfig too 4 years ago
Jeff Becker f307c25d3e
set datadir path when giving filename for config 4 years ago
Jeff Becker c4b5b641bb
default to default data dir given by params instead 4 years ago
Jeff Becker 1cbf50296c
only add endpoint for hidden service if not service node 4 years ago
Jeff Becker e33a1a2e0f
proper autodetect of ifname and ifaddr 4 years ago
Jeff Becker 6aa79b7ca9
set network section 4 years ago
Jason Rhinelander cd7fd1b6ad FIXME fix the FIXME 4 years ago
Jason Rhinelander 4f09090c58 Add [network]:enabled to ignored settings list
No one knows what this option does or did, but it is in some generated
config files.
4 years ago
Jason Rhinelander 1d98632fd3
Merge pull request #1254 from majestrate/network-ifaddr-ifname-2020-05-04
add ifname and ifaddr to network config parsing
4 years ago
Jeff Becker 96a6d81380
add ifname and ifaddr to network config parsing 4 years ago
Jason Rhinelander 4be7b2c8a5
Merge pull request #1253 from notlesh/better-config-error-messages-2020-05-04
Use more user-friendly error messages in config
4 years ago
Stephen Shelton f96fded525
Use more user-friendly error messages in config 4 years ago
Stephen Shelton 78eb0d976d
nonstd::optional -> std::optional 4 years ago
Jeff Becker 7c12347e80
upstream-dns -> upstream 4 years ago
Stephen Shelton 42a7bcd434
Less invasive fix for Addr 4 years ago
Stephen Shelton 5f0cbb4625
Don't forget to load your keys 4 years ago
Stephen Shelton 9ba0f117c7
Revert to previous "if hops > 0" logic in Configure() 4 years ago
Stephen Shelton 15918ff1c9
log-- 4 years ago
Stephen Shelton 960dc37c1f
Refactor TunEndpoint::Configure() (partially) 4 years ago
Stephen Shelton f2a26adcaa
Move all [endpoint] options to [network] 4 years ago
Stephen Shelton 559610ec94
Properly handle empty config default values 4 years ago
Stephen Shelton dd9ab0f1d5
Remove ability to have multiple endpoints/snodes from config 4 years ago
Stephen Shelton b7451b7632
Rip out tag, prefetch tags/addrs from Endpoint 4 years ago
Stephen Shelton 1d12e9d14e
Lokinet_INIT() is already checked in main(), so remove from config 4 years ago
Stephen Shelton 3198a8b139
Handle blacklist-snode validation in config 4 years ago
Stephen Shelton fde93ac02d
Don't take EndpointConfig by value 4 years ago
Stephen Shelton 2730491641
Remove NetworkConfig's freehand options 4 years ago
Stephen Shelton daf599b032
Update comment about ExitEndpoint config TODO 4 years ago
Stephen Shelton 2bc908cd40
Remove [dns]:local-dns in favor of [dns]:bind 4 years ago
Stephen Shelton 779658edd0
Refactor ExitEndpoint's config, mv dns ops from [network] to [dns] 4 years ago