summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/proxy.json
blob: 78617c2137b1a15a693a1e27db69d4f72c712239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
[
  {
    "namespace": "manifest",
    "types": [
      {
        "$extend": "OptionalPermission",
        "choices": [
          {
            "type": "string",
            "enum": ["proxy"]
          }
        ]
      }
    ]
  },
  {
    "namespace": "proxy",
    "description": "Provides access to global proxy settings for Firefox and proxy event listeners to handle dynamic proxy implementations.",
    "permissions": ["proxy"],
    "types": [
      {
        "id": "ProxyConfig",
        "type": "object",
        "description": "An object which describes proxy settings.",
        "properties": {
          "proxyType": {
            "type": "string",
            "optional": true,
            "enum": ["none", "autoDetect", "system", "manual", "autoConfig"],
            "description": "The type of proxy to use."
          },
          "http": {
            "type": "string",
            "optional": true,
            "description": "The address of the http proxy, can include a port."
          },
          "httpProxyAll": {
            "type": "boolean",
            "optional": true,
            "description": "Use the http proxy server for all protocols."
          },
          "ftp": {
            "type": "string",
            "optional": true,
            "deprecated": true,
            "description": "The address of the ftp proxy, can include a port.  Deprecated since Firefox 88."
          },
          "ssl": {
            "type": "string",
            "optional": true,
            "description": "The address of the ssl proxy, can include a port."
          },
          "socks": {
            "type": "string",
            "optional": true,
            "description": "The address of the socks proxy, can include a port."
          },
          "socksVersion": {
            "type": "integer",
            "optional": true,
            "description": "The version of the socks proxy.",
            "minimum": 4,
            "maximum": 5
          },
          "passthrough": {
            "type": "string",
            "optional": true,
            "description": "A list of hosts which should not be proxied."
          },
          "autoConfigUrl": {
            "type": "string",
            "optional": true,
            "description": "A URL to use to configure the proxy."
          },
          "autoLogin": {
            "type": "boolean",
            "optional": true,
            "description": "Do not prompt for authentication if password is saved."
          },
          "proxyDNS": {
            "type": "boolean",
            "optional": true,
            "description": "Proxy DNS when using SOCKS v5."
          },
          "respectBeConservative": {
            "type": "boolean",
            "optional": true,
            "default": true,
            "description": " If true (the default value), do not use newer TLS protocol features that might have interoperability problems on the Internet. This is intended only for use with critical infrastructure like the updates, and is only available to privileged addons."
          }
        }
      }
    ],
    "properties": {
      "settings": {
        "$ref": "types.Setting",
        "description": "Configures proxy settings. This setting's value is an object of type ProxyConfig."
      }
    },
    "events": [
      {
        "name": "onRequest",
        "type": "function",
        "description": "Fired when proxy data is needed for a request.",
        "parameters": [
          {
            "type": "object",
            "name": "details",
            "properties": {
              "requestId": {
                "type": "string",
                "description": "The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request."
              },
              "url": { "type": "string" },
              "method": {
                "type": "string",
                "description": "Standard HTTP method."
              },
              "frameId": {
                "type": "integer",
                "description": "The value 0 indicates that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (<code>type</code> is <code>main_frame</code> or <code>sub_frame</code>), <code>frameId</code> indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab."
              },
              "parentFrameId": {
                "type": "integer",
                "description": "ID of frame that wraps the frame which sent the request. Set to -1 if no parent frame exists."
              },
              "incognito": {
                "type": "boolean",
                "optional": true,
                "description": "True for private browsing requests."
              },
              "cookieStoreId": {
                "type": "string",
                "optional": true,
                "description": "The cookie store ID of the contextual identity."
              },
              "originUrl": {
                "type": "string",
                "optional": true,
                "description": "URL of the resource that triggered this request."
              },
              "documentUrl": {
                "type": "string",
                "optional": true,
                "description": "URL of the page into which the requested resource will be loaded."
              },
              "tabId": {
                "type": "integer",
                "description": "The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab."
              },
              "type": {
                "$ref": "webRequest.ResourceType",
                "description": "How the requested resource will be used."
              },
              "timeStamp": {
                "type": "number",
                "description": "The time when this signal is triggered, in milliseconds since the epoch."
              },
              "fromCache": {
                "type": "boolean",
                "description": "Indicates if this response was fetched from disk cache."
              },
              "requestHeaders": {
                "$ref": "webRequest.HttpHeaders",
                "optional": true,
                "description": "The HTTP request headers that are going to be sent out with this request."
              },
              "urlClassification": {
                "$ref": "webRequest.UrlClassification",
                "description": "Url classification if the request has been classified."
              },
              "thirdParty": {
                "type": "boolean",
                "description": "Indicates if this request and its content window hierarchy is third party."
              }
            }
          }
        ],
        "extraParameters": [
          {
            "$ref": "webRequest.RequestFilter",
            "name": "filter",
            "description": "A set of filters that restricts the events that will be sent to this listener."
          },
          {
            "type": "array",
            "optional": true,
            "name": "extraInfoSpec",
            "description": "Array of extra information that should be passed to the listener function.",
            "items": {
              "type": "string",
              "enum": ["requestHeaders"]
            }
          }
        ]
      },
      {
        "name": "onError",
        "type": "function",
        "description": "Notifies about errors caused by the invalid use of the proxy API.",
        "parameters": [
          {
            "name": "error",
            "type": "object"
          }
        ]
      }
    ]
  }
]