q78kgblog 1.0.4 → 2.0.0-1711191136897

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/404.html +10 -10
  2. package/BingSiteAuth.xml +3 -3
  3. package/about/index.html +14 -14
  4. package/archives/2022/06/index.html +11 -11
  5. package/archives/2022/index.html +11 -11
  6. package/archives/2023/02/index.html +11 -11
  7. package/archives/2023/04/index.html +11 -11
  8. package/archives/2023/05/index.html +11 -11
  9. package/archives/2023/08/index.html +11 -11
  10. package/archives/2023/09/index.html +11 -11
  11. package/archives/2023/index.html +11 -11
  12. package/archives/2024/01/index.html +11 -11
  13. package/archives/2024/02/index.html +11 -11
  14. package/archives/2024/index.html +11 -11
  15. package/archives/index.html +11 -11
  16. package/atom.xml +41 -41
  17. package/baidusitemap.xml +18 -18
  18. package/bangumis/index.html +16 -16
  19. package/bigpie/index.html +12 -12
  20. package/categories/Hello-World/index.html +11 -11
  21. package/categories/Hexo/index.html +11 -11
  22. package/categories/index.html +12 -12
  23. package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +11 -11
  24. package/categories//346/201/260/351/245/255/index.html +11 -11
  25. package/categories//347/264/240/346/235/220/index.html +11 -11
  26. package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +11 -11
  27. package/content.json +1 -1
  28. package/css/ariasakablog.css +1 -1
  29. package/css/iconfont.css +4 -4
  30. package/essay/index.html +10 -10
  31. package/fcircle/index.html +12 -12
  32. package/fontawesome/index.html +12 -12
  33. package/index.html +21 -21
  34. package/links/index.html +47 -20
  35. package/live2d-widget/LICENSE +674 -674
  36. package/live2d-widget/README.md +188 -188
  37. package/live2d-widget/autoload.js +63 -63
  38. package/live2d-widget/demo/demo.html +34 -34
  39. package/live2d-widget/demo/login.html +271 -271
  40. package/live2d-widget/live2d.min.js +1 -1
  41. package/live2d-widget/package.json +31 -31
  42. package/live2d-widget/rollup.config.js +38 -38
  43. package/live2d-widget/src/index.js +178 -178
  44. package/live2d-widget/src/message.js +22 -22
  45. package/live2d-widget/src/model.js +75 -75
  46. package/live2d-widget/src/tools.js +78 -78
  47. package/live2d-widget/src/utils.js +5 -5
  48. package/live2d-widget/src/waifu-tips.js +3 -3
  49. package/live2d-widget/waifu-tips.js +5 -5
  50. package/live2d-widget/waifu-tips.json +255 -255
  51. package/live2d-widget/waifu.css +310 -310
  52. package/noie.html +68 -68
  53. package/othersite/index.html +11 -11
  54. package/package.json +1 -1
  55. package/people.html +23 -23
  56. package/posts/164ef646/index.html +14 -14
  57. package/posts/228c2ef8/index.html +15 -15
  58. package/posts/4a17b156/index.html +14 -14
  59. package/posts/6f3c565b/index.html +14 -14
  60. package/posts/7da7c3f6/index.html +14 -14
  61. package/posts/a9a6c1fb/index.html +14 -14
  62. package/posts/c262e439/index.html +14 -14
  63. package/posts/c81531cf/index.html +14 -14
  64. package/posts/da2093a1/index.html +14 -14
  65. package/posts/e54f7476/index.html +14 -14
  66. package/projects.html +423 -423
  67. package/random.html +15 -17
  68. package/robots.txt +17 -17
  69. package/search.xml +10 -10
  70. package/sitemap.txt +15 -17
  71. package/sitemap.xml +79 -97
  72. package/sw.js +1 -1
  73. package/tags/AI/index.html +12 -12
  74. package/tags/Butterfly/index.html +12 -12
  75. package/tags/Cloudflare/index.html +12 -12
  76. package/tags/DiffSinger/index.html +12 -12
  77. package/tags/Hexo/index.html +12 -12
  78. package/tags/Next/index.html +12 -12
  79. package/tags/RAID/index.html +12 -12
  80. package/tags/VPS/index.html +12 -12
  81. package/tags/Vercel/index.html +12 -12
  82. package/tags/Workers/index.html +12 -12
  83. package/tags/hello-world/index.html +12 -12
  84. package/tags/index.html +12 -12
  85. package/tags//344/270/273/351/242/230/index.html +12 -12
  86. package/tags//344/272/221/346/234/215/345/212/241/345/231/250/index.html +12 -12
  87. package/tags//344/276/277/345/256/234/index.html +12 -12
  88. package/tags//345/206/231/344/275/234/index.html +12 -12
  89. package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +12 -12
  90. package/tags//345/255/246/344/271/240/index.html +12 -12
  91. package/tags//345/256/266/351/207/214/344/272/221/index.html +12 -12
  92. package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +12 -12
  93. package/tags//346/200/247/344/273/267/346/257/224/index.html +12 -12
  94. package/tags//346/212/230/350/205/276/index.html +12 -12
  95. package/tags//346/217/220/344/276/233/345/225/206/index.html +12 -12
  96. package/tags//346/227/245/345/270/270/index.html +12 -12
  97. package/tags//346/234/215/345/212/241/345/231/250/index.html +12 -12
  98. package/tags//346/265/252/346/275/256/index.html +12 -12
  99. package/tags//347/256/200/347/210/261/index.html +12 -12
  100. package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +12 -12
  101. package/tags//350/256/272/346/226/207/index.html +12 -12
  102. package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +12 -12
  103. package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +12 -12
  104. package/tags//351/207/221/345/217/245/index.html +12 -12
  105. package/tags//351/255/224/346/224/271/index.html +12 -12
  106. package/img-col/index.html +0 -802
@@ -6,8 +6,8 @@
6
6
  <meta property="og:description" content="事情起因 这两天,把我的某个网站的评论系统换成了twikoo,过了几天一看,因为网站访问量比较高(日2k+),vercel的云函数使用量直接爆炸 我这一想,嘶~这到时候vercel给我封了咋整。随即,我就开始查找相关负载均衡的资料。因为我之前完全没有做过这方面的功课,所以光是查资料就用了半天。瞎找半天,发现结果cloudflare支持基于dns的负载均衡方案,但是我定睛一看,只有A记录和AAA">
7
7
  <meta property="og:locale" content="zh_CN">
8
8
  <meta property="og:image" content="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg">
9
- <meta property="article:published_time" content="2023-09-16T16:00:00.000Z">
10
- <meta property="article:modified_time" content="2024-03-21T14:54:49.213Z">
9
+ <meta property="article:published_time" content="2023-09-17T00:00:00.000Z">
10
+ <meta property="article:modified_time" content="2024-03-23T10:50:21.947Z">
11
11
  <meta property="article:author" content="Q78KG">
12
12
  <meta property="article:tag" content="日常">
