ZSKShadow

"云影cloundssss导出"

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         ZSKShadow
// @namespace    http://tampermonkey.net/
// @version      0.7
// @description  "云影cloundssss导出"
// @author       You
// @match        https://*.cloudss.me/clientarea.php?action=productdetails&id*
// @require      https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js
// @require      https://cdn.bootcss.com/FileSaver.js/2014-11-29/FileSaver.min.js
// @grant        none
// ==/UserScript==

(function () {
  "use strict";
  let list = Array.from($($("table").children("tbody")[1]).children("tr"));
  let mrObj = {
    strategy: null,
    index: 6,
    global: false,
    enabled: true,
    shareOverLan: false,
    isDefault: false,
    localPort: 1080,
    pacUrl: null,
    useOnlinePac: false,
    secureLocalPac: true,
    availabilityStatistics: false,
    autoCheckUpdate: true,
    checkPreRelease: false,
    isVerboseLogging: true,
    logViewer: {
      topMost: false,
      wrapText: false,
      toolbarShown: false,
      Font: "Consolas, 8pt",
      BackgroundColor: "Black",
      TextColor: "White"
    },
    proxy: {
      useProxy: false,
      proxyType: 0,
      proxyServer: "",
      proxyPort: 0,
      proxyTimeout: 3
    },
    hotkey: {
      SwitchSystemProxy: "",
      SwitchSystemProxyMode: "",
      SwitchAllowLan: "",
      ShowLogs: "",
      ServerMoveUp: "",
      ServerMoveDown: ""
    }
  };
  let port = parseInt($($($("table tbody tr")[0]).children("td")[1]).text());
  let pwd = $($($("table tbody tr")[0]).children("td")[3]).text();
  let getList = [];
  for (let item of list) {
    let obj = {
      server: $.trim($($(item).children("td")[3]).text()),
      server_port: port,
      password: $.trim(pwd),
      method: $.trim($($(item).children("td")[2]).text()),
      plugin: "",
      plugin_opts: "",
      remarks: $.trim($($(item).children("td")[1]).text()),
      timeout: 5,
      obfs: "tls1.2_ticket_auth",
      protocol: "auth_sha1_v4",
    };
    getList.push(obj);
  }
  mrObj.configs = getList;
  var mystyle = `
  .mybtn {
      display: inline-block;
      line-height: 1;
      white-space: nowrap;
      cursor: pointer;
      background: #fff;
      border: 1px solid #d8dce5;
      text-align: center;
      box-sizing: border-box;
      outline: none;
      margin: 0;
      transition: .1s;
      font-weight: 500;
      -moz-user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
      padding: 12px 100px;
      font-size: 18px;
      border-radius: 4px;
      color: #fff;
      background-color: #409eff;
      border-color: #409eff;
      margin-top: 30px;
    }
  `;
  $("head").append("<style>" + mystyle + "</style>");
  $($(".text-center")[0]).append(
    `<button class="mybtn" data-clipboard-target="#bar">获取</button>`
  );
  $('body').on('click', '.mybtn', function () {
    var blob = new Blob([JSON.stringify(mrObj)], {
      type: ""
    });
    saveAs(blob, "CloundSS.json");
  })
})();