mirror of
https://codeberg.org/mayx/pages
synced 2026-02-15 23:34:51 +08:00
353 lines
24 KiB
HTML
353 lines
24 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||
<title>从宝塔面板中学习运维知识 | Mayx的博客</title>
|
||
<meta name="generator" content="Jekyll v3.9.5" />
|
||
<meta property="og:title" content="从宝塔面板中学习运维知识" />
|
||
<meta name="author" content="mayx" />
|
||
<meta property="og:locale" content="zh_CN" />
|
||
<meta name="description" content="用Python代码的程序就等着被抄吧!" />
|
||
<meta property="og:description" content="用Python代码的程序就等着被抄吧!" />
|
||
<meta property="og:site_name" content="Mayx的博客" />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="article:published_time" content="2024-05-19T00:00:00+08:00" />
|
||
<meta name="twitter:card" content="summary" />
|
||
<meta property="twitter:title" content="从宝塔面板中学习运维知识" />
|
||
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
|
||
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
|
||
<meta name="yandex-verification" content="fc0e535abed800be" />
|
||
<script type="application/ld+json">
|
||
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2024-05-19T00:00:00+08:00","datePublished":"2024-05-19T00:00:00+08:00","description":"用Python代码的程序就等着被抄吧!","headline":"从宝塔面板中学习运维知识","mainEntityOfPage":{"@type":"WebPage","@id":"/2024/05/19/bt-ops.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2024/05/19/bt-ops.html"}</script>
|
||
<!-- End Jekyll SEO tag -->
|
||
|
||
<link rel="canonical" href="https://mabbs.github.io/2024/05/19/bt-ops.html" />
|
||
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
|
||
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
|
||
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
|
||
<link rel="stylesheet" href="/assets/css/style.css?v=1768642553" />
|
||
<!--[if !IE]> -->
|
||
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
|
||
<!-- <![endif]-->
|
||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
|
||
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
|
||
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
|
||
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
|
||
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
|
||
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
|
||
<link rel="me" href="https://github.com/Mabbs" />
|
||
<script src="/assets/js/jquery.min.js"></script>
|
||
<!--[if lt IE 9]>
|
||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
|
||
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
|
||
<![endif]-->
|
||
<script>
|
||
var lastUpdated = new Date("Sat, 17 Jan 2026 17:35:53 +0800");
|
||
var BlogAPI = "https://summary.mayx.eu.org";
|
||
</script>
|
||
<script src="/assets/js/main.js"></script>
|
||
<!--[if !IE]> -->
|
||
|
||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
|
||
<script>
|
||
window.dataLayer = window.dataLayer || [];
|
||
function gtag(){dataLayer.push(arguments);}
|
||
gtag('js', new Date());
|
||
gtag('config', 'UA-137710294-1');
|
||
</script>
|
||
|
||
<script src="/assets/js/instant.page.js" type="module"></script>
|
||
<!-- <![endif]-->
|
||
</head>
|
||
|
||
<body>
|
||
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
|
||
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee><![endif]-->
|
||
<div class="wrapper">
|
||
<header class="h-card">
|
||
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
|
||
|
||
|
||
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
|
||
|
||
|
||
<p class="p-note">Mayx's Home Page</p>
|
||
|
||
<form action="/search.html">
|
||
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" />
|
||
</form>
|
||
<br />
|
||
|
||
|
||
|
||
|
||
|
||
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
|
||
|
||
<ul class="downloads">
|
||
|
||
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
|
||
|
||
</ul>
|
||
</header>
|
||
<section class="h-entry">
|
||
|
||
<small><time class="date dt-published" datetime="2024-05-19T00:00:00+08:00">19 May 2024</time> - 字数统计:2286 - 阅读大约需要7分钟 - Hits: <span id="/2024/05/19/bt-ops.html" class="visitors">Loading...</span></small>
|
||
<h1 class="p-name">从宝塔面板中学习运维知识</h1>
|
||
|
||
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
|
||
<div id="outdate" style="display:none;">
|
||
<hr /><p>
|
||
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
|
||
</p>
|
||
</div>
|
||
<script>
|
||
daysold = Math.floor((new Date().getTime() - new Date("Sun, 19 May 2024 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
|
||
if (daysold > 90) {
|
||
document.getElementById("outdate").style.display = "block";
|
||
document.getElementById("outime").innerHTML = daysold;
|
||
}
|
||
</script>
|
||
|
||
<hr />
|
||
|
||
<b>AI摘要</b>
|
||
<p id="ai-output">这篇文章主要讲述了作者在测试不同运维面板(如1Panel、小皮面板和宝塔面板)的过程中,对宝塔面板的使用体验,特别是对其Python代码实现、功能评价和价格的质疑。作者认为宝塔面板有一些独特功能如系统加固、防入侵、文件监控等,虽然代码是开源且部分易于理解,但付费功能定价不合理,如价格高昂的服务器网络加速功能其实无需付费。此外,作者还指出一些功能如防篡改可能存在问题,而一些基础功能实则简单易实现。总的来说,作者认为宝塔面板虽然有可学习之处,但价格与其提供的服务不成正比。</p>
|
||
|
||
<hr />
|
||
|
||
|
||
|
||
<ul><li><a href="#起因">起因</a></li><li><a href="#功能探索与解析">功能探索与解析</a><ul><li><a href="#宝塔防入侵">宝塔防入侵</a></li><li><a href="#宝塔系统加固">宝塔系统加固</a></li><li><a href="#文件监控">文件监控</a></li><li><a href="#堡塔企业级防篡改">堡塔企业级防篡改</a></li><li><a href="#堡塔运维平台">堡塔运维平台</a></li></ul></li><li><a href="#总结">总结</a></li></ul>
|
||
<hr />
|
||
|
||
|
||
<main class="post-content e-content" role="main"><p>用Python代码的程序就等着被抄吧!<!--more--></p>
|
||
<h1 id="起因">
|
||
|
||
|
||
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
|
||
|
||
|
||
</h1>
|
||
|
||
<p>之前我<a href="/2024/04/06/old-pc.html">用旧电脑拼了一堆服务器</a>,但是上面装的东西其实试完之后就没什么兴趣了,主要是它们实际上没有解决什么问题。后来我觉得还是更应该向更有意义的地方靠,于是我就在每个机器上安装了不同的运维面板,打算分别测试一下效果。 </p><p>
|
||
我安装的面板有<a href="https://github.com/1Panel-dev/1Panel">1Panel</a>,<a href="https://beta.xp.cn/">小皮面板公测版</a>,<a href="https://baota.sbs/">宝塔面板破解版</a>。1Panel很不错,但是除了网站管理之外功能全是Docker带来的,另外代码是Go写的我现在还看不懂。小皮面板重构之后很令我失望,功能比旧版小皮面板还少,安装的时候居然还会收集服务器信息并上传?运行环境版本少,PHP连扩展安装的功能都没有,而且现在直接摆烂全放的是配置文件,要是都自己改配置文件了还要面板干啥?另外重构之后也变成Go写的了,就这样拿什么和别的面板打? </p><p>
|
||
宝塔面板破解版之前我在<a href="/2022/11/29/free-server.html">测试Koyeb</a>的时候试过一个,不过后来看到了一个新的,主要是之前那个界面上改的全是的广告,新找的这个破解版不仅界面没有做什么修改,而且<a href="https://github.com/flucont/btcloud">后端开源</a>,也不用担心有什么后门。 </p><p>
|
||
虽然我不信任宝塔面板,毕竟漏洞出的多,各种收费项目,还各种收集用户信息,强制登录啥的,但是有一个好处就是它是Python写的,而且大多数代码并没有混淆(代码倒是<a href="https://github.com/aaPanel">开源</a>了,就是没更新)。作为一款算是比较成熟的面板,有些功能还是比较有意思的,而且我也能看懂Python代码,所以有些有意思的功能就可以看看它的代码是如何实现的。</p>
|
||
<h1 id="功能探索与解析">
|
||
|
||
|
||
<a href="#功能探索与解析"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 功能探索与解析
|
||
|
||
|
||
</h1>
|
||
|
||
<p>对于免费版有的功能,其实我不太关心,一是那些大多数并不复杂,自己装也没什么难度,二是大多功能其实我并不感兴趣🤣。对于付费功能不得不说有的还挺离谱的,有些非常简单的功能价格居然很贵,比如服务器网络加速BBR,这个功能是内核提供的,自己一个命令就能打开,和宝塔半毛钱关系都没有,价格居然是4.93元/天?不过我没用过官网下的宝塔,不知道是破解版乱标还是真是这个价格。 </p><p>
|
||
另外还有一些是纯粹解析类的也没什么意思,比如网站监控报表还有WAF啥的,那些没什么技巧,就只是只要肯写这个功能就会有的东西。我的话更关心一些看起来实现还算难,值得收钱,但是实现其实很简单的东西😁。</p>
|
||
<h2 id="宝塔防入侵">
|
||
|
||
|
||
<a href="#宝塔防入侵"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 宝塔防入侵
|
||
|
||
|
||
</h2>
|
||
|
||
<p>其实对于这个功能,我觉得实现应该不复杂,用SELinux或者AppArmor然后进行合理的配置应该就可以了,但是离谱的是开了这个功能我安装Redis等软件的时候各种报错,用宝塔安装Redis是通过编译安装的,正常来说不应该报错才对的啊,而且就算用了SELinux或者AppArmor也不应该有问题,另外它的报错是Segmentation fault,什么情况编译会报这种错误啊……所以我看了看它的代码,原来他们的实现根本没有用SELinux或者AppArmor,可能一是配置复杂,他们的程序员驾驭不了,二是Ubuntu和红帽系不一定都有安SELinux或者AppArmor,适配起来比较麻烦。他们用的居然是一个不知名的开源软件:<a href="https://github.com/a2o/snoopy">Snoopy</a>,原理也很简单,就是在环境变量里配置在运行任意软件的时候把Snoopy先加载进去,然后它就能记录程序运行时的行为了,但显然这个程序并不怎么成熟,运行某些软件的时候居然会报Segmentation fault的错误,这样的东西也好意思收钱?</p>
|
||
<h2 id="宝塔系统加固">
|
||
|
||
|
||
<a href="#宝塔系统加固"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 宝塔系统加固
|
||
|
||
|
||
</h2>
|
||
|
||
<p>其实这个功能没啥特别的,但是我看它有好多关于等保的功能,因为我维护的服务器中也有需要符合等保要求的,所以这个功能对我来说还挺有用,至少可以做个参考。不过里面有些比如对文件或者文件夹的保护这个实现我还挺感兴趣的,正常来说就算拿权限限制也限制不了root,可是这个功能打开之后居然连root都没有权限操作,还是挺神奇的,之后我看了一下代码,原来有一个叫做chattr的东西,用这个可以加扩展权限,比如<code class="language-plaintext highlighter-rouge">chattr +i <file></code>就可以让任何人都没有权限操作这个文件,想要操作的话必须执行<code class="language-plaintext highlighter-rouge">chattr -i <file></code>解除才行。因为一般都是拿普通权限限制的,从来没考虑过扩展权限,这下学到新知识了😆。</p>
|
||
<h2 id="文件监控">
|
||
|
||
|
||
<a href="#文件监控"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 文件监控
|
||
|
||
|
||
</h2>
|
||
|
||
<p>这个功能其实也不复杂,之前我写过一个<a href="/2022/09/21/cron.html">定时调度器</a>,其中的热载功能用的是watchdog,而wathcdog在Linux下其实用的就是inotify特性,宝塔在实现这个东西的时候用的是pyinotify库,其实它俩倒是没什么特别大的区别,只是watchdog能跨平台而已,虽然宝塔面板也有Windows版,不过估计应该是没有这个插件吧。</p>
|
||
<h2 id="堡塔企业级防篡改">
|
||
|
||
|
||
<a href="#堡塔企业级防篡改"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 堡塔企业级防篡改
|
||
|
||
|
||
</h2>
|
||
|
||
<p>这个和刚才那个用chattr的从功能上来看倒是挺像的,不过这个写的是内核级,看了一下确实有个内核模块,叫做tempercore,虽然编译是在本地进行的但是代码加了密,编译还得用它文件夹里一个叫jm的程序进行编译😅,我猜它的实现应该是在内核里hook了操作文件的API,操作完之后会进行记录,不过试了一下根本没有起效果😅,不知道是我破解版的问题还是不支持Ubuntu……</p>
|
||
<h2 id="堡塔运维平台">
|
||
|
||
|
||
<a href="#堡塔运维平台"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 堡塔运维平台
|
||
|
||
|
||
</h2>
|
||
|
||
<p>从功能上来看挺像Ansible的,看了一下代码是用paramiko直接在远程服务器上执行命令的。不过Ansible也是Python写的,倒是没差。功能有点太简单了,自己用脚本也能实现,不过提供了个面板可能相对适合小白吧,就是这个价格恐怕只有脑子进水的人才会买了。</p>
|
||
<h1 id="总结">
|
||
|
||
|
||
<a href="#总结"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 总结
|
||
|
||
|
||
</h1>
|
||
|
||
<p>总的看来宝塔确实有些有意思的功能,实现有些挺有意思的,看了他们的代码之后感觉也能学到点东西,也许以后有机会可以用得上。但是完全不值那个价,这点东西也敢卖钱也真是挺厉害的,不过可能对于政府项目来说这些安全功能还是挺有意义的,毕竟没什么运维会去当公务员,而且企业版的价格对他们来说都已经算相当便宜了🤣。</p></main>
|
||
|
||
|
||
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=%E5%AE%9D%E5%A1%94"><em>宝塔</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E8%BF%90%E7%BB%B4"><em>运维</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2024-05-19-bt-ops.md">查看原始文件</a></span></small>
|
||
|
||
|
||
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
|
||
<p id="suggest-container">Loading...</p>
|
||
<script>
|
||
var suggest = $("#suggest-container");
|
||
$.get(BlogAPI + "/suggest?id=/2024/05/19/bt-ops.html&update=" + lastUpdated.valueOf(), function (data) {
|
||
if (data.length) {
|
||
getSearchJSON(function (search) {
|
||
suggest.empty();
|
||
var searchMap = {};
|
||
for (var i = 0; i < search.length; i++) {
|
||
searchMap[search[i].url] = search[i];
|
||
}
|
||
|
||
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
|
||
for (var j = 0; j < data.length; j++) {
|
||
var item = searchMap[data[j].id];
|
||
if (item) {
|
||
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
|
||
var contentPreview = item.content.substring(0, 100);
|
||
if (item.content.length > 100) {
|
||
contentPreview += "……";
|
||
}
|
||
link.hover(
|
||
function(e) {
|
||
tooltip.text($(this).data('content'))
|
||
.css({
|
||
top: e.pageY + 10,
|
||
left: e.pageX + 10
|
||
})
|
||
.show();
|
||
},
|
||
function() {
|
||
tooltip.hide();
|
||
}
|
||
).mousemove(function(e) {
|
||
tooltip.css({
|
||
top: e.pageY + 10,
|
||
left: e.pageX + 10
|
||
});
|
||
}).data('content', contentPreview);
|
||
|
||
suggest.append(link);
|
||
suggest.append(' - ' + item.date + '<br />');
|
||
}
|
||
}
|
||
});
|
||
} else {
|
||
suggest.html("暂无推荐文章……");
|
||
}
|
||
});
|
||
</script>
|
||
|
||
<br />
|
||
<div class="pagination">
|
||
|
||
<span class="prev">
|
||
<a href="/2024/04/06/old-pc.html">
|
||
上一篇:关于旧电脑的使用探索
|
||
</a>
|
||
</span>
|
||
|
||
<br />
|
||
|
||
<span class="next">
|
||
<a href="/2024/06/16/hackintosh.html">
|
||
下一篇:Hackintosh使用体验
|
||
</a>
|
||
</span>
|
||
|
||
</div>
|
||
|
||
<!--[if !IE]> -->
|
||
<link rel="stylesheet" href="/assets/css/gitalk.css">
|
||
<script src="/assets/js/gitalk.min.js"></script>
|
||
|
||
<div id="gitalk-container"></div>
|
||
|
||
<script>
|
||
var gitalk = new Gitalk({
|
||
clientID: '36557aec4c3cb04f7ac6',
|
||
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
|
||
repo: 'mabbs.github.io',
|
||
owner: 'Mabbs',
|
||
admin: ['Mabbs'],
|
||
id: '/2024/05/19/bt-ops', // Ensure uniqueness and length less than 50
|
||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||
})
|
||
gitalk.render('gitalk-container')
|
||
</script>
|
||
<!-- <![endif]-->
|
||
|
||
</section>
|
||
<!--[if !IE]> -->
|
||
<div id="landlord" style="left:5px;bottom:0px;">
|
||
<div class="message" style="opacity:0"></div>
|
||
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
|
||
<div class="live_talk_input_body">
|
||
<form id="live_talk_input_form">
|
||
<div class="live_talk_input_name_body" >
|
||
<input type="checkbox" id="load_this" />
|
||
<input type="hidden" id="post_id" value="/2024/05/19/bt-ops.html" />
|
||
<label for="load_this">
|
||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||
</label>
|
||
</div>
|
||
<div class="live_talk_input_text_body">
|
||
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
|
||
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<input name="live_talk" id="live_talk" value="1" type="hidden" />
|
||
<div class="live_ico_box" style="display:none;">
|
||
<div class="live_ico_item type_info" id="showInfoBtn"></div>
|
||
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
|
||
<div class="live_ico_item type_music" id="musicButton"></div>
|
||
<div class="live_ico_item type_youdu" id="youduButton"></div>
|
||
<div class="live_ico_item type_quit" id="hideButton"></div>
|
||
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
|
||
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
|
||
<input id="duType" value="douqilai" type="hidden" />
|
||
</div>
|
||
</div>
|
||
<div id="open_live2d">召唤伊斯特瓦尔</div>
|
||
<!-- <![endif]-->
|
||
<footer>
|
||
<p>
|
||
<small>Made with ❤ by Mayx<br />Last updated at 2026-01-17 17:35:53<br /> 总字数:614622 - 文章数:178 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
|
||
</p>
|
||
</footer>
|
||
</div>
|
||
<script src="/assets/js/scale.fix.js"></script>
|
||
<!--[if !IE]> -->
|
||
<script src="/assets/js/main_new.js"></script>
|
||
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
|
||
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
||
<!-- <![endif]-->
|
||
</body>
|
||
</html>
|