1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
Commit graph

6366 commits

Author SHA1 Message Date
Jeff 503a92c992 un limit lmq 2020-10-02 05:51:52 -04:00
Jeff 7852735b36 tweak configuration defaults 2020-10-02 05:48:08 -04:00
Jeff 28bfaf0372
ammend log levels for common spammy log events (#1375) 2020-10-01 11:14:08 -04:00
Jeff Becker ac16cdc177 bump lokimq submodule to 1.2.0 2020-09-30 17:18:26 -03:00
Jason Rhinelander d41f6f1ef0
0.8.0 version bump (#1373) 2020-09-30 16:13:43 -04:00
Jeff 8943be6c3a
serialize auth codes in rpc (#1369)
* serialize auth codes in rpc

* format

* format

* config and route fixups

* bump lokimq

* fix compile

* discard unknown members in service keys

* format
2020-09-29 09:26:45 -04:00
Thomas Winget 7f18df4e9a
fix format string for size_t (#1371) 2020-09-28 20:07:40 -04:00
Jeff 56f49a6980
make win32 exits work again (#1367) 2020-09-28 18:43:31 -04:00
Jeff 53598ec0e9
dont serialize ephemeral members of service identity (#1370)
* prepare for keytool script

* dont serialize ephemeral members in service key file
* regnerate ephemeral members in service identity on load

* add keygen script

* use nacl for generating keys

* format
2020-09-28 11:15:07 -04:00
Thomas Winget 15229ea7ff
New RC format (#1368)
* initial work for RC SRVs.

Needs tests for new RC format.

Needs SRVs added to new RC, and associated tests.

* convert rc sign/verify test to catch2, add test for new rc

Also fixes a mistake in new rc serialization

* bump loki-mq submodule

need support for viewing bt deserialize consumer buffer so we
know how much it has consumed.

* fix some behavior errors

need to advance llarp_buffer_t after consuming data from it

only rewind and modify size of llarp_buffer_t in owning context.

* Add test for router contact (de-)serialization

Adds a test that makes a list of RouterContact with mixed
versions and ensures it serializes and deserializes correctly.
2020-09-25 14:05:28 -04:00
Jeff 252692a55b
dont poke routes if we have no exit (#1352)
* * refactor route poking out of llarp::Router and into llarp::RoutePoker
* only poke routes when we have an exit enabled as a client

* add route_poker header so it compiles
2020-09-23 20:28:38 -04:00
Jeff 10e3d80559
resolve issue #1361 about peer stats excessive logging (#1365) 2020-09-23 14:44:39 -04:00
Jason Rhinelander 5765c128ad
Remove gcc-5 workaround (#1360) 2020-09-23 14:44:28 -04:00
Jeff Becker 7a18d14fde make it compile 2020-09-23 14:39:06 -03:00
Jeff a9d23d3ac3
use absolute path for route command (#1354)
* ignore tun interfaces on windows for mitigating foot cannons

* add flag for git add -p when using format verifier as git hook

* use explicit path for route command on windows

* fix typo

* fix typo

* remove hunk for win32 route exclusion based off being a tun interface

* add metric to win32 route command

* * refactor win32 route poking to use a common function for iterating over routes

* put interface in route poking for default route

* mnake it compile

* use correct route command on windows

* use fs::path for service::Identity::EnsureKeys
2020-09-23 07:06:11 -04:00
Jeff 11ed8924c6
use fs::path for service::Identity::EnsureKeys (#1364) 2020-09-23 07:05:37 -04:00
Jason Rhinelander d03066ee05
Support [dns] no-resolvconf option (ignored by lokinet) for deb compatibility (#1362)
* Add ignored [dns]no-resolvconf option for deb backwards compat

The debs hack a `#no-resolvconf=1` into the config file in 0.7 to allow
a user to disable resolvconf setup during startup by uncommenting it.
That doesn't work anymore since 0.8 errors on invalid config options, so
add it as an ignored option so that 0.7 deb config files can still be
compatible.

* Fix `[dns]upstream` comment not being produced in generated conf file

* fix test

Co-authored-by: Jeff <jeff@i2p.rocks>
2020-09-22 17:46:06 -04:00
Jason Rhinelander 63a876cc78
Allow -DWITH_SETCAP=OFF to disable setcap during make install (#1363)
The debs don't want it (and so this will save needing to patch it out),
nor do you need it if running via a systemd service file that sets the
capabilities.
2020-09-22 17:45:42 -04:00
Jason Rhinelander bbfbc1c1e7
Drone CI job shuffling (#1359)
- Disable bionic arm64 job to reduce the load on the ARM box a bit.
- Add bionic amd64 build so that we have a (normal) build on bionic.
- Remove sid/g++-10 job because g++ is now the default on sid (so the
  debian/sid build is already doing the same thing).
2020-09-22 16:10:38 -04:00
Jeff c91e4df856
make errors with service keyfile throw (#1358) 2020-09-22 15:04:31 -04:00
Jeff fe30193a97
revive android build system (#1339)
* it lives?

* clean up

* add readme and add x86_64 to abi filters

* disable route poking on android

* make it compile on android

* it compiles!!111

* typofix

* re-enable ccache for android
2020-09-22 15:04:15 -04:00
Jeff ef794bbd11
move pkgconfig requirement (#1355) 2020-09-22 13:59:33 -04:00
Jason Rhinelander d90c1390fa
Merge pull request #1351 from majestrate/wire-up-lns-2020-09-19
client side lns fixes
2020-09-19 12:14:04 -03:00
Jeff 75ef28531e allow lns subdomains 2020-09-19 10:38:57 -04:00
Jeff a035dbdb9a enable peer stats by default 2020-09-19 09:56:47 -04:00
Jeff 686b13b2f3 fix up cmake lokimq target 2020-09-19 09:50:54 -04:00
Jeff 78b40d6725 wire up lns gotnamemessage handler to kitchen sink 2020-09-19 09:29:36 -04:00
Ryan Tharp 5d43a804d1
Update requirements and other README.md clean up (#1343)
* Update requirements and other clean up

git is now required due to submodules
libcurl/libcap: not sure if the minimum version is correct, The number I used is based on the bionic package version
add recursive option to all cloning
other tweaks to make concise and  precise

* Remove libcurl

* Add nproc back

* add libcurl back for windows

* Remove libcurl from WIndows

as lokinet-bootstrap.exe is just curl.exe now and will be removed soon
2020-09-18 10:36:57 -04:00
Rick V 7136f77c2e
allow running lokinet as root on windows (#1347)
* - allow running lokinet as root on windows
  ($PROGRAMDATA/.lokinet/lokinet.ini)
- oops forgot to eat my own command line args

* cursed windows

* now that we eat our own startup options the entry in cxxopts is fully
ded

* aha our command line options get smashed up

* revert plus DRY fix
2020-09-17 15:20:50 -04:00
Jeff 21930cf667
LNS (#1342)
* initial relay side lns

* fix typo

* add reserved names and refactor test for dns

* lns name decryption

* all wired up (allegedly)

* refact to use service::EncryptedName for LNS responses to include nonce with ciphertext

* fully rwemove tag_lookup_job

* replace lns cache with DecayingHashTable

* check for lns name validity against the following rules:

* not localhost.loki, loki.loki, or snode.loki

* if it contains no dash then max 32 characters long, not including the .loki tld (and also assuming a leading subdomain has been stripped)

* These are from general DNS requirements, and also enforced in
registrations:

* Must be all [A-Za-z0-9-]. (A-Z will be lower-cased by the RPC call).

* cannot start or end with a -

* max 63 characters long if it does contain a dash

* cannot contain -- in the third and fourth characters unless it starts with xn--

* handle timeout in name lookup job by calling the right handler with std::nullopt
2020-09-17 15:18:08 -04:00
Jason Rhinelander f5e5066bd5
Update deps (#1348)
* Update submodules/static deps to latest versions

* Add mingw zmq build patch

* Drop support for Windows 2000
2020-09-16 15:47:35 -04:00
Jeff c64c9093f2
make endpoints reachable by default (#1344) 2020-09-14 18:19:17 -04:00
Jeff dfd8df5e7f
add uninstall target (#1340)
* add uninstall target

* * redo cmake uninstall
* remove lokinet-vpn python script
* don't install lokinet-vpn twice
2020-09-09 12:06:57 -04:00
Jeff 854ce48e1c
remove gitlab ci as it is unused (#1341) 2020-09-09 12:03:47 -04:00
Jeff 681459185f
remove locks (#1336)
* remove locks

* use tryPushBack to attempt to prevent deadlocks
2020-09-04 15:55:49 -04:00
cathugger 838d28c6ed
contrib: NetworkManager dnsmasq config (#1335) 2020-09-04 14:58:11 -04:00
cathugger 412821ed77
contrib: systemd-resolved config (#1334) 2020-09-04 14:02:16 -04:00
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
2020-09-03 18:22:22 -04:00
Jeff 60f4d96ba5
proper route poking (#1330)
* route poking:

* remove popen() call, replace with reading /proc/net/route for getting default route
* dynamically poke and unpoke routes on runtime

* swap intros and fix rpc endpoint for version to return what the ui expects

* use std::string::find_first_not_of instead of using a lambda
2020-09-01 17:22:22 -04:00
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
2020-08-31 19:25:58 -04:00
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
2020-08-31 16:07:17 -04:00
Jeff 521765b5a8
Merge pull request #1319 from majestrate/clean-up-dev-2020-07-27
exit tool rewrite in C++ (without macos support yet)
2020-08-28 11:52:15 -04:00
Jason Rhinelander fd684a225b Update nlohmann to latest stable 2020-08-28 11:03:43 -03:00
jeff def8a9ce46 disable running router hive just build it 2020-08-28 13:59:29 +00:00
jeff 1537ad18df format 2020-08-28 11:35:10 +00:00
jeff fc5035902a only stop router hive from fixture when router hive is not None 2020-08-28 11:31:03 +00:00
jeff 75f550434c change assert to throw an exception instead when service node has no peer stats enable.
update unit tests so it passes on debian sid
2020-08-28 11:26:50 +00:00
jeff 52d20968a7 remove llarp::StrEq 2020-08-28 11:05:29 +00:00
jeff bbc749294e fix windows build typo 2020-08-27 16:48:27 +00:00
jeff 5391e6a66a initial config overriding on runtime 2020-08-27 12:43:53 +00:00