从零到一:我的 VPS 标准化开荒 SOP,五步打造稳定、安全、高性能的服务器
<div class="ce-block ce-block--focused" data-id="uNtIzj1FHI" ><div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">当我拿到一台全新的 VPS,无论是用来建站、跑项目还是作为其他的用途我都有一套流程要走,不知道有没有mjj和我一样的,基本上不会直接上手部署业务或者运行其他的内容。跑一个融合怪或者NQ测试脚本啊,基本上的日常操作,DD系统啊,因为有一些厂商预装的系统往往不够纯净,甚至可能被植入了监控组件。此外,如果不经过测试就投入使用,后期一旦出现性能瓶颈或网络问题,很难排查到底是不是商家超售导致硬件“缩水”还是是软件原因。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="_J9E85IakS" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">为了确保服务器的稳定性、安全性以及性能最大化,我按照我自己的习惯整理了一套标准化的“VPS开荒部署”流程。这套 SOP(标准作业程序)是我每次拿到新机器后的必做事项,Linux系统是基于我最常用的 Debian 12 系统。</div>
</div>
</div><div class="ce-block" data-id="uy6B9v1gtC" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">第一步:验机与性能摸底</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="O19ZQk-5Tl" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">获取 IP 和 root 密码后,第一件事是通过 SSH 连接然后运行融合怪或者NQ测试脚本。这一步的核心目的有三点:</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="ZivsO8ulZO" >
<div class="ce-block__content">
<ol class="cdx-list-ordered" style="list-style-type:none; margin-left: -15px;"><li class="cdx-list__item">1. 核对配置:检查 CPU 型号、内存大小、硬盘 I/O 是否与商家宣传一致,最主要还是查看CPU跑分和硬盘IO做到心里有数,后期也好排查是不是超售商家。</li><li class="cdx-list__item">2. 网络体检:测试三网回程线路质量(是 CN2 GIA 还是普通 163),这个在优化机器上尤其重要,尤其是一些藏路由或者大小包的商家,避免自己被骗。</li><li class="cdx-list__item">3. 解锁检测:查看 IP 是否被 Netflix、Disney+ 等流媒体平台封锁,如果是落地机器或者解锁机器这点就特别重要了。</li></ol>
</div>
</div><div class="ce-block ce-block--focused" data-id="T0zmt__BjA" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">我通常使用以下两个脚本,任选其一即可:</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="2YZM8GlN6E" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><b>方案 A:NQ (NodeQuality) 测试脚本</b> 这个脚本输出简洁,适合快速查看硬件配置和基础网络状况。 </div>
</div>
</div><div class="ce-block ce-block--focused" data-id="R1y81XXhI6" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-R1y81XXhI6">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-R1y81XXhI6">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-R1y81XXhI6" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-R1y81XXhI6">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134478RyggS = document.getElementById('codeflask-R1y81XXhI6');
var isCollapsed1790134478RyggS = true;
const flask1790134478RyggS = new CodeFlask(editorElem1790134478RyggS, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134478RyggS = `bash <(curl -sL https://run.NodeQuality.com)`;
code1790134478RyggS = code1790134478RyggS.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134478RyggS.addLanguage('shell', Prism.languages['shell']);
flask1790134478RyggS.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134478RyggS.updateCode(code1790134478RyggS);
const currentCode1790134478RyggS = flask1790134478RyggS.getCode();
var coderow1790134478RyggS = parseInt('');
if (coderow1790134478RyggS === undefined || coderow1790134478RyggS !== coderow1790134478RyggS || coderow1790134478RyggS === 0) {
coderow1790134478RyggS = flask1790134478RyggS.lineNumber;
}
if (coderow1790134478RyggS < 20) {
editorElem1790134478RyggS.parentElement.style.height = '300px';
editorElem1790134478RyggS.style.height = '300px';
} else if (coderow1790134478RyggS >= 20) {
editorElem1790134478RyggS.parentElement.style.height = '500px';
editorElem1790134478RyggS.style.height = '500px';
}
//console.log({currentCode1790134478RyggS})
const copyBtn1790134478RyggS = document.getElementById('codeflask-copy-R1y81XXhI6');
copyBtn1790134478RyggS.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134478RyggS).then(function() {
// 复制成功提示
const originalText = copyBtn1790134478RyggS.innerHTML;
copyBtn1790134478RyggS.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134478RyggS.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134478RyggS);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134478RyggS);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134478RyggS.innerHTML;
copyBtn1790134478RyggS.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134478RyggS.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134478RyggS = document.getElementById('codeflask-bottomBtn-R1y81XXhI6');
const Toggle1790134478RyggS = document.getElementById('codeflask-Toggle-R1y81XXhI6');
bottomBtn1790134478RyggS.addEventListener('click', function() {
if (isCollapsed1790134478RyggS) {
// 展开代码
isCollapsed1790134478RyggS = false;
const codeElement1790134478RyggS = editorElem1790134478RyggS.querySelector('.codeflask__code');
if (codeElement1790134478RyggS) {
const actualHeight1790134478RyggS = codeElement1790134478RyggS.scrollHeight + 20;
editorElem1790134478RyggS.parentElement.style.height = actualHeight1790134478RyggS + 'px';
editorElem1790134478RyggS.style.height = actualHeight1790134478RyggS + 'px';
}
bottomBtn1790134478RyggS.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134478RyggS.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134478RyggS = true;
if (coderow1790134478RyggS < 20) {
editorElem1790134478RyggS.parentElement.style.height = '300px';
editorElem1790134478RyggS.style.height = '300px';
} else if (coderow1790134478RyggS >= 20) {
editorElem1790134478RyggS.parentElement.style.height = '500px';
editorElem1790134478RyggS.style.height = '500px';
}
bottomBtn1790134478RyggS.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134478RyggS.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134478RyggS.addEventListener('click', function() {
bottomBtn1790134478RyggS.click();
});
</script><div class="ce-block ce-block--focused" data-id="Z8rpvllKrp" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><b>方案 B:融合怪测试脚本 (推荐) </b>这是目前最全面的测试脚本,包含详细的 CPU 跑分(Geekbench)、硬盘读写速度以及全球主流流媒体的解锁检测。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="fXbR_k3VeR" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-fXbR_k3VeR">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-fXbR_k3VeR">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-fXbR_k3VeR" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-fXbR_k3VeR">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134478C5mrD = document.getElementById('codeflask-fXbR_k3VeR');
var isCollapsed1790134478C5mrD = true;
const flask1790134478C5mrD = new CodeFlask(editorElem1790134478C5mrD, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134478C5mrD = `bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)`;
code1790134478C5mrD = code1790134478C5mrD.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134478C5mrD.addLanguage('shell', Prism.languages['shell']);
flask1790134478C5mrD.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134478C5mrD.updateCode(code1790134478C5mrD);
const currentCode1790134478C5mrD = flask1790134478C5mrD.getCode();
var coderow1790134478C5mrD = parseInt('');
if (coderow1790134478C5mrD === undefined || coderow1790134478C5mrD !== coderow1790134478C5mrD || coderow1790134478C5mrD === 0) {
coderow1790134478C5mrD = flask1790134478C5mrD.lineNumber;
}
if (coderow1790134478C5mrD < 20) {
editorElem1790134478C5mrD.parentElement.style.height = '300px';
editorElem1790134478C5mrD.style.height = '300px';
} else if (coderow1790134478C5mrD >= 20) {
editorElem1790134478C5mrD.parentElement.style.height = '500px';
editorElem1790134478C5mrD.style.height = '500px';
}
//console.log({currentCode1790134478C5mrD})
const copyBtn1790134478C5mrD = document.getElementById('codeflask-copy-fXbR_k3VeR');
copyBtn1790134478C5mrD.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134478C5mrD).then(function() {
// 复制成功提示
const originalText = copyBtn1790134478C5mrD.innerHTML;
copyBtn1790134478C5mrD.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134478C5mrD.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134478C5mrD);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134478C5mrD);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134478C5mrD.innerHTML;
copyBtn1790134478C5mrD.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134478C5mrD.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134478C5mrD = document.getElementById('codeflask-bottomBtn-fXbR_k3VeR');
const Toggle1790134478C5mrD = document.getElementById('codeflask-Toggle-fXbR_k3VeR');
bottomBtn1790134478C5mrD.addEventListener('click', function() {
if (isCollapsed1790134478C5mrD) {
// 展开代码
isCollapsed1790134478C5mrD = false;
const codeElement1790134478C5mrD = editorElem1790134478C5mrD.querySelector('.codeflask__code');
if (codeElement1790134478C5mrD) {
const actualHeight1790134478C5mrD = codeElement1790134478C5mrD.scrollHeight + 20;
editorElem1790134478C5mrD.parentElement.style.height = actualHeight1790134478C5mrD + 'px';
editorElem1790134478C5mrD.style.height = actualHeight1790134478C5mrD + 'px';
}
bottomBtn1790134478C5mrD.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134478C5mrD.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134478C5mrD = true;
if (coderow1790134478C5mrD < 20) {
editorElem1790134478C5mrD.parentElement.style.height = '300px';
editorElem1790134478C5mrD.style.height = '300px';
} else if (coderow1790134478C5mrD >= 20) {
editorElem1790134478C5mrD.parentElement.style.height = '500px';
editorElem1790134478C5mrD.style.height = '500px';
}
bottomBtn1790134478C5mrD.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134478C5mrD.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134478C5mrD.addEventListener('click', function() {
bottomBtn1790134478C5mrD.click();
});
</script><div class="ce-block ce-block--focused" data-id="inx4NLRSut" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">测试脚本数据只作为参考,真实情况可能不一致,最真实的情况还是需要真实的使用体验</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="ME6lYkuR1N" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><b>如何分析结果?</b></div>
</div>
</div><div class="ce-block ce-block--focused" data-id="3Lk8Pwh_El" >
<div class="ce-block__content">
<ul class="cdx-list-unordered"><li class="cdx-list__item">I/O 速度:如果读写速度低于 100MB/s,说明硬盘性能极差,不适合搭建数据库或高负载网站,看看是石头盘、还是钻石盘、还是SSD缓存盘。</li><li class="cdx-list__item">CPU 跑分:GB5 单核分数直接决定了处理动态页面的能力,如果太低可以判断是超售了。</li><li class="cdx-list__item">丢包率:关注晚高峰时段的丢包率,这比单纯的带宽大小更影响体验。 </li></ul>
</div>
</div><div class="ce-block ce-block--focused" data-id="uQRxdlSOja" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_uQRxdlSOja" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/230751ufqzk278uwl7qwu7.png" title="" alt="" data-aid="146"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block" data-id="E7xiLZ8qyc" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">第二步:DD 重装纯净系统</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="UnXME40voW" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">哪怕商家提供了 Debian 12 镜像,我依然建议自己 DD(重装)一遍。这能确保系统内核是官方原版,彻底清除商家预装的监控戴丽或多余进程,让系统处于“零污染”状态。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="neI0MBcwHI" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">我这里推荐的是使用的是 科技 Lion 的脚本,该脚本集成度高,支持快速重装为 Debian、Ubuntu 或 Alpine 等主流系统。最主要还是方便,我自己也用习惯了,我知道肯定还有其他的但是懒得找了。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="h-d0jVnUhW" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">执行命令: </div>
</div>
</div><div class="ce-block ce-block--focused" data-id="1bHpGhXE2v" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-1bHpGhXE2v">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-1bHpGhXE2v">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-1bHpGhXE2v" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-1bHpGhXE2v">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134478SA6kl = document.getElementById('codeflask-1bHpGhXE2v');
var isCollapsed1790134478SA6kl = true;
const flask1790134478SA6kl = new CodeFlask(editorElem1790134478SA6kl, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134478SA6kl = `curl -sS -O https://kejilion.pro/kejilion.sh && chmod +x kejilion.sh && ./kejilion.sh`;
code1790134478SA6kl = code1790134478SA6kl.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134478SA6kl.addLanguage('shell', Prism.languages['shell']);
flask1790134478SA6kl.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134478SA6kl.updateCode(code1790134478SA6kl);
const currentCode1790134478SA6kl = flask1790134478SA6kl.getCode();
var coderow1790134478SA6kl = parseInt('');
if (coderow1790134478SA6kl === undefined || coderow1790134478SA6kl !== coderow1790134478SA6kl || coderow1790134478SA6kl === 0) {
coderow1790134478SA6kl = flask1790134478SA6kl.lineNumber;
}
if (coderow1790134478SA6kl < 20) {
editorElem1790134478SA6kl.parentElement.style.height = '300px';
editorElem1790134478SA6kl.style.height = '300px';
} else if (coderow1790134478SA6kl >= 20) {
editorElem1790134478SA6kl.parentElement.style.height = '500px';
editorElem1790134478SA6kl.style.height = '500px';
}
//console.log({currentCode1790134478SA6kl})
const copyBtn1790134478SA6kl = document.getElementById('codeflask-copy-1bHpGhXE2v');
copyBtn1790134478SA6kl.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134478SA6kl).then(function() {
// 复制成功提示
const originalText = copyBtn1790134478SA6kl.innerHTML;
copyBtn1790134478SA6kl.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134478SA6kl.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134478SA6kl);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134478SA6kl);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134478SA6kl.innerHTML;
copyBtn1790134478SA6kl.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134478SA6kl.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134478SA6kl = document.getElementById('codeflask-bottomBtn-1bHpGhXE2v');
const Toggle1790134478SA6kl = document.getElementById('codeflask-Toggle-1bHpGhXE2v');
bottomBtn1790134478SA6kl.addEventListener('click', function() {
if (isCollapsed1790134478SA6kl) {
// 展开代码
isCollapsed1790134478SA6kl = false;
const codeElement1790134478SA6kl = editorElem1790134478SA6kl.querySelector('.codeflask__code');
if (codeElement1790134478SA6kl) {
const actualHeight1790134478SA6kl = codeElement1790134478SA6kl.scrollHeight + 20;
editorElem1790134478SA6kl.parentElement.style.height = actualHeight1790134478SA6kl + 'px';
editorElem1790134478SA6kl.style.height = actualHeight1790134478SA6kl + 'px';
}
bottomBtn1790134478SA6kl.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134478SA6kl.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134478SA6kl = true;
if (coderow1790134478SA6kl < 20) {
editorElem1790134478SA6kl.parentElement.style.height = '300px';
editorElem1790134478SA6kl.style.height = '300px';
} else if (coderow1790134478SA6kl >= 20) {
editorElem1790134478SA6kl.parentElement.style.height = '500px';
editorElem1790134478SA6kl.style.height = '500px';
}
bottomBtn1790134478SA6kl.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134478SA6kl.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134478SA6kl.addEventListener('click', function() {
bottomBtn1790134478SA6kl.click();
});
</script><div class="ce-block ce-block--focused" data-id="bZmN6urzaB" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">进入脚本菜单后,选择“重装系统”并指定 Debian 12。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="LoHZuIUbj2" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_LoHZuIUbj2" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/231305djnaz91si0hph090.png" title="" alt="" data-aid="147"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="136kXz1bBM" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">关键提示: 系统重装完成后,SSH 会断开。等待 5-10 分钟重新连接。连接成功后,必须第一时间修改默认密码! 脚本生成的初始密码通常是固定的(如 <code class="inline-code">LeitboGi0</code>),极易被扫描爆破。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="9bkwgNQaiK" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">修改密码命令: <code class="inline-code">passwd</code></div>
</div>
</div><div class="ce-block" data-id="efeppbccJS" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">第三步:基础安全加固</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="BdprSKAS3B" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">公网环境极其恶劣,默认的 22 端口和密码登录方式是黑客脚本攻击的重点对象。为了保障服务器不沦为肉鸡,必须进行以下三项配置:</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="eqpXI_iul3" >
<div class="ce-block__content">
<ol class="cdx-list-ordered" style="list-style-type:none; margin-left: -15px;"><li class="cdx-list__item">1. <b>修改 SSH 默认端口:</b>将默认的 22 端口修改为 20000-65535 之间的高位端口。这能规避 99% 的无差别自动化扫描。</li><li class="cdx-list__item">2. <b>禁用密码登录:</b>配置 SSH 密钥对,仅允许持有私钥的客户端登录,并彻底关闭密码验证功能。这样设置基本可以安全很多,因为密码泄露是很大的风险秘钥基本上杜绝了撞库或者其他方式的扫描。</li><li class="cdx-list__item">3. <b>配置防火墙与 Fail2Ban</b>:启用 UFW 防火墙并放行新端口;启用 Fail2Ban 监控 SSH 日志,自动封禁多次试错的恶意 IP。</li></ol>
</div>
</div><div class="ce-block ce-block--focused" data-id="MyT0USkWiY" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">操作建议: 这一步容易导致新手把自己锁在门外,建议在修改配置文件(<code class="inline-code">/etc/ssh/sshd_config</code>)前先备份。修改完端口后,先不要关闭当前 SSH 窗口,新开一个窗口尝试连接,确认无误后再断开。 </div>
</div>
</div><div class="ce-block" data-id="jx_srnhWXL" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">第四步:系统环境初始化</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="aa-i23vjA6" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">系统重装并加固后,需要对系统环境进行一些基础设置,以适应后续的使用需求。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="mVz3N62cvU" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">1. 更新软件包与校准时间 确保所有软件都是最新版本,并防止因时间不同步导致的日志混乱或协议连接失败,升级软件包其实可以放到第一步的,但是想了想还是放到了这里,有的时候安装不上去软件的时候,先执行软件包更新就可以安装了。 </div>
</div>
</div><div class="ce-block ce-block--focused" data-id="x8wNnTnGcM" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-x8wNnTnGcM">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-x8wNnTnGcM">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-x8wNnTnGcM" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-x8wNnTnGcM">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134478f2V3G = document.getElementById('codeflask-x8wNnTnGcM');
var isCollapsed1790134478f2V3G = true;
const flask1790134478f2V3G = new CodeFlask(editorElem1790134478f2V3G, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134478f2V3G = `apt update && apt upgrade -y
timedatectl set-timezone Asia/Shanghai`;
code1790134478f2V3G = code1790134478f2V3G.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134478f2V3G.addLanguage('shell', Prism.languages['shell']);
flask1790134478f2V3G.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134478f2V3G.updateCode(code1790134478f2V3G);
const currentCode1790134478f2V3G = flask1790134478f2V3G.getCode();
var coderow1790134478f2V3G = parseInt('');
if (coderow1790134478f2V3G === undefined || coderow1790134478f2V3G !== coderow1790134478f2V3G || coderow1790134478f2V3G === 0) {
coderow1790134478f2V3G = flask1790134478f2V3G.lineNumber;
}
if (coderow1790134478f2V3G < 20) {
editorElem1790134478f2V3G.parentElement.style.height = '300px';
editorElem1790134478f2V3G.style.height = '300px';
} else if (coderow1790134478f2V3G >= 20) {
editorElem1790134478f2V3G.parentElement.style.height = '500px';
editorElem1790134478f2V3G.style.height = '500px';
}
//console.log({currentCode1790134478f2V3G})
const copyBtn1790134478f2V3G = document.getElementById('codeflask-copy-x8wNnTnGcM');
copyBtn1790134478f2V3G.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134478f2V3G).then(function() {
// 复制成功提示
const originalText = copyBtn1790134478f2V3G.innerHTML;
copyBtn1790134478f2V3G.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134478f2V3G.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134478f2V3G);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134478f2V3G);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134478f2V3G.innerHTML;
copyBtn1790134478f2V3G.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134478f2V3G.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134478f2V3G = document.getElementById('codeflask-bottomBtn-x8wNnTnGcM');
const Toggle1790134478f2V3G = document.getElementById('codeflask-Toggle-x8wNnTnGcM');
bottomBtn1790134478f2V3G.addEventListener('click', function() {
if (isCollapsed1790134478f2V3G) {
// 展开代码
isCollapsed1790134478f2V3G = false;
const codeElement1790134478f2V3G = editorElem1790134478f2V3G.querySelector('.codeflask__code');
if (codeElement1790134478f2V3G) {
const actualHeight1790134478f2V3G = codeElement1790134478f2V3G.scrollHeight + 20;
editorElem1790134478f2V3G.parentElement.style.height = actualHeight1790134478f2V3G + 'px';
editorElem1790134478f2V3G.style.height = actualHeight1790134478f2V3G + 'px';
}
bottomBtn1790134478f2V3G.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134478f2V3G.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134478f2V3G = true;
if (coderow1790134478f2V3G < 20) {
editorElem1790134478f2V3G.parentElement.style.height = '300px';
editorElem1790134478f2V3G.style.height = '300px';
} else if (coderow1790134478f2V3G >= 20) {
editorElem1790134478f2V3G.parentElement.style.height = '500px';
editorElem1790134478f2V3G.style.height = '500px';
}
bottomBtn1790134478f2V3G.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134478f2V3G.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134478f2V3G.addEventListener('click', function() {
bottomBtn1790134478f2V3G.click();
});
</script><div class="ce-block ce-block--focused" data-id="8XGiSxXdJK" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">2. 开启 Swap (虚拟内存) 对于内存较小(如 512MB 或 1GB)的 VPS,开启 Swap 是防止内存溢出的最后一道防线。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="sEZekoEO3b" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-sEZekoEO3b">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-sEZekoEO3b">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-sEZekoEO3b" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-sEZekoEO3b">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134478L77Ur = document.getElementById('codeflask-sEZekoEO3b');
var isCollapsed1790134478L77Ur = true;
const flask1790134478L77Ur = new CodeFlask(editorElem1790134478L77Ur, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134478L77Ur = `wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh`;
code1790134478L77Ur = code1790134478L77Ur.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134478L77Ur.addLanguage('shell', Prism.languages['shell']);
flask1790134478L77Ur.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134478L77Ur.updateCode(code1790134478L77Ur);
const currentCode1790134478L77Ur = flask1790134478L77Ur.getCode();
var coderow1790134478L77Ur = parseInt('');
if (coderow1790134478L77Ur === undefined || coderow1790134478L77Ur !== coderow1790134478L77Ur || coderow1790134478L77Ur === 0) {
coderow1790134478L77Ur = flask1790134478L77Ur.lineNumber;
}
if (coderow1790134478L77Ur < 20) {
editorElem1790134478L77Ur.parentElement.style.height = '300px';
editorElem1790134478L77Ur.style.height = '300px';
} else if (coderow1790134478L77Ur >= 20) {
editorElem1790134478L77Ur.parentElement.style.height = '500px';
editorElem1790134478L77Ur.style.height = '500px';
}
//console.log({currentCode1790134478L77Ur})
const copyBtn1790134478L77Ur = document.getElementById('codeflask-copy-sEZekoEO3b');
copyBtn1790134478L77Ur.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134478L77Ur).then(function() {
// 复制成功提示
const originalText = copyBtn1790134478L77Ur.innerHTML;
copyBtn1790134478L77Ur.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134478L77Ur.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134478L77Ur);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134478L77Ur);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134478L77Ur.innerHTML;
copyBtn1790134478L77Ur.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134478L77Ur.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134478L77Ur = document.getElementById('codeflask-bottomBtn-sEZekoEO3b');
const Toggle1790134478L77Ur = document.getElementById('codeflask-Toggle-sEZekoEO3b');
bottomBtn1790134478L77Ur.addEventListener('click', function() {
if (isCollapsed1790134478L77Ur) {
// 展开代码
isCollapsed1790134478L77Ur = false;
const codeElement1790134478L77Ur = editorElem1790134478L77Ur.querySelector('.codeflask__code');
if (codeElement1790134478L77Ur) {
const actualHeight1790134478L77Ur = codeElement1790134478L77Ur.scrollHeight + 20;
editorElem1790134478L77Ur.parentElement.style.height = actualHeight1790134478L77Ur + 'px';
editorElem1790134478L77Ur.style.height = actualHeight1790134478L77Ur + 'px';
}
bottomBtn1790134478L77Ur.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134478L77Ur.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134478L77Ur = true;
if (coderow1790134478L77Ur < 20) {
editorElem1790134478L77Ur.parentElement.style.height = '300px';
editorElem1790134478L77Ur.style.height = '300px';
} else if (coderow1790134478L77Ur >= 20) {
editorElem1790134478L77Ur.parentElement.style.height = '500px';
editorElem1790134478L77Ur.style.height = '500px';
}
bottomBtn1790134478L77Ur.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134478L77Ur.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134478L77Ur.addEventListener('click', function() {
bottomBtn1790134478L77Ur.click();
});
</script><div class="ce-block ce-block--focused" data-id="q8bqVxTA2-" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">建议:Swap 大小设置为内存的 1-2 倍即可,不必过大。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="WlVSP0UsHF" >
<div class="ce-block__content">
<blockquote class="cdx-block cdx-quote">
<div class="cdx-input cdx-quote__text">
swap看服务器的情况而定,如果是内存大的服务器不开也可以,开启swap可以让硬盘的容量作为运行内存,可以缓解内存不足的问题,但是swap本质只是那存储空间作为内存读写速度肯定有差距,所以没必要开的很大 。
</div>
<div class="cdx-input cdx-quote__caption cdx-quote__caption-left">
</div>
<div class="quote-background-icon">
<svg t="1747277238703" class="icon" viewBox="0 0 1126 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6647" width="60" height="60"><path d="M809.07988966 473.917355c33.85124 8.46280999 50.77686 25.38843 50.77685999 50.77686 0 42.31404999-42.31405 126.942149-135.404959 262.347107-33.85124 50.77686-50.77686 93.090909-50.77686 135.404959 0 67.70247899 25.38843 101.553719 84.6281 101.553719 33.85124001 0 67.702479-25.38843 110.016529-76.165289 169.256198-211.570248 253.884298-406.214876 253.88429699-600.859504 0-93.090909-25.38843-177.719008-76.16528899-236.95867799-50.77686-67.702479-118.479339-93.090909-194.64462799-93.09090901-59.23966901 0-118.479339 25.38843-160.79338901 67.702479S622.89807165 186.18181799 622.89807164 253.884298c8.46281 110.016529 67.702479 186.18181801 186.18181802 220.033057m-609.32231401 0c33.85124 8.46280999 50.77686 25.38843 50.77686 50.77686 0 42.31404999-42.31405 126.942149-135.404959 262.347107-33.85124 50.77686-50.77686 93.090909-50.77686 135.404959 0 67.70247899 25.38843 101.553719 84.6281 101.553719 33.85124001 0 67.702479-25.38843 110.016529-76.165289 169.256198-211.570248 253.884298-414.677686 253.88429701-600.859504 0-93.090909-25.38843-177.719008-76.16528901-236.958678-50.77686-67.702479-118.479339-93.090909-194.644628-93.090909-59.23966901 0-118.479339 25.38843-160.793389 67.702479s-67.70247899 101.553719-67.702479 169.256199c16.92562 110.016529 76.165289 186.181818 186.181818 220.033057" fill="#bfbfbf" p-id="6648"></path></svg>
</div>
</blockquote>
</div>
</div><div class="ce-block ce-block--focused" data-id="SxoqNx_iFA" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_SxoqNx_iFA" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/231757zwr8on67o19owx6o.png" title="" alt="" data-aid="148"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="cvRGLiqus8" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><b>3. 修改 DNS (按需执行) </b>部分国外商家的默认 DNS 解析国内域名速度较慢。我习惯手动修改为 Google 和 Cloudflare 的公共 DNS。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="06QfU5A-mX" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-06QfU5A-mX">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-06QfU5A-mX">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-06QfU5A-mX" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-06QfU5A-mX">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134478ee51Z = document.getElementById('codeflask-06QfU5A-mX');
var isCollapsed1790134478ee51Z = true;
const flask1790134478ee51Z = new CodeFlask(editorElem1790134478ee51Z, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134478ee51Z = `sudo tee /etc/resolv.conf <<EOF
nameserver 8.8.8.8
nameserver 1.1.1.1
nameserver 2001:4860:4860::8844
nameserver 2606:4700:4700::1111
EOF`;
code1790134478ee51Z = code1790134478ee51Z.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134478ee51Z.addLanguage('shell', Prism.languages['shell']);
flask1790134478ee51Z.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134478ee51Z.updateCode(code1790134478ee51Z);
const currentCode1790134478ee51Z = flask1790134478ee51Z.getCode();
var coderow1790134478ee51Z = parseInt('');
if (coderow1790134478ee51Z === undefined || coderow1790134478ee51Z !== coderow1790134478ee51Z || coderow1790134478ee51Z === 0) {
coderow1790134478ee51Z = flask1790134478ee51Z.lineNumber;
}
if (coderow1790134478ee51Z < 20) {
editorElem1790134478ee51Z.parentElement.style.height = '300px';
editorElem1790134478ee51Z.style.height = '300px';
} else if (coderow1790134478ee51Z >= 20) {
editorElem1790134478ee51Z.parentElement.style.height = '500px';
editorElem1790134478ee51Z.style.height = '500px';
}
//console.log({currentCode1790134478ee51Z})
const copyBtn1790134478ee51Z = document.getElementById('codeflask-copy-06QfU5A-mX');
copyBtn1790134478ee51Z.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134478ee51Z).then(function() {
// 复制成功提示
const originalText = copyBtn1790134478ee51Z.innerHTML;
copyBtn1790134478ee51Z.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134478ee51Z.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134478ee51Z);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134478ee51Z);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134478ee51Z.innerHTML;
copyBtn1790134478ee51Z.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134478ee51Z.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134478ee51Z = document.getElementById('codeflask-bottomBtn-06QfU5A-mX');
const Toggle1790134478ee51Z = document.getElementById('codeflask-Toggle-06QfU5A-mX');
bottomBtn1790134478ee51Z.addEventListener('click', function() {
if (isCollapsed1790134478ee51Z) {
// 展开代码
isCollapsed1790134478ee51Z = false;
const codeElement1790134478ee51Z = editorElem1790134478ee51Z.querySelector('.codeflask__code');
if (codeElement1790134478ee51Z) {
const actualHeight1790134478ee51Z = codeElement1790134478ee51Z.scrollHeight + 20;
editorElem1790134478ee51Z.parentElement.style.height = actualHeight1790134478ee51Z + 'px';
editorElem1790134478ee51Z.style.height = actualHeight1790134478ee51Z + 'px';
}
bottomBtn1790134478ee51Z.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134478ee51Z.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134478ee51Z = true;
if (coderow1790134478ee51Z < 20) {
editorElem1790134478ee51Z.parentElement.style.height = '300px';
editorElem1790134478ee51Z.style.height = '300px';
} else if (coderow1790134478ee51Z >= 20) {
editorElem1790134478ee51Z.parentElement.style.height = '500px';
editorElem1790134478ee51Z.style.height = '500px';
}
bottomBtn1790134478ee51Z.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134478ee51Z.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134478ee51Z.addEventListener('click', function() {
bottomBtn1790134478ee51Z.click();
});
</script><div class="ce-block ce-block--focused" data-id="Q_Uurd60zT" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">特别警示: 如果你购买的是具有 DNS 解锁流媒体 功能的特殊 VPS(如某些原生 IP 机器),商家通常已经配置好了专用 DNS。此时千万不要执行上述修改 DNS 的操作,否则会导致解锁功能失效。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="FjEagc2QWF" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><font style="color: rgb(255, 19, 0);">搬瓦工的机器默认DNS解析延迟有些问题,所以我这里建议修改默认的DNS</font></div>
</div>
</div><div class="ce-block" data-id="ZwSOF5trkq" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">第五步:内核优化与网络加速</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="Epx1uCguyU" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">Debian 12 默认内核已开启 BBR,但针对高延迟、高丢包的国际网络环境,适当的 TCP 参数调优可以进一步提升吞吐量。这里就是针对小白的TCP调优脚本,不需要知道参数,只需执行选择就可以了,还是很方便的。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="bOCzsv2Q42" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left"><b>简易方案: </b>使用 Neko 的 TCP 优化脚本,选择推荐配置即可。 </div>
</div>
</div><div class="ce-block ce-block--focused" data-id="7bVStgfb6u" >
<div class="ce-block__content">
<div class="editorjs-codeFlask_Wrapper">
<div class="editorjs-codeFlask_Header">
<div class="editorjs-codeFlask_LangDisplay">shell</div>
<button class="editorjs-codeFlask_CopyButton" title="复制代码" id="codeflask-copy-7bVStgfb6u">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<button class="editorjs-codeFlask_Toggle" id="codeflask-Toggle-7bVStgfb6u">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
</div>
<div class="editorjs-codeFlask_ContentContainer">
<div class="editorjs-codeFlask_Editor" id="codeflask-7bVStgfb6u" >
</div>
</div>
<div class="editorjs-codeFlask_BottomButtonContainer" id="codeflask-bottomBtn-7bVStgfb6u">
<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="static/js/editorjs/tools/codeflask/codeflask150.min.js?xvG"></script>
<script type="application/javascript">
const editorElem1790134478vZrco = document.getElementById('codeflask-7bVStgfb6u');
var isCollapsed1790134478vZrco = true;
const flask1790134478vZrco = new CodeFlask(editorElem1790134478vZrco, {
language: 'shell',
lineNumbers: true,
styleParent: this.shadowRoot,
rtl: false,
readonly: true
});
var code1790134478vZrco = `wget http://sh.nekoneko.cloud/tools.sh -O tools.sh && bash tools.sh`;
code1790134478vZrco = code1790134478vZrco.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'");
flask1790134478vZrco.addLanguage('shell', Prism.languages['shell']);
flask1790134478vZrco.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
// console.log(code)
});
// flask.updateCode('');
// This will also trigger .onUpdate()
flask1790134478vZrco.updateCode(code1790134478vZrco);
const currentCode1790134478vZrco = flask1790134478vZrco.getCode();
var coderow1790134478vZrco = parseInt('');
if (coderow1790134478vZrco === undefined || coderow1790134478vZrco !== coderow1790134478vZrco || coderow1790134478vZrco === 0) {
coderow1790134478vZrco = flask1790134478vZrco.lineNumber;
}
if (coderow1790134478vZrco < 20) {
editorElem1790134478vZrco.parentElement.style.height = '300px';
editorElem1790134478vZrco.style.height = '300px';
} else if (coderow1790134478vZrco >= 20) {
editorElem1790134478vZrco.parentElement.style.height = '500px';
editorElem1790134478vZrco.style.height = '500px';
}
//console.log({currentCode1790134478vZrco})
const copyBtn1790134478vZrco = document.getElementById('codeflask-copy-7bVStgfb6u');
copyBtn1790134478vZrco.addEventListener('click', function() {
try {
// 先检查 Clipboard API 是否可用
if (navigator.clipboard && navigator.clipboard.writeText) {
// 使用 Clipboard API 复制代码
navigator.clipboard.writeText(code1790134478vZrco).then(function() {
// 复制成功提示
const originalText = copyBtn1790134478vZrco.innerHTML;
copyBtn1790134478vZrco.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
// 一段时间后恢复原文本
setTimeout(function() {
copyBtn1790134478vZrco.innerHTML = originalText;
}, 2000);
}).catch(function(err) {
// 复制失败处理
console.error('复制失败:', err);
// 降级方案:使用传统的复制方法
fallbackCopyTextToClipboard(code1790134478vZrco);
});
} else {
// Clipboard API 不可用时直接使用降级方案
fallbackCopyTextToClipboard(code1790134478vZrco);
}
// 提取降级方案为独立函数
function fallbackCopyTextToClipboard(text) {
const textArea = document.createElement('textarea');
textArea.value = text;
textArea.style.position = 'fixed';
textArea.style.opacity = '0';
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
const originalText = copyBtn1790134478vZrco.innerHTML;
copyBtn1790134478vZrco.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg> 已复制';
setTimeout(function() {
copyBtn1790134478vZrco.innerHTML = originalText;
}, 2000);
} catch (copyErr) {
console.error('传统复制方法也失败了:', copyErr);
} finally {
document.body.removeChild(textArea);
}
}
} catch (err) {
console.error('复制功能不可用:', err);
}
});
const bottomBtn1790134478vZrco = document.getElementById('codeflask-bottomBtn-7bVStgfb6u');
const Toggle1790134478vZrco = document.getElementById('codeflask-Toggle-7bVStgfb6u');
bottomBtn1790134478vZrco.addEventListener('click', function() {
if (isCollapsed1790134478vZrco) {
// 展开代码
isCollapsed1790134478vZrco = false;
const codeElement1790134478vZrco = editorElem1790134478vZrco.querySelector('.codeflask__code');
if (codeElement1790134478vZrco) {
const actualHeight1790134478vZrco = codeElement1790134478vZrco.scrollHeight + 20;
editorElem1790134478vZrco.parentElement.style.height = actualHeight1790134478vZrco + 'px';
editorElem1790134478vZrco.style.height = actualHeight1790134478vZrco + 'px';
}
bottomBtn1790134478vZrco.innerHTML = '<button class="editorjs-codeFlask_BottomToggle" title="折叠代码"><span class="toggle-icon">▲</span> 折叠</button>';
Toggle1790134478vZrco.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
} else {
// 折叠代码
isCollapsed1790134478vZrco = true;
if (coderow1790134478vZrco < 20) {
editorElem1790134478vZrco.parentElement.style.height = '300px';
editorElem1790134478vZrco.style.height = '300px';
} else if (coderow1790134478vZrco >= 20) {
editorElem1790134478vZrco.parentElement.style.height = '500px';
editorElem1790134478vZrco.style.height = '500px';
}
bottomBtn1790134478vZrco.innerHTML = '<button class="editorjs-codeFlask_BottomToggle expand-mode" title="展开代码" data-empty="false"><span class="toggle-icon">▼</span> 展开</button>';
Toggle1790134478vZrco.innerHTML = '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>';
}
});
Toggle1790134478vZrco.addEventListener('click', function() {
bottomBtn1790134478vZrco.click();
});
</script><div class="ce-block ce-block--focused" data-id="tNePIfjd07" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg_tNePIfjd07" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/232001t5eetqretnledqqq.png" title="" alt="" data-aid="149"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="klhDueKK8D" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">进阶方案 (推荐): 如果你对网络协议有更高要求,推荐使用 <a href="https://omnitt.com/" target="_blank" rel="nofollow">迷之调优</a>。根据你的服务器配置(内存、线路延迟)生成专属优化命令。这个网页生成的命令还会自动备份原配置,如果优化后效果不佳,可以随时回滚,还是非常方便的。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="_VrcFgI1-0" >
<div class="ce-block__content">
<div class="cdx-block image-tool image-tool--filled ">
<div class="image-tool__image">
<div class="image-tool__image-preloader" style=""></div>
<img id="aimg__VrcFgI1-0" class="image-tool__image-picture _zoom" src="http://idceve.com/data/attachment/forum/202609/05/232125qbl7r72rjeklf77b.png" title="" alt="" data-aid="150"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="Hp23bFJFR5" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">这东西因人而异不是必须的,有的人开了反而更慢,但是有的人开了还是有所改善的</div>
</div>
</div><div class="ce-block" data-id="zQIaGVR6Mp" >
<div class="ce-block__content" style="">
<h2 class="ce-header ce-header--left">总结</h2>
</div>
</div><div class="ce-block ce-block--focused" data-id="stjpVuX6RN" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">我的习惯就是按部就班的完成以上五个步骤后,这台 VPS 才算真正“交付”到我自己手中,我就可以安心的建站也好部署软件也好,其实还可以增加docker部署的内容,但是不是每个人都必须的就没加上去。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="paExiWBRFK" >
<div class="ce-block__content">
<ul class="cdx-list-unordered"><li class="cdx-list__item"><b>验机</b> 让你心里有数,避免被坑,知道最基本的服务器参数了解清楚;</li><li class="cdx-list__item"><b>DD 系统</b> 给了你一个干净的底层环境,尤其是国内的机器,有很多监控可能都不方便,比如什么阿里云盾拖慢服务器占用资源;</li><li class="cdx-list__item"><b>安全加固</b> 最基本的SSH安全加固,让你在玩服务器的时候无后顾之忧,不要担心服务器被黑;</li><li class="cdx-list__item"><b>系统与网络优化</b> 则榨干了机器的每一分性能,增加一些小鸡的可玩性,让小鸡也有更多的可能。</li></ul>
</div>
</div><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.ce-paragraph {
line-height: 1.6em;
outline: none;
text-indent: 2em;
font-size: 16px;
}
.ce-paragraph--right {
text-align: right;
}
.ce-paragraph--center {
text-align: center;
}
.ce-paragraph--left {
text-align: left;
}
.ce-paragraph--justify {
text-align: justify;
}
.ce-paragraph-text-indent {
text-align: justify;
}
.ce-paragraph:empty::before{
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
opacity: 0;
}
/** Show placeholder at the first paragraph if Editor is empty */
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {
opacity: 1;
}
.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {
opacity: 0;
}
.ce-paragraph p:first-of-type{
margin-top: 0;
}
.ce-paragraph p:last-of-type{
margin-bottom: 0;
}
.svg-icon {
width: 1em;
height: 1em;
}
.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
fill: #4691f6;
}
.svg-icon circle {
stroke: #4691f6;
stroke-width: 1;
}
</style><style type="text/css">
.ce-block {
margin-top: 20px;
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
/**
* Plugin styles
*/
.ce-header {
position: relative;
padding: 1px 0px 1px 15px;
margin: 0;
line-height: 1.25em;
outline: none;
margin-bottom: 10px;
}
.ce-header p,
.ce-header div {
padding: 0 !important;
margin: 0 !important;
}
.ce-header::before {
content: "";
background-color: #3e8fe3;
width: 6px;
height: 100%;
position: absolute;
left: 0;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
/**
* Styles for Plugin icon in Toolbar
*/
.ce-header__icon {
}
.ce-header::before {
position: absolute;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
cursor: text;
}
.ce-header:empty::before {
display: block;
}
.ce-header:empty:focus::before {
display: none;
}
/* FontSize */
h1.ce-header {
font-size: 2.0em;
}
h2.ce-header {
font-size: 1.7em;
}
h3.ce-header {
font-size: 1.4em;
}
h4.ce-header {
font-size: 1.15em;
}
h5.ce-header {
font-size: 0.95em;
}
h6.ce-header {
font-size: 0.8em;
}
/* Alignment*/
.ce-header--right {
text-align: right;
}
.ce-header--center {
text-align: center;
}
.ce-header--left {
text-align: left;
}
.ce-header--justify {
text-align: justify;
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.cdx-list {
margin:0;
outline:none;
display:block;
counter-reset:item;
padding:6px;
}
.cdx-list__item {
line-height:1.45em;
display:block;
padding-top:8px;
margin-left: 2em;
}
.cdx-list__item-children {
display:block;
}
.cdx-list__item {
outline:none
}
.cdx-list__item-content {
word-break:break-word;
white-space:pre-wrap;
grid-area:content;
padding-left:8px
}
.cdx-list__item:before {
counter-increment:item;
white-space:nowrap
}
.cdx-list-li-container {
display: flex;
}
.cdx-list-ordered .cdx-list__item:before {
/* content:counters(item,".",numeric) "." */
}
.cdx-list-ordered {
list-style-type: none;
margin-left: -15px;
counter-reset:item;
font-size: 16px;
}
.cdx-list-unordered {
font-size: 16px;
}
.cdx-list-unordered .cdx-list__item:before {
content:"•"
}
.cdx-list-checklist .cdx-list__item:before {
content:""
}
.cdx-list__settings .cdx-settings-button {
width:50%
}
.cdx-list__checkbox {
padding-top:calc((1.45em - 1.2em) / 2);
grid-area:checkbox;
width:1.2em;
height:1.2em;
display:flex;
cursor:pointer;
font-size: 16px;
}
.cdx-list__checkbox svg {
opacity:0;
height:1.2em;
width:1.2em;
left:-1px;
top:-1px;
position:absolute
}
@media (hover:hover) {
.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg {
opacity:1
}
}.cdx-list__checkbox--checked-1 {
line-height:1.45em
}
@media (hover:hover) {
.cdx-list__checkbox--checked-1:not(.cdx-list__checkbox--checked-1--no-hover):hover .cdx-checklist__checkbox-check {
background:#0059AB;
border-color:#0059AB
}
}.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check {
background:#369FFF;
border-color:#369FFF
}
.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check svg {
opacity:1
}
.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check svg path {
stroke:#fff
}
.cdx-list__checkbox--checked-1 .cdx-list__checkbox-check:before {
opacity:0;
visibility:visible;
transform:scale(2.5)
}
.cdx-list__checkbox-check {
cursor:pointer;
display:inline-block;
position:relative;
margin:0 auto;
width:1.2em;
height:1.2em;
box-sizing:border-box;
border-radius:5px;
border:1px solid #C9C9C9;
background:#fff
}
.cdx-list__checkbox-check:before {
content:"";
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
border-radius:100%;
background-color:#369FFF;
visibility:hidden;
pointer-events:none;
transform:scale(1);
transition:transform .4s ease-out,opacity .4s
}
.cdx-list__checkbox-check--disabled {
pointer-events:none
}
.cdx-list-start-with-field {
background:#F8F8F8;
border:1px solid rgba(226,226,229,.2);
border-radius:6px;
padding:2px;
display:grid;
grid-template-columns:auto auto 1fr;
grid-template-rows:auto
}
.cdx-list-start-with-field--invalid {
background:#FFECED;
border:1px solid #E13F3F
}
.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input {
color:#e13f3f
}
.cdx-list-start-with-field__input {
font-size:16px;
outline:none;
font-weight:500;
font-family:inherit;
border:0;
background:transparent;
margin:0;
padding:0;
line-height:22px;
min-width:calc(100% - 10px)
}
.cdx-list-start-with-field__input::placeholder {
color:#797979;
font-weight:500
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
position: relative;
}
/* 主容器 */
.editorjs-codeFlask_Wrapper {
border: 1px solid #dcdfe6;
border-radius: 5px;
background-color: #f6f8fa;
margin-bottom: 10px;
position: relative;
transition: all 0.3s ease;
width: 100%;
min-height: 100px;
overflow: hidden;
}
/* 标题栏 */
.editorjs-codeFlask_Header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 8px 12px;
background-color: #e9ecef;
border-bottom: 1px solid #dcdfe6;
position: relative;
z-index: 0; /* 从10降低到2 */
}
/* 语言显示 */
.editorjs-codeFlask_LangDisplay {
padding: 2px 8px;
background-color: #409eff;
color: white;
border-radius: 3px;
font-size: 12px;
font-weight: 500;
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
}
/* 内容容器 - 禁止纵向滚动 */
.editorjs-codeFlask_ContentContainer {
position: relative;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
transition: height 0.3s ease;
}
/* 编辑器容器 - 禁止纵向滚动 */
.editorjs-codeFlask_Editor {
position: relative;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
transition: height 0.3s ease;
}
/* 底部按钮容器 - 优化为更简洁的样式 */
.editorjs-codeFlask_BottomButtonContainer {
display: flex;
justify-content: center;
align-items: center;
padding: 4px;
background-color: #f8f9fa;
border-top: 1px solid #e9ecef;
position: relative;
z-index: 0;
}
/* 底部横向折叠/展开按钮 - 优化样式,使其更融入设计 */
.editorjs-codeFlask_BottomToggle {
width: 100%;
background-color: transparent;
color: #606266;
border: none;
border-radius: 4px;
padding: 6px 12px;
font-size: 12px;
font-weight: 400;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
text-align: center;
position: relative;
}
.editorjs-codeFlask_BottomToggle:hover {
background-color: #e9ecef;
color: #409eff;
}
.editorjs-codeFlask_BottomToggle:active {
background-color: #dee2e6;
}
.editorjs-codeFlask_BottomToggle .toggle-icon {
font-size: 11px;
transition: transform 0.3s ease;
}
/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
.editorjs-codeFlask_BottomToggle:has(span.toggle-icon:contains("▲"))::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 6px;
background: linear-gradient(to bottom, rgba(248, 249, 250, 0) 0%, rgba(248, 249, 250, 1) 100%);
pointer-events: none;
}
/* 展开按钮(显示"展开"文本)上边缘添加渐变虚化效果 */
/* 删除不被广泛支持的:contains()选择器 */
.editorjs-codeFlask_BottomToggle.expand-mode::before {
content: '';
position: absolute;
top: -60px;
left: 0;
right: 0;
height: 60px;
background: linear-gradient(to bottom, rgb(255 255 255 / 0%) 0%, rgba(248, 249, 250, 1) 100%);
pointer-events: none;
}
/* CodeFlask 主容器样式 */
.editorjs-codeFlask_Editor .codeflask {
position: relative;
background: #fafafa;
border-radius: 0 0 4px 4px;
min-height: 100px;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}
/* 行号容器 */
.editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 40px;
background-color: #f5f5f5;
border-right: 1px solid #e0e0e0;
z-index: 0;
}
/* 行号 */
.editorjs-codeFlask_Editor .codeflask__lines {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 40px;
padding: 10px 0;
background-color: #f5f5f5;
border-right: 1px solid #e0e0e0;
z-index: 0;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
color: #666;
text-align: right;
user-select: none;
overflow: hidden;
}
.editorjs-codeFlask_Editor .codeflask__lines__line {
padding-right: 8px;
}
/* 文本区域 - 输入框 */
.editorjs-codeFlask_Editor .codeflask__textarea {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 10px;
border: none;
background: transparent;
color: transparent;
caret-color: #333;
resize: none;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
z-index: 1;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
white-space: pre-wrap; /* 自动换行 */
tab-size: 4;
outline: none;
}
/* 添加选中文本样式 */
.editorjs-codeFlask_Editor .codeflask__textarea::selection {
background-color: #b3d4fc;
color: #333;
}
.editorjs-codeFlask_Editor .codeflask__textarea::-moz-selection {
background-color: #b3d4fc;
color: #333;
}
/* 代码预览区域 */
.editorjs-codeFlask_Editor .codeflask__pre {
position: absolute;
top: 0;
left: 0;
width: 100%; /* 确保宽度不超出容器 */
height: 100%;
padding: 10px;
margin: 0;
border: none;
background: transparent;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
z-index: 0;
overflow-x: hidden; /* 禁止横向滚动 */
overflow-y: hidden;
white-space: pre-wrap; /* 自动换行 */
pointer-events: none;
}
/* 代码高亮区域 */
.editorjs-codeFlask_Editor .codeflask__code {
display: block;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 14px;
line-height: 21px;
color: #333;
white-space: pre-wrap; /* 自动换行 */
tab-size: 4;
overflow: visible;
}
/* 语法高亮样式 - 确保Prism.js样式正确应用 */
.editorjs-codeFlask_Editor .codeflask__code {
background: transparent !important;
}
/* 通用语法高亮token样式 */
.editorjs-codeFlask_Editor .token.comment,
.editorjs-codeFlask_Editor .token.prolog,
.editorjs-codeFlask_Editor .token.doctype,
.editorjs-codeFlask_Editor .token.cdata {
color: #708090;
}
.editorjs-codeFlask_Editor .token.punctuation {
color: #999;
}
.editorjs-codeFlask_Editor .token.namespace {
opacity: 0.7;
}
.editorjs-codeFlask_Editor .token.property,
.editorjs-codeFlask_Editor .token.tag,
.editorjs-codeFlask_Editor .token.boolean,
.editorjs-codeFlask_Editor .token.number,
.editorjs-codeFlask_Editor .token.constant,
.editorjs-codeFlask_Editor .token.symbol,
.editorjs-codeFlask_Editor .token.deleted {
color: #905;
}
.editorjs-codeFlask_Editor .token.selector,
.editorjs-codeFlask_Editor .token.attr-name,
.editorjs-codeFlask_Editor .token.string,
.editorjs-codeFlask_Editor .token.char,
.editorjs-codeFlask_Editor .token.builtin,
.editorjs-codeFlask_Editor .token.inserted {
color: #690;
}
.editorjs-codeFlask_Editor .token.operator,
.editorjs-codeFlask_Editor .token.entity,
.editorjs-codeFlask_Editor .token.url,
.editorjs-codeFlask_Editor .language-css .token.string,
.editorjs-codeFlask_Editor .style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, 0.5);
}
.editorjs-codeFlask_Editor .token.atrule,
.editorjs-codeFlask_Editor .token.attr-value,
.editorjs-codeFlask_Editor .token.keyword {
color: #07a;
}
.editorjs-codeFlask_Editor .token.function,
.editorjs-codeFlask_Editor .token.class-name {
color: #dd4a68;
}
.editorjs-codeFlask_Editor .token.regex,
.editorjs-codeFlask_Editor .token.important,
.editorjs-codeFlask_Editor .token.variable {
color: #e90;
}
/* 复制按钮样式 */
.editorjs-codeFlask_CopyButton {
background-color: #409eff;
color: white;
border: none;
border-radius: 3px;
padding: 6px 12px;
margin-right: 8px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
min-width: 28px;
height: 28px;
}
.editorjs-codeFlask_CopyButton:hover {
background-color: #66b1ff;
}
.editorjs-codeFlask_CopyButton.copied {
background-color: #67c23a;
}
/* 折叠/展开按钮样式 */
.editorjs-codeFlask_Toggle {
background-color: #909399;
color: white;
border: none;
border-radius: 3px;
padding: 0 8px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
min-width: 28px;
height: 28px;
font-weight: bold;
}
.editorjs-codeFlask_Toggle:hover {
background-color: #a6a9ad;
}
/* 响应式调整 */
@media (max-width: 768px) {
.editorjs-codeFlask_Header {
padding: 6px 8px;
}
.editorjs-codeFlask_Editor .codeflask__textarea,
.editorjs-codeFlask_Editor .codeflask__pre,
.editorjs-codeFlask_Editor .codeflask__code {
font-size: 13px;
line-height: 19px;
padding: 8px;
}
.editorjs-codeFlask_Editor .codeflask.codeflask--has-line-numbers:before {
width: 35px;
}
.editorjs-codeFlask_Editor .codeflask__lines {
width: 35px;
font-size: 12px;
}
}
/* 滚动条样式 - 完全隐藏纵向滚动条 */
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar {
width: 0;/* 纵向滚动条宽度为0 */
height: 6px;/* 横向滚动条保持6px宽度 */
}
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-track {
background: transparent;
border-radius: 0;
}
.editorjs-codeFlask_Wrapper ::-webkit-scrollbar-thumb {
background: transparent;
border-radius: 0;
}
/* Firefox 滚动条隐藏 */
.editorjs-codeFlask_Wrapper {
scrollbar-width: none;/* Firefox 隐藏纵向滚动条 */
}
.editorjs-codeFlask_Wrapper ::-moz-scrollbar {
width: 0;
height: 6px;
}
/* 焦点状态 */
.editorjs-codeFlask_Wrapper:focus-within {
border-color: #409eff;
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}
/* 只读模式样式 */
.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Header {
background-color: #f5f7fa;
}
.editorjs-codeFlask_Wrapper.readonly .editorjs-codeFlask_Editor .codeflask__textarea {
cursor: default;
}
/* 确保所有元素正确显示 */
.editorjs-codeFlask_Wrapper * {
box-sizing: border-box;
}
/* 修复行号对齐 */
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__textarea,
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__pre {
padding-left: 50px;
}
.editorjs-codeFlask_Editor .codeflask--has-line-numbers .codeflask__lines {
padding-top: 10px;
}
/* 语言显示元素 - 添加点击样式 */
.editorjs-codeFlask_LangDisplay {
padding: 2px 8px;
background-color: #409eff;
color: white;
border-radius: 3px;
font-size: 12px;
font-weight: 500;
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
transition: all 0.2s ease;
}
.editorjs-codeFlask_LangDisplay:hover {
background-color: #66b1ff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 语言选择弹窗 */
.editorjs-codeFlask_LanguagePopup {
background-color: white;
border: 1px solid #dcdfe6;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
width: 250px;
max-height: 300px;
z-index: 1000;
overflow: hidden;
}
/* 搜索框 */
.editorjs-codeFlask_LanguageSearch {
width: 100%;
padding: 8px 12px;
border: none;
border-bottom: 1px solid #ebeef5;
font-size: 12px;
outline: none;
box-sizing: border-box;
}
/* 语言列表 */
.editorjs-codeFlask_LanguagesList {
max-height: 250px;
overflow-y: auto;
}
/* 语言选项 */
.editorjs-codeFlask_LanguageItem {
padding: 8px 12px;
font-size: 12px;
cursor: pointer;
transition: background-color 0.2s ease;
}
.editorjs-codeFlask_LanguageItem:hover {
background-color: #f5f7fa;
}
.editorjs-codeFlask_LanguageItem.selected {
background-color: #ecf5ff;
color: #409eff;
font-weight: 500;
}
/* 滚动条样式 */
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar {
width: 6px;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-track {
background-color: #f5f7fa;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb {
background-color: #c0c4cc;
border-radius: 3px;
}
.editorjs-codeFlask_LanguagesList::-webkit-scrollbar-thumb:hover {
background-color: #909399;
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
/* max-width:calc(100% - 50px) */
margin-left: auto;
margin-right: auto;
}
.image-tool {
--bg-color: #cdd1e0;
--front-color: #388ae5;
--border-color: #e8e8eb;
}
.image-tool__image {
border-radius: 3px;
overflow: hidden;
margin-bottom: 10px;
}
.image-tool__image-picture {
max-width: 100%;
vertical-align: bottom;
display: block;
margin-left: auto;
margin-right: auto;
}
.image-tool__image-preloader {
width: 50px;
height: 50px;
border-radius: 50%;
background-size: cover;
margin: auto;
position: relative;
background-color: #cdd1e0;
background-position: center center;
}
.image-tool__image-preloader::after {
content: "";
position: absolute;
z-index: 3;
width: 60px;
height: 60px;
border-radius: 50%;
border: 2px solid #cdd1e0;
border-top-color: #388ae5;
left: 50%;
top: 50%;
margin-top: -30px;
margin-left: -30px;
animation: image-preloader-spin 2s infinite linear;
box-sizing: border-box;
}
.image-tool__caption::before {
position: absolute !important;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
}
.image-tool__caption:empty::before {
display: block;
}
.image-tool__caption:empty:focus::before {
display: none;
}
.image-tool--empty .image-tool__image {
display: none;
}
.image-tool--empty .image-tool__caption, .image-tool--loading .image-tool__caption {
display: none;
}
.image-tool .cdx-button {
display: flex;
align-items: center;
justify-content: center;
}
.image-tool .cdx-button svg {
height: auto;
margin: 0 6px 0 0;
}
.image-tool--filled .cdx-button {
display: none;
}
.image-tool--filled .image-tool__image-preloader {
display: none;
}
.image-tool--loading .image-tool__image {
min-height: 200px;
display: flex;
border: 1px solid #e8e8eb;
background-color: #fff;
}
.image-tool--loading .image-tool__image-picture {
display: none;
}
.image-tool--loading .cdx-button {
display: none;
}
/**
* Tunes
* ----------------
*/
.image-tool--withBorder .image-tool__image {
border: 1px solid #e8e8eb;
}
.image-tool--withBackground .image-tool__image {
padding: 15px;
background: #cdd1e0;
}
.image-tool--withBackground .image-tool__image-picture {
max-width: 60%;
margin: 0 auto;
}
.image-tool--stretched .image-tool__image-picture {
width: 100%;
}
.image-tool__caption {
text-align: center;
font-size: 14px;
color: #a3a3a3;
}
@keyframes image-preloader-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style><style type="text/css">
.ce-block {
margin-bottom: 20px;
}
.ce-block__content, .ce-toolbar__content {
margin-left: auto;
margin-right: auto;
}
.cdx-quote {
position: relative;
background-color: #f8f8f8;
padding: 24px!important;
margin: 0px;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.quote-background-icon {
position: absolute;
top: 10px;
right: 10px;
opacity: 0.2;
z-index: 1;
}
.cdx-quote__text {
min-height: 30px;
margin-bottom: 10px;
font-size: 16px;
line-height: 1.5;
color: #333;
}
.cdx-quote__caption {
padding: 10px 20px 0px 20px;
font-size: 14px;
color: #777;
}
.cdx-quote__caption-left {
text-align: left;
}
.cdx-quote__caption-center {
text-align: center;
}
.cdx-quote__caption-right {
text-align: right;
}
.cdx-quote ::before {
position: absolute;
content: attr(data-placeholder);
color: #bbb;
font-weight: normal;
opacity: 0;
}
.cdx-quote :empty::before {
opacity: 1;
}
.cdx-quote :empty:focus::before {
opacity: 0;
}
.cdx-quote-settings {
display: flex;
}
.cdx-quote-settings .cdx-settings-button {
width: 50%;
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>
页:
[1]