13
13
  <meta property="article:tag" content="Hexo">
@@ -17,7 +17,7 @@
17
17
  <meta property="article:tag" content="谷歌翻译">
18
18
  <meta property="article:tag" content="Workers">
19
19
  <meta name="twitter:card" content="summary">
20
- <meta name="twitter:image" content="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg"><link rel="shortcut icon" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar-60x60.png"><link rel="canonical" href="https://anjiurine.top/posts/6f3c565b/"><link rel="preconnect" href="//jsd.anjiurine.top"><link rel="preconnect" href="//static.cloudflareinsights.com"><link rel="preconnect" href="//cdn.dusays.com"><link rel="manifest" href="/manifest.json"><link rel="apple-touch-icon" sizes="180x180" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar.png"><link rel="icon" type="image/png" sizes="32x32" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar.png"><link rel="icon" type="image/png" sizes="16x16" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar.png"><link rel="mask-icon" href="/img/safari-pinned-tab.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://jsd.anjiurine.top/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://jsd.anjiurine.top/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://jsd.anjiurine.top/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script defer="defer" data-pjax="data-pjax" src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon="{&quot;token&quot;: &quot;87c9b7f9ab404af1a750443261226d3c&quot;}"></script><script>const GLOBAL_CONFIG = {
20
+ <meta name="twitter:image" content="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg"><link rel="shortcut icon" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar-60x60.png"><link rel="canonical" href="https://anjiurine.top/posts/6f3c565b/"><link rel="preconnect" href="//jsd.anjiurine.top"><link rel="preconnect" href="//static.cloudflareinsights.com"><link rel="preconnect" href="//cdn.dusays.com"><link rel="manifest" href="/manifest.json"><link rel="apple-touch-icon" sizes="180x180" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar.png"><link rel="icon" type="image/png" sizes="32x32" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar.png"><link rel="icon" type="image/png" sizes="16x16" href="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar.png"><link rel="mask-icon" href="/img/safari-pinned-tab.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://registry.npmmirror.com/@fortawesome/fontawesome-free/6/files/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://registry.npmmirror.com/node-snackbar/latest/files/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://registry.npmmirror.com/@fancyapps/ui/latest/files/dist/fancybox/fancybox.css" media="print" onload="this.media='all'"><script defer="defer" data-pjax="data-pjax" src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon="{&quot;token&quot;: &quot;87c9b7f9ab404af1a750443261226d3c&quot;}"></script><script>const GLOBAL_CONFIG = {
21
21
  root: '/',
22
22
  algolia: undefined,
23
23
  localSearch: {"path":"/search.xml","preload":true,"languages":{"hits_empty":"找不到您查询的内容:${query}"}},
@@ -46,8 +46,8 @@
46
46
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"top-right"},
47
47
  source: {
48
48
  justifiedGallery: {
49
- js: 'https://jsd.anjiurine.top/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
50
- css: 'https://jsd.anjiurine.top/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
49
+ js: 'https://registry.npmmirror.com/flickr-justified-gallery/2/files/dist/fjGallery.min.js',
50
+ css: 'https://registry.npmmirror.com/flickr-justified-gallery/2/files/dist/fjGallery.css'
51
51
  }
52
52
  },
53
53
  isPhotoFigcaption: false,
@@ -59,7 +59,7 @@
59
59
  isHome: false,
60
60
  isHighlightShrink: false,
61
61
  isToc: true,
62
- postUpdate: '2024-03-21 22:54:49'
62
+ postUpdate: '2024-03-23 10:50:21'
63
63
  }</script><noscript><style type="text/css">
64
64
  #nav {
65
65
  opacity: 1
@@ -168,7 +168,7 @@
168
168
  }
169
169
  detectApple()
170
170
  })(window)</script><link rel="stylesheet" type="text/css" href="https://registry.npmmirror.com/js-heo/latest/files/mainColor/heoMainColor.css"><link rel="stylesheet" type="text/css" href="https://registry.npmmirror.com/js-heo/latest/files/404/404.css"><script async="" data-pjax="" src="/js/jikewater.js"></script><script async="" data-pjax="" src="/js/jike.js"></script><link rel="stylesheet" type="text/css" href="/css/essay.css"><link rel="stylesheet" type="text/css" href="/css/404page.css"><script src="/live2d-widget/autoload.js"></script><link rel="stylesheet" href="/css/ariasakablog.css"><link id="css" rel="stylesheet" href="/css/stylessimple.css"><link rel="stylesheet" href="/css/iconfont.css"><style>#article-container h1:before, h2:before, h3:before, h4:before, h5:before, h6:before { -webkit-animation: avatar_turn_around 3s linear infinite; -moz-animation: avatar_turn_around 3s linear infinite; -o-animation: avatar_turn_around 3s linear infinite; -ms-animation: avatar_turn_around 3s linear infinite; animation: avatar_turn_around 3s linear infinite; }</style><style id="barragesColor"></style><style id="settingStyle"></style><style id="yjjs"></style><style id="themeColor"></style><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+SC"><link rel="stylesheet" href="https://jsd.anjiurine.top/gh/Zfour/Butterfly-card-history/baiduhistory/css/main.css"><link rel="stylesheet" href="/css/commentBarrage.css"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif+SC"><link rel="stylesheet" type="text/css" href="https://registry.npmmirror.com/node-snackbar/latest/files/dist/snackbar.min.css"><script>LA.init({id: "JnlSnWLD7XChjrlx",ck: "JnlSnWLD7XChjrlx"})</script><script>new LingQue.Monitor().init({id:"JnnW6bt2WtyehVan"});</script><script src="/swReg.js"></script></head><body><span id="fps"></span><style id="grays"></style><script src="https://registry.npmmirror.com/prefetch-page/latest/files/dist/prefetch.js"></script><script>addEventListener('DOMContentLoaded', function () {prefetch({ threshold: 25, delay: 3000, limit: 10 ,customs: ['search.xml']})});requestIdleCallback(function () {prefetch({ threshold: 25, delay: 3000, limit: 10,customs: ['search.xml']})})</script><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-card-history/baiduhistory/css/main.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/5.4.5/css/swiper.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://registry.npmmirror.com/hexo-butterfly-swiper-lyx/latest/files/lib/swiperstyle.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://registry.npmmirror.com/hexo-butterfly-tag-plugins-plus/latest/files/lib/assets/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://registry.npmmirror.com/hexo-butterfly-tag-plugins-plus/latest/files/lib/tag_plugins.css" media="defer" onload="this.media='all'"><script src="https://registry.npmmirror.com/hexo-butterfly-tag-plugins-plus/latest/files/lib/assets/carousel-touch.js"></script><!-- hexo injector head_end end --><meta name="generator" content="Hexo 7.0.0"><link rel="alternate" href="/atom.xml" title="梦溯·镜影" type="application/atom+xml">
