updates tailscale/tailscale#15802
This adds the required targets to build for the iOS
simulator. We support both ios, ios-sim, and ios-fat
framework targets.
The sample app is updated to link in the ios-fat version
so it can be run on any target device or sim.
updates tailscale/tailscale#15802
The connection states weren't public. These are now exposed as
AsyncSequences so that there's no public dependency on Combine.
Documentation cleanup up and clarified slightly. Some minor
reorganization of localAPI. Adds a test to ensure that localAPI
is functional.
Add the xcode equivalent of -wall -werror
updates tailscale/tailscale#15802
Updates the proxy settings. These more modern constants
work with both macOS and iOS, for both localapi and
NSURLConnection socks to tailnet URLs
updates tailscale/tailscale#15802
make ios and make macos for TailscaleKit should build unsigned frameworks.
This also removes the kCFNetworkProxiesHTTPSEnable flag for iOS which
is not available.
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
updates tailscale/tailscale#13937
This adds localAPI support into TailscaleKit. LocalAPI can now be queried
via the SOCK5 proxy on both MacOS and iOS. This also fixes SOCKS5
support for iOS so you can simply apply our config to a URLSession.
This pulls in most of LocalAPI - though much of it is untested, it's based
on the implementation in tailscale/corp/xcode.
Unit tests pending.
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
updates tailscale/tailscale#13937
A few of the initializers and related types on the Listener and Connection
types were default-internal and must be public.
updates tailscale/tailscale#13937
Adds a Makefile for building various targets. Adds support for building
iOS compatible libtailscale_ios.a. Removes SOCKS5 support for iOS where
it looks like the CFNetwork support is lacking.
Fixes a few unexported symbols in TailscaleKit.
Added macOS sample app.
updates tailscale/tailscale#13937
Builds a TailscaleKit.framework which wraps libtailscale.a in an actor,
providing IncomingConnection, Listener, and OutgoingConnection
types which are more usable in pure async Swift code. The
method signatures are intended to be similar in form to NWConnection.
We also provide an extension to URLSession so you can make URL
requests via the user-space proxy.
Adds a static library mirroring much of the test control utilities in go, minus
the dependency on testing, so that we can export the signatures and
link it to tests that cannot run in go.
Added functionality to get both the local interface IPs as well as
the remote IP of incoming connections accepted by a listener.
Fixed a bug in the log writer so we append a newline.
This also updates to the latest go toolchain and tailscale version.
Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
There is a makefile that will produce a libtailscale.tar.zst. This
archive contains a vendored Go source tree for libtailscale, and a
`configure` and `Makefile` that will produce a .so, a .a, and a .pc file
for building & linking against.
Updates tailscale/tailscale#8912
Use a socketpair(2) and sendmsg/recvmsg to pass a connection fd
from Go to C. This lets people write non-blocking C by polling on a
tailscale_listener for when they should tailscale_accept.
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
It is theoretically possible for separate calls to tailscale_close to
race and cause a mess, so move the load+delete under a single mutex
lock.
While here, give it the closer error semantics to tailscale_listener_close.
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
On connections where it applies, signal to the peer connection that the
connection is shutting down/half closed, and only fully close once both
sides are complete.
If a client program receives the fd then it is responsible for closing
the fd, and we must not close the fd, as we may end up closing the wrong
object.
This was compiling because of the implicit integer conversion on the C
side. But -1 was becoming INT32MAX. Which was an invalid fd, so the logs
were hidden just as if the fd were -1. But it filled strace with EBADF.
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>