ShadowSocksURL class
ShadowSocks URL parser and adapter to produce V2Ray configuration pieces.
It parses a ss://
share link into structured fields and exposes
outbound and stream settings compatible with the V2Ray core.
Constructors
- ShadowSocksURL.new({required String url})
- Creates a ShadowSocksURL by parsing the provided ss share link string.
Properties
- address → String
-
The server address (default: empty string).
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
- method ↔ String
-
Encryption method extracted from the URI user info (base64 decoded).
getter/setter pair
- network → String
-
The network protocol (default: 'tcp').
no setterinherited
-
outbound1
→ Map<
String, dynamic> -
Abstract getter for the primary outbound configuration.
Subclasses must implement this to provide protocol-specific outbound settings.
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).
getter/setter pair
- port → int
-
The default port for the connection (default: 443).
no setteroverride
- remark → String
-
The remark or description (default: empty string).
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 ss URL.
latefinal
- 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