Jeff Becker
a73335579a
silence logging in regression test
2020-06-08 09:07:49 -04:00
Jeff Becker
800668348a
add regression test for key backup bug
2020-06-08 08:42:10 -04:00
Jeff Becker
019168fef0
remove unused local variable
2020-06-05 11:40:19 -04:00
Jeff Becker
1899debfb5
unfug transit hops
2020-06-05 11:40:18 -04:00
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.
2020-06-04 15:02:05 -06:00
Jeff
098df580e8
Merge pull request #1298 from majestrate/unfug-transit-hops-2020-06-04
...
Unfug transit hops
2020-06-04 16:23:47 -04:00
Jeff Becker
9fb681eb7c
typo
2020-06-04 16:16:07 -04:00
Jeff Becker
fe1dae8f30
fix transit hop job queuing
2020-06-04 15:48:32 -04:00
Stephen Shelton
980853804d
Remove log statement
2020-06-04 13:34:15 -06:00
Stephen Shelton
cecafb3215
Undo unintentional revert?
2020-06-04 13:32:38 -06:00
Stephen Shelton
43ffe23f66
Remove obnoxious log statement
2020-06-04 13:21:05 -06:00
Stephen Shelton
d8b12ce764
Let KeyManager assemble key filenames
2020-06-04 12:38:35 -06:00
Stephen Shelton
1497b829bd
Ignore our self.signed file if we're a client
2020-06-04 11:05:23 -06:00
Jeff
bb14b44bcf
Merge pull request #1296 from majestrate/fix-one-hop-path-building-2020-06-02
...
fix one hop mode path builds
2020-06-02 11:29:51 -04:00
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.
2020-06-02 07:14:13 -04:00
Stephen Shelton
91a2af0eda
Sanity checks around shared_from_this()
2020-06-01 14:56:58 -06:00
Jeff
45cda241f0
Merge pull request #1272 from majestrate/exit-nodes-2020-05-16
...
exit traffic via snapps
2020-06-01 14:42:43 -04:00
Jeff Becker
f40ffc0fd6
simplify header for tom.
2020-06-01 13:58:45 -04:00
Jeff Becker
95e55a2544
consistent spelling and use std::max
2020-06-01 13:31:12 -04:00
Jeff Becker
c6885ec285
remove Endpoint::GetExitRouters()
2020-06-01 09:35:21 -04:00
Jeff Becker
44c790b65c
revert back to for loop for simplicity
2020-06-01 09:23:17 -04:00
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
2020-06-01 09:17:44 -04:00
Rick V
1340cd0dce
remove some string conversions entirely
2020-05-26 23:09:16 -05:00
Rick V
5529371637
RouterContact::[Read|Write] now take a fs::path const ref
2020-05-26 22:39:01 -05:00
Rick V
f62214cf8c
first pass fix wstring path conversions
2020-05-26 20:48:07 -05:00
Jeff Becker
c47a210302
remove a std::move that prevents copy elision
2020-05-26 14:04:43 -04:00
Jeff Becker
f25e9bb01f
use std::list here too
2020-05-24 08:51:17 -04:00
Jeff Becker
db00d080f6
use std::list instead of std::vector because idfk man
2020-05-24 08:36:46 -04:00
Jeff Becker
9298313066
use std::move
2020-05-24 08:21:04 -04:00
Jeff Becker
96cbab33c3
style: put iterator erase in for loop update
2020-05-24 08:15:36 -04:00
Jeff Becker
44ff3a9928
copy assignment so we don't crash
2020-05-24 08:14:08 -04:00
Jeff Becker
149a01c80f
dont use std::bind, use lambda
2020-05-24 08:07:37 -04:00
Jeff Becker
403bc74493
unbreak unit tests
2020-05-24 07:06:27 -04:00
Jeff Becker
f0eca908a4
use static_assert instead
2020-05-23 17:18:00 -04:00
Jeff Becker
4ad8ae253d
align to either 64bit or max_align_t which ever is smaller, for 32 bit.
2020-05-23 17:06:04 -04:00
Jeff Becker
7a5c193e4f
remove unused member
2020-05-23 16:55:02 -04:00
Jeff Becker
25a4bbd5ca
use std::swap
2020-05-23 16:07:21 -04:00
Jeff Becker
4a378ae934
remove logic thread from logic as it is now a thin wrapper arround the event loop
2020-05-23 16:07:21 -04:00
Jeff Becker
eb0abbf1ff
add eraseif to decaying hashset
2020-05-23 16:07:21 -04:00
Jeff Becker
39f8f17b53
dont set callback if non provided
2020-05-23 16:07:21 -04:00
Jeff Becker
1230b81517
make format
2020-05-23 16:07:21 -04:00
Jeff Becker
b8da447053
use const iterators explicitly
2020-05-23 16:07:21 -04:00
Jeff Becker
b8d262573a
use std::vector instead of thrashing heap with allocation
2020-05-23 16:07:20 -04:00
Jeff Becker
c826d0a0b1
increase transit hop limits
2020-05-23 16:07:20 -04:00
Jeff Becker
3a776b3ed1
bounds checks and such
2020-05-23 16:07:20 -04:00
Jeff Becker
a45f92dca7
use random good path for outbound traffic so that it uses an even spread accross
...
all paths
2020-05-23 16:07:20 -04:00
Jeff Becker
382e4215a8
path testing interval increase to reduce bandwidth use
2020-05-23 16:07:20 -04:00
Jeff Becker
00143e63f4
put replay filters on transit hops to reduce retransmissions.
2020-05-23 16:07:20 -04:00
Jeff Becker
114bdd5ce5
add move and copy constructors/assigment operators to ip_address
2020-05-23 16:07:20 -04:00
Jeff Becker
3eb006f78c
iwp/libuv cleanup: remove llarp_pkt_list and all users of it as it's broke
2020-05-23 16:07:19 -04:00
Jeff Becker
6af498092b
exit traffic via loki addresses
2020-05-23 16:07:19 -04:00
Jason Rhinelander
854619f04f
Workaround for ghc::filesystem (mac) compatibility
2020-05-21 17:21:04 -03:00
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.
2020-05-21 17:05:30 -03:00
Jason Rhinelander
3bb24580a4
make format
2020-05-20 19:48:13 -03:00
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().
2020-05-20 19:18:28 -03:00
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`).
2020-05-20 19:18:28 -03:00
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).
2020-05-20 19:18:28 -03:00
Jason Rhinelander
60d704b25d
Remove dead code
2020-05-20 19:18:28 -03:00
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).
2020-05-20 19:18:27 -03:00
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)
2020-05-20 19:18:27 -03:00
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).
2020-05-20 19:18:27 -03:00
Jason Rhinelander
be9ddf2ae1
Bring back ghc::filesystem for broke AF macos
...
macOS doesn't provide `<filesystem>` support when targetting anything
earlier than 10.15.
2020-05-20 19:18:27 -03:00
Stephen Shelton
ffdeca5378
Initialize all primitive values in Config
2020-05-20 15:54:23 -06:00
Stephen Shelton
ac225eb65e
Testing: explicitly initialize variable
2020-05-20 15:54:22 -06:00
Jason Rhinelander
604501b07f
Fix cmake curl definition
2020-05-18 23:49:30 -03:00
Jeff
abc127a78a
Merge pull request #1276 from despair86/sockaddr-fix
...
fix sockaddr on win32
2020-05-18 16:16:04 -04:00
Rick V
918a09c0cf
fix sockaddr win32 and collapse headers on the unix side
2020-05-18 15:13:45 -05:00
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.
2020-05-18 15:35:13 -03:00
Jason Rhinelander
856cf82c0e
Only link curl if we set up a curl target
...
Should fix win32 (which doesn't link to curl).
2020-05-18 15:11:13 -03:00
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).
2020-05-17 23:31:23 -03:00
Jason Rhinelander
ab4ee954b9
Remove DEBIAN option
...
This hasn't been used in a long time; the debian packaging lives in
separate branches instead.
2020-05-17 21:29:05 -03:00
Jason Rhinelander
a45bec7c4f
Removed RPI definition
...
This was a long-obsolete fix for things that don't matter anymore.
2020-05-17 21:28:25 -03:00
Jason Rhinelander
26ecf23ad8
Silence various warnings
2020-05-17 21:28:17 -03:00
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).
2020-05-17 17:08:11 -03:00
Jeff Becker
fc5b28b66f
const correctness
2020-05-15 14:07:22 -04:00
Jeff Becker
e56faba23d
make format
2020-05-15 09:07:28 -04:00
Jeff Becker
1780e86faa
fix up unit tests, make them all pass
2020-05-15 08:38:04 -04:00
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
2020-05-15 08:36:38 -04:00
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
2020-05-14 13:58:30 -04:00
Stephen Shelton
ed31cdaacf
Cosmetic fixes
2020-05-14 11:51:27 -06:00
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.
2020-05-14 13:45:27 -04:00
Jeff Becker
09a356a8a4
dont use static local lambda
2020-05-14 13:30:23 -04:00
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.
2020-05-14 13:26:36 -04:00
Jeff Becker
ebed21c392
DRY
2020-05-14 12:33:37 -04:00
Jeff Becker
3753dfbddb
IpAddresses in dns section config were not defaulting to port 53 when no port was provided.
...
Fixes #1264
2020-05-14 08:14:19 -04:00
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.
2020-05-13 22:36:15 -03:00
Jason Rhinelander
dccc663f31
Miss Match demands her name be removed from the code
...
(i.e. fix speeling mistack: missmatch -> mismatch)
2020-05-13 22:35:15 -03:00
Jeff
e6a85d7176
Merge pull request #1263 from jagerman/c++17-niceties
...
C++17 niceties
2020-05-12 16:07:27 -04:00
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
2020-05-12 16:42:35 -03:00
Jeff
a5b09c47e1
Merge pull request #1262 from notlesh/bandaids-for-sockaddr-refactor-2020-05-11
...
Bandaids for sockaddr refactor 2020 05 11
2020-05-12 12:04:59 -04:00
Stephen Shelton
4dd4327f36
IpAddress::toString() support for IPv6
2020-05-11 14:52:30 -06:00
Stephen Shelton
043f993e41
Return stream in operator<<(stream, IpAddress)
2020-05-11 14:47:09 -06:00
Stephen Shelton
0a40892867
Implement SockAddr operator<() and operator==()
2020-05-11 11:55:36 -06:00
Stephen Shelton
1c7d57f207
Don't forget to return
2020-05-11 11:42:38 -06:00
Stephen Shelton
c0f58c8159
Properly read in ExitInfo's address
2020-05-11 10:46:53 -06:00
Stephen Shelton
e85105e738
Implement SockAddr's operator<<ostream
2020-05-11 10:17:41 -06:00
Stephen Shelton
dfe71309f1
Add to/from in6_addr to SockAddr
2020-05-11 10:14:07 -06:00
Stephen Shelton
fd145d6eeb
Make FIXME throws uniquely identifiable
2020-05-11 10:00:03 -06:00
Stephen Shelton
839fb42ba4
Hard code RPC's expectedHostname to 'localhost'
2020-05-11 09:47:26 -06:00
Stephen Shelton
0cd5d7a060
Derp
2020-05-11 09:22:42 -06:00
Stephen Shelton
cd44caccaf
Attempt to get this SockAddr refactor up and running
2020-05-11 09:11:44 -06:00
Stephen Shelton
78d09f2ae5
Support SockAddr in from sockaddr and friends
2020-05-08 16:52:00 -06:00
Stephen Shelton
e944bcb28a
Unit tests and fixes for SockAddr::fromString()
2020-05-08 14:33:44 -06:00
Stephen Shelton
0b54087689
Begin implementing SockAddr
2020-05-08 11:23:21 -06:00
Stephen Shelton
aee96e53a3
Refactor Addr -> IpAddress/SockAddr
2020-05-06 14:38:44 -06:00
Jeff Becker
01cc2c86bf
format
2020-05-06 11:37:15 -04:00
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
2020-05-06 10:45:30 -04:00
Stephen Shelton
1cab83ad01
Expand upon IpAddress header, take in feedback
2020-05-04 15:36:08 -06:00
Stephen Shelton
dff170712f
Gut Addr, replace with stubbed SockAddr and IpAddress
2020-05-04 15:17:16 -06:00
Jeff Becker
7e4fdc5b0e
check for zero address for bogons
2020-05-04 15:05:33 -04:00
Jeff Becker
f1edca9fa1
additional cleanup of cruft
2020-05-04 14:39:14 -04:00
Jeff Becker
c425355a6b
set data dir in in loadconfig too
2020-05-04 13:32:10 -04:00
Jeff Becker
f307c25d3e
set datadir path when giving filename for config
2020-05-04 13:30:58 -04:00
Jeff Becker
c4b5b641bb
default to default data dir given by params instead
2020-05-04 13:14:46 -04:00
Jeff Becker
1cbf50296c
only add endpoint for hidden service if not service node
2020-05-04 12:58:46 -04:00
Jeff Becker
e33a1a2e0f
proper autodetect of ifname and ifaddr
2020-05-04 12:51:57 -04:00
Jeff Becker
6aa79b7ca9
set network section
2020-05-04 12:36:29 -04:00
Jason Rhinelander
cd7fd1b6ad
FIXME fix the FIXME
2020-05-04 13:27:14 -03:00
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.
2020-05-04 13:02:28 -03:00
Jason Rhinelander
1d98632fd3
Merge pull request #1254 from majestrate/network-ifaddr-ifname-2020-05-04
...
add ifname and ifaddr to network config parsing
2020-05-04 12:52:37 -03:00
Jeff Becker
96a6d81380
add ifname and ifaddr to network config parsing
2020-05-04 11:44:56 -04:00
Jason Rhinelander
4be7b2c8a5
Merge pull request #1253 from notlesh/better-config-error-messages-2020-05-04
...
Use more user-friendly error messages in config
2020-05-04 12:44:32 -03:00
Stephen Shelton
f96fded525
Use more user-friendly error messages in config
2020-05-04 09:42:38 -06:00
Stephen Shelton
78eb0d976d
nonstd::optional -> std::optional
2020-05-04 09:21:26 -06:00
Jeff Becker
7c12347e80
upstream-dns -> upstream
2020-05-04 11:08:25 -04:00
Stephen Shelton
42a7bcd434
Less invasive fix for Addr
2020-05-04 11:08:25 -04:00
Stephen Shelton
5f0cbb4625
Don't forget to load your keys
2020-05-04 11:07:22 -04:00
Stephen Shelton
9ba0f117c7
Revert to previous "if hops > 0" logic in Configure()
2020-05-04 11:07:21 -04:00
Stephen Shelton
15918ff1c9
log--
2020-05-04 11:07:21 -04:00
Stephen Shelton
960dc37c1f
Refactor TunEndpoint::Configure() (partially)
2020-05-04 11:07:21 -04:00
Stephen Shelton
f2a26adcaa
Move all [endpoint] options to [network]
2020-05-04 11:07:21 -04:00
Stephen Shelton
559610ec94
Properly handle empty config default values
2020-05-04 11:07:21 -04:00
Stephen Shelton
dd9ab0f1d5
Remove ability to have multiple endpoints/snodes from config
2020-05-04 11:07:21 -04:00
Stephen Shelton
b7451b7632
Rip out tag, prefetch tags/addrs from Endpoint
2020-05-04 11:06:47 -04:00
Stephen Shelton
1d12e9d14e
Lokinet_INIT() is already checked in main(), so remove from config
2020-05-04 11:06:47 -04:00
Stephen Shelton
3198a8b139
Handle blacklist-snode validation in config
2020-05-04 11:06:47 -04:00
Stephen Shelton
fde93ac02d
Don't take EndpointConfig by value
2020-05-04 11:06:18 -04:00
Stephen Shelton
2730491641
Remove NetworkConfig's freehand options
2020-05-04 11:06:18 -04:00
Stephen Shelton
daf599b032
Update comment about ExitEndpoint config TODO
2020-05-04 11:05:52 -04:00
Stephen Shelton
2bc908cd40
Remove [dns]:local-dns in favor of [dns]:bind
2020-05-04 11:05:52 -04:00
Stephen Shelton
779658edd0
Refactor ExitEndpoint's config, mv dns ops from [network] to [dns]
2020-05-04 11:05:51 -04:00
Stephen Shelton
21ad442b55
Remove NetConfig_t
2020-05-04 11:05:51 -04:00
Stephen Shelton
df01770466
Rename SnappConfig -> EndpointConfig
2020-05-04 11:05:51 -04:00
Stephen Shelton
93b35c92a7
Eradicate service::Config
2020-05-04 11:05:51 -04:00
Stephen Shelton
cbd93fcb09
Find "-snapp" conf sections, add more snapp conf options
2020-05-04 11:03:53 -04:00
Jason Rhinelander
3efaf9ff76
Add string header (reportedly needed for libc++)
2020-05-01 19:41:20 -03:00
Jason Rhinelander
5cf2126bb9
make format
2020-05-01 19:25:32 -03:00
Jason Rhinelander
1697bf90fe
C++17
...
Compiles with C++17, replaces ghc::filesystem with std::filesystem,
nonstd::optional with std::optional, and llarp::string_view with
std::string_view.
2020-05-01 17:43:27 -03:00
Stephen Shelton
f0f9b1abdd
Allow 0 as outbound port
2020-04-29 14:23:50 -06:00
Stephen Shelton
f8439dab61
Misc aesthetic tweaks
2020-04-29 14:19:48 -06:00
Stephen Shelton
7d83611a0a
Default outbound port to 0, not 1090
2020-04-29 14:19:35 -06:00
Stephen Shelton
c4de0f8493
Add more ignored config options
2020-04-29 13:42:06 -06:00
Stephen Shelton
517922e4c3
Reintroduce support for configurable key files
2020-04-29 13:41:39 -06:00
Stephen Shelton
320564d792
Specialize ConfigOption for bool to accept "truthy" / "falsy" values
2020-04-29 12:32:07 -06:00
Stephen Shelton
331770b348
Add ability to tolerate (ignore) old config options
...
This allows us to explicitly ignore (with a warning) old options
that are no longer supported.
2020-04-29 10:47:51 -06:00
Stephen Shelton
cdd4439cff
Temporary fix for [dns]bind and [dns]local-dns
2020-04-29 10:10:33 -06:00
Stephen Shelton
936fbb2424
Fix config not falling back to undeclared handler for missing option
2020-04-29 09:41:07 -06:00
Stephen Shelton
526b1320b7
Some maybe-fixes for RouterHive post config cleanup
2020-04-24 11:18:25 -06:00
Jeff
54a7843bc5
Merge pull request #1186 from notlesh/config-cleanup-2020-03-13
...
Config cleanup
2020-04-24 12:49:08 -04:00
Jeff
edc0d1a3ed
Merge pull request #1225 from majestrate/macos-cpack-setup-and-bootstrap-2020-04-10
...
macos cpack installer infra
2020-04-21 14:50:16 -04:00
Rick V
6eaaeab094
reeee
2020-04-20 19:09:35 -05:00
Rick V
337a21d6f6
ew stinki
2020-04-20 19:09:32 -05:00
Rick V
76aa0421ff
use a new read buffer every time
2020-04-20 19:09:32 -05:00
Rick V
1e51bfde2c
fix
2020-04-20 19:09:31 -05:00
Rick V
4e87e8dc08
correctly return true/false when writing
2020-04-20 19:09:28 -05:00
Rick V
c65eecf399
are we leaking data randomly
2020-04-20 19:09:27 -05:00
Rick V
46d4ab2708
this might just crash
2020-04-20 19:09:24 -05:00
Rick V
df634b7775
remove a ton of ded win32 code
2020-04-20 19:05:53 -05:00
Rick V
938f40efe1
probably got mangled in a patch
...
supposed to tick at the end
2020-04-20 19:05:36 -05:00
Jason Rhinelander
3dd3d48fbb
Consolidate cmake vars & definitions
...
CMake will set version variables itself if you give the version in the
project(), which is cleaner. Also removes some (nearly) duplicate
definitions and settings added in basic_definitions.cmake for unknown
reasons.
Removes some redundant settings (name, description, version) from the
cpack settings which already default to the values from the project()
call.
2020-04-19 23:16:23 -03:00
Jeff
5b1941222b
unscrew travis-ci ( #1223 )
...
* update travis ci clang-format to clang-format-9 because we use that now
add python3-dev package becuase something inside ci thinks it has python but really does not
* try using python3.6
* try working around hot garbage that is travis-ci
* add deadsnakes repo for python3.8
* prevent nullptr deference when running in unit tests
* move python3.8 to main dependancy matrix and add python3.8 to homebrew deps
* add deadsnake apt repo
* add deadsnakes and python3.8 back to previous matrix
* dev package for python
* toggle hive build in ci
* dont add pybind11 if not bulding hive
* revert setting pyenv shim for travis ci
* make native builds on by default except for windows ci
* only apply native build being off for windows release target becuase that broke macos
2020-04-18 16:58:41 -03:00
Jason Rhinelander
3c6aa002b8
Fix errors and warnings compiling on mac
2020-04-10 14:26:50 -03:00
Stephen Shelton
ca24f25665
Make fewer assumptions about config state
...
This handles values missing when config is created through RouterHive.
2020-04-07 17:52:14 -06:00
Stephen Shelton
dfcf8fb62e
Update RouterHive to reflect config changes
2020-04-07 17:50:50 -06:00
Stephen Shelton
6a10a33e9e
Revert "Remove llarp::Config::Copy()"
...
This reverts commit 3a1c727b9b
.
2020-04-07 15:29:13 -06:00
Stephen Shelton
de8e44ba21
Re-apply clang-format rules after rebasing
2020-04-07 14:41:11 -06:00
Stephen Shelton
3a1c727b9b
Remove llarp::Config::Copy()
...
I probably missed this in my rebase on top of The Great Wall of Blame
2020-04-07 14:32:29 -06:00
Stephen Shelton
6d001c5fd2
Opportunistically move 'netdb' to 'nodedb'
2020-04-07 14:29:47 -06:00
Stephen Shelton
a66f502ed6
Remove [netdb] conf and place it under data-dir
...
This does three things:
1) Remove the [netdb] conf section,
2) Rename the subdir 'netdb' -> 'nodedb'
3) Place 'nodedb' under 'data-dir'
2020-04-07 14:28:23 -06:00
Stephen Shelton
3c6a127dce
Complain loudly when we can't create nodedb dirs
2020-04-07 14:28:23 -06:00
Stephen Shelton
be014175e9
Consolidate logging initialization logic
2020-04-07 14:27:31 -06:00
Stephen Shelton
6909e20588
Fix logging initialization and flush at program exit
2020-04-07 14:27:30 -06:00
Stephen Shelton
2479049876
Remove dead code
2020-04-07 14:26:32 -06:00
Stephen Shelton
d3bcc05aa6
Organize some constants and default values
2020-04-07 14:26:32 -06:00
Stephen Shelton
91206725cb
Inject a default bootstrap file if none in conf
2020-04-07 14:26:31 -06:00
Stephen Shelton
da6bda15a1
Where did rc.signed come from?!
2020-04-07 14:26:31 -06:00
Stephen Shelton
7ea8d62640
Use fs::path over std::string for files
2020-04-07 14:26:30 -06:00
Stephen Shelton
7ce256d846
Prefer fs::path over std::string @ KeyManager
2020-04-07 14:25:51 -06:00
Stephen Shelton
0a9515a94a
Proper support for multiple values @ ConfigDefinition
2020-04-07 14:25:20 -06:00
Stephen Shelton
28c1ca9c7a
Handle missing IP address in conf properly
2020-04-07 14:25:19 -06:00
Stephen Shelton
0697d57190
Important TODO
2020-04-07 14:25:19 -06:00
Stephen Shelton
0e5e9a1222
Silently ignore config file if it exists already
2020-04-07 14:25:19 -06:00
Stephen Shelton
1fc7c61d1f
Share common conf comments for client and relay
2020-04-07 14:24:50 -06:00
Stephen Shelton
3739fc1d70
Reinstate multi-valued option
2020-04-07 14:24:50 -06:00
Stephen Shelton
a6787657be
Refactor config comments to take list of strings
2020-04-07 14:24:49 -06:00
Stephen Shelton
a8671cf9c7
Rename config classes for clarity
...
ConfigDefinition -> OptionDefiniton
Configuration -> ConfigDefinition
2020-04-07 14:24:49 -06:00
Stephen Shelton
f250b7adcb
Remove pidfile support
2020-04-07 14:24:48 -06:00
Stephen Shelton
4f77080f75
Remove optional<> from block-bogons
2020-04-07 14:23:53 -06:00
Stephen Shelton
4d053231d3
Define config defaults as constexpr
2020-04-07 14:23:32 -06:00
Stephen Shelton
adfcbd1d0b
Slight cleanup of k:v option maps
2020-04-07 14:23:11 -06:00
Stephen Shelton
e06c2e4502
Check that [router]min-connections <= [router]max
2020-04-07 14:22:53 -06:00
Stephen Shelton
6fd270ba09
Rip out link type spec and factory
...
We only support IWP now, so this is all effectively dead code.
2020-04-07 14:22:53 -06:00
Stephen Shelton
9e850705b4
Add 'AssignmentAcceptor' convenience for simple config acceptors
2020-04-07 14:20:59 -06:00
Stephen Shelton
f2a8dd10ce
Modernize Snapp config
2020-04-07 14:20:59 -06:00
Stephen Shelton
733efbab40
Reflect removal of accessors on config structs
2020-04-07 14:20:31 -06:00
Stephen Shelton
c8c940b0f5
Replace individual file locations with dataDir
2020-04-07 14:19:21 -06:00
Stephen Shelton
5d0b53e1be
Remove environment variable support in config
2020-04-07 14:19:21 -06:00
Stephen Shelton
05257126fe
Make distinction between config dir and data dir
2020-04-07 14:18:14 -06:00
Stephen Shelton
923e73f693
Plumb isRelay CLI arg through to config
2020-04-07 14:17:13 -06:00
Stephen Shelton
028e55e997
Remove pre-refactor config test
2020-04-07 14:14:33 -06:00
Stephen Shelton
2e75e03434
Remove incomplete impl of config hot-reloading
2020-04-07 14:14:33 -06:00
Stephen Shelton
6301fefd43
Add router-specific config comments
2020-04-07 14:14:01 -06:00
Stephen Shelton
5b520a4dff
Simplify connection limit constants
2020-04-07 14:13:27 -06:00
Stephen Shelton
14e7789847
Add padding to config file generated output
2020-04-07 14:12:31 -06:00
Stephen Shelton
1273f11ce8
First pass at updating comments to lokinet config
2020-04-07 14:12:31 -06:00
Stephen Shelton
18ee23c2a3
Support for comments in config definition
2020-04-07 14:11:58 -06:00
Stephen Shelton
1653b73ee5
Clean up the logic around generating default confs
2020-04-07 14:11:57 -06:00
Stephen Shelton
c5ff672c79
Use 'undeclared handler' for multi-valued 'add-node' config option
2020-04-07 14:10:11 -06:00
Stephen Shelton
feacde7864
Hook up 'undeclared handlers' to mop up loosely-structured INI values
2020-04-07 14:10:11 -06:00
Stephen Shelton
9a1b7b20de
Add "undeclared value" handler to Configuration
2020-04-07 14:09:14 -06:00
Stephen Shelton
e9708a5d1c
Add split(string_view, char) util function
2020-04-07 14:09:14 -06:00
Stephen Shelton
ffc58fcedb
Remove dead code (serverOptions)
2020-04-07 14:09:13 -06:00
Stephen Shelton
2e47262350
Demystify LinksConfig
2020-04-07 14:08:45 -06:00
Stephen Shelton
cd1e7713de
Clean up / consolidate config logging logic
2020-04-07 14:07:40 -06:00
Stephen Shelton
4c00c6238e
Join config definition and config parser
2020-04-07 14:06:10 -06:00
Stephen Shelton
653a650cf9
Fix typo
2020-04-07 14:05:11 -06:00
Stephen Shelton
9f0ae43149
Remove dead code
2020-04-07 14:05:11 -06:00
Stephen Shelton
d82f5e6b93
First pass at replacing config value logic
2020-04-07 14:04:36 -06:00
Stephen Shelton
69331f1571
Remove multiValued as an argument to ConfigDefinition
2020-04-07 14:01:45 -06:00
Stephen Shelton
f6d000838f
Clarity and convenience for defining config options
2020-04-07 14:01:45 -06:00
Stephen Shelton
02e31f3867
Introduce acceptor function in ConfigDefinition
2020-04-07 14:01:44 -06:00
Stephen Shelton
60d0bf2a9b
Rename function for clarity
2020-04-07 14:01:44 -06:00
Stephen Shelton
8160c13458
More documentation around Configuration/ConfigDefinition
2020-04-07 14:01:44 -06:00
Stephen Shelton
8352de7bd4
Config documentation, clarity
2020-04-07 14:01:43 -06:00
Stephen Shelton
d9340a873e
Consolidate Configuration generate INI functions
2020-04-07 14:01:43 -06:00
Stephen Shelton
1b19314278
Implement Configuration::generateDefaultConfig(), maintain insertion order
2020-04-07 14:01:43 -06:00
Stephen Shelton
7dacc30862
Conveience and clarity around config definiton maps
2020-04-07 14:01:42 -06:00
Stephen Shelton
105dd30fd9
More ConfigDefinition unit tests, fixes, support std::string as type
2020-04-07 14:01:42 -06:00
Stephen Shelton
25212b929c
Add ConfigDefinition unit tests, fixes
2020-04-07 14:01:41 -06:00
Stephen Shelton
a856e772c8
Stylistic clean up
2020-04-07 14:01:41 -06:00
Stephen Shelton
0fb888890f
First pass at Configuration definition classes
2020-04-07 14:01:41 -06:00
Stephen Shelton
9d71228e74
Replace config visit pattern with explicit lookups
...
This is an initial pass at doing explicit value checks when handling
config parsing, as opposed to using a visiting pattern. The latter
made it difficult to check for conditions such as missing required
values, multiple values, etc.
It was also generally less readable (think declarative) which further
made it difficult to get a grasp for what our actual configuration file
requirements were.
2020-04-07 14:01:40 -06:00
Stephen Shelton
858e252820
Add stringify() to util/str
2020-04-07 13:56:04 -06:00
Stephen Shelton
ca67c12928
Why template when we only use one type??
2020-04-07 13:56:01 -06:00
Stephen Shelton
273270916e
The Great Wall of Blame
...
This commit reflects changes to clang-format rules. Unfortunately,
these rule changes create a massive change to the codebase, which
causes an apparent rewrite of git history.
Git blame's --ignore-rev flag can be used to ignore this commit when
attempting to `git blame` some code.
2020-04-07 12:38:56 -06:00
Jeff Becker
4375df2f7d
add forgotten files for generating docs
2020-04-07 13:16:22 -04:00
Jeff Becker
c36b6a409c
move version to cmake so docs can access it
2020-04-07 13:16:22 -04:00
Jeff Becker
3e7acb72e1
more docs, make doxygen work
2020-04-07 13:16:22 -04:00
Jeff
d3091cf9fc
Merge pull request #1167 from tewinget/tooling
...
RouterHive initial PR
2020-04-07 13:13:02 -04:00
Jeff Becker
2190da8c81
cpack win32
2020-04-02 11:08:07 -04:00
Jeff
d3c3aebeaf
Merge pull request #1194 from majestrate/disable-iwp-fec-2020-03-23
...
disable accedental fec in iwp outbound messages
2020-03-31 09:31:43 -04:00
Jeff Becker
3b424f76f1
strict check of bounds
2020-03-31 09:26:39 -04:00
Jeff Becker
67883aa945
when we have an inbound session and we do a forward dns lookup
...
we should not look up the descriptor on the network as we
already have a session with them
2020-03-28 16:26:16 -04:00
Jeff Becker
b398076bc6
add bounds check
2020-03-23 13:38:14 -04:00
Jeff Becker
b96700579e
remove un needed check
2020-03-23 13:28:44 -04:00
Jeff Becker
53e7397935
fix use after move
2020-03-23 13:20:32 -04:00
Jeff Becker
769bafd281
disable accedental fec in iwp outbound messages
2020-03-23 12:48:25 -04:00
Jeff
b1f036bb7f
Merge pull request #1188 from majestrate/call-jsonrpc-server-cleanup-2020-03-16
...
fix memleak in jsonrpc
2020-03-16 10:15:41 -04:00
Jeff Becker
1e434c03f8
cleanup
2020-03-16 10:04:33 -04:00
Jeff Becker
d1f8752b7c
fix memleak in jsonrpc
...
llarp_tcp_acceptor ticker wasn't being called so connections where not
being cleaned up
2020-03-16 09:25:46 -04:00
jeff
7089996ac5
discard unknown fields in introset for future use
2020-03-14 14:52:05 -04:00
Stephen Shelton
8a12da8bd5
Remove some .cpp files related to RouterEvents
...
The motivation is to reduce the raw amount of code required to create
and maintain events.
2020-03-12 13:51:57 -06:00
Stephen Shelton
4c6be3c8d1
Add PathBuildRejectedEvent to RouterHive
2020-03-12 12:01:54 -06:00
Stephen Shelton
ea835405c5
Refactor NotifyRouterEvent() to forward args, event code cleanup
...
This template-ifies Router::NotifyRouterEvent() up so that it accepts
the arguments to instantiate the specified event type, forwarding them
to std::make_unique. This would allow (in the future) the function to
no-op the call and avoid memory allocation. It also slightly reduces
the amount of code required to fire an event.
This commit also simplifies some of the RouterEvent code to reduce
redundancy.
2020-03-12 11:50:46 -06:00
Jeff Becker
4452b152aa
add an A Record for random.snode so that it works
2020-03-12 08:19:37 -04:00
Jeff Becker
7ba30eec25
squash commits
2020-03-11 16:55:12 -04:00
Jeff
ac80357552
Merge pull request #1175 from majestrate/limit-snode-session-build-rate-2020-03-09
...
limit path builds on snode sessions
2020-03-11 16:49:58 -04:00
Jeff
3f4b2a53fa
add additional case ( #1180 )
...
* add additional case for if we are near the end and all elements are in the exlcude set
* fix stop condition in second loop
2020-03-11 17:45:48 -03:00
Jeff Becker
a1e8500035
use for loop
2020-03-11 16:25:19 -04:00
Jeff Becker
1ea210ace6
typo fix
2020-03-11 16:18:17 -04:00
Jeff
bf82740c08
only try fetching identity key once so we can interrupt lokinet ( #1178 )
2020-03-11 13:05:46 -03:00
Jeff
c6fd007688
Merge pull request #1176 from majestrate/randomize-hop-selection-more-2020-03-10
...
fully randomize hop selection
2020-03-11 10:18:12 -04:00
Jeff Becker
9cdc7f498d
remove dead code
2020-03-11 10:12:29 -04:00
Jeff Becker
69126c67df
code dedup
2020-03-11 10:08:53 -04:00
Stephen Shelton
6664202868
Add FindRouterSentEvent and FindRouterReceivedEvent to RouterHive
2020-03-10 12:12:11 -06:00
Jeff Becker
6047d578f8
fully randomize hop selection
2020-03-10 12:19:24 -04:00
Jeff
bc85082502
Merge pull request #1171 from majestrate/prune-nodedb-as-client-2020-03-08
...
better nodedb pruning logic
2020-03-10 11:22:34 -04:00
Jeff
a6a3d77bb4
Merge pull request #1174 from notlesh/reduce-rr-decode-fail-verbosity-2020-03-09
...
Reduce log verbosity when DNS RR decode fails
2020-03-09 17:47:57 -04:00
Jeff Becker
677e19e6a9
limit path builds on snode sessions
2020-03-09 17:31:43 -04:00
Jeff Becker
5191af1525
typo fix
2020-03-09 17:06:25 -04:00
Jeff Becker
5d86587aab
typo fix
2020-03-09 17:06:25 -04:00
Jeff Becker
bce5cd7b0f
add additional case check and documentation comments for pruning logic
2020-03-09 17:06:24 -04:00
Jeff Becker
b3f2c71617
add comment
2020-03-09 17:06:24 -04:00
Jeff Becker
d8da3f0a83
simplify logic
2020-03-09 17:06:24 -04:00
Jeff Becker
327ab6f178
prune nodedb as client and service node with no whitelist
2020-03-09 17:06:24 -04:00
Jeff Becker
51516f751b
return NS record for localhost.loki to squash errors in host lookups
2020-03-09 17:48:13 -03:00
Jason Rhinelander
6715b86d51
Fix IPv6 lookups to return empty response
...
The logic here wasn't quite right and was returning an A record in
response to an AAAA lookup.
This returns nothing, which is better, but not quite enough: this gives
empty responses, which produces warnings in host/dig.
2020-03-09 17:48:13 -03:00
Jeff
f3d23d6fb6
strip rr from dns reply for .snode and .loki ( #1172 )
...
fix dns replies so that extra RR for edns are not included.
2020-03-09 17:47:27 -03:00
Stephen Shelton
f40ce505a8
Reduce log verbosity when DNS RR decode fails
2020-03-09 14:20:27 -06:00
Thomas Winget
84a1d7dbcc
clang format.......
2020-03-06 20:20:11 -05:00
Rick V
26d1001e53
fix logging
2020-03-05 12:47:50 -06:00
Rick V
b449e03f43
So as of GCC 9.2, std::random_device on Windows is RtlGenRandom()
...
....which is precisely the thing i patch out in libsodium to use CryptoAPI
documented interfaces instead (which fall through to RtlGenRandom() on
such devices _anyway_)
we can just use libsodium directly, i happened to patch it out in libstdc++
as a side effect (since my local toolchain can target any version of windows)
2020-03-05 12:47:49 -06:00
Rick V
c9f2f90e13
move these out of the way
2020-03-05 12:47:48 -06:00
Rick V
9b0ec0935a
bump for next release
2020-03-05 12:47:47 -06:00
Rick V
8e9842f4b2
bindaddr a common field on the machine-independent side
2020-03-05 12:47:46 -06:00
Rick V
db0920d921
use backport fork for release installer only
...
move all invariant assets to common repo
remove ded code, libuv patches can be swapped in at build time for debug/release builds
2020-03-05 12:47:46 -06:00
Rick V
b4d6f89452
try extracting dns bind addr from INI on windows
2020-03-05 12:47:45 -06:00
Jeff
abff5c35cb
Merge pull request #1160 from majestrate/dns-rebinding-fix-2020-03-04
...
add llarp.admin.die rpc call to gracefully kill router
2020-03-05 09:40:13 -05:00
Jeff Becker
99c814e6b0
fix dns rebinding vuln in jsonrpc
2020-03-04 13:59:33 -05:00
Jason Rhinelander
3b0927ce13
Merge pull request #1140 from despair86/cmake-cleanup
...
some light cmake cleanup for win32
2020-03-04 11:44:10 -04:00
Jason Rhinelander
a78a7fbb17
Merge pull request #1158 from majestrate/prune-routers-2020-03-03
...
Prune non routers from nodedb
2020-03-04 11:41:15 -04:00
Jason Rhinelander
6707037909
Merge pull request #1157 from majestrate/fix-systemd-status-2020-03-03
...
fix status line
2020-03-04 11:28:07 -04:00
Thomas Winget
695784b2b6
more hive things
...
DHT PubIntroSentEvent
some helper functions added to RouterHive (C++ class) as well as RouterHive(Python class)
hive.py main() continues to be a testbed for new event types
some more internal classes in pybind
2020-03-04 00:57:26 -05:00
Thomas Winget
6d472d2423
rc gossip delay adjustment for hive
...
allows enough time for every relay (at least in a hive of 50) to connect
to the bootstrap node so all will get all gossips, but not too long so
tests can run relatively quickly.
2020-03-04 00:54:30 -05:00
Jason Rhinelander
c87fd66386
Fix lookup filter to filter second, not first, lookup
2020-03-04 01:32:20 -04:00
Jeff Becker
08de84d40b
remove non public routers from nodedb
2020-03-03 20:01:24 -05:00
Thomas Winget
6fc05ca1ff
RCGossipSentEvent
2020-03-03 19:57:09 -05:00
Thomas Winget
f01624d10a
2ms between hive router spin-up instead of 20ms
2020-03-03 19:57:09 -05:00
Thomas Winget
a58a8c9a61
hive.py now defaults to 1000 relays because f your box.
...
also check for error on uv_async_init...
may want to `ulimit -Sn $(ulimit -Hn)`...
2020-03-03 19:57:09 -05:00
Thomas Winget
c8c66f0a5f
some refactoring of tooling code, added RCGossipReceivedEvent
2020-03-03 19:57:09 -05:00
Thomas Winget
88c80dc2ee
add cxxopts to shared_lib dependencies
2020-03-03 19:57:09 -05:00
Thomas Winget
df0380e746
LRSM RouterEvent, added to hive test and test passes.
2020-03-03 19:57:09 -05:00
Thomas Winget
771d0b4489
hive pytest framework in place (and path build test works)!
2020-03-03 19:57:09 -05:00
Thomas Winget
04c1f67f78
more structure to python hive code
2020-03-03 19:57:09 -05:00
Thomas Winget
ee7b7e917d
hive can now instantiate and start relays/clients separately
2020-03-03 19:57:09 -05:00
Thomas Winget
2bbb274131
superfluous class declaration
2020-03-03 19:57:09 -05:00
Stephen Shelton
4741d81051
Add GotIntro event to RouterHive
2020-03-03 19:57:09 -05:00
Thomas Winget
68c1ae52b3
add ShortHex function to AlignedBuffer
2020-03-03 19:57:09 -05:00
Thomas Winget
341d03bcf8
changes
2020-03-03 19:57:09 -05:00
Jeff Becker
e7689b40a7
dht pub intro message router event thiny doo
2020-03-03 19:57:09 -05:00
Thomas Winget
5672c42f20
RouterEvent::ToString in parent class
2020-03-03 19:57:09 -05:00
Thomas Winget
a9882ad475
PathRequestReceivedEvent implemented
2020-03-03 19:57:09 -05:00
Thomas Winget
c9a278c0de
some more changes to pybind/hive code, read below
...
hive.py is currently largely for testing the pybind stuff, so changes to it will likely
be frequent and arbitrary for now.
Added pybind for llarp::path::PathHopConfig, but not every member -- just rc and upstream routerID
Hive now uses std::queue with mutex instead of our lockless queue.
Removed some functions from Hive that will not be necessary as things are being handled from python.
2020-03-03 19:57:09 -05:00
Thomas Winget
5cf35769b4
don't have python try to intercept stdout/stderr
2020-03-03 19:57:09 -05:00
Jeff Becker
32dbe6b1ad
more shiz
2020-03-03 19:57:09 -05:00
Jeff Becker
877443d95c
more introspection code
2020-03-03 19:57:09 -05:00
Thomas Winget
931ff521d1
working toward full testnet of routers (not clients yet) in hive/pybind setup
...
Not working yet -- some sort of RC issue. Checkout the commit prior to this if you want something that 'works' that you can play with.
2020-03-03 19:57:09 -05:00
Thomas Winget
1e04decb66
can ping on lokinet running in python context!
2020-03-03 19:57:09 -05:00
Thomas Winget
5e498e962f
working on more pybinds
2020-03-03 19:57:09 -05:00
Thomas Winget
0f34a950a9
pybind config object, working
2020-03-03 19:57:09 -05:00
Thomas Winget
9b3bf833e0
revert nop logging -- un-revert later
2020-03-03 19:57:09 -05:00
Thomas Winget
a5c2b369b7
nop logging on hive build for now
...
a bunch of routers logging to stdout at the same time is a complete
charlie foxtrot. until we take the time to make logger not a singleton
(and probably make each router able to log to its own file rather than stdout)
just make it not log.
Note: this is very temporary, as the logs will be annoying for testing the
pybind stuff and shouldn't be necessary for debugging it
2020-03-03 19:57:09 -05:00
Thomas Winget
0007996fde
using instead of typedef
2020-03-03 19:57:09 -05:00
Jeff Becker
a5dc41b049
OMG IT DOES STUFF :DDDDDD
2020-03-03 19:57:09 -05:00
Thomas Winget
f712acc486
huzzah it builds, time to test soon!
2020-03-03 19:57:09 -05:00
Jeff Becker
da79b14703
make it compile
2020-03-03 19:57:09 -05:00
Thomas Winget
8dc5dabe49
working toward compilation, still has include issue
2020-03-03 19:57:09 -05:00
Jeff Becker
26c1670af7
make it compile
2020-03-03 19:57:09 -05:00
Jeff Becker
35bea37fd1
make it compile
2020-03-03 19:57:09 -05:00
Jeff Becker
1fdb8b4c94
initial pybind11 introspection code
2020-03-03 19:57:09 -05:00
Thomas Winget
8d03e6dd3c
more router hive stuff, read below the fold
...
Router now has a hive pointer if LOKINET_HIVE is set.
llarp::Context has a method InjectHive to give Router the pointer.
Router has a method NotifyRouterEvent which does:
- when LOKINET_HIVE is set, passes the event to RouterHive
- else when LOKINET_DEBUG is set, prints the event at a low log level
- else NOP
2020-03-03 19:57:09 -05:00
Jeff Becker
add305b9f4
use size / 2 as the number of transit paths
2020-03-03 18:16:08 -05:00
Jeff Becker
05082e2507
fix status line
2020-03-03 18:04:09 -05:00
Rick V
4cd7a22ca3
fix libsodium cross compile
2020-03-03 15:33:04 -06:00
Jeff Becker
61ffbc0643
std::vector reserve does not resize
2020-03-03 15:25:18 -05:00
Stephen Shelton
321314b456
Remove re-propagation of introsets when we are wrong candidate
2020-03-02 15:24:41 -07:00
Jeff Becker
32e768d7dd
change log
2020-03-02 12:33:33 -05:00
Jeff Becker
d4ccf895e3
Merge branch 'fix-up-introset-lookup-fails-2020-03-02' of ssh://github.com/majestrate/loki-network into fix-up-introset-lookup-fails-2020-03-02
2020-03-02 12:02:58 -05:00
Jeff Becker
79746e3719
remote lookup limiting of 500ms per address
2020-03-02 12:02:21 -05:00
Stephen Shelton
9be8050854
Make format
2020-03-02 09:57:37 -07:00