WebProxyCarrier class final

Describes a web proxy carrier: an HTTPS relay page, which carries traffic of a web proxy and must be loaded by the application as the top-level document of a hidden web view. Before loading the page, the application must arrange for an object named carrier.bridge_object_name to be defined in the top-level document whenever its origin is exactly carrier.origin, and in no other document or frame. The object must be read-only and must have two members: a method postMessage(value), which passes an ArrayBuffer or a typed array to processWebProxyCarrierMessage as webProxyCarrierMessageBinary, passes a string as webProxyCarrierMessageText, and rejects any other value; and a property onmessage, which the page sets to a function. The application delivers data to the page by calling that function with an object {data: value}, where value is an ArrayBuffer for binary data and a string for text. Each carrier needs its own web view

Inheritance

Constructors

WebProxyCarrier({required int id, required int proxyId, required String url, required String origin, required String pathPrefix, required String bridgeObjectName, required bool isTemporary})
Describes a web proxy carrier: an HTTPS relay page, which carries traffic of a web proxy and must be loaded by the application as the top-level document of a hidden web view. Before loading the page, the application must arrange for an object named carrier.bridge_object_name to be defined in the top-level document whenever its origin is exactly carrier.origin, and in no other document or frame. The object must be read-only and must have two members: a method postMessage(value), which passes an ArrayBuffer or a typed array to processWebProxyCarrierMessage as webProxyCarrierMessageBinary, passes a string as webProxyCarrierMessageText, and rejects any other value; and a property onmessage, which the page sets to a function. The application delivers data to the page by calling that function with an object {data: value}, where value is an ArrayBuffer for binary data and a string for text. Each carrier needs its own web view
const
WebProxyCarrier.fromJson(Map<String, dynamic> json)
Parses a WebProxyCarrier from TDLib JSON.
factory

Properties

bridgeObjectName → String
Name of the object to define in the top-level document; currently, always "TelegramWebProxy"
final
clientId → int?
Identifier of the TDLib client that sent this object, when known.
no setterinherited
extra → dynamic
"@extra" of the request this object answers; null for updates.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → int
Unique identifier of the carrier
final
isTemporary → bool
True, if the carrier is needed only to test the proxy and will be closed after the test. The application may refuse to open such carriers, for example, to avoid creating a web view for every saved proxy
final
origin → String
Origin of the relay page, for example, "https://proxy.example.com". The web view must not be allowed to navigate to another origin
final
pathPrefix → String
The only path prefix on carrier.origin from which the page may load resources or to which it may send requests, for example, "/" or "/relay/"
final
proxyId → int
Identifier of the added proxy that uses the carrier; 0 if the carrier is used by pingProxy or testProxy
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url → String
The HTTPS URL to load. The URL contains the capability for the proxy and a fragment, which must be kept; the URL must never be logged or shown to the user
final

Methods

copyWith({int? id, int? proxyId, String? url, String? origin, String? pathPrefix, String? bridgeObjectName, bool? isTemporary}) → WebProxyCarrier
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.