{"id":376,"date":"2024-05-13T09:03:09","date_gmt":"2024-05-13T01:03:09","guid":{"rendered":"https:\/\/my.di.cloudns.asia\/?p=376"},"modified":"2024-05-13T09:03:09","modified_gmt":"2024-05-13T01:03:09","slug":"3%e5%88%86%e9%92%9f%e5%88%9b%e5%bb%ba%e6%b0%b8%e4%b9%85%e5%85%8d%e8%b4%b9%e7%9a%84trojan%e8%8a%82%e7%82%b9","status":"publish","type":"post","link":"https:\/\/my.di.cloudns.asia\/index.php\/2024\/05\/13\/376.html","title":{"rendered":"3\u5206\u949f\u521b\u5efa\u6c38\u4e45\u514d\u8d39\u7684Trojan\u8282\u70b9"},"content":{"rendered":"<p>trojan workers\u4ee3\u7801\uff1a<\/p>\n<p><a href=\"https:\/\/github.com\/frankiejun\/cvwt\/blob\/main\/trojan_workers\/_workers.js\">https:\/\/github.com\/frankiejun\/cvwt\/blob\/main\/trojan_workers\/_workers.js<\/a><\/p>\n<pre><code>\n\/\/ src\/worker.js\nimport { connect } from &quot;cloudflare:sockets&quot;;\nlet sha224Password = &#039;7e89e622d89becc4299c2d74494b9fb15759f2b0ff47b20eeae867e2&#039;;\nlet pwd = &#039;abc123333&#039;\nconst proxyIPs = [&quot;cdn.xn--b6gac.eu.org&quot;]; \/\/workers.cloudflare.cyou bestproxy.onecf.eu.org cdn-all.xn--b6gac.eu.org cdn.xn--b6gac.eu.org\nlet proxyIP = proxyIPs[Math.floor(Math.random() * proxyIPs.length)];\nlet defaultAddr=&#039;www.visa.com.sg&#039;\n\nif (!isValidSHA224(sha224Password)) {\n    throw new Error(&#039;sha224Password is not valid&#039;);\n}\n\nfunction getprotocol() {\n    let matter = [&#039;t&#039;,&#039;r&#039;,&#039;o&#039;,&#039;j&#039;,&#039;a&#039;,&#039;n&#039;]\n    let result=&#039;&#039;\n    for (let i = 0; i &lt; matter.length; i++) {\n      result += matter[i];\n    }\n    return result;\n  }\n\nconst worker_default = {\n    \/**\n     * @param {import(&quot;@cloudflare\/workers-types&quot;).Request} request\n     * @param {{SHA224PASS: string, PROXYIP: string}} env\n     * @param {import(&quot;@cloudflare\/workers-types&quot;).ExecutionContext} ctx\n     * @returns {Promise&lt;Response&gt;}\n     *\/\n    async fetch(request, env, ctx) {\n        try {\n            proxyIP = env.PROXYIP || proxyIP;\n            pwd  = env.PASSWORD || pwd\n            if (&#039;PASSWORD&#039; in env) {\n                sha224Password = sha256.sha224(env.PASSWORD)\n             }\n            console.log(&#039;pass:&#039;+sha224Password)\n            const upgradeHeader = request.headers.get(&quot;Upgrade&quot;);\n            if (!upgradeHeader || upgradeHeader !== &quot;websocket&quot;) {\n                const url = new URL(request.url);\n                switch (url.pathname) {\n                    case `\/${pwd}`:{\n                        const host = request.headers.get(&#039;Host&#039;);\n                        if ( &#039;PROXYIP&#039; in env) {\n                          return new Response(getprotocol() + `:\/\/` + pwd + `@${host}:443\/?type=ws&amp;host=${host}&amp;security=tls#${host}`, {\n                            status: 200,\n                            headers: {\n                                &quot;Content-Type&quot;: &quot;text\/plain;charset=utf-8&quot;,\n                            }\n                        })\n                        }else{\n                          return new Response(getprotocol() + `:\/\/` + pwd + `@${defaultAddr}:443\/?type=ws&amp;host=${host}&amp;security=tls#${host}`, {\n                            status: 200,\n                            headers: {\n                                &quot;Content-Type&quot;: &quot;text\/plain;charset=utf-8&quot;,\n                            }\n                        })\n                        }\n\n                      };\n                    default:\n                        return new Response(&quot;404 Not found&quot;, { status: 404 });\n                }\n            } else {\n                return await trojanOverWSHandler(request);\n            }\n        } catch (err) {\n            let e = err;\n            return new Response(e.toString());\n        }\n    }\n};\n\nasync function trojanOverWSHandler(request) {\n    const webSocketPair = new WebSocketPair();\n    const [client, webSocket] = Object.values(webSocketPair);\n    webSocket.accept();\n    let address = &quot;&quot;;\n    let portWithRandomLog = &quot;&quot;;\n    const log = (info, event) =&gt; {\n        console.log(`[${address}:${portWithRandomLog}] ${info}`, event || &quot;&quot;);\n    };\n    const earlyDataHeader = request.headers.get(&quot;sec-websocket-protocol&quot;) || &quot;&quot;;\n    const readableWebSocketStream = makeReadableWebSocketStream(webSocket, earlyDataHeader, log);\n    let remoteSocketWapper = {\n        value: null\n    };\n    let udpStreamWrite = null;\n    readableWebSocketStream.pipeTo(new WritableStream({\n        async write(chunk, controller) {\n            if (udpStreamWrite) {\n                return udpStreamWrite(chunk);\n            }\n            if (remoteSocketWapper.value) {\n                const writer = remoteSocketWapper.value.writable.getWriter();\n                await writer.write(chunk);\n                writer.releaseLock();\n                return;\n            }\n            const {\n                hasError,\n                message,\n                portRemote = 443,\n                addressRemote = &quot;&quot;,\n                rawClientData\n            } = await parseTrojanHeader(chunk);\n            address = addressRemote;\n            portWithRandomLog = `${portRemote}--${Math.random()} tcp`;\n            if (hasError) {\n                throw new Error(message);\n                return;\n            }\n            handleTCPOutBound(remoteSocketWapper, addressRemote, portRemote, rawClientData, webSocket, log);\n        },\n        close() {\n            log(`readableWebSocketStream is closed`);\n        },\n        abort(reason) {\n            log(`readableWebSocketStream is aborted`, JSON.stringify(reason));\n        }\n    })).catch((err) =&gt; {\n        log(&quot;readableWebSocketStream pipeTo error&quot;, err);\n    });\n    return new Response(null, {\n        status: 101,\n        \/\/ @ts-ignore\n        webSocket: client\n    });\n}\n\nasync function parseTrojanHeader(buffer) {\n    if (buffer.byteLength &lt; 56) {\n        return {\n            hasError: true,\n            message: &quot;invalid data&quot;\n        };\n    }\n    let crLfIndex = 56;\n    if (new Uint8Array(buffer.slice(56, 57))[0] !== 0x0d || new Uint8Array(buffer.slice(57, 58))[0] !== 0x0a) {\n        return {\n            hasError: true,\n            message: &quot;invalid header format (missing CR LF)&quot;\n        };\n    }\n    const password = new TextDecoder().decode(buffer.slice(0, crLfIndex));\n    if (password !== sha224Password) {\n        return {\n            hasError: true,\n            message: &quot;invalid password&quot;\n        };\n    }\n\n    const socks5DataBuffer = buffer.slice(crLfIndex + 2);\n    if (socks5DataBuffer.byteLength &lt; 6) {\n        return {\n            hasError: true,\n            message: &quot;invalid SOCKS5 request data&quot;\n        };\n    }\n\n    const view = new DataView(socks5DataBuffer);\n    const cmd = view.getUint8(0);\n    if (cmd !== 1) {\n        return {\n            hasError: true,\n            message: &quot;unsupported command, only TCP (CONNECT) is allowed&quot;\n        };\n    }\n\n    const atype = view.getUint8(1);\n    \/\/ 0x01: IPv4 address\n    \/\/ 0x03: Domain name\n    \/\/ 0x04: IPv6 address\n    let addressLength = 0;\n    let addressIndex = 2;\n    let address = &quot;&quot;;\n    switch (atype) {\n        case 1:\n            addressLength = 4;\n            address = new Uint8Array(\n              socks5DataBuffer.slice(addressIndex, addressIndex + addressLength)\n            ).join(&quot;.&quot;);\n            break;\n        case 3:\n            addressLength = new Uint8Array(\n              socks5DataBuffer.slice(addressIndex, addressIndex + 1)\n            )[0];\n            addressIndex += 1;\n            address = new TextDecoder().decode(\n              socks5DataBuffer.slice(addressIndex, addressIndex + addressLength)\n            );\n            break;\n        case 4:\n            addressLength = 16;\n            const dataView = new DataView(socks5DataBuffer.slice(addressIndex, addressIndex + addressLength));\n            const ipv6 = [];\n            for (let i = 0; i &lt; 8; i++) {\n                ipv6.push(dataView.getUint16(i * 2).toString(16));\n            }\n            address = ipv6.join(&quot;:&quot;);\n            break;\n        default:\n            return {\n                hasError: true,\n                message: `invalid addressType is ${atype}`\n            };\n    }\n\n    if (!address) {\n        return {\n            hasError: true,\n            message: `address is empty, addressType is ${atype}`\n        };\n    }\n\n    const portIndex = addressIndex + addressLength;\n    const portBuffer = socks5DataBuffer.slice(portIndex, portIndex + 2);\n    const portRemote = new DataView(portBuffer).getUint16(0);\n    return {\n        hasError: false,\n        addressRemote: address,\n        portRemote,\n        rawClientData: socks5DataBuffer.slice(portIndex + 4)\n    };\n}\n\nasync function handleTCPOutBound(remoteSocket, addressRemote, portRemote, rawClientData, webSocket, log) {\n    async function connectAndWrite(address, port) {\n        const tcpSocket2 = connect({\n            hostname: address,\n            port\n        });\n        remoteSocket.value = tcpSocket2;\n        log(`connected to ${address}:${port}`);\n        const writer = tcpSocket2.writable.getWriter();\n        await writer.write(rawClientData);\n        writer.releaseLock();\n        return tcpSocket2;\n    }\n    async function retry() {\n        const tcpSocket2 = await connectAndWrite(proxyIP || addressRemote, portRemote);\n        tcpSocket2.closed.catch((error) =&gt; {\n            console.log(&quot;retry tcpSocket closed error&quot;, error);\n        }).finally(() =&gt; {\n            safeCloseWebSocket(webSocket);\n        });\n        remoteSocketToWS(tcpSocket2, webSocket, null, log);\n    }\n    const tcpSocket = await connectAndWrite(addressRemote, portRemote);\n    remoteSocketToWS(tcpSocket, webSocket, retry, log);\n}\n\nfunction makeReadableWebSocketStream(webSocketServer, earlyDataHeader, log) {\n    let readableStreamCancel = false;\n    const stream = new ReadableStream({\n        start(controller) {\n            webSocketServer.addEventListener(&quot;message&quot;, (event) =&gt; {\n                if (readableStreamCancel) {\n                    return;\n                }\n                const message = event.data;\n                controller.enqueue(message);\n            });\n            webSocketServer.addEventListener(&quot;close&quot;, () =&gt; {\n                safeCloseWebSocket(webSocketServer);\n                if (readableStreamCancel) {\n                    return;\n                }\n                controller.close();\n            });\n            webSocketServer.addEventListener(&quot;error&quot;, (err) =&gt; {\n                log(&quot;webSocketServer error&quot;);\n                controller.error(err);\n            });\n            const { earlyData, error } = base64ToArrayBuffer(earlyDataHeader);\n            if (error) {\n                controller.error(error);\n            } else if (earlyData) {\n                controller.enqueue(earlyData);\n            }\n        },\n        pull(controller) {},\n        cancel(reason) {\n            if (readableStreamCancel) {\n                return;\n            }\n            log(`readableStream was canceled, due to ${reason}`);\n            readableStreamCancel = true;\n            safeCloseWebSocket(webSocketServer);\n        }\n    });\n    return stream;\n}\n\nasync function remoteSocketToWS(remoteSocket, webSocket, retry, log) {\n    let hasIncomingData = false;\n    await remoteSocket.readable.pipeTo(\n        new WritableStream({\n            start() {},\n            \/**\n             *\n             * @param {Uint8Array} chunk\n             * @param {*} controller\n             *\/\n            async write(chunk, controller) {\n                hasIncomingData = true;\n                if (webSocket.readyState !== WS_READY_STATE_OPEN) {\n                    controller.error(\n                        &quot;webSocket connection is not open&quot;\n                    );\n                }\n                webSocket.send(chunk);\n            },\n            close() {\n                log(`remoteSocket.readable is closed, hasIncomingData: ${hasIncomingData}`);\n            },\n            abort(reason) {\n                console.error(&quot;remoteSocket.readable abort&quot;, reason);\n            }\n        })\n    ).catch((error) =&gt; {\n        console.error(\n            `remoteSocketToWS error:`,\n            error.stack || error\n        );\n        safeCloseWebSocket(webSocket);\n    });\n    if (hasIncomingData === false &amp;&amp; retry) {\n        log(`retry`);\n        retry();\n    }\n}\n\nfunction isValidSHA224(hash) {\n    const sha224Regex = \/^[0-9a-f]{56}$\/i;\n    return sha224Regex.test(hash);\n}\n\nfunction base64ToArrayBuffer(base64Str) {\n    if (!base64Str) {\n        return { error: null };\n    }\n    try {\n        base64Str = base64Str.replace(\/-\/g, &quot;+&quot;).replace(\/_\/g, &quot;\/&quot;);\n        const decode = atob(base64Str);\n        const arryBuffer = Uint8Array.from(decode, (c) =&gt; c.charCodeAt(0));\n        return { earlyData: arryBuffer.buffer, error: null };\n    } catch (error) {\n        return { error };\n    }\n}\n\nlet WS_READY_STATE_OPEN = 1;\nlet WS_READY_STATE_CLOSING = 2;\n\nfunction safeCloseWebSocket(socket) {\n    try {\n        if (socket.readyState === WS_READY_STATE_OPEN || socket.readyState === WS_READY_STATE_CLOSING) {\n            socket.close();\n        }\n    } catch (error) {\n        console.error(&quot;safeCloseWebSocket error&quot;, error);\n    }\n}\nexport {\n    worker_default as\n    default\n};\n\/\/# sourceMappingURL=worker.js.map\n\n\/**\n * [js-sha256]{@link https:\/\/github.com\/emn178\/js-sha256}\n *\n * @version 0.11.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2014-2024\n * @license MIT\n *\/\n\/*jslint bitwise: true *\/\n(function () {\n    &#039;use strict&#039;;\n\n    var ERROR = &#039;input is invalid type&#039;;\n    var WINDOW = typeof window === &#039;object&#039;;\n    var root = WINDOW ? window : {};\n    if (root.JS_SHA256_NO_WINDOW) {\n      WINDOW = false;\n    }\n    var WEB_WORKER = !WINDOW &amp;&amp; typeof self === &#039;object&#039;;\n    var NODE_JS = !root.JS_SHA256_NO_NODE_JS &amp;&amp; typeof process === &#039;object&#039; &amp;&amp; process.versions &amp;&amp; process.versions.node;\n    if (NODE_JS) {\n      root = global;\n    } else if (WEB_WORKER) {\n      root = self;\n    }\n    var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS &amp;&amp; typeof module === &#039;object&#039; &amp;&amp; module.exports;\n    var AMD = typeof define === &#039;function&#039; &amp;&amp; define.amd;\n    var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER &amp;&amp; typeof ArrayBuffer !== &#039;undefined&#039;;\n    var HEX_CHARS = &#039;0123456789abcdef&#039;.split(&#039;&#039;);\n    var EXTRA = [-2147483648, 8388608, 32768, 128];\n    var SHIFT = [24, 16, 8, 0];\n    var K = [\n      0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n      0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n      0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n      0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n      0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n      0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n      0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n      0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n    ];\n    var OUTPUT_TYPES = [&#039;hex&#039;, &#039;array&#039;, &#039;digest&#039;, &#039;arrayBuffer&#039;];\n\n    var blocks = [];\n\n    if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\n      Array.isArray = function (obj) {\n        return Object.prototype.toString.call(obj) === &#039;[object Array]&#039;;\n      };\n    }\n\n    if (ARRAY_BUFFER &amp;&amp; (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n      ArrayBuffer.isView = function (obj) {\n        return typeof obj === &#039;object&#039; &amp;&amp; obj.buffer &amp;&amp; obj.buffer.constructor === ArrayBuffer;\n      };\n    }\n\n    var createOutputMethod = function (outputType, is224) {\n      return function (message) {\n        return new Sha256(is224, true).update(message)[outputType]();\n      };\n    };\n\n    var createMethod = function (is224) {\n      var method = createOutputMethod(&#039;hex&#039;, is224);\n      if (NODE_JS) {\n        method = nodeWrap(method, is224);\n      }\n      method.create = function () {\n        return new Sha256(is224);\n      };\n      method.update = function (message) {\n        return method.create().update(message);\n      };\n      for (var i = 0; i &lt; OUTPUT_TYPES.length; ++i) {\n        var type = OUTPUT_TYPES[i];\n        method[type] = createOutputMethod(type, is224);\n      }\n      return method;\n    };\n\n    var nodeWrap = function (method, is224) {\n      var crypto = require(&#039;crypto&#039;)\n      var Buffer = require(&#039;buffer&#039;).Buffer;\n      var algorithm = is224 ? &#039;sha224&#039; : &#039;sha256&#039;;\n      var bufferFrom;\n      if (Buffer.from &amp;&amp; !root.JS_SHA256_NO_BUFFER_FROM) {\n        bufferFrom = Buffer.from;\n      } else {\n        bufferFrom = function (message) {\n          return new Buffer(message);\n        };\n      }\n      var nodeMethod = function (message) {\n        if (typeof message === &#039;string&#039;) {\n          return crypto.createHash(algorithm).update(message, &#039;utf8&#039;).digest(&#039;hex&#039;);\n        } else {\n          if (message === null || message === undefined) {\n            throw new Error(ERROR);\n          } else if (message.constructor === ArrayBuffer) {\n            message = new Uint8Array(message);\n          }\n        }\n        if (Array.isArray(message) || ArrayBuffer.isView(message) ||\n          message.constructor === Buffer) {\n          return crypto.createHash(algorithm).update(bufferFrom(message)).digest(&#039;hex&#039;);\n        } else {\n          return method(message);\n        }\n      };\n      return nodeMethod;\n    };\n\n    var createHmacOutputMethod = function (outputType, is224) {\n      return function (key, message) {\n        return new HmacSha256(key, is224, true).update(message)[outputType]();\n      };\n    };\n\n    var createHmacMethod = function (is224) {\n      var method = createHmacOutputMethod(&#039;hex&#039;, is224);\n      method.create = function (key) {\n        return new HmacSha256(key, is224);\n      };\n      method.update = function (key, message) {\n        return method.create(key).update(message);\n      };\n      for (var i = 0; i &lt; OUTPUT_TYPES.length; ++i) {\n        var type = OUTPUT_TYPES[i];\n        method[type] = createHmacOutputMethod(type, is224);\n      }\n      return method;\n    };\n\n    function Sha256(is224, sharedMemory) {\n      if (sharedMemory) {\n        blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n          blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n          blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n          blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n        this.blocks = blocks;\n      } else {\n        this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n      }\n\n      if (is224) {\n        this.h0 = 0xc1059ed8;\n        this.h1 = 0x367cd507;\n        this.h2 = 0x3070dd17;\n        this.h3 = 0xf70e5939;\n        this.h4 = 0xffc00b31;\n        this.h5 = 0x68581511;\n        this.h6 = 0x64f98fa7;\n        this.h7 = 0xbefa4fa4;\n      } else { \/\/ 256\n        this.h0 = 0x6a09e667;\n        this.h1 = 0xbb67ae85;\n        this.h2 = 0x3c6ef372;\n        this.h3 = 0xa54ff53a;\n        this.h4 = 0x510e527f;\n        this.h5 = 0x9b05688c;\n        this.h6 = 0x1f83d9ab;\n        this.h7 = 0x5be0cd19;\n      }\n\n      this.block = this.start = this.bytes = this.hBytes = 0;\n      this.finalized = this.hashed = false;\n      this.first = true;\n      this.is224 = is224;\n    }\n\n    Sha256.prototype.update = function (message) {\n      if (this.finalized) {\n        return;\n      }\n      var notString, type = typeof message;\n      if (type !== &#039;string&#039;) {\n        if (type === &#039;object&#039;) {\n          if (message === null) {\n            throw new Error(ERROR);\n          } else if (ARRAY_BUFFER &amp;&amp; message.constructor === ArrayBuffer) {\n            message = new Uint8Array(message);\n          } else if (!Array.isArray(message)) {\n            if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n              throw new Error(ERROR);\n            }\n          }\n        } else {\n          throw new Error(ERROR);\n        }\n        notString = true;\n      }\n      var code, index = 0, i, length = message.length, blocks = this.blocks;\n      while (index &lt; length) {\n        if (this.hashed) {\n          this.hashed = false;\n          blocks[0] = this.block;\n          this.block = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n            blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n            blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n            blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n        }\n\n        if (notString) {\n          for (i = this.start; index &lt; length &amp;&amp; i &lt; 64; ++index) {\n            blocks[i &gt;&gt;&gt; 2] |= message[index] &lt;&lt; SHIFT[i++ &amp; 3];\n          }\n        } else {\n          for (i = this.start; index &lt; length &amp;&amp; i &lt; 64; ++index) {\n            code = message.charCodeAt(index);\n            if (code &lt; 0x80) {\n              blocks[i &gt;&gt;&gt; 2] |= code &lt;&lt; SHIFT[i++ &amp; 3];\n            } else if (code &lt; 0x800) {\n              blocks[i &gt;&gt;&gt; 2] |= (0xc0 | (code &gt;&gt;&gt; 6)) &lt;&lt; SHIFT[i++ &amp; 3];\n              blocks[i &gt;&gt;&gt; 2] |= (0x80 | (code &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];\n            } else if (code &lt; 0xd800 || code &gt;= 0xe000) {\n              blocks[i &gt;&gt;&gt; 2] |= (0xe0 | (code &gt;&gt;&gt; 12)) &lt;&lt; SHIFT[i++ &amp; 3];\n              blocks[i &gt;&gt;&gt; 2] |= (0x80 | ((code &gt;&gt;&gt; 6) &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];\n              blocks[i &gt;&gt;&gt; 2] |= (0x80 | (code &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];\n            } else {\n              code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (message.charCodeAt(++index) &amp; 0x3ff));\n              blocks[i &gt;&gt;&gt; 2] |= (0xf0 | (code &gt;&gt;&gt; 18)) &lt;&lt; SHIFT[i++ &amp; 3];\n              blocks[i &gt;&gt;&gt; 2] |= (0x80 | ((code &gt;&gt;&gt; 12) &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];\n              blocks[i &gt;&gt;&gt; 2] |= (0x80 | ((code &gt;&gt;&gt; 6) &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];\n              blocks[i &gt;&gt;&gt; 2] |= (0x80 | (code &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];\n            }\n          }\n        }\n\n        this.lastByteIndex = i;\n        this.bytes += i - this.start;\n        if (i &gt;= 64) {\n          this.block = blocks[16];\n          this.start = i - 64;\n          this.hash();\n          this.hashed = true;\n        } else {\n          this.start = i;\n        }\n      }\n      if (this.bytes &gt; 4294967295) {\n        this.hBytes += this.bytes \/ 4294967296 &lt;&lt; 0;\n        this.bytes = this.bytes % 4294967296;\n      }\n      return this;\n    };\n\n    Sha256.prototype.finalize = function () {\n      if (this.finalized) {\n        return;\n      }\n      this.finalized = true;\n      var blocks = this.blocks, i = this.lastByteIndex;\n      blocks[16] = this.block;\n      blocks[i &gt;&gt;&gt; 2] |= EXTRA[i &amp; 3];\n      this.block = blocks[16];\n      if (i &gt;= 56) {\n        if (!this.hashed) {\n          this.hash();\n        }\n        blocks[0] = this.block;\n        blocks[16] = blocks[1] = blocks[2] = blocks[3] =\n          blocks[4] = blocks[5] = blocks[6] = blocks[7] =\n          blocks[8] = blocks[9] = blocks[10] = blocks[11] =\n          blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\n      }\n      blocks[14] = this.hBytes &lt;&lt; 3 | this.bytes &gt;&gt;&gt; 29;\n      blocks[15] = this.bytes &lt;&lt; 3;\n      this.hash();\n    };\n\n    Sha256.prototype.hash = function () {\n      var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6,\n        h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\n\n      for (j = 16; j &lt; 64; ++j) {\n        \/\/ rightrotate\n        t1 = blocks[j - 15];\n        s0 = ((t1 &gt;&gt;&gt; 7) | (t1 &lt;&lt; 25)) ^ ((t1 &gt;&gt;&gt; 18) | (t1 &lt;&lt; 14)) ^ (t1 &gt;&gt;&gt; 3);\n        t1 = blocks[j - 2];\n        s1 = ((t1 &gt;&gt;&gt; 17) | (t1 &lt;&lt; 15)) ^ ((t1 &gt;&gt;&gt; 19) | (t1 &lt;&lt; 13)) ^ (t1 &gt;&gt;&gt; 10);\n        blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 &lt;&lt; 0;\n      }\n\n      bc = b &amp; c;\n      for (j = 0; j &lt; 64; j += 4) {\n        if (this.first) {\n          if (this.is224) {\n            ab = 300032;\n            t1 = blocks[0] - 1413257819;\n            h = t1 - 150054599 &lt;&lt; 0;\n            d = t1 + 24177077 &lt;&lt; 0;\n          } else {\n            ab = 704751109;\n            t1 = blocks[0] - 210244248;\n            h = t1 - 1521486534 &lt;&lt; 0;\n            d = t1 + 143694565 &lt;&lt; 0;\n          }\n          this.first = false;\n        } else {\n          s0 = ((a &gt;&gt;&gt; 2) | (a &lt;&lt; 30)) ^ ((a &gt;&gt;&gt; 13) | (a &lt;&lt; 19)) ^ ((a &gt;&gt;&gt; 22) | (a &lt;&lt; 10));\n          s1 = ((e &gt;&gt;&gt; 6) | (e &lt;&lt; 26)) ^ ((e &gt;&gt;&gt; 11) | (e &lt;&lt; 21)) ^ ((e &gt;&gt;&gt; 25) | (e &lt;&lt; 7));\n          ab = a &amp; b;\n          maj = ab ^ (a &amp; c) ^ bc;\n          ch = (e &amp; f) ^ (~e &amp; g);\n          t1 = h + s1 + ch + K[j] + blocks[j];\n          t2 = s0 + maj;\n          h = d + t1 &lt;&lt; 0;\n          d = t1 + t2 &lt;&lt; 0;\n        }\n        s0 = ((d &gt;&gt;&gt; 2) | (d &lt;&lt; 30)) ^ ((d &gt;&gt;&gt; 13) | (d &lt;&lt; 19)) ^ ((d &gt;&gt;&gt; 22) | (d &lt;&lt; 10));\n        s1 = ((h &gt;&gt;&gt; 6) | (h &lt;&lt; 26)) ^ ((h &gt;&gt;&gt; 11) | (h &lt;&lt; 21)) ^ ((h &gt;&gt;&gt; 25) | (h &lt;&lt; 7));\n        da = d &amp; a;\n        maj = da ^ (d &amp; b) ^ ab;\n        ch = (h &amp; e) ^ (~h &amp; f);\n        t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\n        t2 = s0 + maj;\n        g = c + t1 &lt;&lt; 0;\n        c = t1 + t2 &lt;&lt; 0;\n        s0 = ((c &gt;&gt;&gt; 2) | (c &lt;&lt; 30)) ^ ((c &gt;&gt;&gt; 13) | (c &lt;&lt; 19)) ^ ((c &gt;&gt;&gt; 22) | (c &lt;&lt; 10));\n        s1 = ((g &gt;&gt;&gt; 6) | (g &lt;&lt; 26)) ^ ((g &gt;&gt;&gt; 11) | (g &lt;&lt; 21)) ^ ((g &gt;&gt;&gt; 25) | (g &lt;&lt; 7));\n        cd = c &amp; d;\n        maj = cd ^ (c &amp; a) ^ da;\n        ch = (g &amp; h) ^ (~g &amp; e);\n        t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\n        t2 = s0 + maj;\n        f = b + t1 &lt;&lt; 0;\n        b = t1 + t2 &lt;&lt; 0;\n        s0 = ((b &gt;&gt;&gt; 2) | (b &lt;&lt; 30)) ^ ((b &gt;&gt;&gt; 13) | (b &lt;&lt; 19)) ^ ((b &gt;&gt;&gt; 22) | (b &lt;&lt; 10));\n        s1 = ((f &gt;&gt;&gt; 6) | (f &lt;&lt; 26)) ^ ((f &gt;&gt;&gt; 11) | (f &lt;&lt; 21)) ^ ((f &gt;&gt;&gt; 25) | (f &lt;&lt; 7));\n        bc = b &amp; c;\n        maj = bc ^ (b &amp; d) ^ cd;\n        ch = (f &amp; g) ^ (~f &amp; h);\n        t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\n        t2 = s0 + maj;\n        e = a + t1 &lt;&lt; 0;\n        a = t1 + t2 &lt;&lt; 0;\n        this.chromeBugWorkAround = true;\n      }\n\n      this.h0 = this.h0 + a &lt;&lt; 0;\n      this.h1 = this.h1 + b &lt;&lt; 0;\n      this.h2 = this.h2 + c &lt;&lt; 0;\n      this.h3 = this.h3 + d &lt;&lt; 0;\n      this.h4 = this.h4 + e &lt;&lt; 0;\n      this.h5 = this.h5 + f &lt;&lt; 0;\n      this.h6 = this.h6 + g &lt;&lt; 0;\n      this.h7 = this.h7 + h &lt;&lt; 0;\n    };\n\n    Sha256.prototype.hex = function () {\n      this.finalize();\n\n      var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n        h6 = this.h6, h7 = this.h7;\n\n      var hex = HEX_CHARS[(h0 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h0 &gt;&gt;&gt; 24) &amp; 0x0F] +\n        HEX_CHARS[(h0 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h0 &gt;&gt;&gt; 16) &amp; 0x0F] +\n        HEX_CHARS[(h0 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h0 &gt;&gt;&gt; 8) &amp; 0x0F] +\n        HEX_CHARS[(h0 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h0 &amp; 0x0F] +\n        HEX_CHARS[(h1 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h1 &gt;&gt;&gt; 24) &amp; 0x0F] +\n        HEX_CHARS[(h1 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h1 &gt;&gt;&gt; 16) &amp; 0x0F] +\n        HEX_CHARS[(h1 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h1 &gt;&gt;&gt; 8) &amp; 0x0F] +\n        HEX_CHARS[(h1 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h1 &amp; 0x0F] +\n        HEX_CHARS[(h2 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h2 &gt;&gt;&gt; 24) &amp; 0x0F] +\n        HEX_CHARS[(h2 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h2 &gt;&gt;&gt; 16) &amp; 0x0F] +\n        HEX_CHARS[(h2 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h2 &gt;&gt;&gt; 8) &amp; 0x0F] +\n        HEX_CHARS[(h2 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h2 &amp; 0x0F] +\n        HEX_CHARS[(h3 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h3 &gt;&gt;&gt; 24) &amp; 0x0F] +\n        HEX_CHARS[(h3 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h3 &gt;&gt;&gt; 16) &amp; 0x0F] +\n        HEX_CHARS[(h3 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h3 &gt;&gt;&gt; 8) &amp; 0x0F] +\n        HEX_CHARS[(h3 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h3 &amp; 0x0F] +\n        HEX_CHARS[(h4 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h4 &gt;&gt;&gt; 24) &amp; 0x0F] +\n        HEX_CHARS[(h4 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h4 &gt;&gt;&gt; 16) &amp; 0x0F] +\n        HEX_CHARS[(h4 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h4 &gt;&gt;&gt; 8) &amp; 0x0F] +\n        HEX_CHARS[(h4 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h4 &amp; 0x0F] +\n        HEX_CHARS[(h5 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h5 &gt;&gt;&gt; 24) &amp; 0x0F] +\n        HEX_CHARS[(h5 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h5 &gt;&gt;&gt; 16) &amp; 0x0F] +\n        HEX_CHARS[(h5 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h5 &gt;&gt;&gt; 8) &amp; 0x0F] +\n        HEX_CHARS[(h5 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h5 &amp; 0x0F] +\n        HEX_CHARS[(h6 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h6 &gt;&gt;&gt; 24) &amp; 0x0F] +\n        HEX_CHARS[(h6 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h6 &gt;&gt;&gt; 16) &amp; 0x0F] +\n        HEX_CHARS[(h6 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h6 &gt;&gt;&gt; 8) &amp; 0x0F] +\n        HEX_CHARS[(h6 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h6 &amp; 0x0F];\n      if (!this.is224) {\n        hex += HEX_CHARS[(h7 &gt;&gt;&gt; 28) &amp; 0x0F] + HEX_CHARS[(h7 &gt;&gt;&gt; 24) &amp; 0x0F] +\n          HEX_CHARS[(h7 &gt;&gt;&gt; 20) &amp; 0x0F] + HEX_CHARS[(h7 &gt;&gt;&gt; 16) &amp; 0x0F] +\n          HEX_CHARS[(h7 &gt;&gt;&gt; 12) &amp; 0x0F] + HEX_CHARS[(h7 &gt;&gt;&gt; 8) &amp; 0x0F] +\n          HEX_CHARS[(h7 &gt;&gt;&gt; 4) &amp; 0x0F] + HEX_CHARS[h7 &amp; 0x0F];\n      }\n      return hex;\n    };\n\n    Sha256.prototype.toString = Sha256.prototype.hex;\n\n    Sha256.prototype.digest = function () {\n      this.finalize();\n\n      var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5,\n        h6 = this.h6, h7 = this.h7;\n\n      var arr = [\n        (h0 &gt;&gt;&gt; 24) &amp; 0xFF, (h0 &gt;&gt;&gt; 16) &amp; 0xFF, (h0 &gt;&gt;&gt; 8) &amp; 0xFF, h0 &amp; 0xFF,\n        (h1 &gt;&gt;&gt; 24) &amp; 0xFF, (h1 &gt;&gt;&gt; 16) &amp; 0xFF, (h1 &gt;&gt;&gt; 8) &amp; 0xFF, h1 &amp; 0xFF,\n        (h2 &gt;&gt;&gt; 24) &amp; 0xFF, (h2 &gt;&gt;&gt; 16) &amp; 0xFF, (h2 &gt;&gt;&gt; 8) &amp; 0xFF, h2 &amp; 0xFF,\n        (h3 &gt;&gt;&gt; 24) &amp; 0xFF, (h3 &gt;&gt;&gt; 16) &amp; 0xFF, (h3 &gt;&gt;&gt; 8) &amp; 0xFF, h3 &amp; 0xFF,\n        (h4 &gt;&gt;&gt; 24) &amp; 0xFF, (h4 &gt;&gt;&gt; 16) &amp; 0xFF, (h4 &gt;&gt;&gt; 8) &amp; 0xFF, h4 &amp; 0xFF,\n        (h5 &gt;&gt;&gt; 24) &amp; 0xFF, (h5 &gt;&gt;&gt; 16) &amp; 0xFF, (h5 &gt;&gt;&gt; 8) &amp; 0xFF, h5 &amp; 0xFF,\n        (h6 &gt;&gt;&gt; 24) &amp; 0xFF, (h6 &gt;&gt;&gt; 16) &amp; 0xFF, (h6 &gt;&gt;&gt; 8) &amp; 0xFF, h6 &amp; 0xFF\n      ];\n      if (!this.is224) {\n        arr.push((h7 &gt;&gt;&gt; 24) &amp; 0xFF, (h7 &gt;&gt;&gt; 16) &amp; 0xFF, (h7 &gt;&gt;&gt; 8) &amp; 0xFF, h7 &amp; 0xFF);\n      }\n      return arr;\n    };\n\n    Sha256.prototype.array = Sha256.prototype.digest;\n\n    Sha256.prototype.arrayBuffer = function () {\n      this.finalize();\n\n      var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\n      var dataView = new DataView(buffer);\n      dataView.setUint32(0, this.h0);\n      dataView.setUint32(4, this.h1);\n      dataView.setUint32(8, this.h2);\n      dataView.setUint32(12, this.h3);\n      dataView.setUint32(16, this.h4);\n      dataView.setUint32(20, this.h5);\n      dataView.setUint32(24, this.h6);\n      if (!this.is224) {\n        dataView.setUint32(28, this.h7);\n      }\n      return buffer;\n    };\n\n    function HmacSha256(key, is224, sharedMemory) {\n      var i, type = typeof key;\n      if (type === &#039;string&#039;) {\n        var bytes = [], length = key.length, index = 0, code;\n        for (i = 0; i &lt; length; ++i) {\n          code = key.charCodeAt(i);\n          if (code &lt; 0x80) {\n            bytes[index++] = code;\n          } else if (code &lt; 0x800) {\n            bytes[index++] = (0xc0 | (code &gt;&gt;&gt; 6));\n            bytes[index++] = (0x80 | (code &amp; 0x3f));\n          } else if (code &lt; 0xd800 || code &gt;= 0xe000) {\n            bytes[index++] = (0xe0 | (code &gt;&gt;&gt; 12));\n            bytes[index++] = (0x80 | ((code &gt;&gt;&gt; 6) &amp; 0x3f));\n            bytes[index++] = (0x80 | (code &amp; 0x3f));\n          } else {\n            code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (key.charCodeAt(++i) &amp; 0x3ff));\n            bytes[index++] = (0xf0 | (code &gt;&gt;&gt; 18));\n            bytes[index++] = (0x80 | ((code &gt;&gt;&gt; 12) &amp; 0x3f));\n            bytes[index++] = (0x80 | ((code &gt;&gt;&gt; 6) &amp; 0x3f));\n            bytes[index++] = (0x80 | (code &amp; 0x3f));\n          }\n        }\n        key = bytes;\n      } else {\n        if (type === &#039;object&#039;) {\n          if (key === null) {\n            throw new Error(ERROR);\n          } else if (ARRAY_BUFFER &amp;&amp; key.constructor === ArrayBuffer) {\n            key = new Uint8Array(key);\n          } else if (!Array.isArray(key)) {\n            if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\n              throw new Error(ERROR);\n            }\n          }\n        } else {\n          throw new Error(ERROR);\n        }\n      }\n\n      if (key.length &gt; 64) {\n        key = (new Sha256(is224, true)).update(key).array();\n      }\n\n      var oKeyPad = [], iKeyPad = [];\n      for (i = 0; i &lt; 64; ++i) {\n        var b = key[i] || 0;\n        oKeyPad[i] = 0x5c ^ b;\n        iKeyPad[i] = 0x36 ^ b;\n      }\n\n      Sha256.call(this, is224, sharedMemory);\n\n      this.update(iKeyPad);\n      this.oKeyPad = oKeyPad;\n      this.inner = true;\n      this.sharedMemory = sharedMemory;\n    }\n    HmacSha256.prototype = new Sha256();\n\n    HmacSha256.prototype.finalize = function () {\n      Sha256.prototype.finalize.call(this);\n      if (this.inner) {\n        this.inner = false;\n        var innerHash = this.array();\n        Sha256.call(this, this.is224, this.sharedMemory);\n        this.update(this.oKeyPad);\n        this.update(innerHash);\n        Sha256.prototype.finalize.call(this);\n      }\n    };\n\n    var exports = createMethod();\n    exports.sha256 = exports;\n    exports.sha224 = createMethod(true);\n    exports.sha256.hmac = createHmacMethod();\n    exports.sha224.hmac = createHmacMethod(true);\n\n    if (COMMON_JS) {\n      module.exports = exports;\n    } else {\n      root.sha256 = exports.sha256;\n      root.sha224 = exports.sha224;\n      if (AMD) {\n        define(function () {\n          return exports;\n        });\n      }\n    }\n  })();<\/code><\/pre>\n<p>workers\u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf<br \/>\nPASSWORD:  \u8f93\u5165\u4f60\u7684\u5bc6\u7801\uff08\u968f\u610f\u8bbe\u7f6e\uff09<br \/>\nPROXYIP:       \u5982\u679c\u65e0\u57df\u540d\u65e0\u4f18\u9009ip\u53ef\u4ee5\u4e0d\u6dfb\u52a0\u8fd9\u4e2a\u53d8\u91cf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>trojan workers\u4ee3\u7801\uff1a https:\/\/github.com\/frankiejun\/cvwt\/bl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-376","post","type-post","status-publish","format-standard","hentry","category-15"],"_links":{"self":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts\/376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/comments?post=376"}],"version-history":[{"count":1,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts\/376\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/posts\/376\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/media?parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/categories?post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/my.di.cloudns.asia\/index.php\/wp-json\/wp\/v2\/tags?post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}