MethodChannelSignboxVpn class

Default method-channel implementation of SignboxVpnPlatform.

Inheritance

Constructors

MethodChannelSignboxVpn()

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
Method channel for request/response calls.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateChannel EventChannel
State event channel.
final
stateDetailsStream Stream<VpnConnectionSnapshot>
Broadcasts detailed connection snapshots.
no setteroverride
stateStream Stream<VpnConnectionState>
Broadcasts coarse connection state updates.
no setteroverride
statsChannel EventChannel
Stats event channel.
final
statsStream Stream<VpnRuntimeStats>
Broadcasts runtime traffic statistics.
no setteroverride

Methods

getLastError() Future<String?>
Reads last runtime error.
override
getSingboxVersion() Future<String?>
Reads current sing-box version.
override
getState() Future<VpnConnectionState>
Reads current connection state.
override
getStateDetails() Future<VpnConnectionSnapshot>
Reads current detailed state snapshot.
override
getStats() Future<VpnRuntimeStats>
Reads current traffic stats.
override
initialize(SingboxRuntimeOptions options) Future<void>
Initializes native runtime.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pingServer({required String host, required int port, Duration timeout = const Duration(seconds: 3), bool useTls = false, String? tlsServerName, bool allowInsecure = false}) Future<VpnPingResult>
Performs ping over TCP/TLS through native platform implementation.
override
requestNotificationPermission() Future<bool>
Requests Android notification permission.
override
requestVpnPermission() Future<bool>
Requests system VPN permission.
override
restartVpn() Future<void>
Restarts VPN service.
override
setConfig(String configJson) Future<void>
Applies raw JSON config.
override
startVpn() Future<void>
Starts VPN service.
override
stopVpn() Future<void>
Stops VPN service.
override
syncRuntimeState() Future<void>
Syncs state/stats from persisted runtime snapshot.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited