Git Product home page Git Product logo

quanx's Introduction

Scripts

Scripts for QuantumultX, Loon, Surge, JSBox and Node.

Tasks

定时任务合集

boxjs订阅:https://raw.githubusercontent.com/Peng-YM/QuanX/master/Tasks/box.js.json

task合集:https://raw.githubusercontent.com/Peng-YM/QuanX/master/Tasks/task.json

概览

脚本 作用 推荐配置 预览
彩云天气 基于彩云天气API推送实时天气 30 8-22 * * * DEMO
纵横小说 监测纵横小说更新 */30 * * * * DEMO
Github 监测Github仓库的Commit和Release 0 9 * * * DEMO
今日汇率 汇率监控 0 9 * * * DEMO
Steam Steam日报 0 9 * * * DEMO
Epic Epic周免 55 23 ? * THU DEMO
PSN PSN会免 0 9 1 * * DEMO
疫情日报 推送当前地区疫情信息 0 9 * * * DEMO
✈️ 流量 查询✈️ 流量 0 9 * * * DEMO
TG多媒体推送 推送TG频道图文视频 0 9 * * * DEMO

Developer

⭐️ OpenAPI

优雅的跨平台脚本API,一种代码,同时支持Quantumult X, Loon, Surge, JSBoxNode.js了解更多

⭐️ MITM Proxy

为开发者打造的又一神兵利器!电脑端MITM拦截请求并运行指定JavaScript脚本修改RequestResponse了解更多

Tools

自动定位

在脚本中获取系统准确定位的可靠方法。了解更多

Github私有仓库

允许引用Github私有仓库/gist中的订阅分流,重写,脚本等配置文件。了解更多

SSID 自动策略切换

可能是最强的SSID脚本,适用于Surge和Loon,根据当前网络自动切换策略组。由于运行模式的全局直连下,去广告,网易云等分流也会失效,使用此脚本完全解决了此类问题。了解更多

SSID 运行模式

网络变化时自动根据设定调整当前 Surge & Loon 的代理模式。了解更多

❗❗❗免责声明

  1. 此项目中的脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
  2. 由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
  3. 请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
  4. 此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
  5. 本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
  6. 如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我将在收到认证文件确认后删除此脚本。
  7. 所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。

quanx's People

Contributors

brandtime avatar codexss avatar langkhach270389 avatar liby avatar llkhs avatar mazetsz avatar peng-ym avatar toulanboy avatar virgilclyne avatar yangzhaocool avatar zzpiglet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quanx's Issues

github监控脚本执行后,无任何结果。

github监控,通过QuanX构造请求和BoxJs执行脚本均无任何反应:
35ad786e57b2e5dede70f6dac83e6a5
52af1b19f226218cd3104d090c08184

BoxJs的仓库地址如下:
[ { "name": "NZW9314 脚本", "url": "https://github.com/nzw9314/QuantumultX/tree/master" }, { "name": "Chavy 脚本", "url": "https://github.com/chavyleung/scripts" }, { "name": "NobyDa", "file_names": ["JD-DailyBonus/JD_DailyBonus.js", "52pojie-DailyBonus"], "url": "https://github.com/NobyDa/Script/tree/master" } ]
github token默认

使用MITM模块时遇到了一点问题

我在尝试将这个移植到iOS上,于是想要借助您的mitm模块,但是在使用过程中,我发现我修改了workspace,但是不知道为什么,插件并没有读取我在workspace下面的脚本,所以我想向您请教一下我是不是哪里出了问题

2021-07-18 12-08-47 的屏幕截图

代码已上传到https://pastebin.com/iW4fGFvV

2021-07-18 12-25-36 的屏幕截图

运行状况如图,开启了debug也没有任何输出。

NextDns模块运行不提示

使用你的NEXTDNS模块,BOXJS没有开启静默运行。日志跟通知都未出现日志。确认URL与DNS服务器没有填写错误。请问下是什么原因。还是我使用方法有误?

大佬,帮忙看下总是报这个错是什么问题

PS C:\MITM> node "c:\MITM\Proxy.js"
Configuration loaded:
{"general":{"workspace":"/Rewrites","remote":""},"proxy":{"port":6789,"key":"mitmproxy.key.pem","cert":"mitmproxy.crt"},"mitm":["jd.com"],"scripts":[{"name":"test-request-body","type":"request","pattern":"*.jd.com","require_body":true,"path":"test-request-body.js","enabled":true}]}

