V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  guzzhao  ›  全部回复第 2 页 / 共 11 页
回复总数  210
1  2  3  4  5  6  7  8  9  10 ... 11  
妙界吗,我也有点心动,就是怕质量不好
分子
199 天前
回复了 Livid 创建的主题 V2EX 站点状态 20240505 - 邀请码系统
我邮箱和 google 是两个账号,有没有办法合并 https://i.imgur.com/huX6coX.png
分母
210 天前
回复了 b1t 创建的主题 问与答 突然好奇, Obsidian 是用什么框架开发的?
electron+codemirror
220 天前
回复了 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"]]
}




```
这种🐥能运行啥东西
230 天前
回复了 Ayanokouji 创建的主题 程序员 jetbrains 2024.1 发布了
之前几个版本,从 controller 跳转到 httpclinet 卡死,这次加了个进度条可以取消 https://i.imgur.com/veWihk6.png
MTA2MDM5MzcwOUBxcS5jb20=
254 天前
回复了 tcpdump 创建的主题 电影 周处除三害
@IzayakI #8 药神都 6 年了
260 天前
回复了 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 里
277 天前
回复了 zooo 创建的主题 生活 话说 正月里能不能理发?
舅舅信则有,舅舅不信则无
287 天前
回复了 KIMI360 创建的主题 PowerShell 求助:如何阻止 Powershell 生成 tmp 文件
我电脑也是执行一次命令生成几个文件文件名是这样的,Temp/3613DAE9-FDDD-4175-88B8-A492F651B7A9/PS.0LfarU8H.f9be.tmp
1  2  3  4  5  6  7  8  9  10 ... 11  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1011 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 40ms · UTC 22:03 · PVG 06:03 · LAX 14:03 · JFK 17:03
Developed with CodeLauncher
♥ Do have faith in what you're doing.