Skip to content

Instantly share code, notes, and snippets.

echoT(){ FLAG=$1 && shift && echo -e "\033[39m$FLAG\033[39m$@";}
echoY(){ FLAG=$1 && shift && echo -e "\033[38;5;148m$FLAG\033[39m$@";}
echoG(){ FLAG=$1 && shift && echo -e "\033[38;5;71m$FLAG\033[39m$@"; }
echoB(){ FLAG=$1 && shift && echo -e "\033[38;1;34m$FLAG\033[39m$@" ;}
echoR(){ FLAG=$1 && shift && echo -e "\033[38;5;203m$FLAG\033[39m$@"; }
FCLS='\033[34m' # 前景色:蓝色
FTCZ='\033[0m' # 字体:重置所有
FTSS='\033[5m' # 字体:闪烁
// use "rewrites":
{
"rewrites": [
{"source": "/(.*)", "destination": "https://github.com/$1"}
]
}
// use the "routes"
{
"version": 2,
export default {
async fetch(request, env) {
const url = new URL(request.url);
url.host = 'ai.fakeopen.com';
return fetch(new Request(url, request))
}
}
// Website you intended to retrieve for users.
const upstream = 'api.openai.com'
// Custom pathname for the upstream website.
const upstream_path = '/'
// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = upstream
// Countries and regions where you wish to suspend your service.