Processing rewrites for Quantumult X...
Processing rewrites for Loon...
Processing rewrites for Surge...
Added script test-request-body.js
MITM proxy listenning on 6789...
events.js:292
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
?[90m at TCP.onStreamRead (internal/stream_base_commons.js:205:27)?[39m
Emitted 'error' event on Socket instance at:
?[90m at emitErrorNT (internal/streams/destroy.js:84:8)?[39m
?[90m at processTicksAndRejections (internal/process/task_queues.js:84:21)?[39m {
errno: ?[33m-4077?[39m,
code: ?[32m'ECONNRESET'?[39m,
syscall: ?[32m'read'?[39m
}

Github 监控提示仓库中没有该文件

在boxjs里仓库地址填写内容如下:

[
  {
    "name": "JD Task Sgmodule",
    "file_names": ["Surge/lxk0301_Task.sgmodule.sgmodule"],
    "url": "https://github.com/lxk0301/jd_scripts/tree/master"
  }
]

提示仓库中没有该文件lxk0301_Task.sgmodule.sgmodule,请检查路径是否正确

彩云天气

请问彩云天气总是提示腾讯地图token错误是什么原因?

node 版本

你好 我在使用的时候发现使用node 14以上的版本会出网络请求的问题,我做了对比测试,14版本一下的都没有问题,请问下,会升级到14版本嘛? 谢谢!

iOS 13.5版本在根据教程填好相关信息后出错(QX)

image
image
image
image
image
image
(我截图的彩云天气API是个例子,我填的是我自己的token字段)

我申请了彩云的API,按照教程操作,但是到了进入系统天气的这一步,没有提示获取了定位。我点击执行脚本,提示错误

我依据此教程进行配置,
https://github.com/chiupam/tutorial/tree/master/caiyun

相关问题已在
https://t.me/c/1446927138/624715
https://t.me/cool_scripts/78
反馈

https://t.me/c/1446927138/624760
𝒀𝑴 𝑷𝑬𝑵𝑮大佬已答复有时间处理

版本信息-iOS 13.5 QUANTUMULT X v1.0.13-build355 从美区商店购买 蓝色标记

此issues为存档,以备使用。

SSID 自动切换模式脚本报错:[JS exception]: ReferenceError: Can’t find variable: ssid

首先说明,功能正常,可以根据 Config 在网络变化时自动调整代理模式

Script 变动

改了一下文件中的 Config,并在 notify 方法内加了一个 console.log,查看是否调用了 $notification.post

Script 内容
let config = {
  silence: false, // 是否静默运行,默认false
  cellular: "RULE", // 蜂窝数据下的模式,RULE代表规则模式,PROXY代表全局代理,DIRECT代表全局直连
  wifi: "RULE", // wifi下默认的模式
  all_direct: ["Unifi 5G"], // 指定全局直连的wifi名字
  all_proxy: [], // 指定全局代理的wifi名字
};

// load user prefs from box
const boxConfig = $persistentStore.read("surge_running_mode");
if (boxConfig) {
  config = JSON.parse(boxConfig);
  config.silence = JSON.parse(config.silence);
  config.all_direct = JSON.parse(config.all_direct);
  config.all_proxy = JSON.parse(config.all_proxy);
}

const isLoon = typeof $loon !== "undefined";
const isSurge = typeof $httpClient !== "undefined" && !isLoon;
const MODE_NAMES = {
  RULE: "🚦规则模式",
  PROXY: "🚀全局代理模式",
  DIRECT: "🎯全局直连模式",
};

manager();
$done();

function manager() {
  if (isSurge) {
    const v4_ip = $network.v4.primaryAddress;
    // no network connection
    if (!config.silence && !v4_ip) {
      notify("🤖 Surge 运行模式", "❌ 当前无网络", "");
      return;
    }
    const ssid = $network.wifi.ssid;
    const mode = ssid ? lookupSSID(ssid) : config.cellular;
    const target = {
      RULE: "rule",
      PROXY: "global-proxy",
      DIRECT: "direct",
    }[mode];
    $surge.setOutboundMode(target);
  } else if (isLoon) {
    const conf = JSON.parse($config.getConfig());
    const ssid = conf.ssid;
    const mode = ssid ? lookupSSID(ssid) : config.cellular;
    const target = {
      DIRECT: 0,
      RULE: 1,
      PROXY: 2,
    }[mode];
    $config.setRunningModel(target);
  }
  if (!config.silence) {
    notify(
      `🤖 ${isSurge ? "Surge" : "Loon"} 运行模式`,
      `当前网络:${ssid ? ssid : "蜂窝数据"}`,
      `${isSurge ? "Surge" : "Loon"} 已切换至${MODE_NAMES[mode]}`
    );
  }
}

function lookupSSID(ssid) {
  const map = {};
  config.all_direct.map((id) => (map[id] = "DIRECT"));
  config.all_proxy.map((id) => (map[id] = "PROXY"));

  const matched = map[ssid];
  return matched ? matched : config.wifi;
}

function notify(title, subtitle, content) {
  const TIMESTAMP_KEY = "running_mode_notified_time";
  const THROTTLE_TIME = 3 * 1000;
  const lastNotifiedTime = $persistentStore.read(THROTTLE_TIME);
  if (
    !lastNotifiedTime ||
    new Date().getTime() - lastNotifiedTime > THROTTLE_TIME
  ) {
    console.log("与 $notification.post 处在同级")
    $persistentStore.write(new Date().getTime().toString(), TIMESTAMP_KEY);
    $notification.post(title, subtitle, content);
  }
}

notify("title", "subtitle", "content")

问题说明

  1. 网络变化时,调用此脚本,日志中出现报错:[JS exception]: ReferenceError: Can’t find variable: ssid
  2. 切换代理模式时,没有通知提示(但是看到脚本中有调用)

问题录制

建议使用手机或 Chrome DevTools 中的 Device Mode 查看: 视频地址

视频截图

无法使用BoxJs配置脚本:SSID 自动策略切换(auto-policy.js)

使用的软件为Loon,以插件方式安装 BoxJs 和 SSID 自动策略切换(auto-policy.js)脚本。
在BoxJs里保存设置后配置不生效,设定的 SSID 不会自动切换。
下载源代码后以本地形式导入脚本,在删掉原代码

// load user prefs from box
const boxConfig = $persistentStore.read("surge_auto_policy");
if (boxConfig) {
  config = JSON.parse(boxConfig);
  config.silence = JSON.parse(config.silence);
  config.all_direct = listify(config.all_direct);
  config.all_proxy = listify(config.all_proxy);
  config.whitelist = listify(config.whitelist);
}

这一部分并更改脚本 config 内容进行手动进行配置后脚本正常工作。
猜测:脚本无法获取到 BoxJs 中保存的参数。

将上面删掉的获取 BoxJs 参数部分的代码在本地单独建立脚本观察输出:

const boxConfig = $persistentStore.read("surge_auto_policy");
if (boxConfig) {
  config = JSON.parse(boxConfig);
  config.silence = JSON.parse(config.silence);
  config.all_direct = listify(config.all_direct);
  config.all_proxy = listify(config.all_proxy);
  config.whitelist = listify(config.whitelist);
}
console.log(config)

运行后提示:

[JS exception]:ReferenceError: Can't find variable: listify

删掉传参部分的代码,直接输出获取到的参数

const boxConfig = $persistentStore.read("surge_auto_policy");
console.log(boxConfig)

发现 BoxJs 配置的参数能够正确输出。

流量脚本问题

查询流量成功后,QX显示流量脚本一直是活动状态,不退出释放资源

1

大佬请问这个报错是啥原因,日志输出经纬度也没问题。
A99B3D78-6027-4CBB-9059-5EC654814B8B
4B55FAD8-D2F4-4E21-AF02-544F1DE0BCD5

疫情日报错误

iOS 14.6 NE v1.0.20-build517

Logs:

浙江省
[nCov] ERROR: {}

请问大佬,以上错误是怎么解决呢。

彩云天气脚本

我想问一下彩云天气的怎么自定义经纬度 他获取的经纬度不太准确 我想自己填写

surge

整理一个surge的模块,谢谢

问题已经解决了

api失效自己折腾了一下,api返回数据货币代码为小写字母时无法正常输出,这个应该怎么处理

适配了移动端的脚本网站,求适配

用了大佬写的油猴转换脚本,但现在油猴上适配了移动端的脚本并不多,而http://via-app.cn/#/tabBar/home这个网站是专门为via alook写脚本的一个网站,里边的脚本经我手动修改添加到qx后,可以完美使用。
在这个网站上,我找不到js脚本的在线地址,只能添加到alook浏览器后再手动复制到qx。
我水平不够,希望大佬能写一个跟油猴转换脚本类似的脚本,多谢了🙏

1

1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.