171
- <div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><img src="/img/nyancat.gif" id="loadcat"></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><hr><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-newspaper"></i><span> 文章</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="fa-fw fa fa-paper-plane"></i><span> 随便逛逛</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-sitemap"></i><span> 本站</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fab fa-galactic-republic"></i><span> 朋友圈</span></a></li><li><a class="site-page child" href="/othersite/"><i class="fa-fw fa fa-tasks"></i><span> 分站</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-briefcase"></i><span> 工具</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://pixiv.anjiurine.top/"><i class="fa-fw fa fa-book"></i><span> Pixiv镜像站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://api.anjiurine.top/"><i class="fa-fw fa fa-cube"></i><span> 公共API</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-fw fas fa-address-card"></i><span> 我的</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/bangumis/"><i class="fa-fw fa-fw fas fa fa-film"></i><span> 追番</span></a></li><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-info-circle"></i><span> 关于我</span></a></li><li><a class="site-page child" href="/bigpie/"><i class="fa-fw fas fa-cheese"></i><span> 大饼</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fas fa-link"></i><span> 线路</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="https://anjiurine.top/"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://vercel.anjiurine.top/"><span> Vercel</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://github.anjiurine.top/"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://cf.anjiurine.top/"><span> Cloudflare</span></a></li></ul></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">梦溯·镜影</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-newspaper"></i><span> 文章</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="fa-fw fa fa-paper-plane"></i><span> 随便逛逛</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-sitemap"></i><span> 本站</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fab fa-galactic-republic"></i><span> 朋友圈</span></a></li><li><a class="site-page child" href="/othersite/"><i class="fa-fw fa fa-tasks"></i><span> 分站</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-briefcase"></i><span> 工具</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://pixiv.anjiurine.top/"><i class="fa-fw fa fa-book"></i><span> Pixiv镜像站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://api.anjiurine.top/"><i class="fa-fw fa fa-cube"></i><span> 公共API</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-fw fas fa-address-card"></i><span> 我的</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/bangumis/"><i class="fa-fw fa-fw fas fa fa-film"></i><span> 追番</span></a></li><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-info-circle"></i><span> 关于我</span></a></li><li><a class="site-page child" href="/bigpie/"><i class="fa-fw fas fa-cheese"></i><span> 大饼</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fas fa-link"></i><span> 线路</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="https://anjiurine.top/"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://vercel.anjiurine.top/"><span> Vercel</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://github.anjiurine.top/"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://cf.anjiurine.top/"><span> Cloudflare</span></a></li></ul></div></div><center id="name-container"><a id="page-name" href="javascript:rmf.scrollToTop()" rel="external nofollow noreferrer">PAGE_NAME</a></center></div><div id="toggleButtons"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><!--span=' '+_p('search.title')--></a></div><div id="randoms"><a class="site-page social-icon" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="fa fa-paper-plane"></i></a></div><div id="travellings"><a class="site-page social-icon" target="_blank" rel="noopener external nofollow noreferrer" href="https://travellings.link"><i class="fa fa-subway"></i></a></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-09-16T16:00:00.000Z" title="发表于 2023-09-17 00:00:00">2023-09-17</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-03-21T14:54:49.213Z" title="更新于 2024-03-21 22:54:49">2024-03-21</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E9%97%B2%E8%81%8A%E6%9D%82%E8%B0%88/">闲聊杂谈</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">497</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>1分钟</span></span><span class="post-meta-separator">|</span><span id="" data-flag-title="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="twikoo_visitors"></span></span><span class="post-meta-separator">|</span><span class="post-meta-commentcount"><i class="far fa-comments fa-fw post-meta-icon"></i><span class="post-meta-label">评论数:</span><a href="/posts/6f3c565b/#post-comment"><span id="twikoo-count"></span></a></span><span class="post-meta-separator">|&nbsp; <span class="post-meta-dianzan"><a class="dianzan" href="javascript:void(0)" rel="external nofollow noreferrer" onclick="dianzan()"><i class="fas fa-thumbs-up"></i></a><span class="post-meta-label"> 点赞:</span><span class="dianzan-count">0</span></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h2 id="事情起因"><a class="markdownIt-Anchor" href="#事情起因"></a> 事情起因</h2>
171
+ <div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><img src="/img/nyancat.gif" id="loadcat"></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><hr><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-newspaper"></i><span> 文章</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="fa-fw fa fa-paper-plane"></i><span> 随便逛逛</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-sitemap"></i><span> 本站</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fab fa-galactic-republic"></i><span> 朋友圈</span></a></li><li><a class="site-page child" href="/othersite/"><i class="fa-fw fa fa-tasks"></i><span> 分站</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-briefcase"></i><span> 工具</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://pixiv.anjiurine.top/"><i class="fa-fw fa fa-book"></i><span> Pixiv镜像站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://api.anjiurine.top/"><i class="fa-fw fa fa-cube"></i><span> 公共API</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-fw fas fa-address-card"></i><span> 我的</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/bangumis/"><i class="fa-fw fa-fw fas fa fa-film"></i><span> 追番</span></a></li><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-info-circle"></i><span> 关于我</span></a></li><li><a class="site-page child" href="/bigpie/"><i class="fa-fw fas fa-cheese"></i><span> 大饼</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fas fa-link"></i><span> 线路</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="https://anjiurine.top/"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://vercel.anjiurine.top/"><span> Vercel</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://github.anjiurine.top/"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://cf.anjiurine.top/"><span> Cloudflare</span></a></li></ul></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">梦溯·镜影</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fa fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-newspaper"></i><span> 文章</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="fa-fw fa fa-paper-plane"></i><span> 随便逛逛</span></a></li><li><a class="site-page child" href="/archives/"><i class="fa-fw fa fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-sitemap"></i><span> 本站</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/links/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fab fa-galactic-republic"></i><span> 朋友圈</span></a></li><li><a class="site-page child" href="/othersite/"><i class="fa-fw fa fa-tasks"></i><span> 分站</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa fa-briefcase"></i><span> 工具</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://pixiv.anjiurine.top/"><i class="fa-fw fa fa-book"></i><span> Pixiv镜像站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://api.anjiurine.top/"><i class="fa-fw fa fa-cube"></i><span> 公共API</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fa-fw fas fa-address-card"></i><span> 我的</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="/bangumis/"><i class="fa-fw fa-fw fas fa fa-film"></i><span> 追番</span></a></li><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-info-circle"></i><span> 关于我</span></a></li><li><a class="site-page child" href="/bigpie/"><i class="fa-fw fas fa-cheese"></i><span> 大饼</span></a></li></ul></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);" rel="external nofollow noreferrer"><i class="fa-fw fas fa-link"></i><span> 线路</span><!--i.fas.fa-chevron-down--></a><ul class="menus_item_child"><li><a class="site-page child" href="https://anjiurine.top/"><span> 主站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://vercel.anjiurine.top/"><span> Vercel</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://github.anjiurine.top/"><span> Github</span></a></li><li><a class="site-page child" target="_blank" rel="noopener external nofollow noreferrer" href="https://cf.anjiurine.top/"><span> Cloudflare</span></a></li></ul></div></div><center id="name-container"><a id="page-name" href="javascript:rmf.scrollToTop()" rel="external nofollow noreferrer">PAGE_NAME</a></center></div><div id="toggleButtons"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><!--span=' '+_p('search.title')--></a></div><div id="randoms"><a class="site-page social-icon" href="javascript:toRandomPost()" rel="external nofollow noreferrer"><i class="fa fa-paper-plane"></i></a></div><div id="travellings"><a class="site-page social-icon" target="_blank" rel="noopener external nofollow noreferrer" href="https://travellings.link"><i class="fa fa-subway"></i></a></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-09-17T00:00:00.000Z" title="发表于 2023-09-17 00:00:00">2023-09-17</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-03-23T10:50:21.947Z" title="更新于 2024-03-23 10:50:21">2024-03-23</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E9%97%B2%E8%81%8A%E6%9D%82%E8%B0%88/">闲聊杂谈</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">497</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>1分钟</span></span><span class="post-meta-separator">|</span><span id="" data-flag-title="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="twikoo_visitors"></span></span><span class="post-meta-separator">|</span><span class="post-meta-commentcount"><i class="far fa-comments fa-fw post-meta-icon"></i><span class="post-meta-label">评论数:</span><a href="/posts/6f3c565b/#post-comment"><span id="twikoo-count"></span></a></span><span class="post-meta-separator">|&nbsp; <span class="post-meta-dianzan"><a class="dianzan" href="javascript:void(0)" rel="external nofollow noreferrer" onclick="dianzan()"><i class="fas fa-thumbs-up"></i></a><span class="post-meta-label"> 点赞:</span><span class="dianzan-count">0</span></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h2 id="事情起因"><a class="markdownIt-Anchor" href="#事情起因"></a> 事情起因</h2>
172
172
  <p>这两天,把我的某个网站的评论系统换成了twikoo,过了几天一看,因为网站访问量比较高(日2k+),vercel的云函数使用量直接爆炸</p>
