SocksURL class

Socks URL parser and adapter to produce V2Ray configuration pieces.

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

Inheritance

Constructors

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

Properties

address String
Server address extracted from the URI host.
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 socks 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
password String?
Password extracted from the URI user info (base64 decoded).
latefinal
port int
Server port parsed from the URI. Falls back to super.port if absent.
no setteroverride
remark String
Human-readable remark decoded from the URI fragment.
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
uri Uri
The parsed URI object from the socks URL.
latefinal
url String
The original URL string provided during construction.
finalinherited
username String?
Username extracted from the URI user info (base64 decoded).
latefinal

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