{"id":73,"date":"2022-05-28T15:39:51","date_gmt":"2022-05-28T07:39:51","guid":{"rendered":"https:\/\/zoran.090702.xyz\/?p=73"},"modified":"2022-05-28T15:39:51","modified_gmt":"2022-05-28T07:39:51","slug":"%e3%80%90%e5%93%aa%e5%90%92%e7%9b%91%e6%8e%a7%e6%95%99%e7%a8%8b%e3%80%91%e5%ae%9d%e5%a1%94%e9%9d%a2%e6%9d%bf%e6%90%ad%e5%bb%ba%e5%93%aa%e5%90%92%e7%9b%91%e6%8e%a7%ef%bc%8c%e5%b9%b6%e6%8e%a8%e9%80%81","status":"publish","type":"post","link":"https:\/\/zoran.090702.xyz\/?p=73","title":{"rendered":"\u3010\u54ea\u5412\u76d1\u63a7\u6559\u7a0b\u3011\u5b9d\u5854\u9762\u677f\u642d\u5efa\u54ea\u5412\u76d1\u63a7\uff0c\u5e76\u63a8\u9001\u5230tgbot"},"content":{"rendered":"<h3>\u54ea\u5412\u76d1\u63a7<\/h3>\n<p>\u9879\u76ee\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/naiba\/nezha\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/naiba\/nezha<\/a><br \/>\n<a class=\"light-link\" href=\"https:\/\/www.idcfq.com\/usr\/uploads\/2022\/05\/1393797066.png\" data-fancybox=\"gallery\" data-type=\"image\" data-caption=\"neza-01.png\"><img decoding=\"async\" title=\"neza-01.png\" src=\"https:\/\/www.idcfq.com\/usr\/uploads\/2022\/05\/1393797066.png\" alt=\"neza-01.png\" \/><\/a><\/p>\n<h3>\u5b89\u88c5\u5b9d\u5854<\/h3>\n<p>\u5b9d\u5854\u5c31\u4e0d\u591a\u4ecb\u7ecd\u4e86\uff0c\u5982\u679c\u4e0d\u61c2\u8bf7\u81ea\u884c\u767e\u5ea6\u6216\u8c37\u6b4c<\/p>\n<p>\u4e00\u952e\u5b89\u88c5\u5b9d\u5854\uff1a<\/p>\n<pre><code class=\"hljs nginx\"><span class=\"hljs-attribute\">curl<\/span> -sSO http:\/\/download.bt.cn\/install\/install_panel.sh &amp;&amp; bash install_panel.sh\r\n<\/code><\/pre>\n<h3>\u89e3\u6790\u57df\u540d<\/h3>\n<p>\u51c6\u5907\u4e24\u4e2a\u57df\u540d\uff0c\u4e00\u4e2a\u7528\u4e8e\u54ea\u5412\u76d1\u63a7\u9762\u677f\uff08\u53ef\u4ee5\u5957<code>CDN<\/code>\uff0c\u6bd4\u5982<code>cf<\/code>\u7684\uff09\uff0c\u4e00\u4e2a\u7528\u4e8e\u9762\u677f\u548c\u88ab\u76d1\u63a7\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u901a\u4fe1\uff08\u4e0d\u53ef\u4ee5\u5957\u7528<code>CDN<\/code>\uff09<\/p>\n<p>\u4e3e\u4f8b\u5982\u4e0b\uff1a<\/p>\n<p>\u76d1\u63a7\u9762\u677f\u7528\u5230\u7684\uff1anz.idcfq.com\uff0c\u89e3\u6790\u5230\u9762\u677f\u670d\u52a1\u5668 \uff1b\u901a\u4fe1\u7528\u5230\u7684\uff1anzz.idcfq.com \uff0c\u89e3\u6790\u5230\u88ab\u76d1\u63a7\u7684\u5c0f\u9e21\uff0c\u5f53\u7136\u4e0d\u6253\u7b97\u7528\u57df\u540d\u8fdb\u884c\u8bbf\u95ee\uff0c\u76f4\u63a5\u7528<code>IP<\/code>\u4e5f\u884c\uff0c\u6309\u7167\u9879\u76ee\u6559\u7a0b\u5f88\u5feb\u4e5f\u80fd\u5b8c\u6210\u3002<\/p>\n<h3>\u521b\u5efaOauth2 \u5e94\u7528\uff0c\u4ee5\u4f9b\u6388\u6743<\/h3>\n<p>\u6ce8\u518c<code>github<\/code>\u8d26\u53f7\u6216\u8005<code>gitee<\/code>\u8d26\u53f7\uff0c\u5e76\u8bb0\u4e0b\u7528\u6237\u540d\uff08<code>username<\/code>\uff09\u5907\u7528\uff0c\u672c\u6559\u7a0b\u9009\u62e9GitHub\uff1a<a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/<\/a><\/p>\n<p>\u5728\u00a0<code>https:\/\/github.com\/settings\/developers<\/code>\u00a0\u521b\u5efa\u5e94\u7528<\/p>\n<p>\u586b\u5165\u9762\u677f\u57df\u540d\uff1a<\/p>\n<pre><code class=\"hljs cpp\">https:<span class=\"hljs-comment\">\/\/nz.idcfq.com<\/span>\r\nhttps:<span class=\"hljs-comment\">\/\/nzz.idcfq.com\/oauth2\/callback<\/span>\r\n<\/code><\/pre>\n<p>\u8bb0\u5f55\u4e0b<code>Client ID<\/code>\u548c<code>Client secrets<\/code>\uff0c\u5907\u7528<\/p>\n<h3>\u5b89\u88c5\u54ea\u5412\u76d1\u63a7\u9762\u677f<\/h3>\n<p>\u56fd\u5916\u673a<\/p>\n<pre><code class=\"hljs ruby\">curl -L <span class=\"hljs-symbol\">https:<\/span>\/<span class=\"hljs-regexp\">\/raw.githubusercontent.com\/naiba<\/span><span class=\"hljs-regexp\">\/nezha\/master<\/span><span class=\"hljs-regexp\">\/script\/install<\/span>.sh  -o nezha.sh &amp;&amp; chmod +x nezha.sh\r\nsudo .\/nezha.sh\r\n<\/code><\/pre>\n<p>\u56fd\u5185\u955c\u50cf\u52a0\u901f<\/p>\n<pre><code class=\"hljs nginx\"><span class=\"hljs-attribute\">curl<\/span> -L https:\/\/cdn.jsdelivr.net\/gh\/naiba\/nezha<span class=\"hljs-variable\">@master<\/span>\/script\/install.sh -o nezha.sh &amp;&amp; chmod +x nezha.sh\r\nCN=<span class=\"hljs-literal\">true<\/span> sudo .\/nezha.sh\r\n<\/code><\/pre>\n<p>\u9009\u62e9<code>1<\/code>\uff0c\u5b89\u88c5\u9762\u677f\u7aef\uff0c\u53c2\u6570\u914d\u7f6e\u4e00\u4e0b\uff1a<code>GitHub<\/code>\u7528\u6237\u540d\uff0c<code>Client ID<\/code>\u548c<code>Client secrets<\/code>\uff0c\u7aef\u53e3\u53ef\u4ee5\u9ed8\u8ba4\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5df1\u8bbe\u7f6e\uff0c\u6807\u9898\u968f\u610f\u652f\u6301\u4e2d\u6587\u3002<\/p>\n<h3>\u53cd\u4ee3\u54ea\u5412\u76d1\u63a7<\/h3>\n<p>\u9996\u5148\u767b\u9646\u5b9d\u5854\u9762\u677f\u5e76\u767b\u5f55\u8d26\u53f7\uff0c\u4e0d\u60f3\u767b\u5f55\u7684\u53ef\u4ee5\u7528\u4e0b\u9762\u7684\u4ee3\u7801\u8df3\u8fc7\u5b9d\u5854\u5f3a\u5236\u767b\u5f55\uff0c\u4e0d\u8fc7\uff0c\u5efa\u8bae\u767b\u5f55\u4e00\u4e0b\u5b9d\u5854\u8d26\u53f7\u3002<\/p>\n<pre><code class=\"hljs nginx\"><span class=\"hljs-attribute\">echo<\/span> <span class=\"hljs-string\">\"{\\\"uid\\\":1000,\\\"username\\\":\\\"admin\\\",\\\"serverid\\\":1}\"<\/span> &gt; \/www\/server\/panel\/data\/userInfo.json\r\n<\/code><\/pre>\n<p>\u7ed9\u54ea\u5412\u76d1\u63a7\u9762\u677f\u914d\u7f6e\u4e00\u4e0b<code>SSL<\/code>\u8bc1\u4e66\uff0c\u7f51\u7ad9\u8bbe\u7f6e\u91cc\u968f\u610f\u6dfb\u52a0\u4e00\u4e2a\u5411\u4ee3\u7406\uff0c\u7136\u540e\u4fee\u6539\u8fd9\u4e2a\u53cd\u5411\u4ee3\u7406\u7684\u914d\u7f6e\u6587\u4ef6\u4e3a\u4e0b\u9762\u7684\uff1a<\/p>\n<pre><code class=\"hljs nginx\"><span class=\"hljs-attribute\">location<\/span> \/\r\n{\r\n    <span class=\"hljs-attribute\">proxy_pass<\/span> http:\/\/127.0.0.1:8008;\r\n    <span class=\"hljs-attribute\">proxy_set_header<\/span> Host <span class=\"hljs-variable\">$host<\/span>;\r\n}\r\n<span class=\"hljs-attribute\">location<\/span> \/ws\r\n{\r\n    <span class=\"hljs-attribute\">proxy_pass<\/span> http:\/\/127.0.0.1:8008;\r\n    <span class=\"hljs-attribute\">proxy_http_version<\/span> <span class=\"hljs-number\">1<\/span>.<span class=\"hljs-number\">1<\/span>;\r\n    <span class=\"hljs-attribute\">proxy_set_header<\/span> Upgrade <span class=\"hljs-variable\">$http_upgrade<\/span>;\r\n    <span class=\"hljs-attribute\">proxy_set_header<\/span> Connection <span class=\"hljs-string\">\"Upgrade\"<\/span>;\r\n    <span class=\"hljs-attribute\">proxy_set_header<\/span> Host <span class=\"hljs-variable\">$host<\/span>;\r\n}\r\n<span class=\"hljs-attribute\">location<\/span> \/terminal\r\n{\r\n    <span class=\"hljs-attribute\">proxy_pass<\/span> http:\/\/127.0.0.1:8008;\r\n    <span class=\"hljs-attribute\">proxy_http_version<\/span> <span class=\"hljs-number\">1<\/span>.<span class=\"hljs-number\">1<\/span>;\r\n    <span class=\"hljs-attribute\">proxy_set_header<\/span> Upgrade <span class=\"hljs-variable\">$http_upgrade<\/span>;\r\n    <span class=\"hljs-attribute\">proxy_set_header<\/span> Connection <span class=\"hljs-string\">\"Upgrade\"<\/span>;\r\n    <span class=\"hljs-attribute\">proxy_set_header<\/span> Host <span class=\"hljs-variable\">$host<\/span>;\r\n}\r\n<\/code><\/pre>\n<h3>\u6dfb\u52a0\u88ab\u63a7\u7aef<\/h3>\n<p>\u4e0b\u9762\u5c31\u662f\u5728\u8981\u88ab\u76d1\u63a7\u7684\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u88ab\u63a7\u7aef\u4e86<\/p>\n<p>\u8bbf\u95ee nz.idcfq.com\uff0c\u6388\u6743<code>github<\/code>\u767b\u5f55\u54ea\u5412\u76d1\u63a7\u9762\u677f\uff0c\u7ba1\u7406\u540e\u53f0\uff0c\u6dfb\u52a0\u4e3b\u673a\uff0c\u6dfb\u52a0\u597d\u4e4b\u540e\u8bb0\u5f55\u4e00\u4e0b\u5bc6\u94a5\u5907\u7528\u3002<\/p>\n<p>\u56fd\u5916\u673a<\/p>\n<pre><code class=\"hljs ruby\">curl -L <span class=\"hljs-symbol\">https:<\/span>\/<span class=\"hljs-regexp\">\/raw.githubusercontent.com\/naiba<\/span><span class=\"hljs-regexp\">\/nezha\/master<\/span><span class=\"hljs-regexp\">\/script\/install<\/span>.sh  -o nezha.sh &amp;&amp; chmod +x nezha.sh\r\nsudo .\/nezha.sh\r\n<\/code><\/pre>\n<p>\u56fd\u5185\u955c\u50cf\u52a0\u901f<\/p>\n<pre><code class=\"hljs nginx\"><span class=\"hljs-attribute\">curl<\/span> -L https:\/\/cdn.jsdelivr.net\/gh\/naiba\/nezha<span class=\"hljs-variable\">@master<\/span>\/script\/install.sh -o nezha.sh &amp;&amp; chmod +x nezha.sh\r\nCN=<span class=\"hljs-literal\">true<\/span> sudo .\/nezha.sh\r\n<\/code><\/pre>\n<p>\u9009\u62e9<code>8<\/code>\uff0c\u5b89\u88c5\u88ab\u63a7\u7aef\uff0c\u6309\u8981\u6c42\u8f93\u5165\u914d\u7f6e\u547d\u4ee4\uff0c\u8bf7\u8f93\u5165\u4e00\u4e2a\u89e3\u6790\u5230\u9762\u677f\u6240\u5728<code>IP<\/code>\u7684\u57df\u540d\uff08\u4e0d\u53ef\u5957<code>CDN<\/code>\uff09 \u8f93\u5165\u7684\u5c31\u662f\u901a\u4fe1\u57df\u540d\u00a0<code>nzz.idcfq.com<\/code>\u00a0\uff0c\u914d\u7f6e\u9762\u677f\u7aef\u53e3\u548c\u5bc6\u94a5\u3002<\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u518d\u53bb\u54ea\u5412\u9762\u677f\u5c31\u80fd\u770b\u5230\u521a\u521a\u6dfb\u52a0\u7684\u5c0f\u9e21\u5df2\u7ecf\u4e0a\u7ebf\u4e86<\/p>\n<h3>\u914d\u7f6etgbot<\/h3>\n<p>\u54ea\u5412\u9762\u677f\uff0c\u9876\u90e8\u5bfc\u822a\u680f\uff0c\u70b9\u62a5\u8b66\uff0c\u6dfb\u52a0\u901a\u77e5\u65b9\u5f0f<\/p>\n<pre><code class=\"hljs ruby\"><span class=\"hljs-symbol\">https:<\/span>\/<span class=\"hljs-regexp\">\/api.telegram.org\/bot<\/span>XXXXXX\/sendMessage?chat_id=YYYYYY&amp;text=<span class=\"hljs-comment\">#NEZHA#<\/span>\r\n<\/code><\/pre>\n<p>\u53c2\u6570\u83b7\u53d6\u8bf4\u660e\uff1a<code>botXXXXXX<\/code>\u00a0\u4e2d\u7684\u00a0<code>XXXXXX<\/code>\u00a0\u662f\u5728\u00a0<code>telegram<\/code>\u00a0\u4e2d\u5173\u6ce8\u5b98\u65b9\u00a0<code>@Botfather<\/code>\u00a0\uff0c\u8f93\u5165<code>\/newbot<\/code>\u00a0\uff0c\u521b\u5efa\u65b0\u7684\u673a\u5668\u4eba\uff08<code>bot<\/code>\uff09\u65f6\uff0c\u4f1a\u63d0\u4f9b\u7684\u00a0<code>token<\/code>\uff08\u5728\u63d0\u793a\u00a0<code>Use this token to access the HTTP API<\/code>:\u540e\u9762\u4e00\u884c\uff09\u8fd9\u91cc\u00a0<code>'bot'<\/code>\u00a0\u4e09\u4e2a\u5b57\u6bcd\u4e0d\u53ef\u5c11\u3002\u521b\u5efa\u00a0<code>bot<\/code>\u00a0\u540e\uff0c\u9700\u8981\u5148\u5728\u00a0<code>telegram<\/code>\u00a0\u4e2d\u4e0e\u00a0<code>BOT<\/code>\u00a0\u8fdb\u884c\u5bf9\u8bdd\uff08\u968f\u4fbf\u53d1\u4e2a\u6d88\u606f\uff09\uff0c\u7136\u540e\u624d\u53ef\u7528\u00a0<code>API<\/code>\u00a0\u53d1\u9001\u6d88\u606f\u3002<code>YYYYYY<\/code>\u00a0\u662f\u00a0<code>telegram<\/code>\u00a0\u7528\u6237\u7684\u6570\u5b57\u00a0<code>ID<\/code>\u3002\u4e0e\u673a\u5668\u4eba<code>@userinfobot<\/code>\u00a0\u5bf9\u8bdd\u53ef\u83b7\u5f97\u3002<\/p>\n<p>\u7136\u540e\u6dfb\u52a0\uff0c\u62a5\u8b66\u89c4\u5219\uff0c\u4ee5\u4e0b\u8868\u793a\u5c0f\u9e21\u79bb\u7ebf<code>10s<\/code>\u540e\u5c31\u4f1a\u62a5\u8b66\u901a\u77e5\u5230<code>tgbot<\/code><\/p>\n<pre><code class=\"hljs json\">[{<span class=\"hljs-attr\">\"Type\"<\/span>:<span class=\"hljs-string\">\"offline\"<\/span>,<span class=\"hljs-attr\">\"Duration\"<\/span>:<span class=\"hljs-number\">10<\/span>}]\r\n<\/code><\/pre>\n<p>\u8be6\u7ec6\u7684\u62a5\u8b66\u89c4\u5219\u8bbe\u7f6e\u89c1\u4e0b\u65b9<\/p>\n<p>&nbsp;<\/p>\n<div class=\"panel panel-default\">\n<div class=\"panel-heading\" data-toggle=\"collapse\" data-target=\"#collapse-aff6d024899d4f1c62cb88e4b302212656\" aria-expanded=\"true\">\n<div class=\"accordion-toggle\">\u62a5\u8b66\u89c4\u5219\u8bf4\u660e<i class=\"pull-right fontello icon-fw fontello-angle-right\"><\/i><\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<h3>\u81ea\u5b9a\u4e49\u4e3b\u9898<\/h3>\n<p>\u8fd9\u4e00\u6b3e\u54ea\u5412\u76d1\u63a7\u900f\u660e\u4e3b\u9898\uff0c\u6bd4\u8f83\u597d\u770b\uff0c\u641c\u96c6\u81ea\u7f51\u7edc<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5\uff1a\u7528\u54ea\u5412\u7684\u9ed8\u8ba4\u4e3b\u9898\uff0c\u590d\u5236\u4e0b\u65b9\u4e3b\u9898\u4ee3\u7801\uff0c\u7c98\u8d34\u5230\u81ea\u5b9a\u4e49\u4ee3\u7801\u91cc\u9762\u4fdd\u5b58\u5373\u53ef<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u54ea\u5412\u76d1\u63a7 \u9879\u76ee\u5730\u5740\uff1ahttps:\/\/github.com\/naiba\/nezha \u5b89\u88c5\u5b9d\u5854 \u5b9d\u5854\u5c31\u4e0d\u591a\u4ecb\u7ecd\u4e86\uff0c&hellip; <a href=\"https:\/\/zoran.090702.xyz\/?p=73\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">\u3010\u54ea\u5412\u76d1\u63a7\u6559\u7a0b\u3011\u5b9d\u5854\u9762\u677f\u642d\u5efa\u54ea\u5412\u76d1\u63a7\uff0c\u5e76\u63a8\u9001\u5230tgbot<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-73","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=73"}],"version-history":[{"count":1,"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":74,"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions\/74"}],"wp:attachment":[{"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zoran.090702.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}