Commit Graph

398 Commits

Author SHA1 Message Date
Jeff
e480e36f3d
generate windows rc for each executable target so we can set the executable name right for each one 2022-05-30 09:06:48 -04:00
Jeff
f05c2ebc71
macro removals
clean up version cmake stuff

clean up generated cpp version stuff

make all the windows rc stuff get generated by cmake

bump release motto message

properly inject release motto into version
2022-05-30 09:06:48 -04:00
majestrate
838183e36e
Merge pull request #1748 from majestrate/liblokinet-udp-api-2021-09-19
liblokinet updates
2022-02-06 13:19:08 -05:00
Jeff
97966976d0 Update CMakeLists.txt
dont depend on lokinet-shared target for sign target as we disabled it by default.
2022-01-31 10:53:48 -05:00
Jeff Becker
1feaec1169 build liblokinet on macos 2022-01-31 10:53:48 -05:00
Jeff Becker
f38bf2770d move WITH_BOOTSTRAP option to root project CMakeLists.txt 2022-01-31 10:53:48 -05:00
Jeff
2772a32907
* fix up lokinet cli help opts
* document doxygen
2021-12-10 10:40:18 -05:00
Jeff Becker
4c5b90fb03
handle exceptions on setup and config load without aborting 2021-10-06 15:36:29 -04:00
Jeff Becker
5c457ff486
refactor logging to use std::source_location
* use std::source_location instead of godawful macros in logging
* remove unused/absolutely haram af json logstream
* fix bug in android logger where it doesn't respect eLogNone
2021-10-06 11:10:48 -04:00
Jason Rhinelander
488ed47cda Remove duplicate handling of jemalloc
We were linking/loading it in different ways, one with cmake option
`USE_JELLOC` and the other, older version `WITH_JEMALLOC`.  This removes
the latter (which was default OFF) and keeps the former (which was added
and has been default ON since 0.9.4 or so).

Also removes the `ifdef`ed JEMALLOC code in lokinet.cpp because we don't
need it; just linking to jemalloc is enough to get the malloc/free
replacements.
2021-09-13 13:26:12 -03:00
Jason Rhinelander
62d7192a50 Add mainnet/testnet bootstrap files into repo
We use them everywhere now (include the debs) so it makes sense to have
them bundled here rather than needing a download during package build
(in particular for debs that's considered a bad thing).
2021-09-10 19:38:32 -03:00
Jason Rhinelander
8df5005f54
Apply suggestions from code review 2021-09-10 19:22:22 -03:00
Jeff Becker
7e1236503c
make lokinet-bootstrap target toggleable
add cmake option to disable building lokinet-bootstrap binary
2021-09-10 10:41:42 -04:00
Jason Rhinelander
dbea1f98e7
Merge pull request #1651 from majestrate/lokinet-bootstrap-help-messages-2021-05-18
add --help and -h flags to lokinet-bootstrap to show help message
2021-09-08 19:56:32 -03:00
Jason Rhinelander
6c3c523404 Update wording and wrap help message 2021-09-08 19:48:25 -03:00
Jeff Becker
979488830e
remove unused import
lokinet.swift no longer touches internals of lokinet network extension so we remove the import for it
2021-09-03 07:49:29 -04:00
Jason Rhinelander
831cc23de1 Remove obsolete bigs
Removes stuff we didn't end up needing/using:
- Lokinet.modulemap
- apple bits from lokinet.cpp (we don't use lokinet.cpp at all on macos
  anymore).
- dnsproxy/extension C++ headers
- apple-specific network extension config in llarp::config::Config
2021-09-02 19:19:54 -03:00
Jason Rhinelander
92c7fb9872 LOKINET_VERSION -> built in lokinet_VERSION 2021-09-02 19:11:41 -03:00
Jason Rhinelander
8aef5d742d Re-enable LTO; target macos 10.12+ 2021-09-02 19:07:40 -03:00
Jason Rhinelander
067fcf71d3
Remove dead code 2021-09-02 14:17:10 -04:00
Jason Rhinelander
329da951b7
Apple OS interface cleanup & refactoring
- Add a C callback interface (context_wrapper.h) between lokinet and the
  objective-C code so that:
  - we can use objective-C (rather than objective-C++), which seems more
    likely to be supported by Apple into the future;
  - we minimize the amount of code that needs to be aware of the Apple
    APIs.
  - this replaces apple logger objective c++ implementation with a plain
    c++ implementation that takes a very simple C callback (provided
    from the obj-c code) to actually make the call to NSLog.

- Add various documentation to the code of what is going on.

- Send all DNS traffic to the primary IP on the tun interface.  The
  match prefixes simply don't work as advertised, and have weird shit
  (like even if you get it working for some domains, "instagram.com"
  still doesn't because of god-knows-what Apple internal politics).

- Drop the dns proxy code as we don't need it anymore.

- Don't use 9.9.9.9 for default DNS.  (We might consider the unfiltered
  9.9.9.10 as an alternative default, but if we do it should be a global
  lokinet change rather than a Mac-specific change).

- Parse a lokinet.ini in the data directory, if it exists.  (Since we
  are sandboxed, it is an app-specific "home" directory so is probably
  buried god knows where, but at least the GUI ought to be able to get
  it to let users add things to it).

- This commit also adds a swift version of the PacketTunnelProvider
  glue, which ought to work in theory, but the *tooling* for cmake is so
  underdeveloped that I couldn't find any way to actually get the damn
  thing working.  So I'm committing it here anyway (and will revert it
  away in the next commit) in case we someday want to switch to it.

