VpnRoutingOptions class

Routing choices for one VPN session, separate from the supplied Xray JSON.

These require a native runtime built with VPN routing support. Unsupported runtimes reject the request before replacing the current session. Omit this option to retain the ordinary adapter path.

Constructors

VpnRoutingOptions({int? sourceInboundIndex, String? defaultOutboundTag})
Creates optional inbound context and fallback-outbound selections.
const

Properties

defaultOutboundTag → String?
The exact outbound tag used when the caller's routing rules have no match. Existing matching rules, balancers and chains retain their behavior. Null or empty keeps Core's ordinary default outbound selection.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceInboundIndex → int?
An index into the ORIGINAL configuration's inbounds array, starting at zero. VPN traffic uses that input's inbound-tag context without editing its listener, accounts or rules. Null retains the private adapter's context.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, Object?>
A fresh selection-only map. Runtime credentials and generated metadata belong to the native session and are never part of this option.
toString() → String
A string representation of this object.
override
validate() → void
Throws ArgumentError when sourceInboundIndex is outside 32-bit bounds.

Operators

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