Jeff
3ab7db7723
macos route poking ( #1333 )
...
* fix up macos route poker logic
* fix typo
* use string_view
* add forgotten header
* full paths
* add debugging
* catch exception on adding route
* workarround for macos
* typofix
* typofix
* fix for macos
* fix command for macos
* because we autopoke remove explicit route poking in rpc
* probably final fix of macos route poking
* split routes instead of deleting them
* dynamic route poking
* move log statement for introset lookup and dont consider bad sessions as able to send
* send convotag reset frame when we have no session
* add exit map to rpc
* use split_any
4 years ago
Thomas Winget
2c6e7b86c3
SRV records fixes ( #1332 )
...
* fix a log print log level
* correctly match SRV record service and protocol...
* tests for new dns question functions
4 years ago
Thomas Winget
b1c14af938
SRV Record handling for introsets ( #1331 )
...
* update loki-mq submodule for tuple support
* srv record reply implementation
still need to encode srv records into intro sets / router contacts
as well as decode from them and match against queried service.proto
* inverted condition fix in config code
* SRV record struct (de-)serialization for intro sets
* parsing and using srv records from config (for/in introsets)
* adopt str utils from core and use for srv parsing
* changes to repeat requests
no longer drop repeat requests on the floor, but do not make
an *actual* request for them if one is in progress.
do not call reply hook for each reply for a request, as
each userland request is actually made into several lokinet
requests and this would result in duplicate replies.
* fetch SRVs from introsets for .loki
* make format
* dns and srv fixes, srv appears to be working
4 years ago
jeff
39f5e7213f
set send timeout to 5 seconds for exits
4 years ago
jeff
b0bb0b7609
initial route poking
4 years ago
jeff
75f9643776
attempt to fix snode traffic ip rewrite bug
4 years ago
Jeff Becker
3619356406
attempt fixing 100% cpu use on relays
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
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
5abf111159
endpoint auth whitelist
4 years ago
Jeff Becker
a42d3d51c3
more
4 years ago
Jeff Becker
1899debfb5
unfug transit hops
4 years ago
Jeff Becker
6af498092b
exit traffic via loki addresses
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
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
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
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
Jeff Becker
e33a1a2e0f
proper autodetect of ifname and ifaddr
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
dd9ab0f1d5
Remove ability to have multiple endpoints/snodes from config
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
Stephen Shelton
df01770466
Rename SnappConfig -> EndpointConfig
4 years ago
Stephen Shelton
93b35c92a7
Eradicate service::Config
4 years ago
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.
5 years ago
Jeff
d3091cf9fc
Merge pull request #1167 from tewinget/tooling
...
RouterHive initial PR
5 years ago
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
5 years ago
Jeff Becker
4452b152aa
add an A Record for random.snode so that it works
5 years ago
Jeff Becker
51516f751b
return NS record for localhost.loki to squash errors in host lookups
5 years ago
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.
5 years ago
Jeff
f3d23d6fb6
strip rr from dns reply for .snode and .loki ( #1172 )
...
fix dns replies so that extra RR for edns are not included.
5 years ago
Thomas Winget
84a1d7dbcc
clang format.......
5 years ago
Rick V
9b0ec0935a
bump for next release
5 years ago
Rick V
8e9842f4b2
bindaddr a common field on the machine-independent side
5 years ago
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
5 years ago
Rick V
b4d6f89452
try extracting dns bind addr from INI on windows
5 years ago
Jeff Becker
877443d95c
more introspection code
5 years ago
Jason Rhinelander
c0eb0c4db4
Avoid unnecessary copy
5 years ago
Jeff Becker
d50a0149f9
use std::chrono
5 years ago
Jeff Becker
9c30ff7a26
handle snode and clean up codepath for hooked dns
5 years ago
Jeff Becker
1d5c712adb
monkey patch upstream dns to rewrite .loki cname answers
5 years ago
Jeff
a8a6c175fc
Merge pull request #1128 from majestrate/use-std-chrono-2020-02-24
...
make llarp_time_t use std::chrono::milliseconds
5 years ago
Jeff Becker
bf0416cab8
remove Time_t, add operator overload for printing llarp_time_t and add to_json function for serializing llarp_time_t to json
5 years ago
Jason Rhinelander
3bd400f6fe
Fix string_view C++17 compatibility
...
string_view was implicitly convertible to std::string, but
std::string_view is only explicitly convertible. This makes the
`operator std::string` explicit to be more compatible, and re-adds a
bunch of explicit string casts to the code where needed.
(This also fixes the build if changing the standard to c++17)
5 years ago
Jeff Becker
d2d109e92c
llarp_time_t is now using std::chrono
5 years ago
Jason Rhinelander
0839c16f19
Final abseil purge
...
Bye-bye Google Boost.
5 years ago
Jason Rhinelander
46242ba69b
TrimWhiteSpace -> TrimWhitespace
...
Fix my dumb initial capitalization choice.
5 years ago
Jason Rhinelander
54186c4a89
Replace absl string_view with string_view from lokimq
...
When we add loki-mq has a dependency we can just alias it, but for now
it's easier to copy the header than add the whole submodule library.
5 years ago
Jason Rhinelander
98c34d995b
De-abseil: Add our own llarp::TrimWhiteSpace
...
Adds a TrimWhiteSpace instead of using abseil's.
Adds Catch2 tests for it, and also converts the existing str tests to
catch (which look much, much nicer than the gtest ones).
5 years ago
Jason Rhinelander
f84ce61d66
Removed empty cpp files
...
These aren't needed: CMake already knows how to follow #includes and
rebuild when headers change as long as the headers are included
*somewhere*. The extra .cpp files here just require building a bunch of
.cpp files with just header content that we just end up throw away
during linking (since the same things will also be compiled in whatever
other compilation units include the same headers).
5 years ago
Jeff Becker
6c67cc1f01
make default endpoint non reachable by default
5 years ago
Jeff Becker
70eb353c42
make publishing introsets optional using reachable=false to disable
5 years ago
Jeff Becker
ee752c00e6
make format
5 years ago
Jeff Becker
c014d21f84
use std::shared_ptr not a bare pointer to prevent memleak
5 years ago
Jeff Becker
79c3c748e4
limit number of snode sessions client side
5 years ago
Jeff Becker
c9d38d421b
clang fixes
5 years ago
Jeff Becker
92bbda600b
remove callsto Router::PumpLL and stuff gets faster (or stuff)
5 years ago
Jeff Becker
7c0fc69ad8
use ipv6 only with ipv6 packets
5 years ago
Jeff Becker
0c5c1aab1b
remove unneeded log statement
5 years ago
Jeff Becker
a2fc35a7aa
lower limit to 25ms
5 years ago
Jeff Becker
5924a2cec0
limit calls
5 years ago
Jeff Becker
0828307906
fix address mapping bug
5 years ago
Jeff Becker
5188873288
batch and flush
5 years ago
Jason Rhinelander
d13a3d2b62
Don't flush here; we already have a tick flushing
5 years ago
Jeff Becker
ba0fd223d9
reduce number of jobs we put onto the logic thread
5 years ago
Jeff Becker
6f95fbfece
work in progress
5 years ago
Jeff Becker
56dce90de9
add trace log level for tracking logic thread jobs
5 years ago
jeff
52757fef0e
Merge remote-tracking branch 'micheal/background_mode' into vpn-api-2019-10-03
5 years ago
Jeff Becker
327c545530
finish multithread cryptography first pass
5 years ago
jeff
14c9ef15ed
try calling stuff in logic thread from event loop
5 years ago
Jeff Becker
61ade40a51
reduce logging and make format
5 years ago
Jeff Becker
e3bb59707e
more
5 years ago
Jeff Becker
1adae338ce
Merge remote-tracking branch 'origin/master'
5 years ago
Michael
edd0ec398f
Move thread stuff to subdirectory
5 years ago
Michael
4d8fe2a8a8
Move meta programming to subdirectory
5 years ago
Jeff Becker
c01112e4b7
tracy lock contention testing and other fun things
5 years ago
Michael
afb94381a2
Use ToString instead
5 years ago
Michael
094b697b01
Replace StatusObject with underlying JSON type
5 years ago
Michael
16cdfbd5f0
clang-tidy modernize pass
5 years ago
Michael
f9e9227e19
Fix gcc trunk warnings
5 years ago
Jeff Becker
8329aa0ee6
always rewrite address
5 years ago
Jeff Becker
2261885206
mark addresses as active when we use them
5 years ago
Jeff Becker
b4af87aa42
have IPPacket::srcv6 and IPPacket::dstv6 check for ipv4 packets and expand them to ipv6
5 years ago
Jeff Becker
f349677f1c
use ipv4 address on snodes for now
5 years ago
Jeff Becker
9a055947cb
make it compile
5 years ago
Jeff Becker
b29ec20ad4
try deferred resolve for exit handler
5 years ago
Jeff Becker
f48754c45d
make hop count and length configurable
5 years ago
Michael
e52492911d
Refactor endpoint state management to a new class
5 years ago
Jeff Becker
6882e627ba
make format
5 years ago
Jeff Becker
1fd6b5ae74
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
488695047f
Remove redundant else blocks
5 years ago
Jeff Becker
3ed8dec78b
use const reference and don't log invalid packets
5 years ago
Jeff Becker
0eb6431eb1
initialize tun with 0 and set defaults in correct places
5 years ago
Jeff Becker
58005c5f81
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
a2326efa37
Revert "Merge pull request #679 from tewinget/revert-config-refactor"
...
This reverts commit 2996a7f29c
, reversing
changes made to 10df3bd4b3
.
5 years ago
Jeff Becker
89a3e375d2
fix last commit
5 years ago
Jeff Becker
a781589b52
try fix for localhost.loki
5 years ago
Thomas Winget
d044d60101
Reverts #678 #677 and #669 with hashes:
...
10df3bd
766ece8
979f095
See those commits for further details
5 years ago
Michael
8c2d67f8f1
Fix tests
5 years ago
Jeff Becker
d6ec528a72
start work on seperating ips out of endpoint
5 years ago
Jeff Becker
64e9622270
start seperating tun and endpoint
5 years ago
Jeff Becker
5c61df08b5
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
b89689fec3
Refactor path build code
5 years ago
Jeff Becker
227f561ffc
Merge remote-tracking branch 'origin/master' into ipv6-tun
5 years ago
Michael
95646d2d87
Publish metric tags
5 years ago
Jeff Becker
c60099002b
reverse dns for ipv6
5 years ago
Jeff Becker
ec3ddfa425
typofixes
5 years ago
Jeff
8407c20b91
Merge branch 'ipv6-tun' into ipv6-tun
5 years ago
cathugger
72b1ea613c
make format
5 years ago
cathugger
a9dac85c28
fix stuff
5 years ago
Jeff Becker
a780789b2c
handle ipv6 exit traffic
5 years ago
Jeff Becker
0cf09d6435
make exits support v6 probably
5 years ago
Jeff Becker
de51ef23bf
more
5 years ago
Jeff Becker
2403ab8f86
ipv6
5 years ago
Jeff Becker
4c0a52ac9c
try addressing issue #642
5 years ago
Jeff Becker
a33dbce680
try switching logic
5 years ago
Michael
75430a234c
Convert to use memFn
5 years ago
Michael
491fee206b
Port code to use CryptoManager over passing Crypto pointers
5 years ago
Jeff Becker
2ac89c0afb
DRY
5 years ago
Jeff Becker
b679dd7341
fixit
5 years ago
Jeff Becker
64c7ed42fc
make format
5 years ago
Jeff Becker
9c96aecf3f
move llarp::Logic to std::shared_ptr
...
add sequence numbers to HSD messages
begin work on network isolation code
add more docs
5 years ago
Jeff
06f8bb2f42
add blacklist-snode option
5 years ago
Jeff Becker
8f68ceeb11
force ipv4
5 years ago
Jeff Becker
ad019cab71
add changes for review
5 years ago
Jeff Becker
7b03b63d13
more sighup code
5 years ago
Jeff Becker
a53da68700
start work on sighup
5 years ago
Jeff Becker
7c782440fb
round robin the exit endpoints on exit handler
5 years ago
Jeff Becker
728c6005a3
propagate strict-connect to tun handler for hooks
5 years ago
Jeff Becker
986e831579
make bundle-rc option configurable on snode tld
6 years ago
Jeff Becker
6b2ad94731
fix compile warning
6 years ago
Jeff Becker
e060082441
hook every dns for .loki and .snode when applicable
...
make {n,h}uint{32,16}_t templated type.
6 years ago
Jeff Becker
bb47d612b3
more
6 years ago
Jeff Becker
5e0acc1197
separate upstream/downstream flush
6 years ago
Jeff
27fac68716
fix
6 years ago
Jeff
01906c5d94
Merge remote-tracking branch 'origin/master'
6 years ago
Jeff Becker
fea64eaf12
handle subdomains
6 years ago
Jeff Becker
d20ba9ceab
handle subdomains
6 years ago
Jeff Becker
af1529fa72
Merge remote-tracking branch 'origin/master'
6 years ago
Michael
4143472a17
Add cmake module to target a library as 'system', and fix a few warnings
6 years ago
Jeff Becker
6711296b26
finish converting to shared_ptr
6 years ago
Jeff Becker
8484e29c9b
turn more stuff into std::shared_ptr
...
remove dead codepaths
6 years ago
Jeff Becker
c0d7b53328
make it work
6 years ago
Jeff Becker
3a8cb0bfb5
add shell based hooks for service::Endpoint, also make format
6 years ago
Michael
6bf54e0925
Remove AsyncKeyExchange, HiddenServiceAddressLookup and OutboundContext to their own components
6 years ago
Michael
c39c931d03
Remove IStateful virtual inheritance
6 years ago
Jeff Becker
351feadaec
make it work
6 years ago
Jeff Becker
7f25b62ef5
remove adding of defaults to upstream dns resolvers
6 years ago
Jeff Becker
3da6551e82
make android compile
6 years ago
Jeff Becker
e178a70929
use shared_ptr for event loop
6 years ago
Jeff Becker
2f2b841c67
disable mx record dropping
...
add servfail
6 years ago
Jeff Becker
c931ac069f
add AAAA records that return SIIT addresses
6 years ago
Jeff
d5ce529b27
implement random.snode A records
6 years ago
Jeff Becker
2eb6d8a3ae
fix name
6 years ago
Jeff Becker
28474155b9
implement localhost.loki on tun
6 years ago
Jeff Becker
9d649b7b14
Revert "make exit handle localhost.loki for now"
...
This reverts commit 654864919f
.
6 years ago
Jeff Becker
567efb9a92
Revert "move is_random_snode/is_localhost_loki into dns, llarp_HandleHookedDNSMessage() attempt at unification refactor between exit/tun handlers"
...
This reverts commit e388dc47eb
.
6 years ago
Ryan Tharp
654864919f
make exit handle localhost.loki for now
6 years ago
Ryan Tharp
e388dc47eb
move is_random_snode/is_localhost_loki into dns, llarp_HandleHookedDNSMessage() attempt at unification refactor between exit/tun handlers
6 years ago
Ryan Tharp
d02eec2bcf
add note
6 years ago
Jeff Becker
734a5b5fae
more
6 years ago
Jeff Becker
2218749134
Merge remote-tracking branch 'origin/staging' into staging
6 years ago
Jeff Becker
eceb55623c
more
6 years ago
Michael
61f3273dc4
Add threading annotations and fix potential deadlocks
6 years ago
Michael
c5a129ddff
Convert to use abseil synchronisation primitives
6 years ago
Jeff Becker
159415c363
delay dns resolution for snode until we have a session with it
6 years ago
Michael
887fb4ac62
Replace insert(make_pair()) with emplace()
6 years ago
Michael
048fa83c39
Finish replacement of Router with AbstractRouter
6 years ago
Jeff Becker
46222df421
refactor
6 years ago
Jeff Becker
66753430ad
fix it
6 years ago
Jeff Becker
e1522faeaa
add introspection rpc endpoint
6 years ago
Jeff
4c4f3faf83
Merge pull request #284 from michael-loki/abstract_router
...
Convert llarp::Router into an abstract base class
6 years ago
Jeff Becker
f84256d554
* lower lookup timeout for introsets
...
* correct previous commit for dns stuff
* allow for multiple parallel introset lookups
6 years ago
Jeff Becker
b40055181d
lower path build timeout to 15s
...
tweak various dns stuff
6 years ago
Michael
729cd045f1
Convert llarp::Router into an abstract base class
6 years ago
Jeff Becker
5743ca7fba
revert dns behavior
6 years ago
Jeff Becker
2c2b31f4b9
make it compile
6 years ago
Jeff Becker
25fa4817ba
hook mx records for all hooked domains
6 years ago
Jeff Becker
41c993a237
disable A records for random.snode, use CNAME queries instead.
6 years ago
Jeff Becker
8c77c53675
reply with cname
6 years ago
Ryan Tharp
2bba8f01e8
don't return unknown IPs
6 years ago
Ryan Tharp
54549724d0
fix random.snode
6 years ago
Ryan Tharp
4bf4faa956
make format
6 years ago
Michael
7212baa062
Add implicit conversion from ManagedBuffer to llarp_buffer_t
6 years ago
Michael
7ca3e13e78
Rename to ManagedBuffer
6 years ago
Michael
f3b0af9d2f
Create CopyableBuffer type
6 years ago
Michael
2de621b0ad
Disable copy constructing llarp_buffer_t
6 years ago
Michael
e9f6ca339a
Fix minor warning
6 years ago
Ryan Tharp
f20ac0f6e9
Merge branch 'staging' into crypto_interface
6 years ago
Ryan Tharp
175fdbc89c
Merge pull request #250 from majestrate/add-localhost-loki
...
add initial localhost.loki handling in dns
6 years ago
Ryan Tharp
9b6008db1d
downgrade DNS server failure to a warning
6 years ago
Jeff Becker
9e50e2d34a
try fixing AAAA record handling, return NOERROR with no records.
6 years ago
Jeff Becker
7489ab1380
only hook cname for random.snode
6 years ago