Skip to content

Instantly share code, notes, and snippets.

@tiansh
Created October 25, 2018 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiansh/a2b8926ecbf2b286d54fa9553951536e to your computer and use it in GitHub Desktop.
Save tiansh/a2b8926ecbf2b286d54fa9553951536e to your computer and use it in GitHub Desktop.
Config redirector to make some stupid sites work correctly
{
"createdBy": "Redirector v3.2.1",
"redirects": [{
"description": "Google, Use ENGLISH plz",
"exampleUrl": "https://www.google.com/search?q=google",
"exampleResult": "https://www.google.com/search?hl=en&q=google",
"error": null,
"includePattern": "^(https://www.google.com/search\\?)((?!hl=)(?:.(?!&hl=))*)$",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "$1hl=en&$2",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"appliesTo": ["main_frame"]
}, {
"description": "reCAPTCHA",
"exampleUrl": "https://www.google.com/recaptcha/api.js",
"exampleResult": "https://www.recaptcha.net/recaptcha/api.js",
"error": null,
"includePattern": "^([^/:]*)://www.google.com/recaptcha/(.*)$",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "$1://www.recaptcha.net/recaptcha/$2",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"appliesTo": ["script"]
}, {
"description": "Help Google redirect",
"exampleUrl": "https://www.google.com/url?url=https%3A%2F%2Fwww.google.com%2F",
"exampleResult": "https://www.google.com/",
"error": null,
"includePattern": "https://www.google.com/url\\?(?:.*&)?url=([^&]*).*",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "$1",
"patternType": "R",
"processMatches": "urlDecode",
"disabled": false,
"appliesTo": ["main_frame"]
}, {
"description": "ajax.googleapis.com",
"exampleUrl": "https://ajax.googleapis.com/",
"exampleResult": "https://ajax.proxy.ustclug.org/",
"error": null,
"includePattern": "https?://ajax.googleapis.com/(.*)",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "https://ajax.proxy.ustclug.org/$1",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"appliesTo": ["stylesheet", "script"]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment