Commit Graph

7821 Commits (8b321612da4e129b8eee4e02af755184d2405fe9)
 

Author SHA1 Message Date
Jason Rhinelander 84ad0ab4d3
Slightly DRY thread-setting code, fix warning
There were warnings from the rc variable being unused; this DRYes it to
use the same code as linux (including the failure check on rc).
2 years ago
Jason Rhinelander 4065413977
Simplify/fix ip_header layout
ip_header wasn't 20 bytes on windows compilations for some unholy
reason.  This restructures it to avoid the template and just use two
different structs for le/be with a condition_t for the ifdef, which
resolves it (and *also* apparently avoids the need for the pack).

Also add a static_assert to check the size.

Also do the same for ipv6.
2 years ago
Jason Rhinelander 58eec9ed11
Avoid strict aliasing warning on function pointers
Cast via an ordinary function pointer rather than a function pointer
reference to avoid the warning.

Also make the pointer in `Func_t` explicit rather than implicit (deduced
into the `Func_t` type) to make it clearer what is going on here.
2 years ago
Jason Rhinelander ef4e720890
Bump cmake min to 3.13 and adopt policies up to 3.24
3.13...3.xx means "minimum is 3.13, but use any new cmake policies
introduced up to 3.xx".

There was, in particular, a policy w.r.t.  external project timestamps
causing warnings under 3.24.
2 years ago
Jason Rhinelander dd16158081
DNS: default to 127.3.2.1 & high port on Linux
Lots of tools struggle with non-default DNS port, so keep a listener on
127.3.2.1:53 (by default).

This required various changes to the config handling to hold a vector
(instead of an optional) of defaults and values, and now allows passing
in an array of defaults instead of just a single default.
2 years ago
Jeff Becker beb07bf46f
small optimizations and fixes
- Ensure ip header struct is packed
- Use fmt
- add missing header
2 years ago
Jason Rhinelander cfd80f6a17
Fix buffer_printer overflow 2 years ago
Jason Rhinelander f168b7cf72
llarp_buffer_t: rename badly named operator==
It didn't do equality, it did "does the remaining space start with the
argument" (and so the replacement in the previous commit was broken).

This renames it to avoid the confusion and restores to what it was doing
on dev.
2 years ago
Jason Rhinelander b9c9ee1ca7
Fix read problem in linux
errno is only set if read returns < 0 and won't be set to 0 if read
succeeds, so we were bailing here frequently on successful reads
(whenever errno happened to be non-0).
2 years ago
Jason Rhinelander 15443568db
Apply some lipstick to llarp_buffer_t
This class is cursed, but also broken under gcc-12.  Apply some lipstick
to get it moving again (but we really need to refactor this because it
is a mess).
2 years ago
Jeff Becker 24dcffabe5
unit tests 2 years ago
Jeff Becker 4490fdcf46
fix up CI
add jason's suggested changes for artifact upload

use lokinet-ci-nodejs-lts as base image so we can build the installer

update ci pipeline for windows to have building gui toggle-able

by default we will build the gui from this repo, but this allows it to
easily run using a custom gui asset if needed
2 years ago
Jason Rhinelander c9d928950a
C-cast to work around gross enum==int assumption in windows API 2 years ago
Jason Rhinelander 49b97f47cc
Make windows-configure.sh runnable without root/build
For when you want to set up a windows build dir, without doing the build
yet.
2 years ago
Jeff Becker a02679b87a
revise ./contrib/format.sh 2 years ago
Jeff Becker 7f27760c97
disable lokinet-bootstrap on windows builds 2 years ago
Jeff 871c3e3281
changeset for windows port
* wintun vpn platform for windows
* bundle config snippets into nsis installer for exit node, keyfile persisting, reduced hops mode.
* use wintun for vpn platform
* isolate all windows platform specific code into their own compilation units and libraries
* split up internal libraries into more specific components
* rename liblokinet.a target to liblokinet-amalgum.a to elimiate ambiguity with liblokinet.so
* DNS platform for win32
* rename llarp/ev/ev_libuv.{c,h}pp to llarp/ev/libuv.{c,h}pp as the old name was idiotic
* split up net platform into win32 and posix specific compilation units
* rename lokinet_init.c to easter_eggs.cpp as that is what they are for and it does not need to be a c compilation target
* add cmake option STRIP_SYMBOLS for seperating out debug symbols for windows builds
* intercept dns traffic on all interfaces on windows using windivert and feed it into lokinet
2 years ago
Jeff e981c9f899
tweaks for wine and yarn for gui
* allow specifying a custom yarn binary for building the gui using -DYARN= cmake option
* unset DISPLAY when calling wine because i hate popups
* do not rebuild gui when building for windows
* by setting the magical undocumented env var USE_SYSTEM_7ZA to 'true' we can have the pile of npm bullshit code use our system's local 7z binary instead of the probably not backdoored binary from npm, yes for real. i hate nodejs so god damn much you have no fucking idea
* allow providing a custom gui from a zip file via -DGUI_ZIP_FILE cmake option
2 years ago
Jeff d846bab0e1
unbreak android config loading 2 years ago
Jeff baddad9564
remove compat wrapper 2 years ago
Jeff 253d22db4f
restucture dbus parts
* move dbus into llarp/linux/dbus.hpp and llarp/linux/dbus.cpp
* provide platform abstraction for setting dns in preparation for network manager
2 years ago
Jeff 2d586145ee
wire up dns srv records 2 years ago
Jeff 74362149eb
refactor dns subsystem
we want to be able to have multiple locally bound dns sockets in lokinet so
i restructured most of the dns subsystem in order to make this easier.

