Rename package to tsnet_flutter for pub.dev publishing under Svrnty
- Rename Dart package: tailscale_kit → tsnet_flutter - Rename Swift plugin class: TailscaleKitPlugin → TsnetFlutterPlugin - Rename podspec: tailscale_kit → tsnet_flutter - Update MethodChannel name to tsnet_flutter - Add BSD-3-Clause LICENSE (compatible with Tailscale's license) - Update metadata for pub.dev: homepage, repository, author Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ecc289cb38
commit
63f0315ee7
28
LICENSE
Normal file
28
LICENSE
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2026, Svrnty
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@ -11,7 +11,7 @@ import UIKit
|
|||||||
/// TailscaleStatus(&err) → JSON string or NULL
|
/// TailscaleStatus(&err) → JSON string or NULL
|
||||||
/// TailscaleIP(&err) → IP string or NULL
|
/// TailscaleIP(&err) → IP string or NULL
|
||||||
/// TailscaleFreeString(ptr) → frees returned strings
|
/// TailscaleFreeString(ptr) → frees returned strings
|
||||||
public class TailscaleKitPlugin: NSObject, FlutterPlugin {
|
public class TsnetFlutterPlugin: NSObject, FlutterPlugin {
|
||||||
|
|
||||||
private lazy var stateDir: String = {
|
private lazy var stateDir: String = {
|
||||||
let docs = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
|
let docs = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
|
||||||
@ -21,8 +21,8 @@ public class TailscaleKitPlugin: NSObject, FlutterPlugin {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
public static func register(with registrar: FlutterPluginRegistrar) {
|
public static func register(with registrar: FlutterPluginRegistrar) {
|
||||||
let channel = FlutterMethodChannel(name: "tailscale_kit", binaryMessenger: registrar.messenger())
|
let channel = FlutterMethodChannel(name: "tsnet_flutter", binaryMessenger: registrar.messenger())
|
||||||
let instance = TailscaleKitPlugin()
|
let instance = TsnetFlutterPlugin()
|
||||||
registrar.addMethodCallDelegate(instance, channel: channel)
|
registrar.addMethodCallDelegate(instance, channel: channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1,15 +1,15 @@
|
|||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'tailscale_kit'
|
s.name = 'tsnet_flutter'
|
||||||
s.version = '0.1.0'
|
s.version = '0.1.0'
|
||||||
s.summary = 'Embedded Tailscale tsnet for Flutter'
|
s.summary = 'Embedded Tailscale tsnet for Flutter'
|
||||||
s.description = <<-DESC
|
s.description = <<-DESC
|
||||||
Provides a WireGuard tunnel to Constellation heaters via embedded tsnet.
|
Embed Tailscale's tsnet in Flutter apps. Provides a userspace WireGuard
|
||||||
Built with go build -buildmode=c-archive (production Go approach).
|
tunnel with a localhost TCP proxy. Built with go build -buildmode=c-archive.
|
||||||
No VPN entitlement needed — uses userspace netstack.
|
No VPN entitlement needed — uses userspace netstack.
|
||||||
DESC
|
DESC
|
||||||
s.homepage = 'https://github.com/constellation-heating/tailscale-kit'
|
s.homepage = 'https://github.com/svrnty/tsnet_flutter'
|
||||||
s.license = { :type => 'MIT' }
|
s.license = { :type => 'BSD-3-Clause', :file => '../LICENSE' }
|
||||||
s.author = { 'Constellation Heating' => 'dev@constellation-heating.com' }
|
s.author = { 'Svrnty' => 'mathias@svrnty.io' }
|
||||||
s.source = { :path => '.' }
|
s.source = { :path => '.' }
|
||||||
s.source_files = 'Classes/**/*.{swift,h}'
|
s.source_files = 'Classes/**/*.{swift,h}'
|
||||||
s.public_header_files = 'Classes/**/*.h'
|
s.public_header_files = 'Classes/**/*.h'
|
||||||
@ -23,7 +23,6 @@ No VPN entitlement needed — uses userspace netstack.
|
|||||||
s.pod_target_xcconfig = {
|
s.pod_target_xcconfig = {
|
||||||
'DEFINES_MODULE' => 'YES',
|
'DEFINES_MODULE' => 'YES',
|
||||||
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
|
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
|
||||||
# Force-link the Go static library into this pod's dynamic framework
|
|
||||||
'OTHER_LDFLAGS' => '$(inherited) -force_load "$(PODS_TARGET_SRCROOT)/_current_slice/TailscaleKit.framework/TailscaleKit"',
|
'OTHER_LDFLAGS' => '$(inherited) -force_load "$(PODS_TARGET_SRCROOT)/_current_slice/TailscaleKit.framework/TailscaleKit"',
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +30,6 @@ No VPN entitlement needed — uses userspace netstack.
|
|||||||
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
|
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Before compile: symlink the correct xcframework slice for the current platform
|
|
||||||
s.script_phase = {
|
s.script_phase = {
|
||||||
:name => 'Select TailscaleKit Slice',
|
:name => 'Select TailscaleKit Slice',
|
||||||
:script => <<-'SCRIPT',
|
:script => <<-'SCRIPT',
|
||||||
@ -4,20 +4,20 @@ import 'package:flutter/services.dart';
|
|||||||
|
|
||||||
/// Embedded Tailscale tsnet client for Flutter.
|
/// Embedded Tailscale tsnet client for Flutter.
|
||||||
///
|
///
|
||||||
/// Provides a WireGuard tunnel to Constellation heaters via Tailscale,
|
/// Provides a userspace WireGuard tunnel via Tailscale's tsnet library,
|
||||||
/// without requiring the user to install the Tailscale app.
|
/// without requiring the user to install the Tailscale app or a VPN entitlement.
|
||||||
///
|
///
|
||||||
/// Architecture: Go xcframework (tsnet) ↔ Swift bridge ↔ MethodChannel ↔ Dart
|
/// Architecture: Go static library (tsnet) ↔ Swift C bridge ↔ MethodChannel ↔ Dart
|
||||||
///
|
///
|
||||||
/// Usage:
|
/// Usage:
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// final ts = TailscaleKit();
|
/// final ts = TsnetFlutter();
|
||||||
/// await ts.start(authKey: 'tskey-auth-...');
|
/// await ts.start(authKey: 'tskey-auth-...');
|
||||||
/// final port = await ts.startProxy('100.64.0.5');
|
/// final port = await ts.startProxy('100.64.0.5');
|
||||||
/// grpcService.connect('127.0.0.1', port: port);
|
/// // Connect your client to localhost:port — traffic tunnels via WireGuard
|
||||||
/// ```
|
/// ```
|
||||||
class TailscaleKit {
|
class TsnetFlutter {
|
||||||
static const _channel = MethodChannel('tailscale_kit');
|
static const _channel = MethodChannel('tsnet_flutter');
|
||||||
|
|
||||||
/// Join the Tailnet with the given auth key.
|
/// Join the Tailnet with the given auth key.
|
||||||
///
|
///
|
||||||
10
pubspec.yaml
10
pubspec.yaml
@ -1,7 +1,9 @@
|
|||||||
name: tailscale_kit
|
name: tsnet_flutter
|
||||||
description: Embedded Tailscale tsnet for Flutter — provides WireGuard tunnel to Constellation heaters without requiring the Tailscale app.
|
description: Embed Tailscale's tsnet in Flutter apps. Provides a userspace WireGuard tunnel with a localhost TCP proxy — no VPN entitlement needed on iOS.
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
publish_to: 'none'
|
homepage: https://github.com/svrnty/tsnet_flutter
|
||||||
|
repository: https://github.com/svrnty/tsnet_flutter
|
||||||
|
issue_tracker: https://github.com/svrnty/tsnet_flutter/issues
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.10.1
|
sdk: ^3.10.1
|
||||||
@ -20,4 +22,4 @@ flutter:
|
|||||||
plugin:
|
plugin:
|
||||||
platforms:
|
platforms:
|
||||||
ios:
|
ios:
|
||||||
pluginClass: TailscaleKitPlugin
|
pluginClass: TsnetFlutterPlugin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user