// ==UserScript== // @name 自动获取所有SSR // @namespace http://www.cichui.top/ // @version 1.2 // @description 自动获取【SSR小工具】的所有可用SSR链接,你只需要复制后从剪贴板导入SSR工具即可,省去人工一个个添加节点,手机也可使用Yandex浏览器安装此脚本!此脚本仅用于交流学习之用,切不可用于违法用途,因此产生的所有责任与开发者无关,请于下载后24小时内删除脚本,谢谢配合! // @author CiChui // @match *://ssrtool.us/tool/free_ssr* // @match *://usky.ml/tool/free_ssr* // @match *://www.youneed.win/free-* // @require http://code.jquery.com/jquery-1.11.0.min.js // @require https://cdn.bootcss.com/crypto-js/4.0.0/crypto-js.min.js // @grant none // @downloadURL https://update.greasyfork.icu/scripts/388200/%E8%87%AA%E5%8A%A8%E8%8E%B7%E5%8F%96%E6%89%80%E6%9C%89SSR.user.js // @updateURL https://update.greasyfork.icu/scripts/388200/%E8%87%AA%E5%8A%A8%E8%8E%B7%E5%8F%96%E6%89%80%E6%9C%89SSR.meta.js // ==/UserScript== (function() { 'use strict'; /*域名配置,如果域名更新请手动修改上边@match的URL地址*/ var $=jQuery,nodes=[]; if(window.location.host.indexOf("youneed.win")>-1) { var subscribeURL=localStorage.getItem("SubscribeURL")||""; $("h2.post-title").click(function(){ subscribeURL=localStorage.getItem("SubscribeURL")||""; subscribeURL = prompt("输入更新订阅内容的URL",subscribeURL); if(subscribeURL){ if(subscribeURL==0){ localStorage.removeItem("SubscribeURL"); alert("已取消自动更新订阅"); }else{ subscribeURL=subscribeURL.charAt(subscribeURL.length - 1)==="/"?subscribeURL:subscribeURL+"/"; localStorage.setItem("SubscribeURL",subscribeURL); alert("你设置的URL是:"+subscribeURL); } } }); $(".v2ray").each(function(index,item){ var data = $(item).parent().find('td'); if(window.location.pathname.indexOf("ssr")>-1){ nodes.push(data.find('a').attr("data")); }else if(window.location.pathname.indexOf("v2ray")>-1){ nodes.push('vmess://' + CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse( '{"ps":"[youneed.win]' + $(data[1]).text() + '","add":"' + $(data[1]).text() + '","port":"' + $(data[2]).text() + '","id":"' + $(data[3]).text() + '","aid":"0","net":"' + $(data[4]).text() + '","type":"none","host":"' + $(data[5]) .text() + '","tls":"' + $(data[6]).text() + '"}'))); }else if(window.location.pathname.indexOf("ss")>-1){ nodes.push('ss://'+CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse($(data[4]).text()+':'+$(data[3]).text()+'@'+$(data[1]).text()+':'+$(data[2]).text()))); } }); if(nodes.length>0 && subscribeURL) { var text = nodes.join('\n'); var newwindow=window.open(); newwindow.document.write(text); console.info(text); $.post(subscribeURL+(text.indexOf("ssr://")==0?"fmdfssr":text.indexOf("ss://")==0?"fmdfss":"fmdfv2ray")+".txt",{text:CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(text))},function(data){ alert(window.location.pathname+"/订阅内容已发送"); }); } return; } layui.$("#data").append( '