haskell-tdlib-2.1.28.0: Binding to the Telegram Database Library
Safe HaskellSafe-Inferred
LanguageGHC2021

TD.Data.WebProxyCarrier

Documentation

data WebProxyCarrier Source #

Constructors

WebProxyCarrier

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

Fields

  • _id :: Maybe Int

    Unique identifier of the carrier

  • proxy_id :: Maybe Int

    Identifier of the added proxy that uses the carrier; 0 if the carrier is used by pingProxy or testProxy

  • url :: Maybe Text

    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

  • origin :: Maybe Text

    Origin of the relay page, for example, "https://proxy.example.com". The web view must not be allowed to navigate to another origin

  • path_prefix :: Maybe Text

    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/"

  • bridge_object_name :: Maybe Text

    Name of the object to define in the top-level document; currently, always TelegramWebProxy

  • is_temporary :: Maybe 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