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

功能使用十:自定义默认重定向候选地址 #121

Open
jingjingxyk opened this issue Nov 22, 2022 · 1 comment
Open

功能使用十:自定义默认重定向候选地址 #121

jingjingxyk opened this issue Nov 22, 2022 · 1 comment

Comments

@jingjingxyk
Copy link
Contributor

jingjingxyk commented Nov 22, 2022

双击扩展图标,自动快捷打开选项页面 手动切换即可
image

也可以使用自定义规则:

备注: 新增自定义规则,优先级("priority")高的规则生效

候选地址集: https://github.com/justjavac/ReplaceGoogleCDN/tree/master/extension/rules/mirrors

如何使用自定义规则看这里1:

如何使用自定义规则看这里2,修改一下例子也可以:

举个例子:ajax.loli.net 服务挂了,选取如下一条规则,插入自定义规则即可

插入之前,先把 "priority": 200 ,优先级增大

{
    "id": 2,
    "priority": 201,
    "action": {
      "type": "redirect",
      "redirect": {
        "transform": {
          "scheme": "https",
          "host": "ajax.proxy.ustclug.org"
        }
      }
    },
    "condition": {
      "urlFilter": "ajax.googleapis.com",
      "requestDomains": ["ajax.googleapis.com"],
      "resourceTypes": [
        "main_frame",
        "sub_frame",
        "stylesheet",
        "script",
        "image",
        "font",
        "object",
        "xmlhttprequest",
        "ping",
        "csp_report",
        "media",
        "websocket",
        "webtransport",
        "webbundle",
        "other"
      ]
    }
  }

@jingjingxyk jingjingxyk changed the title 当服务挂了,用于自定义的候选地址,选取对应域名的候选地址 当服务挂了,用于自定义的候选地址 Nov 22, 2022
@jingjingxyk
Copy link
Contributor Author

image

@jingjingxyk jingjingxyk changed the title 当服务挂了,用于自定义的候选地址 功能使用十:自定义默认重定向候选地址 Jan 28, 2023
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