9 Commits

Author SHA1 Message Date
Jonathan Nobels
0629602630 workflows: add TailscaleKit tests to CI
updates tailscale/tailscale#15802

Updates the tests to run using go 1.24 and
adds a CI run to build the swift/TailscaleKit
targets and tests.
2025-05-22 12:18:39 -04:00
Jonathan Nobels
727bd68619 swift: add iOS simulator support
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.
2025-05-22 10:50:34 -04:00
Jonathan Nobels
78294ac1d6 swift: add public methods for published states and update docs
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
2025-05-05 15:11:04 -04:00
Jonathan Nobels
66906566f8 swift: fix proxy settings
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
2025-05-02 17:05:53 -04:00
Jonathan Nobels
0b970d454c swift: remove signing from TailscaleKit builds
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>
2025-04-28 12:59:55 -04:00
Jonathan Nobels
d5a3c8e8ef swift, go.mod: adding localAPI support via SOCK5
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>
2025-04-25 11:55:09 -04:00
Jonathan Nobels
a6f9249de0 swift: add public modifiers to methods/types that need to be public
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.
2025-03-25 10:25:55 -04:00
Jonathan Nobels
40f559c067 Makefile/swift: update Makefile and add support for iOS
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.
2025-03-24 14:01:54 -04:00
Jonathan Nobels
2948fe1136 swift: add NWConnection-inspired Swift 6 compatible Tailscale.framework
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>
2025-01-02 14:35:20 -05:00