Commit Graph

13 Commits (8b321612da4e129b8eee4e02af755184d2405fe9)

Author SHA1 Message Date
Jason Rhinelander 93c01623b0
Format fixes & fix warning in format script
- Don't escape '#' in the greps in format.sh: they warn about a spurious
  `\` in the latest grep.
- reformat
2 years ago
Jeff Becker a02679b87a
revise ./contrib/format.sh 2 years ago
Jason Rhinelander 1526b2a2eb which => command -v; different format.sh exit codes
`which` is a debian tool that is being deprecated in favour of
posix-standard `command -v`, so which to that to avoid deprecation
warnings.

Change the exit codes of `contrib/format.sh verify` to be unique for
each formatting program.
3 years ago
Jason Rhinelander 9b0b9fe67b Add jsonnet formatting (if jsonnet is installed) 3 years ago
Jason Rhinelander e39c473c88
format.sh: support macports clang-format
macports names it clang-format-mp-N to avoid clashing with a
system-installed one.
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 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 Becker 6e67f38408
add format verification to contrib/format.sh
run with ./contrib/format.sh verify
exits with 0 if we are good, exits non-zero if we are not formatted right
3 years ago
Thomas Winget 09ebe77860 let format.sh try system clang-format in case it is the correct version 3 years ago
Jason Rhinelander e5aa96ed7c Upgrade to clang-format 11
The formatting changes here are not too large and also nice: in
particular clang-format-11 appears to do better handling of `{...}`
constructor braces/arguments.
3 years ago
Jeff Becker eb0f29223a
add docs to gdb-filter.py
turn off thread logging in gdb
make sure everything runs in gdb when running test
add note in contrib/format.sh about a GNU-ism
4 years ago
Jeff Becker 5c039233db
remove the dreaded makefile and update docs 4 years ago