HysteriaURL class
Hysteria URL parser and adapter to produce V2Ray (Xray) configuration pieces.
It parses a hysteria2:// / hy2:// (version 2) or hysteria:// /
hy:// (version 1) share link into structured fields and exposes outbound
and stream settings compatible with the Xray core.
Constructors
- HysteriaURL({required String url})
- Creates a HysteriaURL by parsing the provided hysteria share link string.
Properties
- address → String
-
Server address extracted from the URI host.
no setteroverride
- allowInsecure → bool
-
Whether to allow insecure connections (default: false).
no setterinherited
- auth ↔ String
-
Authentication string extracted from the URI user info.
latefinal
-
dns
↔ Map<
String, dynamic> -
DNS configuration.
getter/setter pairinherited
-
finalmask
↔ Map<
String, dynamic> ? -
Parsed
fm(final mask) object, or null when absent/invalid.getter/setter pair -
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
-
masquerade
↔ Map<
String, dynamic> ? -
Parsed HTTP/3
masqueradeobject, or null when absent/invalid.getter/setter pair - network → String
-
The network protocol (default: 'tcp').
no setterinherited
-
outbound1
→ Map<
String, dynamic> -
Outbound configuration map for the hysteria protocol used by Xray 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 URI. Falls back to
super.portif 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
- udpIdleTimeout ↔ int?
-
Idle timeout (seconds) for UDP connections, or null to use Xray's default.
getter/setter pair
- uri ↔ Uri
-
The parsed URI object from the hysteria URL.
latefinal
- url → String
-
The original URL string provided during construction.
finalinherited
- version ↔ int
-
Hysteria protocol version (1 or 2).
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? extra}) → 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