tarampampam / random-user-agent

😎 Browser extension that automatically replaces the User-Agent with a randomized one
https://random-user-agent.com
MIT License
571 stars 74 forks source link

Whitelist Mode not Working #610

Open smashedr opened 4 weeks ago

smashedr commented 4 weeks ago

Is there an existing issue for this?

Describe the bug

I am unable to get the extension to work on Android in Whitelist Mode. This also seems to be the case on Desktop too.

Steps to reproduce

No response

Browser

Firefox

Extension version

4.2.0

Anything else?

Settings:

{
  "enabled": true,
  "renew": {
    "enabled": false,
    "intervalMillis": 600000,
    "onStartup": true
  },
  "customUseragent": {
    "enabled": false,
    "list": []
  },
  "remoteUseragentList": {
    "enabled": false,
    "uri": "",
    "updateIntervalMillis": 3600000
  },
  "jsProtection": {
    "enabled": true
  },
  "generator": {
    "types": [
      "firefox_android",
      "firefox_linux",
      "firefox_mac",
      "firefox_win"
    ],
    "syncOsWithHost": false
  },
  "blacklist": {
    "mode": "whitelist",
    "domains": [
      "localhost",
      "127.0.0.1",
      "ivy.cssnr.com"
    ]
  },
  "stats": {
    "enabled": false
  }
}

Rules:

[
  {
    "id": 1,
    "action": {
      "type": "modifyHeaders",
      "requestHeaders": [
        {
          "operation": "set",
          "header": "User-Agent",
          "value": "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:128.0) Gecko/20222201 Firefox/128.0"
        }
      ]
    },
    "condition": {
      "resourceTypes": [
        "main_frame",
        "sub_frame",
        "stylesheet",
        "script",
        "image",
        "object",
        "object_subrequest",
        "xmlhttprequest",
        "xslt",
        "ping",
        "beacon",
        "xml_dtd",
        "font",
        "media",
        "websocket",
        "csp_report",
        "imageset",
        "web_manifest",
        "speculative",
        "other"
      ],
      "requestDomains": [
        "localhost",
        "127.0.0.1",
        "ivy.cssnr.com"
      ],
      "initiatorDomains": [
        "localhost",
        "127.0.0.1",
        "ivy.cssnr.com"
      ],
      "excludedInitiatorDomains": [
        "challenges.cloudflare.com"
      ],
      "excludedRequestDomains": [
        "challenges.cloudflare.com"
      ]
    }
  },
  {
    "id": 2,
    "action": {
      "type": "modifyHeaders",
      "requestHeaders": [
        {
          "operation": "remove",
          "header": "Sec-CH-UA"
        },
        {
          "operation": "remove",
          "header": "Sec-CH-UA-Full-Version-List"
        },
        {
          "operation": "set",
          "header": "Sec-CH-UA-Platform",
          "value": "\"Linux\""
        },
        {
          "operation": "set",
          "header": "Sec-CH-UA-Mobile",
          "value": "?0"
        },
        {
          "operation": "remove",
          "header": "Sec-CH-UA-Full-Version"
        },
        {
          "operation": "remove",
          "header": "Sec-CH-UA-Platform-Version"
        }
      ]
    },
    "condition": {
      "resourceTypes": [
        "main_frame",
        "sub_frame",
        "stylesheet",
        "script",
        "image",
        "object",
        "object_subrequest",
        "xmlhttprequest",
        "xslt",
        "ping",
        "beacon",
        "xml_dtd",
        "font",
        "media",
        "websocket",
        "csp_report",
        "imageset",
        "web_manifest",
        "speculative",
        "other"
      ],
      "requestDomains": [
        "localhost",
        "127.0.0.1",
        "ivy.cssnr.com"
      ],
      "initiatorDomains": [
        "localhost",
        "127.0.0.1",
        "ivy.cssnr.com"
      ],
      "excludedInitiatorDomains": [
        "challenges.cloudflare.com"
      ],
      "excludedRequestDomains": [
        "challenges.cloudflare.com"
      ]
    }
  },
  {
    "id": 3,
    "action": {
      "type": "modifyHeaders",
      "responseHeaders": [
        {
          "operation": "set",
          "header": "server-timing",
          "value": "lYFhvKMM;desc=\"eyJjdXJyZW50Ijp7InVzZXJBZ2VudCI6Ik1vemlsbGEvNS4wIChYMTE7IFU7IExpbnV4IHg4Nl82NDsgZW4tVVM7IHJ2OjEyOC4wKSBHZWNrby8yMDIyMjIwMSBGaXJlZm94LzEyOC4wIiwiYnJvd3NlciI6ImZpcmVmb3giLCJvcyI6ImxpbnV4IiwidmVyc2lvbiI6eyJicm93c2VyIjp7Im1ham9yIjoxMjgsImZ1bGwiOiIxMjguMCJ9fX0sImJyYW5kcyI6eyJtYWpvciI6W10sImZ1bGwiOltdfSwicGxhdGZvcm0iOiJMaW51eCIsImlzTW9iaWxlIjpmYWxzZX0_\""
        }
      ]
    },
    "condition": {
      "resourceTypes": [
        "main_frame",
        "sub_frame",
        "stylesheet",
        "script",
        "image",
        "object",
        "object_subrequest",
        "xmlhttprequest",
        "xslt",
        "ping",
        "beacon",
        "xml_dtd",
        "font",
        "media",
        "websocket",
        "csp_report",
        "imageset",
        "web_manifest",
        "speculative",
        "other"
      ],
      "requestDomains": [
        "localhost",
        "127.0.0.1",
        "ivy.cssnr.com"
      ],
      "initiatorDomains": [
        "localhost",
        "127.0.0.1",
        "ivy.cssnr.com"
      ],
      "excludedInitiatorDomains": [
        "challenges.cloudflare.com"
      ],
      "excludedRequestDomains": [
        "challenges.cloudflare.com"
      ]
    }
  }
]