173
173
  <p><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/appendix/6f3c565b/1.png" alt=""><br>
174
174
  我这一想,嘶~这到时候vercel给我封了咋整。随即,我就开始查找相关负载均衡的资料。因为我之前完全没有做过这方面的功课,所以光是查资料就用了半天。瞎找半天,发现结果cloudflare支持基于dns的负载均衡方案,但是我定睛一看,只有A记录和AAAA记录支持,各种云函数平台基本上都是cname的,这可难办啊。</p>
@@ -179,7 +179,7 @@
179
179
  <h2 id="解决方案"><a class="markdownIt-Anchor" href="#解决方案"></a> 解决方案</h2>
180
180
  <p>于是乎,我当即就让一个朋友<del>(无中生友)</del>帮我写了Workers代码。这个代码能够将发送到Workers的流量根据权重分流到不同的url。(是的你没听错,它甚至支持配置权重!)</p>
181
181
  <p>下面是完整代码</p>
182
- <figure class="highlight js"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 要分流的url,支持添加多条url</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">TARGETS</span> = [<span class="string">"https://example1.com"</span>, <span class="string">"https://example2.com"</span>]</span><br><span class="line"><span class="comment">// url权重,数字一样就是对半分</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">WEIGHTS</span> = [<span class="number">5</span>, <span class="number">5</span>]</span><br><span class="line"></span><br><span class="line"><span class="keyword">async</span> <span class="keyword">function</span> <span class="title function_">handleRequest</span>(<span class="params">request</span>) {</span><br><span class="line"> <span class="keyword">let</span> random = <span class="title class_">Math</span>.<span class="title function_">random</span>()</span><br><span class="line"> <span class="keyword">let</span> sum = <span class="variable constant_">WEIGHTS</span>.<span class="title function_">reduce</span>(<span class="function">(<span class="params">a, b</span>) =&gt;</span> a + b, <span class="number">0</span>)</span><br><span class="line"> random = random * sum</span><br><span class="line"> <span class="keyword">let</span> target = <span class="literal">null</span></span><br><span class="line"> <span class="keyword">let</span> acc = <span class="number">0</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; <span class="variable constant_">TARGETS</span>.<span class="property">length</span>; i++) {</span><br><span class="line"> acc += <span class="variable constant_">WEIGHTS</span>[i]</span><br><span class="line"> <span class="keyword">if</span> (random &lt; acc) {</span><br><span class="line"> target = <span class="variable constant_">TARGETS</span>[i]</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"> <span class="keyword">let</span> url = <span class="keyword">new</span> <span class="title function_">URL</span>(request.<span class="property">url</span>)</span><br><span class="line"> <span class="keyword">let</span> targetUrl = <span class="keyword">new</span> <span class="title function_">URL</span>(target)</span><br><span class="line"> url.<span class="property">protocol</span> = targetUrl.<span class="property">protocol</span></span><br><span class="line"> url.<span class="property">hostname</span> = targetUrl.<span class="property">hostname</span></span><br><span class="line"> url.<span class="property">pathname</span> = targetUrl.<span class="property">pathname</span></span><br><span class="line"> url.<span class="property">search</span> = targetUrl.<span class="property">search</span></span><br><span class="line"> url.<span class="property">hash</span> = targetUrl.<span class="property">hash</span></span><br><span class="line"> <span class="keyword">let</span> newRequest = <span class="keyword">new</span> <span class="title class_">Request</span>(url, request)</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">await</span> <span class="title function_">fetch</span>(newRequest)</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="title function_">addEventListener</span>(<span class="string">"fetch"</span>, <span class="function"><span class="params">event</span> =&gt;</span> {</span><br><span class="line"> event.<span class="title function_">respondWith</span>(<span class="title function_">handleRequest</span>(event.<span class="property">request</span>))</span><br><span class="line">})</span><br><span class="line"></span><br></pre></td></tr></tbody></table></figure></article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://anjiurine.top/posts/6f3c565b/">https://anjiurine.top/posts/6f3c565b/</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info"><div class="post-copyright-a" style="display: inline-block;width: 120px"><h>作者</h><div class="post-copyright-cc-info"><h>Q78KG</h></div></div><div class="post-copyright-c" style="display: inline-block;width: 120px"><h>发布于</h><div class="post-copyright-cc-info"><h>2023-09-17</h></div></div><div class="post-copyright-u" style="display: inline-block;width: 120px"><h>更新于</h><div class="post-copyright-cc-info"><h>2024-03-21</h></div></div><div class="post-copyright-c" style="display: inline-block;width: 180px"><h>许可协议</h><div class="post-copyright-cc-info"><a class="icon" rel="noopener external nofollow noreferrer" target="_blank" title="Creative Commons" href="https://creativecommons.org/"><i class="fab fa-creative-commons"></i></a><a rel="noopener external nofollow noreferrer" target="_blank" title="CC BY-NC-SA 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E6%97%A5%E5%B8%B8/">日常</a><a class="post-meta__tags" href="/tags/Hexo/">Hexo</a><a class="post-meta__tags" href="/tags/Cloudflare/">Cloudflare</a><a class="post-meta__tags" href="/tags/Vercel/">Vercel</a><a class="post-meta__tags" href="/tags/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/">负载均衡</a><a class="post-meta__tags" href="/tags/%E8%B0%B7%E6%AD%8C%E7%BF%BB%E8%AF%91/">谷歌翻译</a><a class="post-meta__tags" href="/tags/Workers/">Workers</a></div><div class="post_share"><div class="social-share" data-image="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg" data-sites="wechat,weibo,qq"></div><link rel="stylesheet" href="https://jsd.anjiurine.top/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://jsd.anjiurine.top/gh/overtrue/share.js@master/dist/js/social-share.min.js" defer=""></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/e54f7476/"><img class="prev-cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/background7.jpg" onerror="onerror=null;src='https://api.vvhan.com/api/acgimg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">全国首款支持多环境开发的 CEC-IDE,卡脖子问题解决,国产崛起了?</div></div></a></div><div class="next-post pull-right"><a href="/posts/7da7c3f6/"><img class="next-cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/99654366_p0.jpg" onerror="onerror=null;src='https://api.vvhan.com/api/acgimg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/posts/c262e439/" title="2023年终总结"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/113398570_p0.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-01-01</div><div class="title">2023年终总结</div></div></a></div><div><a href="/posts/e54f7476/" title="全国首款支持多环境开发的 CEC-IDE,卡脖子问题解决,国产崛起了?"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/background7.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-08-25</div><div class="title">全国首款支持多环境开发的 CEC-IDE,卡脖子问题解决,国产崛起了?</div></div></a></div><div><a href="/posts/164ef646/" title="Next魔改记录"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/2761d84a-a699-423b-a03f-241235497d1d.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-04-18</div><div class="title">Next魔改记录</div></div></a></div><div><a href="/posts/c81531cf/" title="谷歌娘每日金句收集"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/background6.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-02-02</div><div class="title">谷歌娘每日金句收集</div></div></a></div></div></div><hr><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="fgx"><div class="avatar_img"><img style="border-radius:10px" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar-60x60.png" onerror="this.onerror=null;this.src='https://apis.yisous.xyz/api/randomAvatar'" alt="avatar"></div><div class="author-info__description">这是梦溯·镜影,会时不时发一些自己都没眼看的文章</div><div class="rights"><div class="author-info__name">Q78KG</div><div class="card-info-data site-data is-center"><a class="adiv" href="/archives/"><div class="headline">文章</div><div class="length-num">10</div></a><a class="adiv" href="/tags/"><div class="headline">标签</div><div class="length-num">32</div></a><a class="adiv" href="/categories/"><div class="headline">分类</div><div class="length-num">6</div></a></div></div></div><div class="card-info-social-icons"><a class="social-icon" href="https://github.com/Hoshino-Yumetsuki" rel="external nofollow noreferrer" target="_blank" title="Github"><i class="fab fa-github"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">本网站的Twikoo评论系统使用Cravatar头像系统,请自行绑定邮箱配置</div></div><div class="card-widget card-history"><div class="card-content"><div class="item-headline"><i class="fas fa-clock fa-spin"></i><span>那年今日</span></div><div id="history-baidu" style="height: 100px;overflow: hidden;"><div class="history_swiper-container" id="history-container" style="width: 100%;height: 100%;"><div class="swiper-wrapper" id="history_container_wrapper" style="height:20px"></div></div></div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BA%8B%E6%83%85%E8%B5%B7%E5%9B%A0"><span class="toc-number">1.</span> <span class="toc-text"> 事情起因</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%80%E7%BA%BF%E6%9B%99%E5%85%89"><span class="toc-number">2.</span> <span class="toc-text"> 一线曙光</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88"><span class="toc-number">3.</span> <span class="toc-text"> 解决方案</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/228c2ef8/" title="家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏"><img src="https://pximg.anjiurine.top/img-original/img/2020/02/24/00/00/10/79687052_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏"></a><div class="content"><a class="title" href="/posts/228c2ef8/" title="家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏">家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏</a><time datetime="2024-02-08T16:00:00.000Z" title="发表于 2024-02-09 00:00:00">2024-02-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/da2093a1/" title="2024,哪些服务器提供商的性价比高?"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/115799920_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="2024,哪些服务器提供商的性价比高?"></a><div class="content"><a class="title" href="/posts/da2093a1/" title="2024,哪些服务器提供商的性价比高?">2024,哪些服务器提供商的性价比高?</a><time datetime="2024-02-07T16:00:00.000Z" title="发表于 2024-02-08 00:00:00">2024-02-08</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/c262e439/" title="2023年终总结"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/113398570_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="2023年终总结"></a><div class="content"><a class="title" href="/posts/c262e439/" title="2023年终总结">2023年终总结</a><time datetime="2023-12-31T16:00:00.000Z" title="发表于 2024-01-01 00:00:00">2024-01-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/7da7c3f6/" title="这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/99654366_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next"></a><div class="content"><a class="title" href="/posts/7da7c3f6/" title="这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next">这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next</a><time datetime="2023-09-28T16:00:00.000Z" title="发表于 2023-09-29 00:00:00">2023-09-29</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/6f3c565b/" title="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡"></a><div class="content"><a class="title" href="/posts/6f3c565b/" title="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡">拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡</a><time datetime="2023-09-16T16:00:00.000Z" title="发表于 2023-09-17 00:00:00">2023-09-17</time></div></div></div></div><div class="card-widget card-weather" style="width:100%,height:270px"><div class="item-headline"><i class="fas fa-cloud-sun"></i><span>天气</span></div><div id="he-plugin-standard"></div><script>WIDGET = {
182
+ <figure class="highlight js"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 要分流的url,支持添加多条url</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">TARGETS</span> = [<span class="string">"https://example1.com"</span>, <span class="string">"https://example2.com"</span>]</span><br><span class="line"><span class="comment">// url权重,数字一样就是对半分</span></span><br><span class="line"><span class="keyword">const</span> <span class="variable constant_">WEIGHTS</span> = [<span class="number">5</span>, <span class="number">5</span>]</span><br><span class="line"></span><br><span class="line"><span class="keyword">async</span> <span class="keyword">function</span> <span class="title function_">handleRequest</span>(<span class="params">request</span>) {</span><br><span class="line"> <span class="keyword">let</span> random = <span class="title class_">Math</span>.<span class="title function_">random</span>()</span><br><span class="line"> <span class="keyword">let</span> sum = <span class="variable constant_">WEIGHTS</span>.<span class="title function_">reduce</span>(<span class="function">(<span class="params">a, b</span>) =&gt;</span> a + b, <span class="number">0</span>)</span><br><span class="line"> random = random * sum</span><br><span class="line"> <span class="keyword">let</span> target = <span class="literal">null</span></span><br><span class="line"> <span class="keyword">let</span> acc = <span class="number">0</span></span><br><span class="line"> <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; <span class="variable constant_">TARGETS</span>.<span class="property">length</span>; i++) {</span><br><span class="line"> acc += <span class="variable constant_">WEIGHTS</span>[i]</span><br><span class="line"> <span class="keyword">if</span> (random &lt; acc) {</span><br><span class="line"> target = <span class="variable constant_">TARGETS</span>[i]</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"> <span class="keyword">let</span> url = <span class="keyword">new</span> <span class="title function_">URL</span>(request.<span class="property">url</span>)</span><br><span class="line"> <span class="keyword">let</span> targetUrl = <span class="keyword">new</span> <span class="title function_">URL</span>(target)</span><br><span class="line"> url.<span class="property">protocol</span> = targetUrl.<span class="property">protocol</span></span><br><span class="line"> url.<span class="property">hostname</span> = targetUrl.<span class="property">hostname</span></span><br><span class="line"> url.<span class="property">pathname</span> = targetUrl.<span class="property">pathname</span></span><br><span class="line"> url.<span class="property">search</span> = targetUrl.<span class="property">search</span></span><br><span class="line"> url.<span class="property">hash</span> = targetUrl.<span class="property">hash</span></span><br><span class="line"> <span class="keyword">let</span> newRequest = <span class="keyword">new</span> <span class="title class_">Request</span>(url, request)</span><br><span class="line"> <span class="keyword">return</span> <span class="keyword">await</span> <span class="title function_">fetch</span>(newRequest)</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"><span class="title function_">addEventListener</span>(<span class="string">"fetch"</span>, <span class="function"><span class="params">event</span> =&gt;</span> {</span><br><span class="line"> event.<span class="title function_">respondWith</span>(<span class="title function_">handleRequest</span>(event.<span class="property">request</span>))</span><br><span class="line">})</span><br><span class="line"></span><br></pre></td></tr></tbody></table></figure></article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://anjiurine.top/posts/6f3c565b/">https://anjiurine.top/posts/6f3c565b/</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info"><div class="post-copyright-a" style="display: inline-block;width: 120px"><h>作者</h><div class="post-copyright-cc-info"><h>Q78KG</h></div></div><div class="post-copyright-c" style="display: inline-block;width: 120px"><h>发布于</h><div class="post-copyright-cc-info"><h>2023-09-17</h></div></div><div class="post-copyright-u" style="display: inline-block;width: 120px"><h>更新于</h><div class="post-copyright-cc-info"><h>2024-03-23</h></div></div><div class="post-copyright-c" style="display: inline-block;width: 180px"><h>许可协议</h><div class="post-copyright-cc-info"><a class="icon" rel="noopener external nofollow noreferrer" target="_blank" title="Creative Commons" href="https://creativecommons.org/"><i class="fab fa-creative-commons"></i></a><a rel="noopener external nofollow noreferrer" target="_blank" title="CC BY-NC-SA 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E6%97%A5%E5%B8%B8/">日常</a><a class="post-meta__tags" href="/tags/Hexo/">Hexo</a><a class="post-meta__tags" href="/tags/Cloudflare/">Cloudflare</a><a class="post-meta__tags" href="/tags/Vercel/">Vercel</a><a class="post-meta__tags" href="/tags/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/">负载均衡</a><a class="post-meta__tags" href="/tags/%E8%B0%B7%E6%AD%8C%E7%BF%BB%E8%AF%91/">谷歌翻译</a><a class="post-meta__tags" href="/tags/Workers/">Workers</a></div><div class="post_share"><div class="social-share" data-image="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg" data-sites="wechat,weibo,qq"></div><link rel="stylesheet" href="https://registry.npmmirror.com/social-share.js/latest/files/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://jsd.anjiurine.top/gh/overtrue/share.js@master/dist/js/social-share.min.js" defer=""></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/e54f7476/"><img class="prev-cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/background7.jpg" onerror="onerror=null;src='https://api.vvhan.com/api/acgimg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">全国首款支持多环境开发的 CEC-IDE,卡脖子问题解决,国产崛起了?</div></div></a></div><div class="next-post pull-right"><a href="/posts/7da7c3f6/"><img class="next-cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/99654366_p0.jpg" onerror="onerror=null;src='https://api.vvhan.com/api/acgimg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/posts/c262e439/" title="2023年终总结"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/113398570_p0.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-01-01</div><div class="title">2023年终总结</div></div></a></div><div><a href="/posts/e54f7476/" title="全国首款支持多环境开发的 CEC-IDE,卡脖子问题解决,国产崛起了?"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/background7.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-08-25</div><div class="title">全国首款支持多环境开发的 CEC-IDE,卡脖子问题解决,国产崛起了?</div></div></a></div><div><a href="/posts/164ef646/" title="Next魔改记录"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/2761d84a-a699-423b-a03f-241235497d1d.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-04-18</div><div class="title">Next魔改记录</div></div></a></div><div><a href="/posts/c81531cf/" title="谷歌娘每日金句收集"><img class="cover" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/background6.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-02-02</div><div class="title">谷歌娘每日金句收集</div></div></a></div></div></div><hr><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="fgx"><div class="avatar_img"><img style="border-radius:10px" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar-60x60.png" onerror="this.onerror=null;this.src='https://apis.yisous.xyz/api/randomAvatar'" alt="avatar"></div><div class="author-info__description">这是梦溯·镜影,会时不时发一些自己都没眼看的文章</div><div class="rights"><div class="author-info__name">Q78KG</div><div class="card-info-data site-data is-center"><a class="adiv" href="/archives/"><div class="headline">文章</div><div class="length-num">10</div></a><a class="adiv" href="/tags/"><div class="headline">标签</div><div class="length-num">32</div></a><a class="adiv" href="/categories/"><div class="headline">分类</div><div class="length-num">6</div></a></div></div></div><div class="card-info-social-icons"><a class="social-icon" href="https://github.com/Hoshino-Yumetsuki" rel="external nofollow noreferrer" target="_blank" title="Github"><i class="fab fa-github"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">本网站的Twikoo评论系统使用Cravatar头像系统,请自行绑定邮箱配置</div></div><div class="card-widget card-history"><div class="card-content"><div class="item-headline"><i class="fas fa-clock fa-spin"></i><span>那年今日</span></div><div id="history-baidu" style="height: 100px;overflow: hidden;"><div class="history_swiper-container" id="history-container" style="width: 100%;height: 100%;"><div class="swiper-wrapper" id="history_container_wrapper" style="height:20px"></div></div></div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BA%8B%E6%83%85%E8%B5%B7%E5%9B%A0"><span class="toc-number">1.</span> <span class="toc-text"> 事情起因</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%80%E7%BA%BF%E6%9B%99%E5%85%89"><span class="toc-number">2.</span> <span class="toc-text"> 一线曙光</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88"><span class="toc-number">3.</span> <span class="toc-text"> 解决方案</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/228c2ef8/" title="家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/79687052_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏"></a><div class="content"><a class="title" href="/posts/228c2ef8/" title="家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏">家里云折腾之路——如何把一台好好的浪潮NF5270M3玩坏</a><time datetime="2024-02-09T00:00:00.000Z" title="发表于 2024-02-09 00:00:00">2024-02-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/da2093a1/" title="2024,哪些服务器提供商的性价比高?"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/115799920_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="2024,哪些服务器提供商的性价比高?"></a><div class="content"><a class="title" href="/posts/da2093a1/" title="2024,哪些服务器提供商的性价比高?">2024,哪些服务器提供商的性价比高?</a><time datetime="2024-02-08T00:00:00.000Z" title="发表于 2024-02-08 00:00:00">2024-02-08</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/c262e439/" title="2023年终总结"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/113398570_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="2023年终总结"></a><div class="content"><a class="title" href="/posts/c262e439/" title="2023年终总结">2023年终总结</a><time datetime="2024-01-01T00:00:00.000Z" title="发表于 2024-01-01 00:00:00">2024-01-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/7da7c3f6/" title="这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/99654366_p0.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next"></a><div class="content"><a class="title" href="/posts/7da7c3f6/" title="这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next">这可能是首个DiffSinger数据集全自动标注工具——Fast-Phasr-Next</a><time datetime="2023-09-29T00:00:00.000Z" title="发表于 2023-09-29 00:00:00">2023-09-29</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/6f3c565b/" title="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡"><img src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/MXP1xJAnYDlLGWT.jpg" onerror="this.onerror=null;this.src='https://api.vvhan.com/api/acgimg'" alt="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡"></a><div class="content"><a class="title" href="/posts/6f3c565b/" title="拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡">拯救流量爆炸的vercel——使用Cloudflare Workers做负载均衡</a><time datetime="2023-09-17T00:00:00.000Z" title="发表于 2023-09-17 00:00:00">2023-09-17</time></div></div></div></div><div class="card-widget card-weather" style="width:100%,height:270px"><div class="item-headline"><i class="fas fa-cloud-sun"></i><span>天气</span></div><div id="he-plugin-standard"></div><script>WIDGET = {
183
183
  "CONFIG": {
184
184
  "layout": "2",
185
185
  "width": 270,
@@ -433,7 +433,7 @@
433
433
  radius: ['15%', '90%'],
434
434
  center: ['50%', '55%'],
435
435
  sort: 'desc',
436
- data: [{"name":"闲聊杂谈","value":5,"path":"categories/闲聊杂谈/","id":"clu1d1qf8000vhkn9dny13ksq","parentId":"0"},{"name":"年终总结","value":1,"path":"categories/年终总结/","id":"clu1d1qez0004hkn9hia8dvcy","parentId":"0"},{"name":"恰饭","value":1,"path":"categories/恰饭/","id":"clu1d1qf4000chkn95skj84tz","parentId":"0"},{"name":"Hexo","value":1,"path":"categories/Hexo/","id":"clu1d1qf6000jhkn9epcsf8yf","parentId":"0"},{"name":"Hello World","value":1,"path":"categories/Hello-World/","id":"clu1d1qf7000qhkn9dj3h27ju","parentId":"0"},{"name":"素材","value":1,"path":"categories/素材/","id":"clu1d1qfh0022hkn9g0ly5pgu","parentId":"0"}],
436
+ data: [{"name":"闲聊杂谈","value":5,"path":"categories/闲聊杂谈/","id":"clu3z0mij000xvoq13qp28uwj","parentId":"0"},{"name":"年终总结","value":1,"path":"categories/年终总结/","id":"clu3z0mi80004voq107uc652d","parentId":"0"},{"name":"恰饭","value":1,"path":"categories/恰饭/","id":"clu3z0mid000cvoq1ckk753in","parentId":"0"},{"name":"Hexo","value":1,"path":"categories/Hexo/","id":"clu3z0mig000kvoq1e3iieh77","parentId":"0"},{"name":"Hello World","value":1,"path":"categories/Hello-World/","id":"clu3z0mii000svoq1bzvngda1","parentId":"0"},{"name":"素材","value":1,"path":"categories/素材/","id":"clu3z0mis002lvoq1bowre9hh","parentId":"0"}],
437
437
  itemStyle: {
438
438
  borderColor: '#fff',
439
439
  borderWidth: 2,
@@ -455,7 +455,7 @@
455
455
  color: color,
456
456
  formatter: '{b} : {c} ({d}%)'
457
457
  },
458
- data: [{"name":"闲聊杂谈","value":5,"path":"categories/闲聊杂谈/","id":"clu1d1qf8000vhkn9dny13ksq","parentId":"0"},{"name":"年终总结","value":1,"path":"categories/年终总结/","id":"clu1d1qez0004hkn9hia8dvcy","parentId":"0"},{"name":"恰饭","value":1,"path":"categories/恰饭/","id":"clu1d1qf4000chkn95skj84tz","parentId":"0"},{"name":"Hexo","value":1,"path":"categories/Hexo/","id":"clu1d1qf6000jhkn9epcsf8yf","parentId":"0"},{"name":"Hello World","value":1,"path":"categories/Hello-World/","id":"clu1d1qf7000qhkn9dj3h27ju","parentId":"0"},{"name":"素材","value":1,"path":"categories/素材/","id":"clu1d1qfh0022hkn9g0ly5pgu","parentId":"0"}],
458
+ data: [{"name":"闲聊杂谈","value":5,"path":"categories/闲聊杂谈/","id":"clu3z0mij000xvoq13qp28uwj","parentId":"0"},{"name":"年终总结","value":1,"path":"categories/年终总结/","id":"clu3z0mi80004voq107uc652d","parentId":"0"},{"name":"恰饭","value":1,"path":"categories/恰饭/","id":"clu3z0mid000cvoq1ckk753in","parentId":"0"},{"name":"Hexo","value":1,"path":"categories/Hexo/","id":"clu3z0mig000kvoq1e3iieh77","parentId":"0"},{"name":"Hello World","value":1,"path":"categories/Hello-World/","id":"clu3z0mii000svoq1bzvngda1","parentId":"0"},{"name":"素材","value":1,"path":"categories/素材/","id":"clu3z0mis002lvoq1bowre9hh","parentId":"0"}],
459
459
  itemStyle: {
460
460
  emphasis: {
461
461
  shadowBlur: 10,
@@ -505,7 +505,7 @@
505
505
  else if (epage === cpage){
506
506
  butterfly_swiper_injector_config();
507
507
  }
508
- </script><script defer="" src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/5.4.5/js/swiper.min.js"></script><script defer="" data-pjax="" src="https://registry.npmmirror.com/hexo-butterfly-swiper-lyx/latest/files/lib/swiper_init.js"></script><script async="" src="//at.alicdn.com/t/font_2032782_8d5kxvn09md.js"></script><!-- hexo injector body_end end --><div><script src="https://registry.npmmirror.com/vue/2.6.11/files/dist/vue.min.js"></script><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://jsd.anjiurine.top/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><script src="https://jsd.anjiurine.top/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/js/local-search.js"></script><script>window.addEventListener('DOMContentLoaded',function(){
508
+ </script><script defer="" src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/5.4.5/js/swiper.min.js"></script><script defer="" data-pjax="" src="https://registry.npmmirror.com/hexo-butterfly-swiper-lyx/latest/files/lib/swiper_init.js"></script><script async="" src="//at.alicdn.com/t/font_2032782_8d5kxvn09md.js"></script><!-- hexo injector body_end end --><div><script src="https://registry.npmmirror.com/vue/2.6.11/files/dist/vue.min.js"></script><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://registry.npmmirror.com/@fancyapps/ui/latest/files/dist/fancybox/fancybox.umd.js"></script><script src="https://registry.npmmirror.com/node-snackbar/latest/files/dist/snackbar.min.js"></script><script src="/js/local-search.js"></script><script>window.addEventListener('DOMContentLoaded',function(){
509
509
  var preloader = {
510
510
  endLoading: () => {
511
511
  document.body.style.overflow = 'auto';
@@ -534,7 +534,7 @@ var preloader = {
534
534
 
535
535
  }
536
536
  }
537
- window.addEventListener('pjax:complete',preloader.endLoading())} )</script><div class="js-pjax"><link rel="stylesheet" type="text/css" href="https://jsd.anjiurine.top/npm/katex@latest/dist/katex.min.css"><script src="https://jsd.anjiurine.top/npm/katex@latest/dist/contrib/copy-tex.min.js"></script><link rel="stylesheet" type="text/css" href="https://jsd.anjiurine.top/npm/katex@latest/dist/contrib/copy-tex.css"><script>(() => {
537
+ window.addEventListener('pjax:complete',preloader.endLoading())} )</script><div class="js-pjax"><link rel="stylesheet" type="text/css" href="https://registry.npmmirror.com/katex/latest/files/dist/katex.min.css"><script src="https://registry.npmmirror.com/katex/latest/files/dist/contrib/copy-tex.min.js"></script><link rel="stylesheet" type="text/css" href="https://jsd.anjiurine.top/npm/katex@latest/dist/contrib/copy-tex.css"><script>(() => {
538
538
  document.querySelectorAll('#article-container span.katex-display').forEach(item => {
539
539
  btf.wrap(item, 'div', { class: 'katex-wrap'})
540
540
  })
@@ -557,7 +557,7 @@ window.addEventListener('pjax:complete',preloader.endLoading())} )</script><div
557
557
  }
558
558
 
559
559
  const loadMermaid = () => {
560
- window.loadMermaid ? runMermaid() : getScript('https://jsd.anjiurine.top/npm/mermaid/dist/mermaid.min.js').then(runMermaid)
560
+ window.loadMermaid ? runMermaid() : getScript('https://registry.npmmirror.com/mermaid/latest/files/dist/mermaid.min.js').then(runMermaid)
561
561
  }
562
562
 
563
563
  window.pjax ? loadMermaid() : document.addEventListener('DOMContentLoaded', loadMermaid)
@@ -1010,4 +1010,4 @@ document.addEventListener('pjax:error', (e) => {
1010
1010
  if (e.request.status === 404) {
1011
1011
  pjax.loadUrl('/404.html')
1012
1012
  }
1013
- })</script><script async="" data-pjax="" src="https://cdn.dusays.com/bsz.js"></script><div id="fixedcard-dashboard"><button class="fixedcard-activebtn" type="button" title="我的信息" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-info&quot;,&quot;0&quot;)"><i class="fas fa-address-book"></i></button><button class="fixedcard-activebtn" type="button" title="公告" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-announcement&quot;,&quot;0&quot;)"><i class="fas fa-bullhorn"></i></button><button class="fixedcard-activebtn" type="button" title="天气" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-weather&quot;,&quot;0&quot;)"><i class="fas fa-cloud-sun"></i></button><button class="fixedcard-activebtn" type="button" title="最新文章" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-recent-post&quot;,&quot;0&quot;)"><i class="fas fa-history"></i></button><button class="fixedcard-activebtn" type="button" title="最新评论" onclick="FixedCardWidget(&quot;id&quot;,&quot;card-newest-comments&quot;,&quot;0&quot;)"><i class="fas fa-comment-dots"></i></button><button class="fixedcard-activebtn" type="button" title="文章日历" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-calendar&quot;,&quot;0&quot;)"><i class="fas fa-calendar"></i></button><div class="fixedcard-user-avatar fixedcard-activebtn" onclick="RemoveFixedCardWidget()"><img class="fixedcard-user-avatar-img" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar-60x60.png" title="Q78KG"></div></div></div><div class="barrageswiper swiper-container"><div class="comment-barrage js-pjax swiper-wrapper"></div><link rel="stylesheet" href="/css/commentBarrage.css"><script data-pjax="" src="/js/commentBarrage.js"></script></div></body></html>
1013
+ })</script><script async="" data-pjax="" src="https://registry.npmmirror.com/penndu/latest/files/bsz.js"></script><div id="fixedcard-dashboard"><button class="fixedcard-activebtn" type="button" title="我的信息" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-info&quot;,&quot;0&quot;)"><i class="fas fa-address-book"></i></button><button class="fixedcard-activebtn" type="button" title="公告" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-announcement&quot;,&quot;0&quot;)"><i class="fas fa-bullhorn"></i></button><button class="fixedcard-activebtn" type="button" title="天气" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-weather&quot;,&quot;0&quot;)"><i class="fas fa-cloud-sun"></i></button><button class="fixedcard-activebtn" type="button" title="最新文章" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-recent-post&quot;,&quot;0&quot;)"><i class="fas fa-history"></i></button><button class="fixedcard-activebtn" type="button" title="最新评论" onclick="FixedCardWidget(&quot;id&quot;,&quot;card-newest-comments&quot;,&quot;0&quot;)"><i class="fas fa-comment-dots"></i></button><button class="fixedcard-activebtn" type="button" title="文章日历" onclick="FixedCardWidget(&quot;class&quot;,&quot;card-calendar&quot;,&quot;0&quot;)"><i class="fas fa-calendar"></i></button><div class="fixedcard-user-avatar fixedcard-activebtn" onclick="RemoveFixedCardWidget()"><img class="fixedcard-user-avatar-img" src="https://registry.npmmirror.com/q78kg-website-npm-cdn/latest/files/avatar-60x60.png" title="Q78KG"></div></div></div><div class="barrageswiper swiper-container"><div class="comment-barrage js-pjax swiper-wrapper"></div><link rel="stylesheet" href="/css/commentBarrage.css"><script data-pjax="" src="/js/commentBarrage.js"></script></div></body></html>