mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-14 05:37:23 +08:00
Android Support (#166)
1. Add vpnservice tauri plugin for android. 2. add workflow for android. 3. Easytier Core support android, allow set tun fd.
This commit is contained in:
20
tauri-plugin-vpnservice/ios/Sources/ExamplePlugin.swift
Normal file
20
tauri-plugin-vpnservice/ios/Sources/ExamplePlugin.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
import SwiftRs
|
||||
import Tauri
|
||||
import UIKit
|
||||
import WebKit
|
||||
|
||||
class PingArgs: Decodable {
|
||||
let value: String?
|
||||
}
|
||||
|
||||
class ExamplePlugin: Plugin {
|
||||
@objc public func ping(_ invoke: Invoke) throws {
|
||||
let args = try invoke.parseArgs(PingArgs.self)
|
||||
invoke.resolve(["value": args.value ?? ""])
|
||||
}
|
||||
}
|
||||
|
||||
@_cdecl("init_plugin_vpnservice")
|
||||
func initPlugin() -> Plugin {
|
||||
return ExamplePlugin()
|
||||
}
|
||||
Reference in New Issue
Block a user