{"id":73,"date":"2026-11-02T12:00:23","date_gmt":"2026-11-02T20:00:23","guid":{"rendered":"\/?p=73"},"modified":"2026-11-02T12:00:23","modified_gmt":"2026-11-02T20:00:23","slug":"post-mvyqdq9x","status":"publish","type":"post","link":"https:\/\/www.woiov.cn\/?p=73","title":{"rendered":"\u4e00\u5904 === &#8216;vm&#8217;\uff0c\u8ba9\u65b0\u5957\u9910\u5f00\u4e86\u5355\u5374\u53ea\u53d1\u7801\u4e0d\u5efa\u673a"},"content":{"rendered":"<p>\u4e00\u5904 <code>=== 'vm'<\/code>\uff0c\u8ba9\u65b0\u5957\u9910\u5f00\u4e86\u5355\u5374\u53ea\u53d1\u7801\u4e0d\u5efa\u673a<\/p>\n<p>\u4e0a\u7ebf\u4e00\u4e2a\u65b0\u5957\u9910\u7c7b\u578b\uff0c\u6700\u7701\u4e8b\u7684\u505a\u6cd5\u662f\u5f80 <code>type<\/code> \u5b57\u6bb5\u91cc\u52a0\u4e00\u4e2a\u503c\u3002\u6211\u4eec\u52a0\u7684\u662f <code>bot<\/code>\u2014\u2014\u517b\u9c7c\u5957\u9910\uff0c\u5356\u7684\u662f\u300c\u5f00\u7bb1\u5373\u7528\u7684 AstrBot + NapCat \u5bb9\u5668\u300d\u3002\u52a0\u5b8c\u4e4b\u540e\u4e0b\u5355\uff0c\u65e5\u5fd7\u6f02\u4eae\u5f97\u5f88\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>\n[03:29:09] \u5f00\u59cb\u5f00\u901a\uff1a\u517b\u9c7c\u5957\u9910 1C2G\uff5c20G | AstrBot+QQ \u00a518\n[03:29:09] \u7ed1\u5b9a\u8bbe\u5907\u4ee3\u7801 \/ \u5199\u5165\u5f52\u5c5e \/ \u8bbe\u7f6e\u5230\u671f\u2026\n[03:29:09] \u751f\u6210\u8bbe\u5907\u4ee3\u7801\uff1a\u72f8\u82b1\u7f51\u7edc-NVBE3V\n[03:29:09] \u2705 \u5f00\u901a\u5b8c\u6210\n<\/code><\/pre>\n<p>\u56db\u4e2a\u52fe\u5168\u7eff\uff0c\u8ba2\u5355\u72b6\u6001 <code>active<\/code>\u3002\u7528\u6237\u624b\u91cc\u53ea\u6709\u4e00\u4e2a\u8bbe\u5907\u7801\uff0c\u673a\u5668\u4e00\u53f0\u6ca1\u6709\u3002<\/p>\n<h3>\u6839\u56e0\uff1a\u5206\u652f\u91cc\u7684 else \u662f\u7ed9\u8c01\u51c6\u5907\u7684<\/h3>\n<p>\u5f00\u901a\u6d41\u7a0b\u5927\u81f4\u957f\u8fd9\u6837\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>\nlet code = null\nif (plan.type === 'vless' &amp;&amp; D.takeStock) {\n  code = await D.takeStock({ deviceName, note, order, step })\n}\nif (!code) code = await addCode({ deviceName, note, issuedBy })   \/\/ \u6240\u6709\u7c7b\u578b\u90fd\u53d1\u7801\n\nlet vmid = ''\nif (plan.type === 'vm') {                                        \/\/ \u53ea\u6709 vm \u5efa\u5bb9\u5668\n  const mode = plan.vmMode || (String(plan.poolVmids || '').trim() ? 'pool' : 'create')\n  ...\n}\n<\/code><\/pre>\n<p>\u5199\u8fd9\u6bb5\u4ee3\u7801\u7684\u65f6\u5019\uff0c\u4e16\u754c\u4e0a\u53ea\u6709\u4e24\u79cd\u5957\u9910\uff1a<code>vm<\/code> \u548c <code>vless<\/code>\u3002\u6240\u4ee5\u300c\u4e0d\u662f vless \u5c31\u662f vm\u300d\u8fd9\u4e2a\u9690\u542b\u5047\u8bbe\u6210\u7acb\uff0c<code>=== 'vm'<\/code> \u5224\u65ad\u4e5f\u5c31\u591f\u7528\u4e86\u3002<\/p>\n<p>\u7b2c\u4e09\u79cd\u7c7b\u578b\u4e00\u8fdb\u6765\uff0c\u5b83\u65e2\u4e0d\u662f vless\uff0c\u4e5f\u4e0d\u662f vm\u3002\u4e8e\u662f\uff1a<\/p>\n<ul>\n<li>\u62ff\u4e0d\u5230\u5e93\u5b58\u94fe\u63a5\uff08\u7b2c\u4e00\u4e2a if \u4e0d\u6210\u7acb\uff09<\/li>\n<li>\u8d70\u4e86\u515c\u5e95\u7684 <code>addCode<\/code>\uff0c\u51ed\u7a7a\u751f\u6210\u4e00\u4e2a\u65b0\u7801<\/li>\n<li>\u5efa\u5bb9\u5668\u90a3\u4e00\u6bb5\u88ab\u8df3\u8fc7<\/li>\n<\/ul>\n<p><strong>\u5b83\u540c\u65f6\u6389\u8fdb\u4e86\u4e24\u4e2a\u5206\u652f\u7684\u7a7a\u9699<\/strong>\uff1a\u65e2\u6ca1\u8d70\u94fe\u63a5\u4ea4\u4ed8\uff0c\u4e5f\u6ca1\u8d70\u5bb9\u5668\u4ea4\u4ed8\uff0c\u6700\u540e\u6309\u94fe\u63a5\u7684\u5f62\u6001\u4ea4\u4ed8\u4e86\u4e00\u4e2a\u4e0d\u5b58\u5728\u7684\u8d44\u6e90\u3002<\/p>\n<h3>\u6bd4 bug \u66f4\u9ebb\u70e6\u7684\uff1a\u5e95\u5c42\u662f\u300c\u7801\u9a71\u52a8\u300d<\/h3>\n<p>\u518d\u5f80\u91cc\u770b\u4e00\u5c42\uff0c\u95ee\u9898\u4e0d\u5728\u90a3\u4e2a if\uff0c\u5728\u8ba2\u5355\u6a21\u578b\u3002<\/p>\n<p>\u8ba2\u5355\u7684\u4ea4\u4ed8\u7269\u4e00\u76f4\u662f <code>code<\/code>\u3002\u5f52\u5c5e\u3001\u5230\u671f\u3001\u7eed\u8d39\u3001\u9000\u8ba2\u3001\u540e\u53f0\u5217\u8868\u3001\u4f53\u68c0\u2014\u2014\u5168\u90fd\u6302\u5728\u7801\u4e0a\uff1a<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>\u73af\u8282<\/th>\n<th>\u4f9d\u8d56<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u5f52\u5c5e\u5199\u5165<\/td>\n<td><code>bindPayload(code.code, {...})<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u7eed\u8d39<\/td>\n<td>\u904d\u5386 <code>items[].code<\/code> \u6539 <code>expiresAt<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u9000\u6b3e<\/td>\n<td><code>bindPayload(it.code, { enabled: false })<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u540e\u53f0\u4f53\u68c0<\/td>\n<td><code>if (isContainerPlan(...) && !it.vmid)<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u300c\u6211\u7684\u670d\u52a1\u5668\u300d<\/td>\n<td>\u6309 <code>items[].code<\/code> \u53cd\u67e5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u5bb9\u5668\u53ea\u662f\u7801\u7684\u4e00\u4e2a\u9644\u5c5e\u5c5e\u6027\u3002\u6240\u4ee5\u54ea\u6015\u5bb9\u5668\u5efa\u51fa\u6765\u4e86\uff0c\u7528\u6237\u770b\u5230\u7684\u8fd8\u662f\u300c\u8bbe\u5907\u4ee3\u7801 \u72f8\u82b1\u7f51\u7edc-XXXX\u300d\uff0c\u800c\u4e0d\u662f\u300c\u4e00\u53f0 2 \u6838 2G \u7684\u673a\u5668\u300d\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u52a0\u4e00\u4e2a\u5bb9\u5668\u578b\u5957\u9910\u4f1a\u89c9\u5f97\u5904\u5904\u4e0d\u5bf9\u52b2\u2014\u2014\u4e0d\u662f\u65b0\u5957\u9910\u6709\u95ee\u9898\uff0c\u662f\u8fd9\u5c42\u6a21\u578b\u672c\u6765\u5c31\u662f\u4e3a\u5356\u94fe\u63a5\u8bbe\u8ba1\u7684\u3002<\/p>\n<h3>\u4fee\u6cd5\uff1a\u522b\u5224\u65ad\u300c\u662f\u4ec0\u4e48\u300d\uff0c\u5224\u65ad\u300c\u4e0d\u662f\u4ec0\u300d<\/h3>\n<p>\u5982\u679c\u7ee7\u7eed\u7528 <code>=== 'vm'<\/code>\uff0c\u6bcf\u52a0\u4e00\u79cd\u5bb9\u5668\u578b\u5957\u9910\u5c31\u8981\u6539\u4e00\u5904\u3001\u6f0f\u4e00\u5904\u3002\u6539\u6210\u53cd\u5411\u5224\u65ad\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>\n\/\/ \u5bb9\u5668\u578b\u5957\u9910\uff1a\u9664 vless \u5916\u90fd\u7b97\uff08vm \/ bot \/ \u4ee5\u540e\u7684\u5e94\u7528\u5957\u9910\uff09\nconst isContainerPlan = (t) =&gt; String(t || '') !== 'vless'\n<\/code><\/pre>\n<p>\u7136\u540e\u628a\u5168\u6587\u4ef6 6 \u5904 <code>planType === 'vm'<\/code> \/ <code>!== 'vm'<\/code> \u5168\u90e8\u66ff\u6362\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u5c06\u6765\u518d\u52a0 <code>wordpress<\/code>\u3001<code>gitlab<\/code>\u3001<code>mc<\/code> \u8fd9\u7c7b\u5957\u9910\uff0c\u4e0d\u6539\u8fd9\u884c\u5c31\u4e0d\u4f1a\u6f0f\u5efa\u5bb9\u5668\u3002<\/p>\n<p>\u914d\u5957\u8fd8\u6539\u4e86\u4e24\u5904\u6587\u6848\uff0c\u8ba9\u5bb9\u5668\u8ba2\u5355\u7684\u65e5\u5fd7\u4e0d\u518d\u51fa\u73b0\u300c\u8bbe\u5907\u4ee3\u7801\u300d\uff1a<\/p>\n<ul>\n<li>\u9636\u6bb5\u6807\u9898 \u2192 <code>\u5199\u5165\u5f52\u5c5e \/ \u8bbe\u7f6e\u5230\u671f\u2026<\/code><\/li>\n<li>\u7ed3\u5c3e \u2192 <code>\u5bb9\u5668\u4ea4\u4ed8\u5b8c\u6210\uff1a#401<\/code><\/li>\n<\/ul>\n<h3>\u540e\u7eed\u4e24\u4e2a\u8fde\u5750<\/h3>\n<p><strong>\u4e00\u3001\u5b57\u6bb5\u88ab PATCH \u62b9\u6389<\/strong><\/p>\n<p>\u5957\u9910\u52a0\u4e86 <code>botBootstrap: true<\/code> \u6807\u8bb0\u7528\u6765\u89e6\u53d1\u90e8\u7f72\u3002\u7ba1\u7406\u5458\u5728\u540e\u53f0\u70b9\u4e00\u6b21\u300c\u4fdd\u5b58\u300d\uff0cPATCH \u8bf7\u6c42\u53ea\u5e26\u56fa\u5b9a\u5b57\u6bb5\uff0c<code>botBootstrap<\/code> \u5c31\u88ab\u8986\u76d6\u6210 <code>null<\/code>\uff0c\u90e8\u7f72\u94a9\u5b50\u4ece\u6b64\u9759\u9ed8\u5931\u6548\u3002<\/p>\n<p>\u4fee\u6cd5\u4e24\u4ef6\uff1apayload \u91cc\u663e\u5f0f\u5e26\u4e0a <code>payload.botBootstrap = (type === 'bot') || (app === 'bot')<\/code>\uff1b\u540e\u7aef\u5224\u5b9a\u6539\u6210\u4e09\u91cd\u2014\u2014<code>botBootstrap || app === 'bot' || type === 'bot'<\/code>\u3002\u4efb\u4f55\u4e00\u6761\u6210\u7acb\u5c31\u90e8\u7f72\u3002<\/p>\n<p><strong>\u4e8c\u3001\u4e0b\u62c9\u6846\u91cc\u6ca1\u6709\u8fd9\u4e00\u9879<\/strong><\/p>\n<p>\u9884\u88c5\u5e94\u7528\u4e0b\u62c9\u53ea\u6709\u300c\u4e0d\u9884\u88c5 \/ WordPress \/ ddns-go\u300d\uff0c\u517b\u9c7c\u5957\u9910\u4fdd\u5b58\u540e\u4f1a\u88ab\u91cd\u7f6e\u6210\u300c\u4e0d\u9884\u88c5\u300d\u3002\u8865\u4e00\u9879 <code>bot<\/code>\uff0c\u5e76\u4e14\u9009\u4e2d\u903b\u8f91\u8981\u6392\u9664\u4e92\u65a5\uff1a<code>!p.app && !p.botBootstrap<\/code> \u624d\u8ba9\u300c\u4e0d\u9884\u88c5\u300d\u62ff\u9ed8\u8ba4\u6001\u3002<\/p>\n<h3>\u4e09\u6761\u53ef\u4ee5\u5e26\u8d70\u7684<\/h3>\n<p>1. <strong>\u65b0\u589e\u679a\u4e3e\u503c\uff0c\u5148 grep \u6240\u6709 <code>=== '\u65e7\u503c'<\/code><\/strong>\u3002\u6bcf\u4e00\u5904\u90fd\u662f\u5728\u5047\u8bbe\u300c\u96c6\u5408\u91cc\u53ea\u6709\u8fd9\u51e0\u4e2a\u300d\u3002<\/p>\n<p>2. <strong>\u515c\u5e95\u5206\u652f\u6bd4\u62a5\u9519\u66f4\u5371\u9669<\/strong>\u3002<code>if (!code) code = await addCode()<\/code> \u6ca1\u6709\u4efb\u4f55\u9519\uff0c\u5b83\u53ea\u662f\u5b89\u9759\u5730\u628a\u4e00\u53f0\u4e0d\u5b58\u5728\u7684\u673a\u5668\u4ea4\u4ed8\u51fa\u53bb\u4e86\u3002\u5b81\u53ef\u629b 409\u3002<\/p>\n<p>3. <strong>\u65e5\u5fd7\u5168\u7eff\u4e0d\u7b49\u4e8e\u4ea4\u4ed8\u6b63\u786e<\/strong>\u3002\u56db\u4e2a step \u90fd\u6253\u52fe\u7684\u8ba2\u5355\uff0c\u53ef\u4ee5\u5b8c\u5168\u6ca1\u6709\u8d44\u6e90\u3002<\/p>\n<p>\u517b\u9c7c\u5957\u9910\u73b0\u5728\u8d70\u7684\u662f\u5bb9\u5668\u4ea4\u4ed8\uff1a\u9009\u8282\u70b9 \u2192 \u5206\u914d vmid \u2192 \u5efa\u5bb9\u5668 \u2192 \u521d\u59cb\u5316 \u2192 \u90e8\u7f72 AstrBot + NapCat \u2192 \u7ed1\u4e8c\u7ea7\u57df\u540d\u3002\u7801\u8fd8\u5728\u5e95\u5c42\uff0c\u4f5c\u4e3a\u5f52\u5c5e\u548c\u7eed\u8d39\u7684\u952e\uff0c\u754c\u9762\u4e0a\u4e0d\u518d\u9732\u9762\u3002<\/p>\n<p>\u8981\u5f7b\u5e95\u6e05\u6389\u5b83\uff0c\u5f97\u628a\u8ba2\u5355\u4ea4\u4ed8\u7269\u4ece\u300c\u7801\u300d\u6362\u6210\u300c\u8d44\u6e90\u300d\uff0c\u90a3\u662f\u53e6\u4e00\u6b21\u624b\u672f\u3002\u4e0d\u8fc7\u81f3\u5c11\u73b0\u5728\uff0c\u7528\u6237\u62ff\u5230\u7684\u662f\u673a\u5668\uff0c\u4e0d\u662f\u4e00\u4e32\u5b57\u7b26\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u5904 === &#8216;vm&#8217;\uff0c\u8ba9\u65b0\u5957\u9910\u5f00\u4e86\u5355\u5374\u53ea\u53d1\u7801\u4e0d\u5efa\u673a \u4e0a\u7ebf\u4e00\u4e2a\u65b0\u5957\u9910\u7c7b\u578b\uff0c\u6700\u7701\u4e8b\u7684\u505a\u6cd5\u662f\u5f80 type \u5b57\u6bb5\u91cc\u52a0\u4e00\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-73","post","type-post","status-publish","format-standard","hentry","category-cat-e68a80e69cafe697"],"_links":{"self":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=73"}],"version-history":[{"count":0,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}