VmessURL class

Vmess URL parser and adapter to produce V2Ray configuration pieces.

It parses a vmess:// share link into structured fields and exposes outbound and stream settings compatible with the V2Ray core.

Inheritance

Constructors

VmessURL.new({required String url})
Creates a VmessURL by parsing the provided vmess share link string.

Properties

address String
Server address (add field). Returns empty string if missing.
no setteroverride
allowInsecure bool
Whether to allow insecure connections (default: true).
no setterinherited
dns Map<String, dynamic>
DNS configuration.
getter/setter pairinherited
fullConfiguration Map<String, dynamic>
Complete V2Ray configuration combining all settings.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inbound Map<String, dynamic>
Inbound configuration for the proxy.
getter/setter pairinherited
level int
The user level for the connection (default: 8).
no setterinherited
log Map<String, dynamic>
Log configuration.
getter/setter pairinherited
network String
The network protocol (default: 'tcp').
no setterinherited
outbound1 Map<String, dynamic>
Outbound configuration map for the vmess protocol used by V2Ray core.
no setteroverride
outbound2 Map<String, dynamic>
Secondary outbound configuration for direct connections.
getter/setter pairinherited
outbound3 Map<String, dynamic>
Tertiary outbound configuration for blocking connections.
getter/setter pairinherited
port int
Server port parsed from the config. Falls back to super.port if absent.
no setteroverride
rawConfig Map<String, dynamic>
Raw configuration decoded from the vmess URL payload.
latefinal
remark String
Human-readable remark (ps field) for this server.
no setteroverride
routing Map<String, dynamic>
Routing configuration.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
security String
The security method for the connection (default: 'auto').
no setterinherited
streamSetting Map<String, dynamic>
Stream settings for the connection.
getter/setter pairinherited
url String
The original URL string provided during construction.
finalinherited

Methods

getFullConfiguration({int indent = 2}) String
Generates the full V2Ray configuration as a formatted JSON string.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
populateTlsSettings({required String? streamSecurity, required bool allowInsecure, required String? sni, required String? fingerprint, required String? alpns, required String? publicKey, required String? shortId, required String? spiderX}) → void
Populates the TLS/reality settings for the connection.
inherited
populateTransportSettings({required String transport, required String? headerType, required String? host, required String? path, required String? seed, required String? quicSecurity, required String? key, required String? mode, required String? serviceName}) String
Populates the stream settings based on transport parameters.
inherited
removeNulls(dynamic params) → dynamic
Recursively removes null values from a data structure.
inherited
toString() String
A string representation of this object.
inherited

Operators

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