SignboxVpnPlatform class abstract
Platform interface for the native VPN bridge.
- Inheritance
-
- Object
- PlatformInterface
- SignboxVpnPlatform
- Implementers
Constructors
- SignboxVpnPlatform()
- Creates a platform interface instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stateDetailsStream
→ Stream<
VpnConnectionSnapshot> -
Detailed state stream including diagnostics.
no setter
-
stateStream
→ Stream<
VpnConnectionState> -
Connection-state stream (
connecting,connected,error, ...).no setter -
statsStream
→ Stream<
VpnRuntimeStats> -
Runtime traffic/stats stream.
no setter
Methods
-
getLastError(
) → Future< String?> - Returns last runtime error string, if any.
-
getSingboxVersion(
) → Future< String?> - Returns current sing-box core version string.
-
getState(
) → Future< VpnConnectionState> - Returns current connection state.
-
getStateDetails(
) → Future< VpnConnectionSnapshot> - Returns detailed connection snapshot.
-
getStats(
) → Future< VpnRuntimeStats> - Returns current runtime stats.
-
initialize(
SingboxRuntimeOptions options) → Future< void> -
Initializes native runtime with
options. -
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> -
Executes an active TCP/TLS ping test against
host:port. -
requestNotificationPermission(
) → Future< bool> - Requests Android notification permission when needed.
-
requestVpnPermission(
) → Future< bool> - Requests VPN permission from the user.
-
restartVpn(
) → Future< void> - Restarts the VPN service.
-
setConfig(
String configJson) → Future< void> - Applies raw sing-box JSON config.
-
startVpn(
) → Future< void> - Starts the VPN service.
-
stopVpn(
) → Future< void> - Stops the VPN service.
-
syncRuntimeState(
) → Future< void> - Synchronizes state/stats from persisted runtime snapshot.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ SignboxVpnPlatform
-
Active platform implementation.
getter/setter pair