guzzhao 最近的时间轴更新
guzzhao

guzzhao

V2EX 第 248437 号会员,加入于 2017-08-13 21:51:18 +08:00
今日活跃度排名 5555
根据 guzzhao 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
guzzhao 最近回复了
6 天前
回复了 fyxtc 创建的主题 问与答 你们梯子的‘漏网之鱼’都是怎么处理的
我用的是 clash verge 的脚本
```

const mainSelect = "🚀 节点选择"
const autoSelect = "🎃 自动选择"
const otherSelect = "🐟 漏网之鱼"
const githubProxyUrl = "https://ghproxy.net/https://raw.githubusercontent.com/"
const myProxyUrlList = [
'npmmirror.com'
]
const myDirectUrlList = [
]



function main(params) {

initDns(params)
initGroups(params)
initRules(params)
delParams(params)
// 自定义
microsoftRules(params)
myRules(params)
return params;
}

function initGroups(params) {

const proxies = params["proxies"].map(e => e.name)

const groupFilter = {
"🇭🇰 香港 自动选择": "港|HK|Hong",
"🇯🇵 日本 自动选择": "日|东京|JP|Japan",
"🇸🇬 新加坡 自动选择": "新|坡|獅|SG|Singapore"
}

let auto = Object.keys(groupFilter).map(gf => {
return {
name: gf,
type: 'url-test',
url: 'https://cp.cloudflare.com/generate_204',
tolerance: 20,
proxies: proxies.filter(p => new RegExp(groupFilter[gf]).test(p))
}
}).filter(e => e.proxies.length > 0)

const proxyGroups = [
{
name: mainSelect,
type: 'select',
proxies: [autoSelect, ...auto.map(e => e.name), ...proxies]
},
{
name: otherSelect,
type: 'select',
proxies: [mainSelect, 'DIRECT']
},
{
name: autoSelect,
type: 'url-test',
url: 'https://cp.cloudflare.com/generate_204',
tolerance: 20,
proxies: proxies
}, ...auto
]

params["proxy-groups"] = proxyGroups
}

function initRules(params) {

let baseUrl = githubProxyUrl + "Loyalsoldier/clash-rules/release/";
let ruleProvidersKeys = [
'reject',
'icloud',
'apple',
// 'google',
'proxy',
'direct',
'private',
// 'gfw', proxy 包含 gfw
'tld-not-cn',
// 'telegramcidr',
'cncidr',
'lancidr',
'applications']

let ruleProviders = {}
ruleProvidersKeys.forEach(e => {
ruleProviders[e] = {
type: "http",
behavior: "domain",
url: baseUrl + `${e}.txt`,
path: `./ruleset/${e}.yaml`,
interval: 86400
}
})

let rules = [
"RULE-SET,applications,DIRECT",
"DOMAIN,clash.razord.top,DIRECT",
"DOMAIN,yacd.haishan.me,DIRECT",
"RULE-SET,private,DIRECT",
"RULE-SET,reject,REJECT", // 广告域名列表
"RULE-SET,icloud,DIRECT",
"RULE-SET,apple,DIRECT",
// "RULE-SET,google," + mainSelect, Google 在中国大陆可直连的域名列表
"RULE-SET,direct,DIRECT",
"RULE-SET,lancidr,DIRECT",
"RULE-SET,cncidr,DIRECT",
// "RULE-SET,telegramcidr," + mainSelect,
"RULE-SET,proxy," + mainSelect,
"GEOIP,CN,DIRECT,no-resolve",
"MATCH," + otherSelect
]

params["rule-providers"] = ruleProviders
params["rules"] = rules

}

function initDns(params) {
params["dns"] = {
"enable": true,
"ipv6": false,
"listen": "0.0.0.0:1053",
"default-nameserver": [
"223.5.5.5",
"119.29.29.29",
"114.114.114.114"
],
"enhanced-mode": "fake-ip",
"fake-ip-range": "28.0.0.1/8",
"use-hosts": true,
"nameserver": [
"tls://223.5.5.5:853",
"tls://223.6.6.6:853",
"https://doh.pub/dns-query",
"https://dns.alidns.com/dns-query"
],
"fallback": [
"https://doh.dns.sb/dns-query",
"https://dns.cloudflare.com/dns-query",
"https://dns.twnic.tw/dns-query",
"tls://8.8.4.4:853"
],
"fallback-filter": {
"geoip": true,
"ipcidr": [
"240.0.0.0/4",
"0.0.0.0/32"
]
}
}
}

function delParams(params) {
delete params["cfw-conn-break-strategy"]
delete params["experimental"]
delete params["hosts"]
delete params["cfw-latency-timeout"]
delete params["cfw-latency-url"]
delete params["clash-for-android"]
delete params["udp"]


}

function microsoftRules(params) {

let baseUrl = githubProxyUrl + "blackmatrix7/ios_rule_script/master/rule/Clash/";
let microsoftProviders = {
'microsoft': {
type: "http",
behavior: "classical",
url: baseUrl + "Microsoft/Microsoft.yaml",
path: `./ruleset/microsoft.yaml`,
interval: 86400
},
"bing": {
type: "http",
behavior: "classical",
url: baseUrl + "Bing/Bing.yaml",
path: `./ruleset/bing.yaml`,
interval: 86400
},
"oneDrive": {
type: "http",
behavior: "classical",
url: baseUrl + "OneDrive/OneDrive.yaml",
path: `./ruleset/oneDrive.yaml`,
interval: 86400
},
}

let microsoftRules = [
"RULE-SET,microsoft,Microsoft",
"RULE-SET,bing,Microsoft",
"RULE-SET,oneDrive,Microsoft"
]
let microsoftGroup = {
name: 'Microsoft',
type: 'select',
proxies: [mainSelect, "DIRECT"]
}

params["rule-providers"] = { ...microsoftProviders, ...params["rule-providers"] }
params["rules"] = [...microsoftRules, ...params["rules"]]
params["proxy-groups"] = [...params["proxy-groups"], microsoftGroup]

}


function myRules(params) {
let rules = [
...myDirectUrlList.map(e => 'DOMAIN-SUFFIX,' + e + ',DIRECT'),
...myProxyUrlList.map(e => 'DOMAIN-SUFFIX,' + e + ',' + mainSelect),
]

console.log(rules)
params["rules"] = [...rules, ...params["rules"]]
}




```
这种🐥能运行啥东西
14 天前
回复了 newlin 创建的主题 知乎 有没有人发现知乎上的内容开始良莠不齐了?
只能说不如 b 站(好歹 b 站用户看起来像真人🤣)
16 天前
回复了 Ayanokouji 创建的主题 程序员 jetbrains 2024.1 发布了
之前几个版本,从 controller 跳转到 httpclinet 卡死,这次加了个进度条可以取消
MTA2MDM5MzcwOUBxcS5jb20=
40 天前
回复了 tcpdump 创建的主题 电影 周处除三害
@IzayakI #8 药神都 6 年了
46 天前
回复了 guzzhao 创建的主题 问与答 wsl2 使用桥接网络问题
@Fanta721 #5 用最新版的 win11 可以这样设置,wsl 和主机一个 IP,用 localhost 也可以访问 wsl

[wsl2]
networkingMode=mirrored # 网络使用 mirrored 模式
firewall=true
autoProxy=true
dnsTunneling=true

[experimental]
autoMemoryReclaim=gradual
sparseVhd=true
hostAddressLoopback=true
希望可以添加到 scoop 里
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   851 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 21:32 · PVG 05:32 · LAX 14:32 · JFK 17:32
Developed with CodeLauncher
♥ Do have faith in what you're doing.