-
2021-09-02 14:17:09 -04:00
Jason Rhinelander
712b5a5608
Tweak icns generation to only run when necessary 2021-09-02 14:17:09 -04:00
jeff
deb0a982be
it works 2021-09-02 14:17:09 -04:00
jeff
1272a4fbe1
add dummy sign target for ci when we don't have signing keys
remove static macos from ci pipeline
2021-09-02 14:17:09 -04:00
jeff
7db2459469
macos sort of works now 2021-09-02 14:17:09 -04:00
Jason Rhinelander
81d27c35c1
Default CODESIGN_APPEX to CODESIGN_APP
Sometimes (e.g. dev builds) these can apparently be the same; sometimes
it seems they need to be different, because Apple.
2021-09-02 14:17:08 -04:00
Jason Rhinelander
3ab117a03b
Switch extension from a framework to an appex 2021-09-02 14:17:08 -04:00
Jason Rhinelander
faf8a699a6
Set version into Info.plist, don't manually configure
cmake already treats the info plist as a file to be configured (not
merely copied) so we don't need to configure_file ourselves to a temp
file.
2021-09-02 14:17:08 -04:00
Jason Rhinelander
0bb00baacf
Various cmake build cleanups/refactors
- Added contrib/macos/README.txt with description of the cancer
  happening here.
- Add provisioningprofiles that Apple wants to make things work properly
- Made the entitlements files match the provisioningprofiles
- Remove configured entitlements files; we *can't* change any of the
  things here because they are closedly tied to the provisioningprofiles
  -- which means if someone wants to build their own Lokinet, they have
  to replace a bunch of crap and change application IDs throughout.
  This is the hostile-to-open-source Apple way.
- Remove unused old lokinet binary, as we're no longer using it on macos
- Use a POST_BUILD rather than install to copy things around into the
  right places
- Convert all the configure_file's to consistently use @ONLY
- Misc cleanups
2021-09-02 14:17:08 -04:00
jeff
5edd045c9b
add swift version bullshit file and additional bullshittery 2021-09-02 14:17:08 -04:00
jeff
0708a0d897
initial network extension code for macos
probably does not work
2021-09-02 14:17:08 -04:00
Jeff Becker
37a9bd768e
fix linking on win32 for lokinet.dll
only apply static link flags for executables
2021-06-08 08:32:44 -04:00
Jeff Becker
7ba15f91f3
add --help and -h flags to lokinet-bootstrap to show help message 2021-05-25 06:41:59 -04:00
Jason Rhinelander
73a29d3b07 Link lokinet-bootstrap against libssl as well
Just crypto apparently isn't enough, at least on some arches/distros.
2021-04-19 23:45:36 -03:00
Jeff Becker
c547cd0118
fixes for lokinet-bootstrap
* use schannel on windows platforms
* load ca bundle for non windows platforms
* use geteuid for detecting root user when finding default data dir
2021-04-19 07:08:23 -04:00
Jeff Becker
3d87dbff91
bullshit for windows and openssl with CPR
* windows static cross compile is wonky af so we add some hacks to make it work
2021-04-19 07:08:03 -04:00
Jason Rhinelander
2ca7ef7f5f
Rename isRouter -> isSNode
The isRouter wording was quite confusing, especially in a call such as:

    router->Configure(config, opts.isRouter, nodedb)
2021-04-19 06:58:36 -04:00
Jason Rhinelander
1d6ad7284c
Fix cursed formatting 2021-04-19 06:58:36 -04:00
Jeff Becker
c92894804c
Merge remote-tracking branch 'origin/stable' into dev 2021-04-17 09:18:37 -04:00
Jeff Becker
68826f10bb use binary mode for writing files 2021-04-16 18:52:18 -03:00
Jeff Becker
4daebc0141
catch exception and print out error 2021-04-16 15:01:00 -04:00
Jeff Becker
a0d3ab125a
throw on failed writing and port fs namespace changes from oxen-core 2021-04-16 14:47:17 -04:00
Jeff Becker
a80d8b95b3
update lokinet-bootstrap
* compat with old shell script curl wrapper's arguments
* do lazy validation of fetched data
2021-04-16 14:16:16 -04:00
Jeff Becker
77de60af91
require openssl explicitly for lokinet-bootstrap 2021-04-16 09:40:36 -04:00
Jeff Becker
27c80a2638
add include directory for daemon directory so llarp/* includes work 2021-04-16 05:51:34 -04:00
Jeff Becker
e8178a032e
lokinet-bootstrap native binary 2021-04-15 20:06:15 -04:00
Jeff Becker
0c37cc7f60
lokinet-bootstrap native binary 2021-04-15 13:39:45 -04:00
Jeff Becker
54c56a6d28
remove references to lokimq namespace
these were not found during the first passes and now that lokimq is gone from my machine this failed to compile
2021-03-15 08:46:19 -04:00
Thomas Winget
7caa87862e standardize include format and pragma once
All #ifndef guards on headers have been removed, I think,
in favor of #pragma once

Headers are now included as `#include "filename"` if the included file
resides in the same directory as the file including it, or any
subdirectory therein.  Otherwise they are included as
`#include <project/top/dir/relative/path/filename>`

The above does not include system/os headers.
2021-03-09 19:01:41 -05:00
Jason Rhinelander
91d6698a9d Reformat with clang-format-11 2021-03-05 13:36:31 -04:00