V2RayURL class abstract

Base class for parsing and handling V2Ray URLs.

This abstract class provides common functionality for V2Ray URL parsers, including configuration generation, transport settings, and TLS settings. Subclasses should implement outbound1 for specific protocol configurations.

Implementers

Constructors

V2RayURL({required String url})
Creates a V2RayURL instance with the provided URL string.

Properties

address → String
The server address (default: empty string).
no setter
dns ↔ Map<String, dynamic>
DNS configuration.
getter/setter pair
fullConfiguration → Map<String, dynamic>
Complete V2Ray configuration combining all settings.
no setter
hashCode → int
The hash code for this object.
no setterinherited
inbound ↔ Map<String, dynamic>
Inbound configuration for the proxy.
getter/setter pair
level → int
The user level for the connection (default: 8).
no setter
log ↔ Map<String, dynamic>
Log configuration.
getter/setter pair
network → String
The network protocol (default: 'tcp').
no setter
outbound1 → Map<String, dynamic>
Abstract getter for the primary outbound configuration. Subclasses must implement this to provide protocol-specific outbound settings.
no setter
outbound2 ↔ Map<String, dynamic>
Secondary outbound configuration for direct connections.
getter/setter pair
outbound3 ↔ Map<String, dynamic>
Tertiary outbound configuration for blocking connections.
getter/setter pair
port → int
The default port for the connection (default: 443).
no setter
remark → String
The remark or description (default: empty string).
no setter
routing ↔ Map<String, dynamic>
Routing configuration.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
security → String
The security method for the connection (default: 'auto').
no setter
streamSetting ↔ Map<String, dynamic>
Stream settings for the connection.
getter/setter pair
url → String
The original URL string provided during construction.
final

Methods

getFullConfiguration({int indent = 2}) → String
Generates the full V2Ray configuration as a formatted JSON string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
populateTlsSettings({required String? streamSecurity, required String? sni, required String? fingerprint, required String? alpns, required String? publicKey, required String? shortId, required String? spiderX, String? pinnedPeerCertSha256, String? verifyPeerCertByName}) → void
Populates the TLS/reality settings for the connection.
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? extra}) → String
Populates the stream settings based on transport parameters.
removeNulls(dynamic params) → dynamic
Recursively removes null values from a data structure.
toString() → String
A string representation of this object.
inherited

Operators

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