This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 配置文件预处理 | |
## 版本要求 | |
0.10.1 版本更新后,支持使用 JavaScript 对下载后的配置文件进行预处理 | |
0.11.10 版本更新后,支持使用 YAML 对下载后配置文件进行简单预处理 | |
## 简便方法(YAML) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.parse = async (raw, { axios, yaml, notify, console }, { name, url, interval, selected }) => { | |
return `# parsed by remote parser\n\n${raw}` | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<meta | |
http-equiv="Content-Security-Policy" | |
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'" | |
/> | |
<title>Hello World!</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COMMAND="$1" | |
CFW_PATH="$2" | |
USER_HOME=$(getent passwd $SUDO_USER | cut -d: -f6) | |
SOURCE="$2/resources/static/files/linux/x64/service" | |
DEST="$USER_HOME/.config/clash" | |
INSTALLER_PATH="$CFW_PATH/resources/static/files/linux/common/service-installer" | |
PLIST_PATH="$INSTALLER_PATH/scripts/clash-core-service.service" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Hello World!</title> | |
<meta | |
http-equiv="Content-Security-Policy" | |
content="script-src 'self' 'unsafe-inline';" | |
/> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hi() { | |
return function () { | |
if (/https?:\/\/(.+?)\//.test("http://127.0.0.1:54637/config")) { | |
console.log(RegExp.$1); | |
} else { | |
console.log("no match"); | |
} | |
}; | |
} | |
hi()(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vmess-proxy1= vmess, example.com, 443, username = 12345678-abcd-1234-1234-47ffca0ce229, ws=true, tls=true, ws-path=/v2, ws-headers=X-Header-1:value|X-Header-2:value | |
vmess-proxy2= vmess, example.com, 443, username = 12345678-abcd-1234-1234-47ffca0ce229, ws=true, tls=true, ws-path=/v2, ws-headers=X-Header-1:value|X-Header-2:value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($response.statusCode != 200) { | |
$done(Null); | |
} | |
// test | |
const body = $response.body; | |
const bodyJson = JSON.parse(body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var body = $response.body; | |
// console.log(body.slice(0, 20)) | |
let body = JSON.stringify({}) | |
// var obj = JSON.parse(body); | |
// obj['data'] = obj['data'].filter(c => c['type'] === 'common_card') | |
// body = JSON.stringify(obj); | |
11122 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hostname=api.zhihu.com | |
https://api.zhihu.com/(topstory/follow|moments) url script-response-body https://raw.githubusercontent.com/onewayticket255/Surge-Script/master/surge%20zhihu%20feed.js | |
https://api.zhihu.com/topstory/recommend url script-response-body https://raw.githubusercontent.com/onewayticket255/Surge-Script/master/surge%20zhihu%20recommend.js | |
https://api.zhihu.com/v4/questions url script-response-body https://raw.githubusercontent.com/onewayticket255/Surge-Script/master/surge%20zhihu%20answer.js | |
https://api.zhihu.com/market/header url script-response-body https://raw.githubusercontent.com/onewayticket255/Surge-Script/master/surge%20zhihu%20market.js |
NewerOlder