Commit Graph

64 Commits (ubuntu/impish)

Author SHA1 Message Date
Jason Rhinelander 92c7fb9872 LOKINET_VERSION -> built in lokinet_VERSION 3 years ago
Jason Rhinelander 3527c9cdb5
Remove more unused dns-proxy files 3 years ago
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.

-
3 years ago
jeff 7db2459469
macos sort of works now 3 years ago
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.
3 years ago
Jason Rhinelander 3ab117a03b
Switch extension from a framework to an appex 3 years ago
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.
3 years ago
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
3 years ago
jeff 5edd045c9b
add swift version bullshit file and additional bullshittery 3 years ago
jeff 0708a0d897
initial network extension code for macos
probably does not work
3 years ago
Jeff 6407733c8e
* make llarp.halt rpc call actually return a reply (#1488)
* add --kill flag to lokinet-vpn that calls llarp.halt
* make macos uninstaller kill lokinet via lokinet-vpn --kill
4 years ago
Jason Rhinelander f1b074bb95
Merge pull request #1487 from jagerman/revert-uninstaller-subdir
Revert "Build mac uninstaller as subproject instead of externalprojec…
4 years ago
Jeff b18546086a
make macos uninstaller actually kill and uninstall lokinet (#1484)
* macos fluff

* make uninstaller work, the uninstall script needs to be called with /usr/bin/sudo to work because god know why it needs that even though it's already root.
* add logrotation
* make the uninstall script kill all the things

* revert

* use correct regular expression

* remove logrotate configs rename logrotate config file name to be more descriptive
4 years ago
Jason Rhinelander bc62e9dd2d Revert "Build mac uninstaller as subproject instead of externalproject (#1485)"
This reverts commit e62f04c601.
4 years ago
Jason Rhinelander e62f04c601
Build mac uninstaller as subproject instead of externalproject (#1485)
This makes it easier to build/rebuild via a target, and is a bit
cleaner.
4 years ago
Jason Rhinelander a753e96d8d
Version bump (#1483)
* Bump version to 0.8.2

* Let cmake set PROJECT_NAME

`project(x ...)` already sets PROJECT_NAME (and CMAKE_PROKECT_NAME if
this is the top-level build) to `x`; the logic here seemed sort of
backwards.

* Get rid of uninstaller entitlement

We don't seem to need it anymore with Qt 5.15.1.

* Bump windows lokinet-gui build
4 years ago
Jeff Becker 876f292efb use /var/log/ for log files 4 years ago
Jeff Becker 300ce89278 kill the gui 4 years ago
Jeff Becker 452cf13841 delete lokinet applications directory 4 years ago
Jeff Becker b8a1c69a3e remove old path too 4 years ago
Jeff Becker 42b979b266 remove line from uninstaller 4 years ago
Jeff Becker c4e983da3f update icon 4 years ago
Jeff Becker f3989c0f9a add entitlements 4 years ago
Jeff Becker 3a950aa950 change icon 4 years ago
Jeff Becker 4d089db3cd change tool name 4 years ago
Jeff Becker 36fa3f347a fix icon path 4 years ago
Jeff Becker d2a68f8323 add install target 4 years ago
Jeff Becker bb1f9c4dc0 ugh 4 years ago
Jeff Becker d268ef1246 security.h 4 years ago
Jeff Becker ee3489744e more fixes for macos 4 years ago
Jeff Becker 6e6bff5e1d fix header 4 years ago
Jeff Becker e835ad6347 chmod +x 4 years ago
Jeff Becker e183bf9673 fix typo 4 years ago
Jeff Becker ca5df6436a add initial uninstaller code that is horrible 4 years ago
Jeff Becker 580f005f50 revert 4 years ago
Jeff Becker 3b3374fa4c try watching trash for lokinet-gui.app and delete ourself if we see it 4 years ago
Jeff Becker 0afe9f0138 update packaging for macos add preinstall script that nukes any existing lokinet make uninstaller revert dns to "empty" make cpack use preinstall script in pkg file 4 years ago
Jason Rhinelander 5b7d194ff1 Merge remote-tracking branch 'origin/master' into dev 4 years ago
Jason Rhinelander 1a552d580e More macos uninstall hackery 4 years ago
Jason Rhinelander 86a67db87a After touching, macos needs some sleep 4 years ago
Jason Rhinelander 2be546557f Touch the magic file 4 years ago
Jason Rhinelander d48a54363d Restore DNS via signal handler
If we get signalled we still want to run it, but a signal on the script
could result in us exiting early.
4 years ago
Stephen Shelton 47806b4408
Handle no-explicitly-set-dns case in launchd script 4 years ago
Stephen Shelton b4b2e91bb5
Handle no-explicitly-set-dns case in launchd script 4 years ago
Jason Rhinelander dacea9a2bc Add stapling after notarization 4 years ago
Stephen Shelton b56ff52ad9 Include macos uninstall script 4 years ago
Jason Rhinelander 2036bcaf8f NOTARIZE only has one O 4 years ago
Jason Rhinelander 35197a7620 codesigning and notarization
Codesigns and notarizes the package.  Requires a bunch of stuff to
actually get this working.  (see contrib/macos-signing.txt).

I'm currently also building with

    -DLOKINET_GUI_REPO=https://github.com/jagerman/loki-network-control-panel.git -DLOKINET_GUI_CHECKOUT=cmake

because it needs the camke-ification PR for the control panel to
properly sign everything there.
4 years ago
Jason Rhinelander 1221a24c25 Change mac install prefix to /opt/lokinet
/usr/local is probably going to get stomped on by homebrew.
4 years ago
Jason Rhinelander c9a8c67276 Build lokinet-gui with ExternalProject
Also installs it without the extra hack by specifying ../../Applications
for the destination.  (This definitely feels kind of nasty, but it works).
4 years ago