{"behavior":"degenerate_repetition","label_filter":null,"limit":10,"next_offset":2203,"offset":2193,"previous_offset":null,"rows":[{"assistant_initiates":false,"asst_text":"\u0414\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c PAC-\u0444\u0430\u0439\u043b \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 `pacScript` \u0432 API `chrome.proxy`. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c PAC-\u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u044f\u043c\u043e \u0432 \u043a\u043e\u0434 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0444\u0430\u0439\u043b.\n\n\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:\n\n### \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f PAC-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0438\n\n1. **\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 PAC-\u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438**. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e `FindProxyForURL` \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043a\u043e\u0434\u0430.\n\n2. **\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 API `chrome.proxy` \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 PAC-\u0441\u043a\u0440\u0438\u043f\u0442\u0430**.\n\n### \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f `background.js`\n\n```javascript\nchrome.runtime.onInstalled.addListener(() => {\n  const pacScript = `\n    function FindProxyForURL(url, host) {\n      // \u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f localhost \u0438 \u0435\u0433\u043e IP\n      if (host === \"localhost\" || host === \"127.0.0.1\") {\n        return \"DIRECT\"; // \u041f\u0440\u044f\u043c\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\n      }\n\n      // \u041f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430\n      if (host === \"passport.twitch.tv\") {\n        return \"PROXY your.proxy.server:8080\"; // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438\n      }\n\n      // \u041f\u0440\u044f\u043c\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432 twitch.tv\n      if (shExpMatch(host, \"*.twitch.tv\")) {\n        return \"DIRECT\";\n      }\n\n      // \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\n      return \"PROXY your.proxy.server:8080\"; // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438\n    }\n  `;\n\n  // \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PAC-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0438\n  chrome.proxy.settings.set(\n    {\n      value: {\n        mode: \"pac_script\",\n        pacScript: {\n          data: pacScript, // \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 PAC-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c\n        },\n      },\n      scope: \"regular\"\n    },\n    () => {\n      console.log(\"PAC script set.\");\n    }\n  );\n});\n```\n\n### \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 `manifest.json`\n\n\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0432\u0430\u0448\u0435\u043c `manifest.json` \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f:\n\n```json\n{\n  \"manifest_version\": 3,\n  \"name\": \"PAC Proxy Example\",\n  \"version\": \"1.0\",\n  \"permissions\": [\n    \"proxy\",\n    \"tabs\",\n    \"storage\"\n  ],\n  \"background\": {\n    \"service_worker\": \"background.js\"\n  }\n}\n```\n\n### \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\n\n\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PAC-\u0444\u0430\u0439\u043b \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c PAC-\u0444\u0430\u0439\u043b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f.\n\n\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!","behavior":"degenerate_repetition","conversation_hash":"c65d4f40508f34bcead755d39d5d3423","conversation_redacted":false,"conversation_toxic":false,"country":"Indonesia","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"Russian","model":"gpt-4o-mini-2024-07-18","n_chars":75302,"n_turns_in_conversation":1,"n_words":7268,"source_row_offset":2193,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:44:12 GMT","turn_id":"b67c14344ef8284f1f8e32ae","turn_index":0,"user_text":"User: \u0441\u0434\u0435\u043b\u0430\u0439 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f chrome manifest v3 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043e\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c bypassUrl\nAssistant: <p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043b\u044f Chrome, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e Manifest V3, \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 (bypass) \u2014 \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043d\u043e \u044f \u043c\u043e\u0433\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.</p>\n<p>\u0412\u043e\u0442 \u0448\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:</p>\n<ol>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0430\u043f\u043e\u043a \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430.</li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>manifest.json</code>.</li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>background.js</code>.</li>\n<li>\u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>popup.html</code> \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.</li>\n</ol>\n<h3>1. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a</h3>\n<pre><code>my-chrome-extension/\n\u2502\n\u251c\u2500\u2500 manifest.json\n\u251c\u2500\u2500 background.js\n\u2514\u2500\u2500 popup.html (\u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438)\n</code></pre>\n<h3>2. \u0424\u0430\u0439\u043b <code>manifest.json</code></h3>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Chrome Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;,\n    &quot;default_icon&quot;: {\n      &quot;16&quot;: &quot;icon16.png&quot;,\n      &quot;48&quot;: &quot;icon48.png&quot;,\n      &quot;128&quot;: &quot;icon128.png&quot;\n    }\n  }\n}\n</code></pre>\n<h3>3. \u0424\u0430\u0439\u043b <code>background.js</code></h3>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot;\n      host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    function() {}\n  );\n});\n\n// \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f)\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;yourUsername&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;yourPassword&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  chrome.proxy.onAuthRequired.addListener(\n    (details, callback) =&gt; {\n      callback({ authCredentials: { username: username, password: password } });\n    },\n    { urls: [&quot;&lt;all_urls&gt;&quot;] }\n  );\n};\n\n// \u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\nsetAuthCredentials();\n</code></pre>\n<h3>4. \u0424\u0430\u0439\u043b <code>popup.html</code> (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)</h3>\n<pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n  &lt;title&gt;Proxy Settings&lt;/title&gt;\n  &lt;script src=&quot;popup.js&quot;&gt;&lt;/script&gt;\n&lt;/head&gt;\n&lt;body&gt;\n  &lt;h1&gt;Proxy Settings&lt;/h1&gt;\n  &lt;p&gt;Your proxy settings are applied!&lt;/p&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<h3>5. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f</h3>\n<ol>\n<li>\u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>.</li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.</li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &quot;\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u0432\u0430\u0448 \u043f\u043b\u0430\u0433\u0438\u043d.</li>\n</ol>\n<h3>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f</h3>\n<ul>\n<li>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 <code>your.proxy.server</code>, <code>yourUsername</code> \u0438 <code>yourPassword</code> \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.</li>\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.</li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0431\u044b\u043b\u0438 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.</li>\n</ul>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0438 \u0432\u0430\u043c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0434 \u0432\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f.</p>\n\nUser: \u043a\u0430\u043a \u043c\u043d\u0435 \u0436\u0435\u0441\u0442\u043a\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 js \u043a\u043e\u0434\u0435\nAssistant: <p>\u0414\u043b\u044f \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 JavaScript-\u043a\u043e\u0434\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f Chrome, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0440\u0430\u043d\u0435\u0435, \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 <code>username</code> \u0438 <code>password</code> \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0436\u0435\u0441\u0442\u043a\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0438\u0441\u043a\u0443.</p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434:</p>\n<h3>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 <code>background.js</code></h3>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot;\n      host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    function() {}\n  );\n\n  setAuthCredentials();\n});\n\n// \u0416\u0435\u0441\u0442\u043a\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;johndoe&quot;; // \u0436\u0435\u0441\u0442\u043a\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;securepassword&quot;; // \u0436\u0435\u0441\u0442\u043a\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  chrome.proxy.onAuthRequired.addListener(\n    (details, callback) =&gt; {\n      callback({ authCredentials: { username: username, password: password } });\n    },\n    { urls: [&quot;&lt;all_urls&gt;&quot;] }\n  );\n};\n</code></pre>\n<h3>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:</h3>\n<ol>\n<li><p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c:</strong> \u0416\u0435\u0441\u0442\u043a\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0443\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0434\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u043e\u043d \u0443\u0432\u0438\u0434\u0438\u0442 \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>chrome.storage</code>) \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0432\u043e\u0434 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f.</p>\n</li>\n<li><p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a:</strong> \u0412\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u043b\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435.</p>\n</li>\n<li><p><strong>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445</strong>: \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.</p>\n</li>\n<li><p><strong>\u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433</strong>: \u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e, \u043f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.</p>\n</li>\n</ol>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: Error in event handler: TypeError: Cannot read properties of undefined (reading 'addListener')\nAssistant: <p> <code>TypeError: Cannot read properties of undefined (reading &#39;addListener&#39;)</code> \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \ufffd\ufffd\u043e, \u0447\u0442\u043e \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>addListener</code> \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0438\u043b\u0438 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.</p>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f Chrome, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u0438\u0437-\u0437\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a API, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043a <code>chrome.proxy.onAuthRequired</code>. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 <code>addListener</code> \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438.</p>\n<p>\u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432 \u0438 \u0441\u043e\u0432\u0435\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c:</p>\n<h3>1. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u0432 <code>manifest.json</code></h3>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0432\u0430\u0448\u0435\u043c <code>manifest.json</code> \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Chrome Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;,\n    &quot;default_icon&quot;: {\n      &quot;16&quot;: &quot;icon16.png&quot;,\n      &quot;48&quot;: &quot;icon48.png&quot;,\n      &quot;128&quot;: &quot;icon128.png&quot;\n    }\n  }\n}\n</code></pre>\n<h3>2. \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>chrome.proxy.onAuthRequired</code> \u0432 <code>background.js</code></h3>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448\u0438 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043f\u043e\u0434\u0440\u044f\u0434. \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:</p>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;,\n      host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set({ value: proxySettings, scope: &#39;regular&#39; }, () =&gt; {\n    console.log(&quot;Proxy settings applied.&quot;);\n  });\n\n  setAuthCredentials();\n});\n\n// \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;johndoe&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;securepassword&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  chrome.proxy.onAuthRequired.addListener(\n    (details, callback) =&gt; {\n      // \u0417\u0434\u0435\u0441\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u044c\u0442\u0435, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\n      callback({ authCredentials: { username: username, password: password } });\n    },\n    { urls: [&quot;&lt;all_urls&gt;&quot;] }\n  );\n};\n</code></pre>\n<h3>3. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c API</h3>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 Chrome \u0438 API, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c \u0432\u0435\u0440\u0441\u0438\u0438 2 \u0438 3 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434.</p>\n<h3>4. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0432\u044b\u0432\u043e\u0434 \u043e\u0448\u0438\u0431\u043e\u043a</h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a Chrome \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0430\u0448\u0438\u0445 \u043b\u043e\u0433\u043e\u0432. \u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f <code>console.error</code>, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0431\u043e\u0439.</p>\n<h3>5. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435</h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 <code>chrome://extensions/</code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443.</p>\n<p>\u0425\u043e\u0442\u044f \u0436\u0435\u0441\u0442\u043a\u0430\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u043e\u0434\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.</p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: Error in event handler: TypeError: Cannot read properties of undefined (reading 'addListener') at setAuthCredentials\nAssistant: <p> <code>TypeError: Cannot read properties of undefined (reading &#39;addListener&#39;) at setAuthCredentials</code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>addListener</code> \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 <code>chrome.proxy.onAuthRequired</code> \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d.</p>\n<p>\u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443:</p>\n<h3>1. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e</h3>\n<p>\u0412 \u0432\u0430\u0448\u0435\u043c <code>manifest.json</code>, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>proxy</code>:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Chrome Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;,\n    &quot;default_icon&quot;: {\n      &quot;16&quot;: &quot;icon16.png&quot;,\n      &quot;48&quot;: &quot;icon48.png&quot;,\n      &quot;128&quot;: &quot;icon128.png&quot;\n    }\n  }\n}\n</code></pre>\n<h3>2. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0434\u0430 \u0432 <code>background.js</code></h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d:</p>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;,\n      host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied.&quot;);\n      setAuthCredentials(); // \u0417\u0434\u0435\u0441\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a\n    }\n  );\n});\n\n// \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;johndoe&quot;; // \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;securepassword&quot;; // \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  // \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e chrome.proxy.onAuthRequired \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\n  if (chrome.proxy &amp;&amp; chrome.proxy.onAuthRequired) {\n    chrome.proxy.onAuthRequired.addListener(\n      (details, callback) =&gt; {\n        callback({\n          authCredentials: {\n            username: username,\n            password: password\n          }\n        });\n      },\n      { urls: [&quot;&lt;all_urls&gt;&quot;] }\n    );\n  } else {\n    console.error(&quot;chrome.proxy.onAuthRequired \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.&quot;);\n  }\n};\n</code></pre>\n<h3>3. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a</h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448 \u0444\u0430\u0439\u043b <code>background.js</code> \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 <code>chrome://extensions/</code>, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 &quot;\u041a\u043e\u043d\u0441\u043e\u043b\u044c&quot; \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043e\u043a.</p>\n<h3>4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a</h3>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 (\u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a -&gt; &quot;\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434&quot; \u0438\u043b\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <code>Ctrl+Shift+I</code>), \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.</p>\n<h3>5. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440</h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Chrome, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 API.</p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0438 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0442\u0443 \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0443, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u044f \u043c\u043e\u0433 \u043f\u043e\u043c\u043e\u0447\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e.</p>\n\nUser: chrome.proxy.onAuthRequired \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.\nAssistant: <p> \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e <code>chrome.proxy.onAuthRequired</code> \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u0445 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f:</p>\n<h3>1. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043b\u0438 \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435</h3>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code> \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d.</p>\n<h3>2. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API</h3>\n<p><code>chrome.proxy.onAuthRequired</code> \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u0447\u0435\u0440\u0435\u0437 <code>chrome.proxy.settings.set()</code>. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 <code>setAuthCredentials</code> \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:</p>\n<pre><code class=\"language-javascript\">chrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied.&quot;);\n      setAuthCredentials(); // \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435: \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0437\u0434\u0435\u0441\u044c\n    }\n  );\n});\n</code></pre>\n<h3>3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439</h3>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 <code>manifest.json</code> \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0441\u0438:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Chrome Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;,\n    &quot;webRequest&quot;,\n    &quot;webRequestBlocking&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;,\n    &quot;default_icon&quot;: {\n      &quot;16&quot;: &quot;icon16.png&quot;,\n      &quot;48&quot;: &quot;icon48.png&quot;,\n      &quot;128&quot;: &quot;icon128.png&quot;\n    }\n  }\n}\n</code></pre>\n<h3>4. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430</h3>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Chrome, \u0442\u0430\u043a \u043a\u0430\u043a API \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445.</p>\n<h3>5. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f API</h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f API Chrome. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u043d \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d.</p>\n<h3>6. \u041e\u0442\u043b\u0430\u0434\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u0438</h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 (\u043f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f -&gt; &quot;\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434&quot;) \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043b\u043e\u0433\u043e\u0432. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438, \u043f\u0440\u044f\u043c\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>addListener</code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0430\u0448 \u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u043e \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438.</p>\n<pre><code class=\"language-javascript\">const setAuthCredentials = () =&gt; {\n  const username = &quot;johndoe&quot;;\n  const password = &quot;securepassword&quot;;\n\n  console.log(&quot;Attempting to set auth credentials...&quot;); // \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043b\u043e\u0433\n\n  // \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 chrome.proxy.onAuthRequired\n  if (chrome.proxy &amp;&amp; chrome.proxy.onAuthRequired) {\n    chrome.proxy.onAuthRequired.addListener(\n      (details, callback) =&gt; {\n        callback({\n          authCredentials: {\n            username: username,\n            password: password\n          }\n        });\n      },\n      { urls: [&quot;&lt;all_urls&gt;&quot;] }\n    );\n  } else {\n    console.error(&quot;chrome.proxy.onAuthRequired \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.&quot;);\n  }\n};\n</code></pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043d\u0435 \u0440\u0435\u0448\u0430\u044e\u0442 \u0432\u0430\u0448\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Firefox), \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 Chrome. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u0441\u0434\u0435\u043b\u0430\u0439 \u043c\u043d\u0435 \u044d\u0442\u043e\u0442 \u043f\u043b\u0430\u0433\u0438\u043d \u043d\u0430 declarativeWebRequest\nAssistant: <p>\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f Chrome \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API <code>declarativeNetRequest</code> \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u0442 API \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <code>chrome.proxy</code>. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0432\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>declarativeNetRequest</code> \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.</p>\n<p>\u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u043a\u0441\u0438-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0432\u0430\u043c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0432 <code>background.js</code>.</p>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0441 <code>declarativeNetRequest</code>:</p>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a</h3>\n<pre><code>my-chrome-extension/\n\u251c\u2500\u2500 manifest.json\n\u251c\u2500\u2500 background.js\n\u251c\u2500\u2500 popup.html\n</code></pre>\n<h3>manifest.json</h3>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Declarative Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;declarativeNetRequest&quot;,\n    &quot;storage&quot;,\n    &quot;activeTab&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;,\n    &quot;default_icon&quot;: {\n      &quot;16&quot;: &quot;icon16.png&quot;,\n      &quot;48&quot;: &quot;icon48.png&quot;,\n      &quot;128&quot;: &quot;icon128.png&quot;\n    }\n  },\n  &quot;declarative_net_request&quot;: {\n    &quot;rule_resources&quot;: [{\n      &quot;id&quot;: &quot;ruleset_1&quot;,\n      &quot;enabled&quot;: true,\n      &quot;path&quot;: &quot;ruleset.json&quot;\n    }]\n  }\n}\n</code></pre>\n<h3>ruleset.json</h3>\n<pre><code class=\"language-json\">[\n  {\n    &quot;id&quot;: &quot;block_http&quot;,\n    &quot;priority&quot;: 1,\n    &quot;action&quot;: {\n      &quot;type&quot;: &quot;block&quot;\n    },\n    &quot;condition&quot;: {\n      &quot;urlFilter&quot;: &quot;*://*/*&quot;,\n      &quot;resourceTypes&quot;: [&quot;main_frame&quot;]\n    }\n  }\n]\n</code></pre>\n<h3>background.js</h3>\n<pre><code class=\"language-javascript\">chrome.runtime.onInstalled.addListener(() =&gt; {\n  console.log(&quot;Declarative Proxy Auth Extension installed.&quot;);\n  // \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0437\u0434\u0435\u0441\u044c.\n});\n\n// \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e)\nchrome.declarativeNetRequest.onBeforeSendHeaders.addListener(\n  (details) =&gt; {\n    const authHeader = &#39;Basic &#39; + btoa(&#39;yourUsername:yourPassword&#39;); // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435\n    details.requestHeaders.push({ name: &#39;Authorization&#39;, value: authHeader });\n    return { requestHeaders: details.requestHeaders };\n  },\n  { urls: [&quot;&lt;all_urls&gt;&quot;] },\n  [&quot;blocking&quot;, &quot;requestHeaders&quot;]\n);\n</code></pre>\n<h3>popup.html (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)</h3>\n<pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n  &lt;title&gt;Proxy Settings&lt;/title&gt;\n&lt;/head&gt;\n&lt;body&gt;\n  &lt;h1&gt;Proxy Settings&lt;/h1&gt;\n  &lt;p&gt;Your proxy settings are applied!&lt;/p&gt;\n&lt;/body&gt;\n&lt;/html&gt;\n</code></pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f</h3>\n<ol>\n<li>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>.</li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.</li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &quot;\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0432\u0430\u0448\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c.</li>\n</ol>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:</h3>\n<ul>\n<li>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b.</li>\n<li>\u041a\u043e\u0434 \u0432 <code>background.js</code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443.</li>\n<li>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 <code>yourUsername</code> \u0438 <code>yourPassword</code> \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.</li>\n</ul>\n<h3>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f:</h3>\n<ul>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0436\u0435\u0441\u0442\u043a\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>chrome.storage</code> \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.</li>\n<li>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445.</li>\n</ul>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.</p>\n\nUser: \u0430 \u0433\u0434\u0435 \u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\nAssistant: <p> \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u0441\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API <code>declarativeNetRequest</code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 <code>ruleset.json</code>. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e <code>declarativeNetRequest</code> \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438.</p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 API <code>chrome.proxy</code> \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438, \u0432\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.</p>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u043e\u043b\u0435\u0435 \u044f\u0432\u043d\u043e \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438:</p>\n<h3>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 <code>manifest.json</code></h3>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Declarative Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;declarativeNetRequest&quot;,\n    &quot;storage&quot;,\n    &quot;activeTab&quot;,\n    &quot;proxy&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;,\n    &quot;default_icon&quot;: {\n      &quot;16&quot;: &quot;icon16.png&quot;,\n      &quot;48&quot;: &quot;icon48.png&quot;,\n      &quot;128&quot;: &quot;icon128.png&quot;\n    }\n  },\n  &quot;declarative_net_request&quot;: {\n    &quot;rule_resources&quot;: [{\n      &quot;id&quot;: &quot;ruleset_1&quot;,\n      &quot;enabled&quot;: true,\n      &quot;path&quot;: &quot;ruleset.json&quot;\n    }]\n  }\n}\n</code></pre>\n<h3>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 <code>ruleset.json</code></h3>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:</p>\n<pre><code class=\"language-json\">[\n  {\n    &quot;id&quot;: &quot;block_http&quot;,\n    &quot;priority&quot;: 1,\n    &quot;action&quot;: {\n      &quot;type&quot;: &quot;block&quot;\n    },\n    &quot;condition&quot;: {\n      &quot;urlFilter&quot;: &quot;*://*/*&quot;,\n      &quot;resourceTypes&quot;: [&quot;main_frame&quot;]\n    }\n  }\n]\n</code></pre>\n<h3>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 <code>background.js</code></h3>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438:</p>\n<pre><code class=\"language-javascript\">chrome.runtime.onInstalled.addListener(() =&gt; {\n  console.log(&quot;Declarative Proxy Auth Extension installed.&quot;);\n  setProxy(); // \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438\n});\n\n// \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438\nconst setProxy = () =&gt; {\n  const proxyConfig = {\n    mode: &quot;fixed_servers&quot;,\n    rules: {\n      singleProxy: {\n        scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot; \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438\n        host: &quot;your.proxy.server&quot;, // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\n        port: 8080 // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n      },\n      bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0430\u0434\u0440\u0435\u0441\u0430\n    }\n  };\n\n  chrome.proxy.settings.set({ value: proxyConfig, scope: &#39;regular&#39; }, () =&gt; {\n    console.log(&quot;Proxy settings applied.&quot;);\n    setAuthCredentials(); // \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u043e\u043a\u0441\u0438\n  });\n};\n\n// \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;yourUsername&quot;; // \u0412\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;yourPassword&quot;; // \u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  chrome.declarativeNetRequest.onBeforeSendHeaders.addListener(\n    (details) =&gt; {\n      const authHeader = &#39;Basic &#39; + btoa(`${username}:${password}`);\n      details.requestHeaders.push({ name: &#39;Authorization&#39;, value: authHeader });\n      return { requestHeaders: details.requestHeaders };\n    },\n    { urls: [&quot;&lt;all_urls&gt;&quot;] },\n    [&quot;blocking&quot;, &quot;requestHeaders&quot;]\n  );\n};\n</code></pre>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f:</h3>\n<ol>\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c</strong>: \u041d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0434\u0435. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>chrome.storage</code> \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. </li>\n<li><strong>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435</strong>: \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.</li>\n<li><strong>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438</strong>: API <code>chrome.declarativeNetRequest</code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043f\u0440\u043e\u043a\u0441\u0438 \u0432\u0430\u043c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API <code>chrome.proxy</code> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.</li>\n</ol>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f</h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0432 Chrome. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435 &quot;\u0420\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430&quot;, \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 &quot;\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435&quot; \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0430\u043f\u043a\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c.</p>\n<p>\u042d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \nError handling response: TypeError: Cannot read properties of undefined (reading 'addListener') at setAuthCredentials\nAssistant: <p> <code>TypeError: Cannot read properties of undefined (reading &#39;addListener&#39;)</code> \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>chrome.declarativeNetRequest</code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>addListener</code> \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.</p>\n<p>\u0412\u0430\u0448\u0430 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>chrome.declarativeNetRequest</code> \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u0434\u043d\u0430\u043a\u043e <code>declarativeNetRequest</code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0430\u0447\u0435, \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>addListener</code> \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430.</p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API <code>declarativeNetRequest</code>.</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434</h3>\n<ol>\n<li><p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0430\u043f\u043e\u043a</strong>:</p>\n<pre><code>my-chrome-extension/\n\u251c\u2500\u2500 manifest.json\n\u251c\u2500\u2500 background.js\n\u2514\u2500\u2500 ruleset.json\n</code></pre>\n</li>\n<li><p><strong>\u0424\u0430\u0439\u043b <code>manifest.json</code></strong>:\n\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Declarative Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;declarativeNetRequest&quot;,\n    &quot;declarativeNetRequestFeedback&quot;,\n    &quot;storage&quot;,\n    &quot;activeTab&quot;,\n    &quot;proxy&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;declarative_net_request&quot;: {\n    &quot;rule_resources&quot;: [{\n      &quot;id&quot;: &quot;ruleset_1&quot;,\n      &quot;enabled&quot;: true,\n      &quot;path&quot;: &quot;ruleset.json&quot;\n    }]\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;\n  }\n}\n</code></pre>\n</li>\n<li><p><strong>\u0424\u0430\u0439\u043b <code>ruleset.json</code></strong>:\n\u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>declarativeNetRequest</code>:</p>\n<pre><code class=\"language-json\">[\n  {\n    &quot;id&quot;: &quot;set_auth_header&quot;,\n    &quot;priority&quot;: 1,\n    &quot;action&quot;: {\n      &quot;type&quot;: &quot;modifyHeaders&quot;,\n      &quot;responseHeaders&quot;: [{\n        &quot;operation&quot;: &quot;set&quot;,\n        &quot;header&quot;: &quot;Authorization&quot;,\n        &quot;value&quot;: &quot;Basic YOUR_BASE64_ENCODED_CREDENTIALS&quot;\n      }]\n    },\n    &quot;condition&quot;: {\n      &quot;urlFilter&quot;: &quot;*://*/*&quot;,\n      &quot;resourceTypes&quot;: [&quot;main_frame&quot;]\n    }\n  }\n]\n</code></pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 <code>YOUR_BASE64_ENCODED_CREDENTIALS</code> \u043d\u0430 \u0432\u0430\u0448 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>Base64</code> \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>username:password</code>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0438\u043b\u0438 \u043e\u043d\u043b\u0430\u0439\u043d-\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0434\u043b\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.</p>\n</li>\n<li><p><strong>\u0424\u0430\u0439\u043b <code>background.js</code></strong>:\n\u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0430\u0433\u0435\u043d\u0442. \u0422\u0443\u0442 \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u043a\u0441\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437 <code>ruleset.json</code> \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432:</p>\n<pre><code class=\"language-javascript\">chrome.runtime.onInstalled.addListener(() =&gt; {\n  console.log(&quot;Declarative Proxy Auth Extension installed.&quot;);\n  setProxy();\n});\n\n// \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438\nconst setProxy = () =&gt; {\n  const proxyConfig = {\n    mode: &quot;fixed_servers&quot;,\n    rules: {\n      singleProxy: {\n        scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot;\n        host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\n        port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n      },\n      bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;]\n    }\n  };\n\n  chrome.proxy.settings.set({ value: proxyConfig, scope: &#39;regular&#39; }, () =&gt; {\n    console.log(&quot;Proxy settings applied.&quot;);\n  });\n};\n</code></pre>\n</li>\n</ol>\n<h3>\u0412\u0430\u0436\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f</h3>\n<ol>\n<li><p><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c</strong>: \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0442\u043e\u0436\u0435 \u043d\u0435\u0441\u0435\u0442 \u0440\u0438\u0441\u043a\u0438. \u041f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u043e \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Chrome Storage.</p>\n</li>\n<li><p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430</strong>: \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d, \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 URL, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f.</p>\n</li>\n<li><p><strong>\u041e\u0442\u043b\u0430\u0434\u043a\u0430</strong>: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>chrome://extensions/</code>, \u0447\u0442\u043e\u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.</p>\n</li>\n</ol>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435, \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\nAssistant: <p>\u0432\u0438\u043d\u0438\u0442\u0435 \u0437\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>declarativeNetRequest</code> \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e API \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u0445, \u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043a\u0440\u043e\u0435\u0442 \u0434\u0438\u0430\u043b\u043e\u0433 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.</p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u043a\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>chrome.proxy</code> API, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a <code>declarativeNetRequest</code>, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e. </p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438, \u043e\u0441\u0442\u0430\u0432\u0430\u044f\u0441\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>chrome.proxy</code>:</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>chrome.proxy</code></h3>\n<ol>\n<li><p><strong>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043a\u0438</strong>:</p>\n<pre><code>my-chrome-extension/\n\u251c\u2500\u2500 manifest.json\n\u251c\u2500\u2500 background.js\n\u251c\u2500\u2500 popup.html (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)\n</code></pre>\n</li>\n<li><p><strong>manifest.json</strong>:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;\n  }\n}\n</code></pre>\n</li>\n<li><p><strong>background.js</strong>:</p>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot;\n      host: &quot;your.proxy.server&quot;, // \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0432\u0430\u0448\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\n  }\n};\n\n// \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied.&quot;);\n      setAuthCredentials();\n    }\n  );\n});\n\n// \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;yourUsername&quot;; // \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;yourPassword&quot;; // \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  chrome.proxy.onAuthRequired.addListener(\n    (details, callback) =&gt; {\n      callback({\n        authCredentials: {\n          username: username,\n          password: password\n        }\n      });\n    },\n    { urls: [&quot;&lt;all_urls&gt;&quot;] }\n  );\n};\n</code></pre>\n</li>\n</ol>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f</h3>\n<ol>\n<li>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>.</li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.</li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &quot;\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0432\u0430\u0448\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c.</li>\n</ol>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f:</h3>\n<ul>\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c</strong>: \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0438\u0445 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>background.js</code> \u2014 \u044d\u0442\u043e \u0440\u0438\u0441\u043a. \u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>chrome.storage</code>.</li>\n<li><strong>\u0417\u0430\u043f\u0443\u0441\u043a</strong>: \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 <code>chrome://extensions/</code>.</li>\n</ul>\n<p>\u042d\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043c\u043e\u0449\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c\u0438, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e chrome.webAuthenticationProxy\nAssistant: <p> \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 Chrome \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 API \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>chrome.webAuthenticationProxy</code>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u043c\u0435\u043b\u0438 \u0432 \u0432\u0438\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API <code>chrome.proxy</code> \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0442\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0430\u043a \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445.</p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, Chrome \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 API <code>chrome.proxy</code>. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>chrome.proxy.onAuthRequired</code>, \u043a\u0430\u043a \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0440\u0430\u043d\u0435\u0435.</p>\n<p>\u0412\u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>chrome.proxy</code>:</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u043a\u0441\u0438</h3>\n<h4>1. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043a\u0438</h4>\n<pre><code>my-chrome-extension/\n\u251c\u2500\u2500 manifest.json\n\u251c\u2500\u2500 background.js\n\u2514\u2500\u2500 popup.html (\u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d)\n</code></pre>\n<h4>2. manifest.json</h4>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;\n  }\n}\n</code></pre>\n<h4>3. background.js</h4>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot; \n      host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\n  }\n};\n\n// \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied.&quot;);\n      setAuthCredentials();\n    }\n  );\n});\n\n// \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;yourUsername&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;yourPassword&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  chrome.proxy.onAuthRequired.addListener(\n    (details, callback) =&gt; {\n      callback({\n        authCredentials: {\n          username: username,\n          password: password\n        }\n      });\n    },\n    { urls: [&quot;&lt;all_urls&gt;&quot;] }\n  );\n};\n</code></pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f</h3>\n<ol>\n<li>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>.</li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.</li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &quot;\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0432\u0430\u0448\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c.</li>\n</ol>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f:</h3>\n<ul>\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c</strong>: \u0416\u0435\u0441\u0442\u043a\u043e\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0438\u0441\u043a. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>chrome.storage</code> \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.</li>\n<li><strong>\u041e\u0442\u043b\u0430\u0434\u043a\u0430</strong>: \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0432 <code>chrome://extensions/</code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445.</li>\n</ul>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u043d\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 onAuthRequired\nAssistant: <p>\u0432\u0438\u043d\u0438\u0442\u0435 \u0437\u0430 \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0443. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c \u0432 API Chrome, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 v3, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>onAuthRequired</code> \u0431\u044b\u043b\u043e \u0443\u0431\u0440\u0430\u043d\u043e \u0438\u0437 API <code>chrome.proxy</code>. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. </p>\n<h3>\u0421\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439:</h3>\n<ol>\n<li><p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 API <code>chrome.proxy</code></strong>:\n\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>chrome.proxy</code> \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>chrome.proxy.onAuthRequired</code>. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439.</p>\n</li>\n<li><p><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 <code>onAuthRequired</code></strong>:\n\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 <code>onAuthRequired</code>, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e API \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 Chrome \u0438\u043b\u0438 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.</p>\n</li>\n</ol>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432:</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>chrome.proxy</code></h3>\n<p>\u0412\u043e\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:</p>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a</h3>\n<pre><code>my-chrome-extension/\n\u251c\u2500\u2500 manifest.json\n\u251c\u2500\u2500 background.js\n\u2514\u2500\u2500 popup.html (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e)\n</code></pre>\n<h3>manifest.json</h3>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;\n  }\n}\n</code></pre>\n<h3>background.js</h3>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot;\n      host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0439 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;] // \u0437\u0430\u043c\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied.&quot;);\n    }\n  );\n\n  setAuthCredentials();\n});\n\n// \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\nconst setAuthCredentials = () =&gt; {\n  const username = &quot;yourUsername&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\n  const password = &quot;yourPassword&quot;; // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c\n\n  chrome.proxy.onAuthRequired.addListener(\n    (details, callback) =&gt; {\n      console.log(&quot;Auth required&quot;, details);\n      callback({ authCredentials: { username: username, password: password } });\n    },\n    { urls: [&quot;&lt;all_urls&gt;&quot;] }\n  );\n};\n</code></pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f</h3>\n<ol>\n<li>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>.</li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.</li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &quot;\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0432\u0430\u0448\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c.</li>\n</ol>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f</h3>\n<ul>\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c</strong>: \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>chrome.storage</code> \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.</li>\n<li><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430</strong>: \u0415\u0441\u043b\u0438 <code>onAuthRequired</code> \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438\u043b\u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.</li>\n</ul>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0435\u0449\u0435 \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0438 \u044f \u043f\u043e\u043c\u043e\u0433\u0443 \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u0430\u0448\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b!</p>\n\nUser: \u043a\u0430\u043a\u043e\u0439 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u043b\u0430\u0433\u0438\u043d\nAssistant: <p> \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c API Chrome \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438, \u0432\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c:</p>\n<h3>1. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u0441\u0438 \u0447\u0435\u0440\u0435\u0437 PowerShell \u0438\u043b\u0438 Batch-\u0441\u043a\u0440\u0438\u043f\u0442\u044b (\u0434\u043b\u044f Windows)</h3>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u042d\u0442\u043e \u043c\u0435\u043d\u0435\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Windows.</p>\n<h3>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0440\u043e\u0433\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a:</p>\n<ul>\n<li><strong>FoxyProxy</strong> - \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.</li>\n<li><strong>Proxy SwitchyOmega</strong> - \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439.</li>\n</ul>\n<h3>3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u043a\u0441\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0442\u0440\u0430\u0444\u0438\u043a, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 NGINX \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430.</p>\n<h3>4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 VPN-\u0441\u0435\u0440\u0432\u0438\u0441\u0430</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u0446\u0435\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043b\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f VPN-\u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u043a\u0441\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u043e\u0439\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0438 \u043e\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430.</p>\n<h3>5. \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0435 \u0436\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043b\u0435\u0433\u043a\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0434\u0440\u0435\u0441, \u043f\u043e\u0440\u0442, \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u0430\u0440\u043e\u043b\u044c) \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u0445:</p>\n<ul>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>chrome.storage</code> \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.</li>\n<li>\u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e API <code>chrome.proxy</code>.</li>\n</ul>\n<p>\u0412\u043e\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430:</p>\n<pre><code class=\"language-javascript\">// background.js\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.storage.local.set({\n    proxy: {\n      host: &quot;your.proxy.server&quot;,\n      port: 8080,\n      username: &quot;yourUsername&quot;,\n      password: &quot;yourPassword&quot;\n    }\n  }, () =&gt; console.log(&quot;Proxy setup storage initialized.&quot;));\n});\n\n// \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u043a\u0441\u0438\nconst setProxy = (host, port, username, password) =&gt; {\n  const proxyConfig = {\n    mode: &quot;fixed_servers&quot;,\n    rules: {\n      singleProxy: {\n        scheme: &quot;http&quot;,\n        host: host,\n        port: parseInt(port)\n      },\n      bypassList: [&quot;http://*.example.com&quot;, &quot;https://*.example.com&quot;]\n    }\n  };\n\n  chrome.proxy.settings.set({value: proxyConfig, scope: &#39;regular&#39;}, () =&gt; {\n    console.log(&quot;Proxy settings applied.&quot;);\n  });\n\n  // \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\n  chrome.proxy.onAuthRequired.addListener((details, callback) =&gt; {\n    callback({authCredentials: {username, password}});\n  });\n};\n\n// \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u043e\u043a\u0441\u0438 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435\nchrome.storage.local.get(&quot;proxy&quot;, (data) =&gt; {\n  if (data.proxy) {\n    setProxy(data.proxy.host, data.proxy.port, data.proxy.username, data.proxy.password);\n  }\n});\n</code></pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435</h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043d\u0443\u0436\u0434 \u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0438 \u044f \u043f\u043e\u043c\u043e\u0433\u0443 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438!</p>\n\nUser: Unchecked runtime.lastError: You need to request host permissions in the manifest file in order to be notified about requests from the webRequest API.\nAssistant: <p>\u0438\u0431\u043a\u0438 <code>Unchecked runtime.lastError: You need to request host permissions in the manifest file in order to be notified about requests from the webRequest API</code> \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438 Chrome, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u043c API <code>webRequest</code> \u0438\u043b\u0438 <code>webRequestBlocking</code>, \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445.</p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u0448 \u0444\u0430\u0439\u043b <code>manifest.json</code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:</p>\n<h3>\u0428\u0430\u0433\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438</h3>\n<ol>\n<li><strong>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f <code>webRequest</code> \u0438 <code>webRequestBlocking</code></strong>:\n\u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f <code>webRequest</code>, <code>webRequestBlocking</code> \u0438, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f, \u0441\u043f\u0438\u0441\u043e\u043a URL \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0432\u0435\u0431-\u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>https://*/*</code> \u0438\u043b\u0438 <code>http://*/*</code>).</li>\n</ol>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 <code>manifest.json</code></h3>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0444\u0430\u0439\u043b <code>manifest.json</code>:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;,\n    &quot;webRequest&quot;,\n    &quot;webRequestBlocking&quot;,  // \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f webRequest API\n    &quot;https://*/*&quot;,         // \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u043d\u0430 HTTPS\n    &quot;http://*/*&quot;          // \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u043d\u0430 HTTP\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;\n  }\n}\n</code></pre>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f:</h3>\n<ul>\n<li><p><strong>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f</strong>: \u0412\u0430\u0436\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>webRequest</code> API \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0432\u0441\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f, \u0443\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.</p>\n</li>\n<li><p><strong>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435</strong>: \u041f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f <code>manifest.json</code>, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0432 \u0441\u0438\u043b\u0443. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c&quot; (\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443).</p>\n</li>\n<li><p><strong>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435</strong>: \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445, \u043d\u0430\u0436\u0430\u0432 <code>Ctrl+Shift+I</code> \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f &quot;\u041f\u0440\u0430\u0432\u044b\u0439 \u043a\u043b\u0438\u043a&quot; -&gt; &quot;\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434&quot; \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f.</p>\n</li>\n</ul>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: Permission 'https://*/*' is unknown.\nAssistant: <p> &quot;Permission &#39;https://<em>/</em>&#39; is unknown&quot; \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430 Chrome. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Manifest V3, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c URL. \u0412\u043c\u0435\u0441\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u0430\u043a <code>https://*/*</code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>https://*/*</code> \u0438 <code>http://*/*</code>, \u0438\u043b\u0438 \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u043c\u0435\u043d\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f.</p>\n<h3>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435</h3>\n<ol>\n<li><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 <code>manifest.json</code></strong>:\n\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f.</li>\n</ol>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u0430\u0448 <code>manifest.json</code>:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Auth Extension&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;,\n    &quot;webRequest&quot;,\n    &quot;webRequestBlocking&quot;\n  ],\n  &quot;host_permissions&quot;: [\n    &quot;http://*/*&quot;,\n    &quot;https://*/*&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  },\n  &quot;action&quot;: {\n    &quot;default_popup&quot;: &quot;popup.html&quot;\n  }\n}\n</code></pre>\n<h3>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f:</h3>\n<ul>\n<li><p>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u043c\u0435\u044e\u0442 \u0434\u0432\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: <code>permissions</code> \u0438 <code>host_permissions</code>. <code>permissions</code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f API, \u0430 <code>host_permissions</code> \u2014 \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u043a \u043a\u0430\u043a\u0438\u043c URL \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f.</p>\n</li>\n<li><p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043e\u0431\u043d\u043e\u0432\u0438\u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <code>chrome://extensions/</code> \u043f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430.</p>\n</li>\n<li><p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 Chrome, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0440\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 API.</p>\n</li>\n</ul>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: chrome --load-extension \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432\nAssistant: <p> \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0432 Chrome \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>--load-extension</code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:</p>\n<h3>1. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:</h3>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u043f\u043e\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432\u0430\u0448\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:</p>\n<pre><code class=\"language-bash\">chrome --load-extension=/path/to/extension1,/path/to/extension2,/path/to/extension3\n</code></pre>\n<h3>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Windows:</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 Windows, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0443\u0442\u0438 \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:</p>\n<pre><code class=\"language-bash\">&quot;C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe&quot; --load-extension=&quot;C:\\path\\to\\extension1&quot;,&quot;C:\\path\\to\\extension2&quot;\n</code></pre>\n<h3>3. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 MacOS \u0438\u043b\u0438 Linux:</h3>\n<p>\u041d\u0430 MacOS \u0438\u043b\u0438 Linux, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u043c:</p>\n<pre><code class=\"language-bash\">open -a &quot;Google Chrome&quot; --args --load-extension=&quot;/path/to/extension1,/path/to/extension2&quot;\n</code></pre>\n<h3>4. \u0417\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 \u0441\u043a\u0440\u0438\u043f\u0442</h3>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>start_chrome.sh</code> (\u0434\u043b\u044f Linux/Mac) \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:</p>\n<pre><code class=\"language-bash\">#!/bin/bash\nopen -a &quot;Google Chrome&quot; --args \\\n    --load-extension=&quot;/path/to/extension1&quot; \\\n    --load-extension=&quot;/path/to/extension2&quot; \\\n    --load-extension=&quot;/path/to/extension3&quot;\n</code></pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c:</p>\n<pre><code class=\"language-bash\">chmod +x start_chrome.sh\n</code></pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>./start_chrome.sh</code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c Chrome \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438.</p>\n<h3>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f</h3>\n<ol>\n<li>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u0443\u0442\u0438 \u043a \u043f\u0430\u043f\u043a\u0430\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.</li>\n<li>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>--load-extension</code>, Chrome \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u0441 \u0440\u0435\u0436\u0438\u043c\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b.</li>\n<li>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>chrome://extensions</code> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.</li>\n</ol>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u043a\u0430\u043a \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0435 chrome \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432\nAssistant: <p> \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u0432 \u0432\u0430\u0448\u0435\u043c Chrome-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>bypassList</code> \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u043a\u0441\u0438. \u042d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u043c\u0435\u043d\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.</p>\n<p>\u0412\u043e\u0442 \u0448\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432:</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438</h3>\n<ol>\n<li><p><strong>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a</strong>:</p>\n<pre><code>my-chrome-extension/\n\u251c\u2500\u2500 manifest.json\n\u2514\u2500\u2500 background.js\n</code></pre>\n</li>\n<li><p><strong>\u0424\u0430\u0439\u043b <code>manifest.json</code></strong>:\n\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f:</p>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;Proxy Exclusion Example&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  }\n}\n</code></pre>\n</li>\n<li><p><strong>\u0424\u0430\u0439\u043b <code>background.js</code></strong>:\n\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:</p>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;,  // \u0438\u043b\u0438 &quot;https&quot;\n      host: &quot;your.proxy.server&quot;,  // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080  // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [\n      &quot;http://example.com&quot;,  // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\n      &quot;https://*.example.com&quot;,  // \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438\n      &quot;*.another-example.com&quot;\n    ]\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied with exclusions.&quot;);\n    }\n  );\n});\n</code></pre>\n</li>\n</ol>\n<h3>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435:</h3>\n<ul>\n<li><strong><code>bypassList</code></strong>: \u042d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u043c\u0435\u043d\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u043a\u0430\u0436\u0435\u0442\u0435 <code>http://example.com</code>, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u044d\u0442\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0431\u0443\u0434\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043c\u0438\u043d\u0443\u044f \u043f\u0440\u043e\u043a\u0441\u0438.</li>\n<li><strong>\u041f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438</strong>: \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>*</code>, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>https://*.example.com</code> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b <code>example.com</code>.</li>\n</ul>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f</h3>\n<ol>\n<li>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <code>chrome://extensions/</code>.</li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.</li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 &quot;\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435&quot; \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0432\u0430\u0448\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c.</li>\n</ol>\n<h3>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\ufffd\ufffd\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044f</h3>\n<ul>\n<li>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.</li>\n<li>\u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u043e\u043a\u0441\u0438.</li>\n</ul>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u043f\u043e\u043c\u0438\u043c\u043e bypassLista \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f?\nAssistant: <p> Chrome API \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>bypassList</code>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043d\u0443\u0436\u0434, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:</p>\n<h3>1. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432 \u043a\u043e\u0434\u0435</h3>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438, \u0430 \u043a\u0430\u043a\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0431\u0435\u0437 \u043d\u0435\u0433\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>chrome.webRequest</code> \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 URL.</p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u0432 \u044d\u0442\u043e\u043c:</p>\n<pre><code class=\"language-javascript\">chrome.webRequest.onBeforeRequest.addListener(\n  function(details) {\n    const excludedUrls = [\n      &quot;http://example.com&quot;,\n      &quot;https://*.example.com&quot;,\n      &quot;*.another-example.com&quot;\n    ];\n    \n    const url = new URL(details.url);\n    // \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\n    for (let exclude of excludedUrls) {\n      if (url.hostname.match(new RegExp(exclude.replace(/\\*/g, &#39;.*&#39;)))) {\n        // \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438\n        return { cancel: false };\n      }\n    }\n    // \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u043e\u043a\u0441\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\n    return { redirectUrl: &quot;http://your.proxy.server:8080&quot; }; // \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438\n  },\n  { urls: [&quot;&lt;all_urls&gt;&quot;] }, \n  [&quot;blocking&quot;]\n);\n</code></pre>\n<h3>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f / \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0433\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0438\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u044b \u0438\u043b\u0438 \u043f\u0443\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 <code>chrome.storage</code>.</p>\n<h3>3. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u0430</h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 API, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443.</p>\n<h3>4. \u0412\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Proxy Pac-\u0444\u0430\u0439\u043b\u0430</h3>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 PAC (Proxy Auto-Configuration), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c JavaScript-\u043a\u043e\u0434 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0438 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e URL. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 PAC-\u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u043d\u043e \u043e\u043d \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 PAC-\u0444\u0430\u0439\u043b\u0430:</h3>\n<pre><code class=\"language-javascript\">function FindProxyForURL(url, host) {\n  if (shExpMatch(host, &quot;example.com&quot;) || shExpMatch(host, &quot;*.another-example.com&quot;)) {\n    return &quot;DIRECT&quot;;  // \u041f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\n  }\n  return &quot;PROXY your.proxy.server:8080&quot;;  // \u041f\u0440\u043e\u043a\u0441\u0438\n}\n</code></pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435</h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>bypassList</code> \u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u043a\u043e\u0434 \u0432\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PAC-\u0444\u0430\u0439\u043b\u043e\u0432.</p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u043c\u043e\u0449\u044c \u0438\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u043a\u0430\u043a \u0432 bypassList \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b \u043a\u0440\u043e\u043c\u0435 \u043e\u0434\u043d\u043e\u0433\u043e?\nAssistant: <p> \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 \u043e\u0434\u043d\u043e\u0433\u043e, \u0438\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>bypassList</code> \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438 Chrome, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.</p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, <code>bypassList</code> \u0432 Chrome API \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0432 <code>bypassList</code> \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c.</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438</h3>\n<ol>\n<li><strong>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0439\u0442\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c.</strong></li>\n<li><strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432.</strong></li>\n</ol>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430</h3>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;, // \u0438\u043b\u0438 &quot;https&quot;\n      host: &quot;your.proxy.server&quot;, // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [\n      &quot;*.example.com&quot;, // \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b example.com\n      // \u044f\u0432\u043d\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c\n      &quot;specific.subdomain.example.com&quot;, // \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f\n      &quot;http://*.another-example.com&quot; // \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438\n    ]\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied with exclusions.&quot;);\n    }\n  );\n});\n</code></pre>\n<h3>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435</h3>\n<ul>\n<li>\u0412 <code>bypassList</code> \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f <code>*.example.com</code>, \u0447\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b <code>example.com</code> \u0438\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.</li>\n<li>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>specific.subdomain.example.com</code>.</li>\n</ul>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b, \u043a\u0440\u043e\u043c\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u0430) \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>bypassList</code>. \u042d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438.</p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435</h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b, \u043a\u0440\u043e\u043c\u0435 \u043e\u0434\u043d\u043e\u0433\u043e, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c API, \u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>chrome.webRequest</code> \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u0432\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e:\n*twitch.tv - \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b\npassport.twitch.tv - \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u0441\u044f\n\n\u0432\u0435\u0440\u043d\u043e?\nAssistant: <p>\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u043e. \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>bypassList</code> \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b <code>*.twitch.tv</code>, \u043a\u0440\u043e\u043c\u0435 <code>passport.twitch.tv</code>. </p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 <code>bypassList</code>, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u0430 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435. \u041d\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 <code>bypassList</code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 &quot;\u0435\u0441\u043b\u0438-\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c&quot;.</p>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 <code>chrome.webRequest</code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f:</h3>\n<ol>\n<li><p><strong>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 <code>manifest.json</code></strong> \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>webRequest</code> \u0438 <code>webRequestBlocking</code>.</p>\n</li>\n<li><p>\u0412 <code>background.js</code>:</p>\n</li>\n</ol>\n<pre><code class=\"language-javascript\">const proxySettings = {\n  mode: &quot;fixed_servers&quot;,\n  rules: {\n    singleProxy: {\n      scheme: &quot;http&quot;,  // \u0438\u043b\u0438 &quot;https&quot;\n      host: &quot;your.proxy.server&quot;,  // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438\n      port: 8080 // \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u043e\u0440\u0442\n    },\n    bypassList: [\n      &quot;*twitch.tv&quot;  // \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b twitch.tv\n    ]\n  }\n};\n\nchrome.runtime.onInstalled.addListener(() =&gt; {\n  chrome.proxy.settings.set(\n    { value: proxySettings, scope: &#39;regular&#39; },\n    () =&gt; {\n      console.log(&quot;Proxy settings applied with exclusions.&quot;);\n    }\n  );\n});\n\n// \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 webRequest\nchrome.webRequest.onBeforeRequest.addListener(\n  (details) =&gt; {\n    const url = new URL(details.url);\n    \n    // \u0415\u0441\u043b\u0438 \u044d\u0442\u043e passport.twitch.tv, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\n    if (url.hostname === &quot;passport.twitch.tv&quot;) {\n      return { cancel: false }; // \u041f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\n    }\n\n    // \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\n    return { redirectUrl: &quot;http://your.proxy.server:8080&quot; }; // \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u043a\u0441\u0438\n  },\n  { urls: [&quot;*://*.twitch.tv/*&quot;] }, // \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a twitch.tv\n  [&quot;blocking&quot;]\n);\n</code></pre>\n<h3>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435:</h3>\n<ol>\n<li><p><strong><code>bypassList</code>:</strong> \u0412\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b <code>*.twitch.tv</code> \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0438\u0437 \u043f\u0440\u043e\u043a\u0441\u0438.</p>\n</li>\n<li><p><strong><code>chrome.webRequest.onBeforeRequest.addListener</code>:</strong> \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <code>passport.twitch.tv</code>, \u043d\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442\u0435/\u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b <code>twitch.tv</code> \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438.</p>\n</li>\n</ol>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u0430\u0435\u0442 \u0432\u0430\u043c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0438 \u043f\u043e\u043c\u0438\u043c\u043e \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0432 API Chrome \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e <code>bypassList</code>.</p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u0430 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PAC\nAssistant: <p> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 \u043e\u0434\u043d\u043e\u0433\u043e, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 PAC (Proxy Auto-Configuration), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JavaScript \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. PAC-\u0444\u0430\u0439\u043b\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0438\u043b\u0438 \u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 URL.</p>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c PAC-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b <code>twitch.tv</code>, \u043a\u0440\u043e\u043c\u0435 <code>passport.twitch.tv</code>:</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 PAC-\u0444\u0430\u0439\u043b\u0430</h3>\n<pre><code class=\"language-javascript\">function FindProxyForURL(url, host) {\n  // \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0435\u0441\u043b\u0438 \u0445\u043e\u0441\u0442 - \u044d\u0442\u043e passport.twitch.tv\n  if (host === &quot;passport.twitch.tv&quot;) {\n    return &quot;PROXY your.proxy.server:8080&quot;; // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438\n  }\n  \n  // \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d twitch.tv, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\n  if (shExpMatch(host, &quot;*.twitch.tv&quot;)) {\n    return &quot;DIRECT&quot;; // \u041f\u0440\u044f\u043c\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\n  }\n\n  // \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\n  return &quot;PROXY your.proxy.server:8080&quot;; // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438\n}\n</code></pre>\n<h3>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PAC-\u0444\u0430\u0439\u043b \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438</h3>\n<ol>\n<li><p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 PAC-\u0444\u0430\u0439\u043b</strong>: \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>proxy.pac</code>.</p>\n</li>\n<li><p><strong>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 PAC-\u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435</strong>: \u0412 \u0432\u0430\u0448\u0435\u043c <code>background.js</code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>chrome.proxy</code> API \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 PAC-\u0444\u0430\u0439\u043b\u0430:</p>\n</li>\n</ol>\n<pre><code class=\"language-javascript\">chrome.runtime.onInstalled.addListener(() =&gt; {\n  // \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PAC-\u0444\u0430\u0439\u043b\u0430\n  chrome.proxy.settings.set(\n    { value: { mode: &quot;pac_script&quot;, pacScript: { url: &quot;file:///path/to/your/proxy.pac&quot; } }, scope: &quot;regular&quot; } \n  , () =&gt; {\n      console.log(&quot;PAC script set.&quot;);\n    });\n});\n</code></pre>\n<p>\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 <code>&quot;/path/to/your/proxy.pac&quot;</code> \u043d\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0432\u0430\u0448\u0435\u043c\u0443 PAC-\u0444\u0430\u0439\u043b\u0443.</p>\n<ol start=\"3\">\n<li><strong>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0432\u0430\u0448 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442</strong>: \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0432\u0430\u0448\u0435\u043c <code>manifest.json</code> \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f:</li>\n</ol>\n<pre><code class=\"language-json\">{\n  &quot;manifest_version&quot;: 3,\n  &quot;name&quot;: &quot;PAC Proxy Example&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;permissions&quot;: [\n    &quot;proxy&quot;,\n    &quot;tabs&quot;,\n    &quot;storage&quot;\n  ],\n  &quot;background&quot;: {\n    &quot;service_worker&quot;: &quot;background.js&quot;\n  }\n}\n</code></pre>\n<h3>\u041a\u0430\u043a \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c PAC-\u0444\u0430\u0439\u043b</h3>\n<ol>\n<li><p><strong>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435</strong>: \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 PAC-\u0444\u0430\u0439\u043b \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e, \u043e\u0442\u043a\u0440\u044b\u0432 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.</p>\n</li>\n<li><p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f</strong>: \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a <code>passport.twitch.tv</code> \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b <code>twitch.tv</code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435.</p>\n</li>\n</ol>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435</h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PAC-\u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0438\u0431\u0447\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043e\u0439\u0442\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f <code>bypassList</code>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0432\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 PAC \u0444\u0430\u0439\u043b\u0435 localhost\nAssistant: <p> \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c <code>localhost</code> \u0438 \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u044b \u0438\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 PAC (Proxy Auto-Configuration), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>FindProxyForURL</code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0437\u0430\u043f\u0440\ufffd\ufffd\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0445\u043e\u0441\u0442 <code>localhost</code> \u0438\u043b\u0438 \u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>127.0.0.1</code>). </p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:</p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 PAC-\u0444\u0430\u0439\u043b\u0430 \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>localhost</code></h3>\n<pre><code class=\"language-javascript\">function FindProxyForURL(url, host) {\n  // \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 localhost \u0438 \u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\n  if (host === &quot;localhost&quot; || host === &quot;127.0.0.1&quot;) {\n    return &quot;DIRECT&quot;; // \u041f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\n  }\n  \n  // \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0445\u043e\u0441\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u0430\n  if (host === &quot;passport.twitch.tv&quot;) {\n    return &quot;PROXY your.proxy.server:8080&quot;; // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438\n  }\n  \n  // \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d twitch.tv, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\n  if (shExpMatch(host, &quot;*.twitch.tv&quot;)) {\n    return &quot;DIRECT&quot;; // \u041f\u0440\u044f\u043c\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\n  }\n\n  // \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438\n  return &quot;PROXY your.proxy.server:8080&quot;; // \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u043a\u0441\u0438\n}\n</code></pre>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:</h3>\n<ol>\n<li><p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <code>localhost</code></strong>: \u0415\u0441\u043b\u0438 <code>host</code> \u0440\u0430\u0432\u0435\u043d <code>localhost</code> \u0438\u043b\u0438 <code>127.0.0.1</code>, \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e (\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043a\u0441\u0438). \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u043b\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438.</p>\n</li>\n<li><p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 <code>passport.twitch.tv</code></strong>: \u042d\u0442\u043e\u0442 \u0434\u043e\u043c\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u043a\u0441\u0438.</p>\n</li>\n<li><p><strong>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432</strong>: \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u043e\u043c\u0435\u043d\u043e\u0432 <code>twitch.tv</code> \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u044f\u043c\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435.</p>\n</li>\n<li><p><strong>\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u043c\u0435\u043d\u044b</strong>: \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440.</p>\n</li>\n</ol>\n<h3>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PAC-\u0444\u0430\u0439\u043b</h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 PAC-\u0444\u0430\u0439\u043b \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:</p>\n<ol>\n<li><p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 PAC-\u0444\u0430\u0439\u043b</strong>: \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>proxy.pac</code>.</p>\n</li>\n<li><p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 PAC-\u0444\u0430\u0439\u043b \u0432 \u0432\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438</strong>. \u0412 \u0432\u0430\u0448\u0435\u043c <code>background.js</code>, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 <code>chrome.proxy</code> API, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u0448 PAC-\u0444\u0430\u0439\u043b:</p>\n</li>\n</ol>\n<pre><code class=\"language-javascript\">chrome.runtime.onInstalled.addListener(() =&gt; {\n  // \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PAC-\u0444\u0430\u0439\u043b\u0430\n  chrome.proxy.settings.set(\n    { value: { mode: &quot;pac_script&quot;, pacScript: { url: &quot;file:///path/to/your/proxy.pac&quot; } }, scope: &quot;regular&quot; },\n    () =&gt; {\n      console.log(&quot;PAC script set.&quot;);\n    }\n  );\n});\n</code></pre>\n<ol start=\"3\">\n<li><strong>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442</strong>: \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0432\u0430\u0448 <code>manifest.json</code>.</li>\n</ol>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435</h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 PAC-\u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043c, \u043a\u0430\u043a \u0432\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u044b \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f, \u0434\u0430\u0439\u0442\u0435 \u0437\u043d\u0430\u0442\u044c!</p>\n\nUser: \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c pac \u0444\u0430\u0439\u043b \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f url\nAssistant:"},{"assistant_initiates":false,"asst_text":"01","behavior":"degenerate_repetition","conversation_hash":"010ff9afd08ce4449fd41ad4bb85e0e6","conversation_redacted":false,"conversation_toxic":false,"country":"United States","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"English","model":"gpt-4o-mini-2024-07-18","n_chars":140,"n_turns_in_conversation":1,"n_words":24,"source_row_offset":2194,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:44:26 GMT","turn_id":"e27bec341122c4e45019ae24","turn_index":0,"user_text":" \nSend only episode number from below text like 01, 02, 03.etc without any extra text.\n\nDororo (2019) S01 EPepisode - 480p [Eng   Jap].mkv\n"},{"assistant_initiates":false,"asst_text":"01","behavior":"degenerate_repetition","conversation_hash":"ac9637ad4c5fdf0156ee2329151ec633","conversation_redacted":false,"conversation_toxic":false,"country":"United States","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"English","model":"gpt-4o-mini-2024-07-18","n_chars":139,"n_turns_in_conversation":1,"n_words":24,"source_row_offset":2195,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:44:26 GMT","turn_id":"83ab070e068bae14bb1e2767","turn_index":0,"user_text":" \nSend only season number from below text like 01, 02, 03.etc without any extra text.\n\nDororo (2019) S01 EPepisode - 480p [Eng   Jap].mkv\n"},{"assistant_initiates":false,"asst_text":"Hello! I'm just a computer program, but I'm here and ready to help you. How can I assist you today?","behavior":"degenerate_repetition","conversation_hash":"a00a17767aad7dcc32022771b48d71ed","conversation_redacted":false,"conversation_toxic":false,"country":"Canada","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"English","model":"gpt-4o-mini-2024-07-18","n_chars":156,"n_turns_in_conversation":1,"n_words":31,"source_row_offset":2196,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:44:53 GMT","turn_id":"6d0830c9f2e731693e07714d","turn_index":0,"user_text":"User: hi, how are you?\nUser: hi, how are you?\nAssistant:"},{"assistant_initiates":false,"asst_text":"United States","behavior":"degenerate_repetition","conversation_hash":"cf0b286ac1dec087599fc75512adc592","conversation_redacted":false,"conversation_toxic":false,"country":"El Salvador","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"English","model":"gpt-4o-mini-2024-07-18","n_chars":86,"n_turns_in_conversation":1,"n_words":16,"source_row_offset":2197,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:45:03 GMT","turn_id":"ab7a4045f3db09a6c71d73a9","turn_index":0,"user_text":"Reply without comment only with the name of the country of the emoji :\ud83c\uddfa\ud83c\uddf8"},{"assistant_initiates":false,"asst_text":"I'm using Google Translate to communicate. But it's very difficult to keep translating.","behavior":"degenerate_repetition","conversation_hash":"cbd2f66b3f3984f76e677e26ab7a4ff1","conversation_redacted":false,"conversation_toxic":false,"country":"Italy","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"Portuguese","model":"gpt-4o-mini-2024-07-18","n_chars":229,"n_turns_in_conversation":1,"n_words":34,"source_row_offset":2198,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:45:04 GMT","turn_id":"50833db7d662689ce4e648ac","turn_index":0,"user_text":"Translate this message Estou usando o google tradutor para conversar. Mas \u00e9 muito dificil ficar traduzindo into United States without comment"},{"assistant_initiates":false,"asst_text":"It seems you might be referring to a person named Olivia Devine, but I don't have any specific information about someone by that name. If you could provide more context or details about who she is or what you're looking for, I\u2019d be happy to help!","behavior":"degenerate_repetition","conversation_hash":"d6c21399800c17a1eec3cf0b9a4ac901","conversation_redacted":false,"conversation_toxic":false,"country":"Russia","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"Romanian","model":"gpt-4o-mini-2024-07-18","n_chars":261,"n_turns_in_conversation":1,"n_words":48,"source_row_offset":2199,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:45:17 GMT","turn_id":"db44f72b0401e15609894d9a","turn_index":0,"user_text":"Olivia devine "},{"assistant_initiates":false,"asst_text":"\u0622\u067e\u0646\u0647 \u062a\u0646\u0641\u0633\u06cc \u0628\u0647 \u062d\u0627\u0644\u062a\u06cc \u0627\u0637\u0644\u0627\u0642 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u062f\u0631 \u0622\u0646 \u0641\u0631\u062f \u0628\u0647 \u0637\u0648\u0631 \u0645\u06a9\u0631\u0631 \u062f\u0631 \u062e\u0648\u0627\u0628 \u062f\u0686\u0627\u0631 \u062a\u0648\u0642\u0641 \u062a\u0646\u0641\u0633 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u06cc\u0646 \u062d\u0627\u0644\u062a \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0628\u0647 \u062f\u0644\u0627\u06cc\u0644 \u0645\u062e\u062a\u0644\u0641\u06cc \u0631\u062e \u062f\u0647\u062f \u0648 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u062a\u0627\u062b\u06cc\u0631 \u0634\u062f\u06cc\u062f\u06cc \u0628\u0631 \u06a9\u06cc\u0641\u06cc\u062a \u062e\u0648\u0627\u0628 \u0648 \u0633\u0644\u0627\u0645\u062a \u06a9\u0644\u06cc \u0641\u0631\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.\n\n\u062f\u0648 \u0646\u0648\u0639 \u0631\u0627\u06cc\u062c \u0622\u067e\u0646\u0647 \u062a\u0646\u0641\u0633\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f:\n\n1. **\u0622\u067e\u0646\u0647 \u062e\u0648\u0627\u0628 \u0627\u0646\u0633\u062f\u0627\u062f\u06cc (OSA)**: \u0627\u06cc\u0646 \u0646\u0648\u0639 \u0622\u067e\u0646\u0647 \u0628\u06cc\u0634\u062a\u0631 \u0634\u0627\u06cc\u0639 \u0627\u0633\u062a \u0648 \u0628\u0647 \u062f\u0644\u06cc\u0644 \u0627\u0646\u0633\u062f\u0627\u062f \u0645\u062c\u0627\u0631\u06cc \u062a\u0646\u0641\u0633\u06cc \u062f\u0631 \u0647\u0646\u06af\u0627\u0645 \u062e\u0648\u0627\u0628 \u0631\u062e \u0645\u06cc\u200c\u062f\u0647\u062f. \u0627\u06cc\u0646 \u0627\u0646\u0633\u062f\u0627\u062f \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u0628\u0647 \u062f\u0644\u06cc\u0644 \u0634\u0644 \u0634\u062f\u0646 \u0639\u0636\u0644\u0627\u062a \u062d\u0646\u062c\u0631\u0647 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u062f.\n\n2. **\u0622\u067e\u0646\u0647 \u062e\u0648\u0627\u0628 \u0645\u0631\u06a9\u0632\u06cc**: \u062f\u0631 \u0627\u06cc\u0646 \u0646\u0648\u0639 \u0622\u067e\u0646\u0647\u060c \u0645\u0634\u06a9\u0644 \u0628\u0647 \u062f\u0644\u06cc\u0644 \u0627\u062e\u062a\u0644\u0627\u0644 \u062f\u0631 \u0646\u062d\u0648\u0647 \u0627\u0646\u062a\u0642\u0627\u0644 \u0633\u06cc\u06af\u0646\u0627\u0644\u200c\u0647\u0627 \u0627\u0632 \u0645\u063a\u0632 \u0628\u0647 \u0639\u0636\u0644\u0627\u062a\u06cc \u06a9\u0647 \u0645\u0633\u0626\u0648\u0644 \u062a\u0646\u0641\u0633 \u0647\u0633\u062a\u0646\u062f\u060c \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u06cc\u0646 \u0646\u0648\u0639 \u06a9\u0645\u062a\u0631 \u0634\u0627\u06cc\u0639 \u0627\u0633\u062a.\n\n\u0639\u0644\u0627\u0626\u0645 \u0622\u067e\u0646\u0647 \u062a\u0646\u0641\u0633\u06cc \u0634\u0627\u0645\u0644 \u062e\u0631\u0648\u067e\u0641 \u0628\u0644\u0646\u062f\u060c \u062e\u0648\u0627\u0628\u200c\u0622\u0644\u0648\u062f\u06af\u06cc \u062f\u0631 \u0637\u0648\u0644 \u0631\u0648\u0632\u060c \u0628\u06cc\u200c\u062e\u0648\u0627\u0628\u06cc\u060c \u0648 \u0645\u0634\u06a9\u0644 \u062f\u0631 \u062a\u0645\u0631\u06a9\u0632 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. \u062f\u0631\u0645\u0627\u0646 \u0622\u067e\u0646\u0647 \u062a\u0646\u0641\u0633\u06cc \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0634\u0627\u0645\u0644 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0633\u0628\u06a9 \u0632\u0646\u062f\u06af\u06cc\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u06af\u0627\u0647\u200c\u0647\u0627\u06cc \u06a9\u0645\u06a9\u200c\u062a\u0646\u0641\u0633\u06cc \u0645\u0627\u0646\u0646\u062f CPAP\u060c \u06cc\u0627 \u062f\u0631 \u0628\u0631\u062e\u06cc \u0645\u0648\u0627\u0631\u062f \u062c\u0631\u0627\u062d\u06cc \u0628\u0627\u0634\u062f. \u0627\u06af\u0631 \u0641\u06a9\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0634\u06a9\u0644 \u062f\u0686\u0627\u0631 \u0647\u0633\u062a\u06cc\u062f\u060c \u0645\u0634\u0627\u0648\u0631\u0647 \u0628\u0627 \u06cc\u06a9 \u067e\u0632\u0634\u06a9 \u0645\u062a\u062e\u0635\u0635 \u062e\u0648\u0627\u0628 \u0636\u0631\u0648\u0631\u06cc \u0627\u0633\u062a.","behavior":"degenerate_repetition","conversation_hash":"a2683ca87cbf1b30a03965b10a866aa1","conversation_redacted":false,"conversation_toxic":false,"country":"Iran","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"Persian","model":"gpt-4o-mini-2024-07-18","n_chars":879,"n_turns_in_conversation":5,"n_words":167,"source_row_offset":2200,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:46:15 GMT","turn_id":"b0aa5254a0b704b3b19b66e8","turn_index":0,"user_text":"\u0627\u067e\u0646\u0647 \u062a\u0646\u0641\u0633\u06cc \u0686\u06cc\u0633\u062a"},{"assistant_initiates":false,"asst_text":"\u0648\u062c\u0648\u062f \u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 (\u0627\u0644\u06a9\u0644 \u0646\u0648\u0634\u06cc\u062f\u0646\u06cc) \u062f\u0631 \u06cc\u06a9 \u06af\u0632\u0627\u0631\u0634 \u067e\u0632\u0634\u06a9\u06cc \u0642\u0627\u0646\u0648\u0646\u06cc \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0641\u0631\u062f \u062f\u0631 \u0632\u0645\u0627\u0646 \u0646\u0645\u0648\u0646\u0647\u200c\u0628\u0631\u062f\u0627\u0631\u06cc \u0627\u0632 \u062e\u0648\u0646\u060c \u0645\u0642\u062f\u0627\u0631\u06cc \u0627\u0644\u06a9\u0644 \u062f\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0628\u062f\u0646\u0634 \u062f\u0627\u0634\u062a\u0647 \u0627\u0633\u062a. \u0627\u06af\u0631 \u0633\u0637\u062d \u0627\u0644\u06a9\u0644 \u062f\u0631 \u062e\u0648\u0646 \u06f8 \u0645\u06cc\u0644\u06cc\u200c\u06af\u0631\u0645 \u062f\u0631 \u0647\u0631 \u062f\u0633\u06cc\u200c\u0644\u06cc\u062a\u0631 (mg/dL) \u06af\u0632\u0627\u0631\u0634 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f\u060c \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0641\u0631\u062f \u062f\u0631 \u0632\u0645\u0627\u0646 \u0645\u0631\u06af \u06cc\u0627 \u0646\u0645\u0648\u0646\u0647\u200c\u0628\u0631\u062f\u0627\u0631\u06cc \u0645\u0642\u062f\u0627\u0631\u06cc \u0627\u0644\u06a9\u0644 \u0645\u0635\u0631\u0641 \u06a9\u0631\u062f\u0647 \u0627\u0633\u062a.\n\n\u0633\u0637\u062d \u06f8 \u0645\u06cc\u0644\u06cc\u200c\u06af\u0631\u0645 \u0627\u0644\u06a9\u0644 \u062f\u0631 \u062e\u0648\u0646 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u0645\u0642\u062f\u0627\u0631 \u0646\u0633\u0628\u062a\u0627 \u067e\u0627\u06cc\u06cc\u0646 \u062a\u0644\u0642\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0631\u062e\u06cc \u0627\u0632 \u062f\u0644\u0627\u06cc\u0644 \u0628\u0631\u0627\u06cc \u0628\u0647 \u0648\u062c\u0648\u062f \u0622\u0645\u062f\u0646 \u0627\u06cc\u0646 \u0645\u06cc\u0632\u0627\u0646 \u0627\u0644\u06a9\u0644 \u062f\u0631 \u062e\u0648\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0634\u0627\u0645\u0644 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0628\u0627\u0634\u062f:\n\n1. **\u0645\u0635\u0631\u0641 \u0646\u0648\u0634\u06cc\u062f\u0646\u06cc\u200c\u0647\u0627\u06cc \u0627\u0644\u06a9\u0644\u06cc**: \u0641\u0631\u062f \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0628\u0647 \u062a\u0627\u0632\u06af\u06cc \u0627\u0644\u06a9\u0644 \u0645\u0635\u0631\u0641 \u06a9\u0631\u062f\u0647 \u0628\u0627\u0634\u062f.\n  \n2. **\u062a\u062c\u0632\u06cc\u0647 \u0627\u0644\u06a9\u0644**: \u0627\u0644\u06a9\u0644 \u0628\u0647 \u062a\u062f\u0631\u06cc\u062c \u062f\u0631 \u0628\u062f\u0646 \u0645\u062a\u0627\u0628\u0648\u0644\u06cc\u0632\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0646\u0645\u0648\u0646\u0647\u200c\u0628\u0631\u062f\u0627\u0631\u06cc \u0627\u0646\u062c\u0627\u0645 \u0634\u062f\u0647 \u0628\u0648\u062f\u060c \u0647\u0646\u0648\u0632 \u0628\u062e\u0634\u06cc \u0627\u0632 \u0622\u0646 \u062f\u0631 \u062e\u0648\u0646 \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f.\n\n3. **\u0622\u0644\u0648\u062f\u06af\u06cc \u06cc\u0627 \u0634\u0631\u0627\u06cc\u0637 \u0645\u062d\u06cc\u0637\u06cc**: \u062f\u0631 \u0628\u0631\u062e\u06cc \u0627\u0632 \u0645\u0648\u0627\u0631\u062f\u060c \u0645\u0642\u0627\u062f\u06cc\u0631 \u067e\u0627\u06cc\u06cc\u0646 \u0627\u0644\u06a9\u0644 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0646\u0627\u0634\u06cc \u0627\u0632 \u0622\u0644\u0648\u062f\u06af\u06cc\u200c\u0647\u0627\u06cc \u0645\u062d\u06cc\u0637\u06cc \u06cc\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0627\u0631\u0648\u0647\u0627\u06cc\u06cc \u0628\u0627\u0634\u062f \u06a9\u0647 \u062d\u0627\u0648\u06cc \u0627\u0644\u06a9\u0644 \u0647\u0633\u062a\u0646\u062f.\n\n4. **\u0634\u0646\u0648\u0627\u06cc\u06cc \u0648 \u0639\u0627\u062f\u0627\u062a \u063a\u0630\u0627\u06cc\u06cc**: \u0645\u0635\u0631\u0641 \u0628\u0631\u062e\u06cc \u063a\u0630\u0627\u0647\u0627 \u0648 \u0646\u0648\u0634\u06cc\u062f\u0646\u06cc\u200c\u0647\u0627\u06cc \u062d\u0627\u0648\u06cc \u0627\u0644\u06a9\u0644 (\u0645\u062b\u0644 \u0628\u0639\u0636\u06cc \u0627\u0632 \u0634\u06cc\u0631\u06cc\u0646\u06cc\u200c\u0647\u0627 \u06cc\u0627 \u062f\u0633\u0631\u0647\u0627) \u0646\u06cc\u0632 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0645\u0646\u062c\u0631 \u0628\u0647 \u0648\u062c\u0648\u062f \u0645\u0642\u0627\u062f\u06cc\u0631 \u06a9\u0645 \u0627\u0644\u06a9\u0644 \u062f\u0631 \u062e\u0648\u0646 \u0634\u0648\u062f.\n\n\u062f\u0631 \u06a9\u0644\u060c \u0628\u0631\u0627\u06cc \u062a\u0641\u0633\u06cc\u0631 \u062f\u0642\u06cc\u0642\u200c\u062a\u0631 \u0648 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u062f\u0631\u0628\u0627\u0631\u0647 \u062a\u0623\u062b\u06cc\u0631 \u0627\u0644\u06a9\u0644 \u0628\u0631 \u0648\u0636\u0639\u06cc\u062a \u0641\u0631\u062f (\u0645\u0627\u0646\u0646\u062f \u0648\u0636\u0639\u06cc\u062a \u0632\u0646\u062f\u0647 \u0628\u0648\u062f\u0646\u060c \u0631\u0641\u062a\u0627\u0631 \u0648 \u06cc\u0627 \u0639\u0644\u062a \u0645\u0631\u06af)\u060c \u0628\u06cc\u0634\u062a\u0631 \u0628\u0647 \u0632\u0645\u06cc\u0646\u0647 \u0648 \u0634\u0631\u0627\u06cc\u0637 \u062e\u0627\u0635 \u0647\u0631 \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u062a\u062d\u0644\u06cc\u0644 \u062f\u0642\u06cc\u0642\u200c\u062a\u0631\u060c \u0646\u062a\u0627\u06cc\u062c \u062f\u06cc\u06af\u0631 \u0622\u0632\u0645\u0627\u06cc\u0634\u0627\u062a \u0648 \u06af\u0632\u0627\u0631\u0634\u0627\u062a \u067e\u0632\u0634\u06a9\u06cc \u0642\u0627\u0646\u0648\u0646\u06cc \u0646\u06cc\u0632 \u0628\u0627\u06cc\u062f \u0645\u0648\u0631\u062f \u0628\u0631\u0631\u0633\u06cc \u0642\u0631\u0627\u0631 \u06af\u06cc\u0631\u062f.","behavior":"degenerate_repetition","conversation_hash":"a2683ca87cbf1b30a03965b10a866aa1","conversation_redacted":false,"conversation_toxic":false,"country":"Iran","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"Persian","model":"gpt-4o-mini-2024-07-18","n_chars":1295,"n_turns_in_conversation":5,"n_words":248,"source_row_offset":2201,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:46:15 GMT","turn_id":"6aac41ccd90d5745019232dd","turn_index":1,"user_text":"\u0686\u0631\u0627 \u062f\u0631 \u06af\u0632\u0627\u0631\u0634 \u067e\u0632\u0634\u06a9\u06cc \u0642\u0627\u0646\u0648\u0646\u06cc \u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 \u06f8 \u0645\u06cc\u0644\u06cc \u06af\u0631\u0645 \u062f\u0631 \u062e\u0648\u0646 \u062f\u06cc\u062f\u0647 \u0634\u062f\u0647"},{"assistant_initiates":false,"asst_text":"\u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 (\u06a9\u0647 \u0628\u0647 \u0622\u0646 \u0627\u0644\u06a9\u0644 \u0635\u0646\u0639\u062a\u06cc \u06cc\u0627 \u0627\u062a\u0627\u0646\u0648\u0644 \u0646\u06cc\u0632 \u06af\u0641\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f) \u0628\u0647 \u0637\u0648\u0631 \u062e\u0627\u0635 \u062f\u0631 \u062f\u0627\u0631\u0648\u0647\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u0627\u062f\u0647\u200c\u0627\u06cc \u0641\u0639\u0627\u0644 \u06cc\u0627 \u062d\u0644\u0627\u0644 \u062f\u0631 \u0628\u0631\u062e\u06cc \u0641\u0631\u0645\u0648\u0644\u0627\u0633\u06cc\u0648\u0646\u200c\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0686\u0646\u062f \u0646\u0648\u0639 \u062f\u0627\u0631\u0648\u06cc \u062d\u0627\u0648\u06cc \u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 \u0639\u0628\u0627\u0631\u062a\u0646\u062f \u0627\u0632:\n\n1. **\u0645\u06a9\u0645\u0644\u200c\u0647\u0627\u06cc \u062f\u0627\u0631\u0648\u06cc\u06cc \u0645\u0627\u06cc\u0639**: \u0628\u0631\u062e\u06cc \u0627\u0632 \u062f\u0627\u0631\u0648\u0647\u0627\u06cc \u0645\u0627\u06cc\u0639 \u0645\u0627\u0646\u0646\u062f \u0634\u0631\u0628\u062a\u200c\u0647\u0627\u06cc \u0636\u062f\u0633\u0631\u0641\u0647 \u0648 \u0628\u0631\u062e\u06cc \u062f\u0627\u0631\u0648\u0647\u0627\u06cc \u0628\u06cc\u200c\u062d\u0633\u200c\u06a9\u0646\u0646\u062f\u0647 \u062f\u0627\u0631\u0627\u06cc \u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u062d\u0644\u0627\u0644 \u06cc\u0627 \u0645\u0648\u0627\u062f \u0646\u06af\u0647\u200c\u062f\u0627\u0631\u0646\u062f\u0647 \u0647\u0633\u062a\u0646\u062f.\n\n2. **\u0645\u062d\u0644\u0648\u0644\u200c\u0647\u0627\u06cc \u0636\u062f\u0639\u0641\u0648\u0646\u06cc\u200c\u06a9\u0646\u0646\u062f\u0647**: \u0628\u0633\u06cc\u0627\u0631\u06cc \u0627\u0632 \u0645\u062d\u0644\u0648\u0644\u200c\u0647\u0627\u06cc \u0636\u062f\u0639\u0641\u0648\u0646\u06cc\u200c\u06a9\u0646\u0646\u062f\u0647 \u062f\u0633\u062a \u0648 \u067e\u0648\u0633\u062a \u062d\u0627\u0648\u06cc \u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 \u0647\u0633\u062a\u0646\u062f \u0648 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0636\u062f\u0639\u0641\u0648\u0646\u06cc\u200c \u06a9\u0646\u0646\u062f\u0647 \u067e\u0648\u0633\u062a \u0648 \u062a\u062c\u0647\u06cc\u0632\u0627\u062a \u067e\u0632\u0634\u06a9\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f.\n\n3. **\u062f\u0627\u0631\u0648\u0647\u0627\u06cc \u0628\u06cc\u200c\u0647\u0648\u0634\u06cc**: \u0628\u0631\u062e\u06cc \u0627\u0632 \u062f\u0627\u0631\u0648\u0647\u0627\u06cc \u0628\u06cc\u200c\u0647\u0648\u0634\u06cc \u062c\u0646\u0631\u0627\u0644 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 \u0631\u0627 \u0634\u0627\u0645\u0644 \u0634\u0648\u0646\u062f.\n\n4. **\u0641\u0631\u0645\u0648\u0644\u0627\u0633\u06cc\u0648\u0646\u200c\u0647\u0627\u06cc \u062f\u0627\u0631\u0648\u06cc\u06cc \u062e\u0627\u0635**: \u0628\u0631\u062e\u06cc \u0627\u0632 \u0641\u0631\u0645\u0648\u0644\u200c\u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647\u200c\u06cc \u062f\u0627\u0631\u0648\u06cc\u06cc \u06a9\u0647 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u062d\u0644\u0627\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 \u062f\u0627\u0631\u0646\u062f\u060c \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u062f\u0631 \u062f\u0627\u0631\u0648\u062e\u0627\u0646\u0647\u200c\u0647\u0627 \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633\u06cc \u0647\u0633\u062a\u0646\u062f.\n\n\u0627\u06af\u0631 \u0633\u0648\u0627\u0644 \u062e\u0627\u0635\u06cc \u062f\u0631\u0628\u0627\u0631\u0647 \u06cc\u06a9 \u062f\u0627\u0631\u0648\u06cc \u062e\u0627\u0635 \u06cc\u0627 \u0641\u0631\u0645\u0648\u0644\u0627\u0633\u06cc\u0648\u0646 \u062f\u0627\u0631\u0648\u06cc\u06cc \u062f\u0627\u0631\u06cc\u062f\u060c \u0628\u0647\u062a\u0631 \u0627\u0633\u062a \u0628\u0627 \u067e\u0632\u0634\u06a9 \u06cc\u0627 \u062f\u0627\u0631\u0648\u0633\u0627\u0632 \u0645\u0634\u0648\u0631\u062a \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u062f\u0642\u06cc\u0642\u06cc \u062f\u0631 \u0627\u06cc\u0646 \u0632\u0645\u06cc\u0646\u0647 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u06cc\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646 \u0628\u0627\u06cc\u062f \u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a \u06a9\u0647 \u0645\u0635\u0631\u0641 \u0645\u062d\u0635\u0648\u0644\u0627\u062a \u062d\u0627\u0648\u06cc \u0627\u0644\u06a9\u0644 \u0628\u0627\u06cc\u062f \u0628\u0647 \u062f\u0642\u062a \u0648 \u0645\u0637\u0627\u0628\u0642 \u0628\u0627 \u062f\u0633\u062a\u0648\u0631 \u067e\u0632\u0634\u06a9 \u0627\u0646\u062c\u0627\u0645 \u0634\u0648\u062f\u060c \u0628\u0647 \u062e\u0635\u0648\u0635 \u0628\u0631\u0627\u06cc \u0627\u0641\u0631\u0627\u062f \u0645\u0633\u062a\u0639\u062f \u0628\u0647 \u0627\u0639\u062a\u06cc\u0627\u062f \u06cc\u0627 \u062f\u0627\u0631\u0627\u06cc \u0645\u0634\u06a9\u0644\u0627\u062a \u06a9\u0628\u062f\u06cc \u0648 \u062f\u06cc\u06af\u0631 \u0634\u0631\u0627\u06cc\u0637 \u0628\u0647\u062f\u0627\u0634\u062a\u06cc.","behavior":"degenerate_repetition","conversation_hash":"a2683ca87cbf1b30a03965b10a866aa1","conversation_redacted":false,"conversation_toxic":false,"country":"Iran","empty_output":false,"evidence_codes":[],"label":"absent","label_present":false,"label_qualified":false,"label_source":"Final dense release","language":"Persian","model":"gpt-4o-mini-2024-07-18","n_chars":1088,"n_turns_in_conversation":5,"n_words":188,"source_row_offset":2202,"source_shard":"turns-00060.parquet","timestamp":"Sat, 01 Feb 2025 17:46:15 GMT","turn_id":"d2be258ed912d917829b3c0c","turn_index":2,"user_text":"\u0686\u0647 \u062f\u0627\u0631\u0648\u06cc\u06cc \u0627\u0644\u06a9\u0644 \u0627\u062a\u06cc\u0644\u06cc\u06a9 \u062f\u0627\u0631\u062f"}],"shard":{"index":60,"name":"turns-00060.parquet","rows":43065}}
