Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

功能使用一: 修改UserAgent #135

Open
jingjingxyk opened this issue Dec 29, 2022 · 0 comments
Open

功能使用一: 修改UserAgent #135

jingjingxyk opened this issue Dec 29, 2022 · 0 comments

Comments

@jingjingxyk
Copy link
Contributor

jingjingxyk commented Dec 29, 2022

使用例子:pc 端打开站点:m.sm.cn

演示例子已包括该规则

规则

[
  {
    "id": 1,
    "priority": 2,
    "action": {
      "type": "modifyHeaders",
      "requestHeaders": [
        {
          "header": "user-agent",
          "operation": "set",
          "value": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
        }
      ]
    },
    "condition": {
      "urlFilter": "*",
      "requestDomains": ["m.sm.cn"],
      "resourceTypes": [
        "main_frame",
        "sub_frame",
        "stylesheet",
        "script",
        "image",
        "font",
        "object",
        "xmlhttprequest",
        "ping",
        "csp_report",
        "media",
        "websocket",
        "webtransport",
        "webbundle",
        "other"
      ]
    }
  }
]

规则文件

添加自定义规则:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant