Commit Graph

64 Commits

Author SHA1 Message Date
Jason Rhinelander
92c7fb9872 LOKINET_VERSION -> built in lokinet_VERSION 2021-09-02 19:11:41 -03:00
Jason Rhinelander
3527c9cdb5
Remove more unused dns-proxy files 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
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
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
2020-11-20 12:37:30 -05:00
Jason Rhinelander
f1b074bb95
Merge pull request #1487 from jagerman/revert-uninstaller-subdir
Revert "Build mac uninstaller as subproject instead of externalprojec…
2020-11-18 18:15:56 -04:00
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
2020-11-18 17:06:48 -05:00
Jason Rhinelander
bc62e9dd2d Revert "Build mac uninstaller as subproject instead of externalproject (#1485)"
This reverts commit e62f04c601.
2020-11-18 17:54:29 -04:00
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.
2020-11-18 12:49:16 -05:00
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
2020-11-18 06:08:56 -05:00
Jeff Becker
876f292efb use /var/log/ for log files 2020-11-17 19:22:19 -04:00
Jeff Becker
300ce89278 kill the gui 2020-11-17 19:22:19 -04:00
Jeff Becker
452cf13841 delete lokinet applications directory 2020-11-17 19:22:19 -04:00
Jeff Becker
b8a1c69a3e remove old path too 2020-11-17 19:22:19 -04:00
Jeff Becker
42b979b266 remove line from uninstaller 2020-11-17 19:22:19 -04:00
Jeff Becker
c4e983da3f update icon 2020-11-17 19:22:19 -04:00
Jeff Becker
f3989c0f9a add entitlements 2020-11-17 19:22:19 -04:00
Jeff Becker
3a950aa950 change icon 2020-11-17 19:22:19 -04:00
Jeff Becker
4d089db3cd change tool name 2020-11-17 19:22:19 -04:00
Jeff Becker
36fa3f347a fix icon path 2020-11-17 19:22:19 -04:00
Jeff Becker
d2a68f8323 add install target 2020-11-17 19:22:19 -04:00
Jeff Becker
bb1f9c4dc0 ugh 2020-11-17 19:22:19 -04:00
Jeff Becker
d268ef1246 security.h 2020-11-17 19:22:19 -04:00
Jeff Becker
ee3489744e more fixes for macos 2020-11-17 19:22:19 -04:00
Jeff Becker
6e6bff5e1d fix header 2020-11-17 19:22:19 -04:00
Jeff Becker
e835ad6347 chmod +x 2020-11-17 19:22:19 -04:00
Jeff Becker
e183bf9673 fix typo 2020-11-17 19:22:19 -04:00
Jeff Becker
ca5df6436a add initial uninstaller code that is horrible 2020-11-17 19:22:19 -04:00
Jeff Becker
580f005f50 revert 2020-11-17 19:22:19 -04:00
Jeff Becker
3b3374fa4c try watching trash for lokinet-gui.app and delete ourself if we see it 2020-11-17 19:22:19 -04:00
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 2020-11-17 19:22:19 -04:00
Jason Rhinelander
5b7d194ff1 Merge remote-tracking branch 'origin/master' into dev 2020-05-22 00:45:24 -03:00
Jason Rhinelander
1a552d580e More macos uninstall hackery 2020-04-22 00:04:13 -03:00
Jason Rhinelander
86a67db87a After touching, macos needs some sleep 2020-04-21 23:39:25 -03:00
Jason Rhinelander
2be546557f Touch the magic file 2020-04-21 23:14:41 -03:00
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.
2020-04-21 22:55:11 -03:00
Stephen Shelton
47806b4408
Handle no-explicitly-set-dns case in launchd script 2020-04-21 14:51:17 -06:00
Stephen Shelton
b4b2e91bb5
Handle no-explicitly-set-dns case in launchd script 2020-04-21 14:47:36 -06:00
Jason Rhinelander
dacea9a2bc Add stapling after notarization 2020-04-21 16:25:30 -03:00
Stephen Shelton
b56ff52ad9 Include macos uninstall script 2020-04-21 16:25:30 -03:00
Jason Rhinelander
2036bcaf8f NOTARIZE only has one O 2020-04-21 16:25:30 -03:00
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.
2020-04-21 16:25:30 -03:00
Jason Rhinelander
1221a24c25 Change mac install prefix to /opt/lokinet
/usr/local is probably going to get stomped on by homebrew.
2020-04-21 16:25:30 -03:00
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).
2020-04-21 16:20:15 -03:00