specifically, we have a new structure to dns subsystem:

* dns::QueryJob_Base

base type for holding a dns query and response with virtual methods
in charge of sending a reply to whoever requested.

* dns::PacketSource_Base

base type for reading and writing dns messages to and from wherever they came from

* dns::Resolver_Base

base type for filtering and handling of dns messages asynchronously.

* dns::Server

contextualized per endpoint dns object, responsible for all dns related isms.

this change hides all impelementation details of all of the dns components.
adds some more helper functions for parsing dns and dealing with OwnedBuffer.

overall dns becomes less of a pain with this new structure. probably.
2 years ago
Jeff Becker bf2488d9e8
zero copy compare 2 years ago
Jeff Becker 1b9898aabc
restructure readme and docs 2 years ago
majestrate a8c0f76e1c
Merge pull request #1971 from majestrate/docs-and-such-2022-08-06
more docs
2 years ago
majestrate d5a2616d6f
Merge pull request #1983 from jagerman/macos-packaging
Macos packaging
2 years ago
Jason Rhinelander 2eef7c5915
Don't look for sqlite when not building peerstats 2 years ago
Jason Rhinelander 57cebe5c9f Don't build peerstats tests when peer stats disabled 2 years ago
Jason Rhinelander 955cecb21d Drone macos fixes
- fix lib check script to look at the network extension
- amend the list of intented linked libs
- upload the dmg
2 years ago
Jason Rhinelander 6e5db4f560 Set up sign target dependencies always; mark unsigned package
Even if we aren't codesigning, things like the `package` target expect
to be able to depend on `notarize` (and thus implicitly sign ->
assemble) to require a built package.

Also add a `-UNSIGNED` into the built dmg filename.
2 years ago
Jason Rhinelander ceed8e3238
Remove unused parameter names 2 years ago
Jason Rhinelander dccc86ea62 Apple icon bullshit
Apple introduced a bug in macOS 11 that they can't be arsed to fix which
breaks PNG loading into icns files by dropping the blue channel of the
last pixel, leaving a streak of yellow pixels at the bottom of the
image.

This hacks around it by setting a fully transparent, non-white (actually
yellow) pixel in the bottom-right corner of the images.

This is such inexcusable trash.
2 years ago
Jason Rhinelander 500530a336 dmg: version, and set icon
- Add the version number into the .dmg filename
- Set the lokinet icon on the .dmg.  This is done via a swift program
  because all the Apple CLI tools to do this are deprecated.
2 years ago
Jason Rhinelander 4605b49cfc Fix codesigning: reenable extension provisioning profile
The macOS PR that was merged accidentally dropped a cmake option that
result in the extension's provisioning profile not getting copied into
place (but was working locally because I was using a build dir where the
variable was still set).  This restores the option to fix the
codesigning.
2 years ago
Jason Rhinelander f5376e98c2 Lower minimum version for swift binary
CMake apparently doesn't do anything with CMAKE_OSX_DEPLOYMENT_TARGET
for swift, which results in a 12+ minimum version.  This fixes it
(albeit in a hacky way since the only apple-sanctioned way to properly
set this appears to be "use xcode").

Shame on Apple, as usual.
2 years ago
Jason Rhinelander 039d1429f5 Build an installer dmg 2 years ago
Jason Rhinelander 182f1dccb9 Fix mac.sh defaults to make a signed, notarized build 2 years ago
Jason Rhinelander 8b157c304e Remove obsolete mac packaging cruft 2 years ago
Jason Rhinelander d6fe1f1610 Update gui submodule to dev branch 2 years ago
Jeff 4c897f583c
fix up log statements
* make socket bind errors have a distinct message reported when caught using their own exception type
* omit printing banner in setup when we run from the lokinet executable (but not the liblokinet.so entry point)
2 years ago
Jeff a9abeb33cc
bump version to 0.9.10
* update release motto for 0.9.10
2 years ago
jeff 6929a02842
set up links to new docs pages 2 years ago
majestrate 256470229d
add more info
clarifiy what .loki and .snode gtld are
2 years ago
Jeff f6613c9526
wire up new docs pages
reword a few things about the links rewired.
2 years ago
Jeff f3533e9912
add initial high level usage docs 2 years ago
Jeff badf72838e
move all code directory readmes into docs/project-structure.md 2 years ago
majestrate 13c71c3626
Merge pull request #1942 from jagerman/macos-sysex
macOS system extension
2 years ago
Jason Rhinelander ab16d428cb Don't use sign target for contrib/mac.sh 2 years ago
Jason Rhinelander 2b7b1fcc79 Working signed macOS GUI build 2 years ago