Search: #协议筛选

  1. Sub-Store 小课堂: 根据请求头内容自动过滤协议例如根据 Surge 客户端实际解锁了哪些来进行筛选可让 AI 帮忙修改 我人废了function operator(proxies, target, context) {

    Sub-Store 小课堂: 根据请求头内容自动过滤协议

    例如根据 Surge 客户端实际解锁了哪些来进行筛选

    可让 AI 帮忙修改 我人废了

    function operator(proxies, target, context) {
      if ($options?._req) {
        const { headers, url, path } = $options?._req || {};
        // 获取 user-agent
        const ua = headers?.["user-agent"] || headers?.["User-Agent"];
        console.log(`User-Agent: ${ua}`);
        let types = [];
        if (target === "Surge") {
          const isSurgeiOS = ua?.startsWith("Surge iOS/");
          if (isSurgeiOS) {
            // 获取 Surge 已解锁的功能
            const features = (
              headers?.["x-surge-unlocked-features"] ||
              headers?.["X-Surge-Unlocked-Features"]
            )?.split(/\s*,\s*/);
            console.log(`Surge 已解锁的功能: ${features}`);
    
            // 如果能取到 Surge 已解锁的功能 并且 里面没有 anytls, 就过滤掉 anytls
            if (features && !features.includes("anytls")) {
              types.push("anytls");
            }
          } else if (
            ua?.startsWith("Surge Mac/") &&
            ua?.match(/\/(\d+)/)?.[1] < 9860
          ) {
            // 若 Surge Mac 版本小于 9860,就过滤掉 anytls
            types.push("anytls");
          }
        } else if (target === "Egern") {
          const build = ua?.match(/Build\/(\d+)/)?.[1];
          console.log(`Egern Build: ${build}`);
          // 更旧的版本里 user-agent 里没 build
          // 判断旧版 就过滤掉 anytls
          if (ua?.startsWith("egern/") && (!build || build < 718)) {
            types.push("anytls");
          }
        }
        return proxies.filter((proxy) => !types.includes(proxy.type));
      }
      return proxies;
    }


    Sub-Store 合集 频道资源合集 恰饭推荐 群组

    #SubStore #Sub-Store #小课堂 #tips #协议 #协议筛选 #筛选 #过滤 #节点 #请求 #请求头

    • ❤️3
    • 🫡3
    • 🥰2
    • 😁1
  2. Sub-Store 小课堂: 筛选出 Shadowsocks 2022 节点▎脚本过滤return ['2022-blake3-aes-128-gcm', '2022-blake3-aes-256-gcm'].includes($server.cipher) Sub-Store 合集 频道资源合集 恰饭推荐 群组 #SubStore #Sub-Store #小课堂 #tips #协议 #协议筛选 #筛选 #SS #SS2022 #Shadowsocks #Shadowsocks2022 #过滤 #节点

    Sub-Store 小课堂: 筛选出 Shadowsocks 2022 节点

    ▎脚本过滤

    return ['2022-blake3-aes-128-gcm', '2022-blake3-aes-256-gcm'].includes($server.cipher)



    Sub-Store 合集 频道资源合集 恰饭推荐 群组

    #SubStore #Sub-Store #小课堂 #tips #协议 #协议筛选 #筛选 #SS #SS2022 #Shadowsocks #Shadowsocks2022 #过滤 #节点

    • ❤️2
    • 🌭1
  3. Sub-Store 小课堂: 按协议筛选节点UDP 协议的未来不容乐观...部分群友有排除掉 UDP 协议的需求 故出一期小课堂▎协议过滤只选你要的协议▎脚本过滤更灵活, 示例为 排除 hysteria2 hysteria tuic juicity 四种协议return !['hysteria2', 'hysteria', 'tuic', 'juicity'].includes($server.type) Sub-Store 合集 频道资源合集 恰饭推荐 群组 #SubStore #Sub-Store #小课堂 #tips #协议 #协议筛选 #筛选 #UDP #过滤 #节点

    Sub-Store 小课堂: 按协议筛选节点

    UDP 协议的未来不容乐观...部分群友有排除掉 UDP 协议的需求 故出一期小课堂

    ▎协议过滤

    只选你要的协议

    ▎脚本过滤

    更灵活, 示例为 排除 hysteria2 hysteria tuic juicity 四种协议

    return !['hysteria2', 'hysteria', 'tuic', 'juicity'].includes($server.type)


    Sub-Store 合集 频道资源合集 恰饭推荐 群组

    #SubStore #Sub-Store #小课堂 #tips #协议 #协议筛选 #筛选 #UDP #过滤 #节点

    • ❤️5
    • 👍4