diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..dc68f3b Binary files /dev/null and b/.DS_Store differ diff --git a/404.html b/404.html new file mode 100644 index 0000000..4325a2d --- /dev/null +++ b/404.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + 404 Page not found | 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+

404 - 页面不存在

+ +
+
+
+ + diff --git a/atom.xml b/atom.xml new file mode 100644 index 0000000..7685c57 --- /dev/null +++ b/atom.xml @@ -0,0 +1,585 @@ + + + + + 如我所见 + 这是站点描述 + 2022-01-12T16:04:31+08:00 + https://example.com/ + + + + iaeieue + https://example.com/ + + iaeieue@gmail.com + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) + Hugo + + 饥荒服务器搭建流程 + + https://example.com/posts/%E9%A5%A5%E8%8D%92%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%90%AD%E5%BB%BA%E6%B5%81%E7%A8%8B%E8%AE%B0%E5%BD%95/ + 2022-01-12T16:00:54+08:00 + 2022-01-12T15:43:35+08:00 + + iaeieue + https://example.com/ + iaeieue@gmail.com + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)记录一下自己饥荒服务器搭建流程。 ..着重号..测试 系统配置 操作系统:Ubuntu Server 18.04.1…… + + <p>记录一下自己饥荒服务器搭建流程。</p> +<p>..着重号..测试</p> +<h2 id="系统配置">系统配置</h2> +<ul> +<li>操作系统:Ubuntu Server 18.04.1 LTS 64bit</li> +<li>CPU:2核</li> +<li>内存:4GB</li> +<li>系统盘:80GB SSD</li> +<li>带宽:8Mbps(1200GB/月)</li> +</ul> +<p>之后改成Ubuntu20了</p> +<h2 id="配置服务器防火墙">配置服务器防火墙</h2> +<p>开启10888、10999、10998 端口 使用UDP协议</p> +<h2 id="使用密钥通过root用户连接主机">使用密钥通过root用户连接主机</h2> +<p>腾讯云的Ubuntu机子默认不能使用root用户登录,所以需要进行配置。</p> +<h3 id="创建密钥并绑定服务器">创建密钥并绑定服务器</h3> +<p>服务器关了再创</p> +<h3 id="使用finalshell登录服务器">使用FinalShell登录服务器</h3> +<p>到此依然只能用ubuntu账号通过密钥登录,使用root还需要配置</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">sudo passwd root +su - root +cat /home/ubuntu/.ssh/authorized_keys &gt;&gt; /root/.ssh/authorized_keys + +passwd -d root +</code></pre></td></tr></table> +</div> +</div><p>这时重新配置FinalShell,使用root账号即可登录</p> +<h2 id="配置steamcmd">配置steamcmd</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">dpkg --add-architecture i386 +apt update +<span class="c1"># libsdl2-2.0-0:i386 必须安装否则会有SDL报错</span> +<span class="c1"># libcurl4-gnutls-dev:i386 如果没有则会在开启服务器的时候出现问题,可能是因为启动服务器用了bin里的程序</span> +apt install lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 libcurl4-gnutls-dev:i386 + +useradd -m dst +passwd dst +su - dst + +mkdir steamcmd <span class="o">&amp;&amp;</span> <span class="nb">cd</span> steamcmd <span class="o">&amp;&amp;</span> wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz <span class="o">&amp;&amp;</span> tar -xvzf steamcmd_linux.tar.gz +./steamcmd.sh + +</code></pre></td></tr></table> +</div> +</div><pre tabindex="0"><code class="language-steamcmd" data-lang="steamcmd">force_install_dir /home/dst/dstserver +login anonymous +app_update 343050 validate +quit +</code></pre><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">cd</span> /home/dst/dstserver/bin + +<span class="nb">echo</span> <span class="s2">&#34;./dontstarve_dedicated_server_nullrenderer -console -cluster ruwosuojian -shard Master&#34;</span> &gt; master_start.sh <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s2">&#34;./dontstarve_dedicated_server_nullrenderer -console -cluster ruwosuojian -shard Caves&#34;</span> &gt; caves_start.sh <span class="o">&amp;&amp;</span> chmod +x master_start.sh caves_start.sh +</code></pre></td></tr></table> +</div> +</div><p>先运行一遍指令,生成存档。</p> +<p>使用本地的饥荒创建世界后进行如下操作。 +dedicated_server_mods_setup.lua 文件放在/home/dst/dstserver/mods +cluster_token.txt cluster.ini 放在存档的根目录 +modoverrides.lua leveldataoverride.lua server.ini 分别放入Master、Caves</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">screen -S master ./master_start.sh +screen -S caves ./caves_start.sh +</code></pre></td></tr></table> +</div> +</div><h2 id="配置dst用户开机启动服务器">配置dst用户开机启动服务器</h2> +<blockquote> +<p>systemd 用户实例在用户首次登陆时启动,并在最后一个会话退出时终止。 但有时候,对于一些不依赖于会话的用户进程,在系统启动时加载用户实例,在会话全部结束时,也不停止用户实例是比较有用的。Lingering 就是用来实现这个的。 使用以下命令来启用驻留指定用户:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">loginctl enable-linger username +</code></pre></td></tr></table> +</div> +</div></blockquote> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">loginctl enable-linger dst +<span class="nb">export</span> <span class="nv">XDG_RUNTIME_DIR</span><span class="o">=</span>/run/user/<span class="k">$(</span>id -u<span class="k">)</span> <span class="o">&amp;&amp;</span> systemctl --user import-environment PATH + +<span class="c1"># 验证是否配置正确</span> +systemctl --user show-environment + + +systemctl --user <span class="nb">enable</span> dstmaster +systemctl --user <span class="nb">enable</span> dstcaves +systemctl --user daemon-reload + +systemctl --user status dstcaves + +<span class="c1"># 查看日志</span> +journalctl --user -u dstmaster -n <span class="m">20</span> -f +journalctl --user -u dstcaves -n <span class="m">20</span> -f + +</code></pre></td></tr></table> +</div> +</div><p>就为了个以dst用户开机启动dst服务器,真是给我整吐了 +之后最好还要加一个定时备份存档</p> +<!-- echo "XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.config/environment.d/env.conf --> +<!-- echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)\nsystemctl --user import-environment PATH" >> ~/.bashrc --> +<p><a href="https://wiki.archlinux.org/title/Systemd_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/User_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E9%9A%8F%E7%B3%BB%E7%BB%9F%E8%87%AA%E5%8A%A8%E5%90%AF%E5%258">https://wiki.archlinux.org/title/Systemd_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/User_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E9%9A%8F%E7%B3%BB%E7%BB%9F%E8%87%AA%E5%8A%A8%E5%90%AF%E5%8</a></p> + + + + + + + + + + + + + + + + Nginx+Trojan Go搭建 + + https://example.com/posts/nginx+trojan-go%E6%90%AD%E5%BB%BA/ + 2022-01-12T15:42:33+08:00 + 2022-01-12T15:42:10+08:00 + + iaeieue + https://example.com/ + iaeieue@gmail.com + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)配置系统Nginx服务 使用 apt 进行前置软件安装 1 2 apt update apt install nginx screen curl unzip 创建站点文件夹,并编…… + + <h2 id="配置系统nginx服务">配置系统Nginx服务</h2> +<p>使用 apt 进行前置软件安装</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">apt update +apt install nginx screen curl unzip +</code></pre></td></tr></table> +</div> +</div><p>创建站点文件夹,并编写测试网页文件</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">mkdir -p /var/www/baoshuma.top +vi /var/www/baoshuma.top/index.html +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="cp">&lt;!DOCTYPE html&gt;</span> +<span class="p">&lt;</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">&#34;en&#34;</span><span class="p">&gt;</span> + +<span class="p">&lt;</span><span class="nt">head</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">&#34;UTF-8&#34;</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">http-equiv</span><span class="o">=</span><span class="s">&#34;X-UA-Compatible&#34;</span> <span class="na">content</span><span class="o">=</span><span class="s">&#34;IE=edge&#34;</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">name</span><span class="o">=</span><span class="s">&#34;viewport&#34;</span> <span class="na">content</span><span class="o">=</span><span class="s">&#34;width=device-width, initial-scale=1.0&#34;</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">title</span><span class="p">&gt;</span>Document<span class="p">&lt;/</span><span class="nt">title</span><span class="p">&gt;</span> +<span class="p">&lt;/</span><span class="nt">head</span><span class="p">&gt;</span> + +<span class="p">&lt;</span><span class="nt">body</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>Example Page<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span> + This is content...... +<span class="p">&lt;/</span><span class="nt">body</span><span class="p">&gt;</span> + +<span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span> +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">vi /etc/nginx/sites-available/baoshuma.top +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-service" data-lang="service"><span class="err">server</span> <span class="err">{</span> + <span class="err">listen</span> <span class="err">80</span><span class="c">;</span> + + <span class="err">root</span> <span class="err">/var/www/baoshuma.top</span><span class="c">;</span> + <span class="err">index</span> <span class="err">index.html</span> <span class="err">index.htm</span> <span class="err">index.nginx-debian.html</span><span class="c">;</span> + <span class="err">server_name</span> <span class="err">baoshuma.top</span> <span class="err">www.baoshuma.top</span><span class="c">;</span> + + <span class="err">location</span> <span class="err">/</span> <span class="err">{</span> + <span class="na">try_files $uri $uri/ </span><span class="o">=</span><span class="s">404;</span> + <span class="err">}</span> + + <span class="na">if ( $remote_addr !</span><span class="o">=</span><span class="s"> 127.0.0.1 ) {</span> + <span class="err">rewrite</span> <span class="err">^/(.*)$</span> <span class="err">https://baoshuma.top/$1</span> <span class="err">redirect</span><span class="c">;</span> + <span class="err">}</span> + + <span class="err">access_log</span> <span class="err">/var/log/nginx/baoshuma.top.access.log</span><span class="c">;</span> + <span class="err">error_log</span> <span class="err">/var/log/nginx/baoshuma.top.error.log</span><span class="c">;</span> +<span class="err">}</span> +</code></pre></td></tr></table> +</div> +</div><p>创建软连接并重启nginx服务</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">ln -s /etc/nginx/sites-available/baoshuma.top /etc/nginx/sites-enabled +systemctl restart nginx + +</code></pre></td></tr></table> +</div> +</div><h2 id="通过acmesh进行ssl证书自动化">通过ACME.SH进行SSL证书自动化</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">curl https://get.acme.sh <span class="p">|</span> sh +acme.sh --set-default-ca --server letsencrypt +<span class="nb">export</span> <span class="nv">CF_Key</span><span class="o">=</span><span class="s2">&#34;XXX&#34;</span> +<span class="nb">export</span> <span class="nv">CF_Email</span><span class="o">=</span><span class="s2">&#34;XXX&#34;</span> +acme.sh --issue --dns dns_cf -d baoshuma.top -d <span class="s1">&#39;*.baoshuma.top&#39;</span> -k ec-256 +mkdir -p /etc/nginx/ssl +acme.sh --installcert -d baoshuma.top --fullchain-file /etc/nginx/ssl/fullchain.cer --key-file /etc/nginx/ssl/baoshuma.top.key --ecc +</code></pre></td></tr></table> +</div> +</div><h2 id="配置trojan-go">配置Trojan-Go</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">wget https://github.com/p4gefau1t/trojan-go/releases/download/v0.10.6/trojan-go-linux-amd64.zip +mkdir -p /etc/trojan-go/<span class="o">{</span>bin,conf,logs<span class="o">}</span> +unzip -d /etc/trojan-go/bin trojan-go-linux-amd64.zip +rm trojan-go-linux-amd64.zip +vi /etc/trojan-go/conf/server.json +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span><span class="lnt">20 +</span><span class="lnt">21 +</span><span class="lnt">22 +</span><span class="lnt">23 +</span><span class="lnt">24 +</span><span class="lnt">25 +</span><span class="lnt">26 +</span><span class="lnt">27 +</span><span class="lnt">28 +</span><span class="lnt">29 +</span><span class="lnt">30 +</span><span class="lnt">31 +</span><span class="lnt">32 +</span><span class="lnt">33 +</span><span class="lnt">34 +</span><span class="lnt">35 +</span><span class="lnt">36 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="p">{</span> + <span class="nt">&#34;run_type&#34;</span><span class="p">:</span> <span class="s2">&#34;server&#34;</span><span class="p">,</span> + <span class="nt">&#34;local_addr&#34;</span><span class="p">:</span> <span class="s2">&#34;0.0.0.0&#34;</span><span class="p">,</span> + <span class="nt">&#34;local_port&#34;</span><span class="p">:</span> <span class="mi">443</span><span class="p">,</span> + <span class="nt">&#34;remote_addr&#34;</span><span class="p">:</span> <span class="s2">&#34;127.0.0.1&#34;</span><span class="p">,</span> + <span class="nt">&#34;remote_port&#34;</span><span class="p">:</span> <span class="mi">80</span><span class="p">,</span> + <span class="nt">&#34;password&#34;</span><span class="p">:</span> <span class="p">[</span> + <span class="s2">&#34;XXX&#34;</span> + <span class="p">],</span> + <span class="nt">&#34;log_level&#34;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="nt">&#34;log_file&#34;</span><span class="p">:</span> <span class="s2">&#34;/etc/trojan-go/logs/trojan-go-access.log&#34;</span><span class="p">,</span> + <span class="nt">&#34;ssl&#34;</span><span class="p">:</span> <span class="p">{</span> + <span class="nt">&#34;verify&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;verify_hostname&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;cert&#34;</span><span class="p">:</span> <span class="s2">&#34;/etc/nginx/ssl/fullchain.cer&#34;</span><span class="p">,</span> + <span class="nt">&#34;key&#34;</span><span class="p">:</span> <span class="s2">&#34;/etc/nginx/ssl/baoshuma.top.key&#34;</span><span class="p">,</span> + <span class="nt">&#34;key_password&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;curves&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;cipher&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;prefer_server_cipher&#34;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> + <span class="nt">&#34;sni&#34;</span><span class="p">:</span> <span class="s2">&#34;baoshuma.top&#34;</span><span class="p">,</span> + <span class="nt">&#34;alpn&#34;</span><span class="p">:</span> <span class="p">[</span> + <span class="s2">&#34;http/1.1&#34;</span> + <span class="p">],</span> + <span class="nt">&#34;reuse_session&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;session_ticket&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;plain_http_response&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;fallback_addr&#34;</span><span class="p">:</span> <span class="s2">&#34;127.0.0.1&#34;</span><span class="p">,</span> + <span class="nt">&#34;fallback_port&#34;</span><span class="p">:</span> <span class="mi">80</span><span class="p">,</span> + <span class="nt">&#34;fingerprint&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span> + <span class="p">},</span> + <span class="nt">&#34;tcp&#34;</span><span class="p">:</span> <span class="p">{</span> + <span class="nt">&#34;no_delay&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;keep_alive&#34;</span><span class="p">:</span> <span class="kc">true</span> + <span class="p">}</span> +<span class="p">}</span> +</code></pre></td></tr></table> +</div> +</div><p>配置Trojan-Go开机自启服务</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">vi /lib/systemd/system/trojan-go.service +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-service" data-lang="service"><span class="k">[Unit]</span> +<span class="na">Description</span><span class="o">=</span><span class="s">Trojan-Go - An unidentifiable mechanism that helps you bypass GFW</span> +<span class="na">Documentation</span><span class="o">=</span><span class="s">https://p4gefau1t.github.io/trojan-go</span> +<span class="na">After</span><span class="o">=</span><span class="s">network.target nss-lookup.target</span> + +<span class="k">[Service]</span> +<span class="na">CapabilityBoundingSet</span><span class="o">=</span><span class="s">CAP_NET_ADMIN CAP_NET_BIND_SERVICE</span> +<span class="na">AmbientCapabilities</span><span class="o">=</span><span class="s">CAP_NET_ADMIN CAP_NET_BIND_SERVICE</span> +<span class="na">NoNewPrivileges</span><span class="o">=</span><span class="s">true</span> +<span class="na">ExecStart</span><span class="o">=</span><span class="s">/etc/trojan-go/bin/trojan-go -config /etc/trojan-go/conf/server.json</span> +<span class="na">Restart</span><span class="o">=</span><span class="s">on-failure</span> +<span class="na">RestartSec</span><span class="o">=</span><span class="s">10s</span> +<span class="na">LimitNOFILE</span><span class="o">=</span><span class="s">infinity</span> + +<span class="k">[Install]</span> +<span class="na">WantedBy</span><span class="o">=</span><span class="s">multi-user.target</span> +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">systemctl <span class="nb">enable</span> trojan-go +systemctl daemon-reload +systemctl start trojan-go +systemctl status trojan-go +journalctl -u trojan-go -n <span class="m">20</span> -f + +</code></pre></td></tr></table> +</div> +</div><h2 id="bbrcake">BBR+cake</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">echo</span> <span class="s1">&#39;net.core.default_qdisc=cake&#39;</span> <span class="p">|</span> tee -a /etc/sysctl.conf +<span class="nb">echo</span> <span class="s1">&#39;net.ipv4.tcp_congestion_control=bbr&#39;</span> <span class="p">|</span> tee -a /etc/sysctl.conf +sysctl -p + +lsmod <span class="p">|</span> egrep bbr + + +reboot +</code></pre></td></tr></table> +</div> +</div> + + + + + + + + + + + + + + + Hello World + + https://example.com/posts/hello-world/ + 2022-01-11T17:07:42+08:00 + 2022-01-11T17:07:42+08:00 + + iaeieue + https://example.com/ + iaeieue@gmail.com + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) + + + + + + + + + + + + + + + + diff --git a/categories/index.html b/categories/index.html new file mode 100644 index 0000000..20c3f7a --- /dev/null +++ b/categories/index.html @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + Categories | 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ + 如我所见 + +
+ + + + +
+
+ + + + + + + +
+ + + + + + + +
+
+
+ +

Categories

+ +
+ + + + + + + + + + +
    + +
+
+
+
+
+ + + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/css/meme.min.3c52e5b04c3db513988e826607f42a0fe51c3d52b98afd6f5cfac2dede39923a.css b/css/meme.min.3c52e5b04c3db513988e826607f42a0fe51c3d52b98afd6f5cfac2dede39923a.css new file mode 100644 index 0000000..e326449 --- /dev/null +++ b/css/meme.min.3c52e5b04c3db513988e826607f42a0fe51c3d52b98afd6f5cfac2dede39923a.css @@ -0,0 +1,10 @@ +html{scroll-behavior:smooth}html,body{margin:0;width:100%;height:100%;font-size:16px;text-size-adjust:none;-webkit-text-size-adjust:none;-moz-text-size-adjust:none}body{-moz-tab-size:4;tab-size:4;color:var(--color-contrast-high);background-color:var(--color-bg);overflow-wrap:break-word;word-wrap:break-word;line-height:1.618;transition:all .5s}.container{min-height:100%;min-width:100%;position:relative}.main{padding:2em 1em 15em;display:block}.main{padding-top:7em}.main-inner{margin:0 auto;display:block}.icon{width:1.05em;height:1em;fill:currentColor;display:inline-block}svg{vertical-align:middle}h1,h2,h3,h4,h5,h6{margin:1.618em 0 1em;color:var(--color-contrast-higher)}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{text-decoration:none !important;color:var(--color-contrast-higher)}h1{font-size:2em}h2{font-size:1.8em}h3{font-size:1.6em}h4{font-size:1.4em}h5{font-size:1.2em}h6{font-size:1em}a{color:var(--color-contrast-high);text-decoration:none;transition:all .5s}a:hover{color:var(--color-primary)}::selection{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3)}::-webkit-scrollbar{width:0.5rem;height:0.5rem}::-webkit-scrollbar-track{background-color:var(--color-bg)}::-webkit-scrollbar-thumb{background-color:var(--color-contrast-low)}::-webkit-scrollbar-thumb:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}::-webkit-scrollbar-thumb:active{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}::-webkit-scrollbar-corner{background-color:var(--color-bg)}.list-title,.term-title,.list-year,.list-month,.post-title,.post-subtitle,.related-title,.post-nav,thead,dt{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}.post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5,.post-body h6{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}.contents-title{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}code,pre,sup,.post-meta,.updated-badge,.post-gitinfo,.minimal-footer,.minimal-footer-about,.busuanzi-site-uv-and-pv,.copy-button{font-family:"glyph-correction","Source Code Pro","Noto Serif SC",monospace}body{font-family:"glyph-correction","EB Garamond","Noto Serif SC",serif}@font-face{font-family:'glyph-correction';font-display:swap;src:url("/fonts/glyph-correction.woff2") format("woff2"),url("/fonts/glyph-correction.woff") format("woff"),url("/fonts/glyph-correction.ttf") format("truetype"),url("/fonts/glyph-correction.eot") format("embedded-opentype");unicode-range:U+00B7, U+2014, U+2022, U+2026;font-weight:inherit;font-style:inherit}.drop-cap{margin-top:1rem !important}.emphasis-point{font-style:normal;text-emphasis:'•';-webkit-text-emphasis:'•';-moz-text-emphasis:'•';text-emphasis-position:under;-webkit-text-emphasis-position:under;-moz-text-emphasis-position:under}[data-indent="true"] .contents-title{text-align:center}[data-indent="true"] .post-body p{text-indent:2em;margin:0}[data-indent="true"] .post-body .caption{text-indent:0;margin:0 0 1em}[data-indent="true"] .post-body blockquote{margin:1em 0;padding:0;border:none}[data-indent="true"] .post-body img,[data-indent="true"] .post-body video{margin:1em auto}[data-indent="true"] .post-body table{margin:1em 0}[data-indent="true"] .post-body pre,[data-indent="true"] .post-body .highlight{margin:1rem 0}[data-indent="true"] .post-body h1,[data-indent="true"] .post-body h2,[data-indent="true"] .post-body h3,[data-indent="true"] .post-body h4,[data-indent="true"] .post-body h5,[data-indent="true"] .post-body h6{text-align:center}[data-indent="true"] .post-body .anchor-link{position:relative;transform:none;display:block;float:none}[data-indent="true"] .post-body ol,[data-indent="true"] .post-body ul{margin:0;padding-left:4em}[data-indent="true"] .post-body ol p,[data-indent="true"] .post-body ul p{text-indent:0}[data-indent="true"] .post-body li ol,[data-indent="true"] .post-body li ul{padding-left:2em}[data-indent="true"] .post-body dl{text-indent:2em}[data-indent="true"] .post-body dl dd{text-indent:0;margin-left:4em}[data-indent="true"] .post-body dl p{text-indent:0}@media (prefers-color-scheme: light){:root:not([data-theme]){--theme-name: "light";--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #006699;--chroma-name-color: #9999ff;--chroma-attribute-color: #330099;--chroma-literal-color: #cc3300;--chroma-number-color: #ff6600;--chroma-comment-color: #0099ff;--chroma-deleted-color: #ffcccc;--chroma-output-color: #aaaaaa}:root:not([data-theme]) .theme-icon-light{display:inline-block}:root:not([data-theme]) .theme-icon-dark{display:none}}:root[data-theme="light"]{--theme-name: "light";--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #006699;--chroma-name-color: #9999ff;--chroma-attribute-color: #330099;--chroma-literal-color: #cc3300;--chroma-number-color: #ff6600;--chroma-comment-color: #0099ff;--chroma-deleted-color: #ffcccc;--chroma-output-color: #aaaaaa}:root[data-theme="light"] .theme-icon-light{display:inline-block}:root[data-theme="light"] .theme-icon-dark{display:none}@media (prefers-color-scheme: dark){:root:not([data-theme]){--theme-name: "dark";--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(231, 14%, 10%);--color-bg-h:231;--color-bg-s:14%;--color-bg-l:10%;--color-contrast-lower:hsl(230, 12%, 18%);--color-contrast-lower-h:230;--color-contrast-lower-s:12%;--color-contrast-lower-l:18%;--color-contrast-low:hsl(240, 2%, 37%);--color-contrast-low-h:240;--color-contrast-low-s:2%;--color-contrast-low-l:37%;--color-contrast-medium:hsl(80, 2%, 69%);--color-contrast-medium-h:80;--color-contrast-medium-s:2%;--color-contrast-medium-l:69%;--color-contrast-high:hsl(69, 9%, 84%);--color-contrast-high-h:69;--color-contrast-high-s:9%;--color-contrast-high-l:84%;--color-contrast-higher:hsl(60, 6%, 90%);--color-contrast-higher-h:60;--color-contrast-higher-s:6%;--color-contrast-higher-l:90%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #ff79c6;--chroma-name-color: #8be9fd;--chroma-attribute-color: #50fa7b;--chroma-literal-color: #f1fa8c;--chroma-number-color: #bd93f9;--chroma-comment-color: #6272a4;--chroma-deleted-color: #8b080b;--chroma-output-color: #44475a}:root:not([data-theme]) .theme-icon-light{display:none}:root:not([data-theme]) .theme-icon-dark{display:inline-block}:root:not([data-theme]) img{filter:brightness(75%)}}:root{--theme-name: "dark";--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(231, 14%, 10%);--color-bg-h:231;--color-bg-s:14%;--color-bg-l:10%;--color-contrast-lower:hsl(230, 12%, 18%);--color-contrast-lower-h:230;--color-contrast-lower-s:12%;--color-contrast-lower-l:18%;--color-contrast-low:hsl(240, 2%, 37%);--color-contrast-low-h:240;--color-contrast-low-s:2%;--color-contrast-low-l:37%;--color-contrast-medium:hsl(80, 2%, 69%);--color-contrast-medium-h:80;--color-contrast-medium-s:2%;--color-contrast-medium-l:69%;--color-contrast-high:hsl(69, 9%, 84%);--color-contrast-high-h:69;--color-contrast-high-s:9%;--color-contrast-high-l:84%;--color-contrast-higher:hsl(60, 6%, 90%);--color-contrast-higher-h:60;--color-contrast-higher-s:6%;--color-contrast-higher-l:90%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #ff79c6;--chroma-name-color: #8be9fd;--chroma-attribute-color: #50fa7b;--chroma-literal-color: #f1fa8c;--chroma-number-color: #bd93f9;--chroma-comment-color: #6272a4;--chroma-deleted-color: #8b080b;--chroma-output-color: #44475a}:root .theme-icon-light{display:none}:root .theme-icon-dark{display:inline-block}:root img{filter:brightness(75%)}#theme-switcher{color:var(--color-contrast-medium);transition:color .5s;z-index:4}#theme-switcher:hover{color:var(--color-primary)}#theme-switcher .icon{margin-right:0 !important}.header{z-index:3}.header{position:fixed;width:100vw}.header-wrapper{padding:1em 0;-webkit-backdrop-filter:saturate(180%) blur(1em);backdrop-filter:saturate(180%) blur(1em);background:linear-gradient(90deg, rgba(247,149,51,0.101961) 0, rgba(243,112,85,0.101961) 15%, rgba(239,78,123,0.101961) 30%, rgba(161,102,171,0.101961) 44%, rgba(80,115,184,0.101961) 58%, rgba(16,152,173,0.101961) 72%, rgba(7,179,155,0.101961) 86%, rgba(109,186,130,0.101961) 100%);transition:background .5s}.header-inner{display:flex;justify-content:space-between;align-items:center;margin:0 auto;max-width:40em}.header-inner.list{max-width:36em}.site-brand{margin-right:1em}.brand{font-size:1em;color:var(--color-contrast-high);text-decoration:none}.brand:hover{color:var(--color-contrast-high)}:root{--header-height: calc( + max( + /* brand */ + 25.888px, + /* menu */ + 19.2px /* {.nav font-size} * {.menu line-height} */ + ) + /* .header-wrapper top+bottom margin */ + + 32px + )}*[id]{scroll-margin-top:var(--header-height)}#nav-toggle{display:none}.nav-toggle{display:none;position:absolute;top:1em;right:1em;margin-right:1em;width:1em;height:1em;cursor:pointer}.nav-toggle-inner{padding:1em;display:inline-block}.nav-toggle span{display:block;position:absolute;height:0.1em;width:1em;background-color:var(--color-contrast-high);transition:all .5s}.nav-toggle span:nth-child(1){top:0.4em}.nav-toggle span:nth-child(2){top:0.7em}.nav-toggle span:nth-child(3){top:1em}.nav-toggle.open span:nth-child(1){top:75%;transform:rotate(225deg)}.nav-toggle.open span:nth-child(2){width:0;opacity:0;transform:rotate(-135deg)}.nav-toggle.open span:nth-child(3){top:75%;transform:rotate(-45deg)}.nav-curtain{height:100vh;width:100vw;-webkit-backdrop-filter:saturate(180%) blur(1em);backdrop-filter:saturate(180%) blur(1em);background:linear-gradient(90deg, rgba(247,149,51,0.101961) 0, rgba(243,112,85,0.101961) 15%, rgba(239,78,123,0.101961) 30%, rgba(161,102,171,0.101961) 44%, rgba(80,115,184,0.101961) 58%, rgba(16,152,173,0.101961) 72%, rgba(7,179,155,0.101961) 86%, rgba(109,186,130,0.101961) 100%) rgba(0,0,0,0.5)}.nav{z-index:3;position:relative}.menu{padding:0;margin:0;list-style:none;line-height:1.5;font-weight:500}.menu-item{display:inline-block}.menu-item a{color:var(--color-contrast-medium)}.menu-item a:hover{color:var(--color-primary)}.active a{color:var(--color-primary)}.nav{text-align:right;font-size:80%}.menu-item{margin-left:0.5em}.menu-item .icon{margin:0 0.3em 0.2em 0}.list .main-inner{width:36em}.list-title{text-align:center}.list ul{list-style:none;padding:0}.list-item-title{flex:1}.list-item-time{text-align:right;margin-left:1em}.list-item{line-height:2;position:relative;transition:border .5s;border-bottom:1px dashed var(--color-contrast-low);margin-top:1em;padding-bottom:0.5em;display:flex;align-items:baseline}.list-item:hover{border-bottom-color:var(--color-primary)}.list-item:hover ::before{background:var(--color-primary)}.list-item ::before{content:" ";position:absolute;left:0.618em;top:0.618em;width:5.33333333px;height:5.33333333px;background:var(--color-contrast-low);border-radius:50%;border:1px solid var(--color-bg);transition:background .5s;font-size:1rem}.list-item-title{margin:0 0.618em 0 2em;font-size:1.2em;line-height:1.5}.list-item-time{margin:0 0.618em 0 2em;color:var(--color-contrast-medium);line-height:1.5}.list-read-more{margin-top:1em;font-size:1.2em;line-height:1.5}.list-year{display:flex;justify-content:space-between;align-items:baseline}.term-count{color:var(--color-contrast-medium);font-size:0.7em}.single .main-inner{width:40em}.post-title{text-align:center}.post-subtitle{font-size:1.8em;text-align:center;font-weight:700;margin-top:-0.618em}.post-description{text-align:center;margin:1rem 0;font-size:90%}.post-body{margin-top:5em !important}.post-body a{text-decoration:underline;text-decoration-color:var(--color-contrast-low)}.post-body a:hover{text-decoration-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.post p{margin:1em 0;line-height:2}.post img{display:block;margin:2em auto;max-width:100%;border:1px solid var(--color-contrast-lower);clear:both}.post video{display:block;max-width:100%;margin:2em auto;clear:both}.post sup{font-size:70%;vertical-align:super}.post sup a{text-decoration:none}.post ol,.post ul{margin:0;padding-left:2em;line-height:2}.post hr{border:none;margin:2.427em 0 1.5em;text-align:center}.post hr::after{content:"···";letter-spacing:2em;padding-left:2em}blockquote{margin:2em 0;padding-left:1em;color:var(--color-contrast-medium);border-left:3px solid var(--color-contrast-low)}blockquote a{color:var(--color-contrast-medium)}blockquote a:hover{color:var(--color-primary)}.drop-cap{float:left;font-size:48px;margin-right:16px;margin-top:8px;line-height:32px}.caption{display:block;text-align:center;margin:-1em 0 0;font-size:90%;color:var(--color-contrast-medium)}.contents{margin-top:5em}.contents ol,.contents ul{list-style:none}ol.toc,ul.toc{padding:0;overflow:auto hidden;white-space:nowrap}.footnotes{font-size:90%;margin-top:5rem}.footnotes hr{margin:0;height:1px;border:none;background-color:var(--color-contrast-medium)}.footnotes hr::after{content:none}.footnotes ol{margin:1.618rem 0 0 !important;padding:0 1rem 0 2rem !important}.footnote-icon{fill:hsla(var(--color-contrast-high-h), var(--color-contrast-high-s), var(--color-contrast-high-l), 0.5);transition:fill .5s;margin-bottom:0.3em}.footnote-icon:hover{fill:var(--color-primary)}.anchor-link{position:absolute;transform:translate(-150%)}.anchor-icon{width:0.75em;height:0.75em;vertical-align:baseline}:root{--anchor-opacity: 0}.anchor-link{opacity:var(--anchor-opacity);transition:all .25s}.post h1:hover,.post h2:hover,.post h3:hover,.post h4:hover,.post h5:hover,.post h6:hover,.post .anchor-link:hover{--anchor-opacity: 1}.table-container{margin:2em 0;overflow-x:auto}table{width:100%;border-collapse:collapse;border-spacing:0;border-color:var(--color-contrast-lower)}th{font-weight:700}th,td{font-size:0.9em;padding:0.4em;border:1px solid var(--color-contrast-lower)}table>tbody>tr:nth-of-type(odd){background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}table>tbody>tr:hover{background-color:var(--color-contrast-lower)}dt{font-weight:700}dd{margin-left:2em}code{padding:2px 4px;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);font-size:80%}pre{overflow:auto;overflow-wrap:normal;word-wrap:normal;font-size:0.8rem;margin:2rem 0;padding:1em;line-height:1.618;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}pre code{background-color:unset;font-size:0.8rem;padding:0}pre{max-height:25em}.copy-button{position:absolute;top:0;right:0;border:0;font-size:inherit;color:var(--color-bg);background-color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.5);transition:all .5s;cursor:pointer}.copy-button:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.copy-button{visibility:hidden;opacity:0}.katex-display,mjx-container[jax="CHTML"][display="true"]{overflow:auto hidden;text-indent:0}.footer{position:absolute;bottom:0;width:100%;font-size:90%;color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.footer a{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.footer a:hover{color:var(--color-primary)}.footer-inner{padding:1em;text-align:center}.footer-icon{margin:0 0.25em 0.3em}.footer-icon{fill:#f06292}@keyframes heartbeat{0%,100%{transform:scale(1)}10%,30%{transform:scale(0.9)}20%,40%,50%,60%,70%,80%{transform:scale(1.1)}}.footer-icon{animation:heartbeat 1.33s ease-in-out infinite}.post-meta{color:var(--color-contrast-medium);font-size:80%;text-align:center;margin:1rem 0}.post-meta a{color:var(--color-contrast-medium)}.post-meta a:hover{color:var(--color-primary)}.home .post-meta{margin:1rem 0}.post-meta-item{margin:0.5em;display:inline-block}.post-meta-icon{fill:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.5);margin-bottom:0.3em}.post-copyright{margin:0;list-style:none;margin-top:5em !important;padding:0.5em 1em;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);border-left:3px solid hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5);line-height:2}.copyright-item{line-height:1.5;margin:0.5em 0}.copyright-item-text{font-weight:500}.updated-badge-container{margin-top:5em;text-align:center}.updated-badge-left{fill:var(--color-contrast-low)}.updated-badge-right{fill:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.related-posts{border:1px solid var(--color-contrast-lower);padding:0.6em 1em;line-height:2em;margin-top:5em}.related-title{font-size:1em;margin:0}.related-icon{float:right;margin-top:0.4em}.related-list{margin:0;padding:0;list-style:none}.related-link{line-height:1.5;display:inline-block}.post-tags{margin-top:5rem;text-align:center;font-size:90%}.post-tags-link{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.9);margin:0 0.5em;line-height:2;display:inline-block}.tag-icon{margin-right:0.3em;font-size:80%}.post-nav{list-style:none;padding:0;display:flex;justify-content:space-between;border-top:1px solid var(--color-contrast-lower);font-weight:700;margin-top:5em;padding-top:0.618em}.post-nav-prev{margin-right:auto;max-width:42%}.post-nav-next{margin-left:auto;text-align:right;max-width:42%}.back-to-top{position:fixed;right:0;z-index:1}.back-to-top a{display:block;padding:1em;color:var(--color-contrast-medium)}.back-to-top a:hover{color:var(--color-primary)}.back-to-top{bottom:-3.6em;transition:bottom 0.3s ease-in-out}.back-to-top.show{bottom:0}.highlight{font-size:0.8rem;margin:2rem 0}.highlight pre{margin:0 !important;max-height:unset}.highlight .lntd pre{background-color:unset;overflow:visible}.highlight table>tbody>tr:nth-of-type(odd){background-color:inherit}.highlight table>tbody>tr:hover{background-color:inherit}span.lnt{user-select:none;display:block;margin-right:-1em !important;padding:0 !important;text-align:right}.chroma{color:var(--color-contrast-high);background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}.lntable,.highlight>pre{max-height:25em}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:var(--chroma-line-numbers-background)}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:var(--chroma-line-numbers-color)}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:var(--chroma-line-numbers-color)}.chroma .k{color:var(--chroma-keyword-color)}.chroma .kc{color:var(--chroma-keyword-color)}.chroma .kd{color:var(--chroma-declaration-color);font-style:italic}.chroma .kn{color:var(--chroma-name-color)}.chroma .kp{color:var(--chroma-keyword-color)}.chroma .kr{color:var(--chroma-keyword-color)}.chroma .kt{color:var(--chroma-name-color)}.chroma .na{color:var(--chroma-attribute-color)}.chroma .nb{color:var(--chroma-name-color);font-style:italic}.chroma .nc{color:var(--chroma-attribute-color)}.chroma .nf{color:var(--chroma-attribute-color)}.chroma .nl{color:var(--chroma-name-color);font-style:italic}.chroma .nt{color:var(--chroma-keyword-color)}.chroma .nv{color:var(--chroma-name-color);font-style:italic}.chroma .vc{color:var(--chroma-name-color);font-style:italic}.chroma .vg{color:var(--chroma-name-color);font-style:italic}.chroma .vi{color:var(--chroma-name-color);font-style:italic}.chroma .s{color:var(--chroma-literal-color)}.chroma .sa{color:var(--chroma-literal-color)}.chroma .sb{color:var(--chroma-literal-color)}.chroma .sc{color:var(--chroma-literal-color)}.chroma .dl{color:var(--chroma-literal-color)}.chroma .sd{color:var(--chroma-literal-color)}.chroma .s2{color:var(--chroma-literal-color)}.chroma .se{color:var(--chroma-literal-color)}.chroma .sh{color:var(--chroma-literal-color)}.chroma .si{color:var(--chroma-literal-color)}.chroma .sx{color:var(--chroma-literal-color)}.chroma .sr{color:var(--chroma-literal-color)}.chroma .s1{color:var(--chroma-literal-color)}.chroma .ss{color:var(--chroma-literal-color)}.chroma .m{color:var(--chroma-number-color)}.chroma .mb{color:var(--chroma-number-color)}.chroma .mf{color:var(--chroma-number-color)}.chroma .mh{color:var(--chroma-number-color)}.chroma .mi{color:var(--chroma-number-color)}.chroma .il{color:var(--chroma-number-color)}.chroma .mo{color:var(--chroma-number-color)}.chroma .o{color:var(--chroma-keyword-color)}.chroma .ow{color:var(--chroma-keyword-color)}.chroma .c{color:var(--chroma-comment-color)}.chroma .ch{color:var(--chroma-comment-color)}.chroma .cm{color:var(--chroma-comment-color)}.chroma .c1{color:var(--chroma-comment-color)}.chroma .cs{color:var(--chroma-comment-color)}.chroma .cp{color:var(--chroma-keyword-color)}.chroma .cpf{color:var(--chroma-keyword-color)}.chroma .gd{color:var(--chroma-deleted-color)}.chroma .ge{text-decoration:underline}.chroma .gh{font-weight:bold}.chroma .gi{font-weight:bold}.chroma .go{color:var(--chroma-output-color)}.chroma .gu{font-weight:bold}.chroma .gl{text-decoration:underline}.home{text-align:center}.home .poetry{font-size:1em;width:auto;max-width:26em;margin:0 auto;padding:5em 1em 10em}.home .links{position:absolute;bottom:10%;left:5%;right:5%;font-size:1.5em}.home .links-item{padding:1em;display:inline-block}.home .life{color:#f37055}.home .tech{color:#a166ab}.home .about{color:#07b39b}.tree{overflow:auto hidden;white-space:nowrap}.tree ul{padding-left:2.4em}.tree>ul{padding:0}.list-categories>li{position:relative}.list-categories>li::before{content:" ";position:absolute;top:2.4em;left:0.1em;width:0.2em;height:calc(100% - 2.8em);background:var(--color-contrast-lower)}.category-item{color:var(--color-primary);font-size:1.2em}.category-item:hover{color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}.category-count{color:var(--color-contrast-medium)}.category-post:hover{color:var(--color-contrast-medium)}.tag-cloud{text-align:center}.tag-cloud-item{margin:0.5rem;display:inline-block}.fof::before{background-image:url();background-repeat:no-repeat;background-size:cover;background-position:50% 50%;content:" ";position:fixed;width:100%;height:100%;top:0;left:0;z-index:1}.fof .main-inner{background:rgba(0,0,0,0.25);min-height:100%;min-width:100%;position:absolute;z-index:3}.fof video{position:fixed;top:50%;left:50%;min-width:100%;min-height:100%;width:auto;height:auto;z-index:2;transform:translateX(-50%) translateY(-50%)}.fof h1{font-size:3rem;text-transform:uppercase;letter-spacing:0.3rem;text-align:center;top:15%;left:5%;right:5%;position:absolute;color:#fff;margin:0.67em 0}.fof .fof-footer{font-size:2rem;position:absolute;bottom:15%;left:10%;right:10%;text-align:center}.fof a{color:#eee}.fof a:hover{color:#fff}@media only screen and (max-device-width: 1024px){.fof #bgvid{display:none}}.medium-zoom-overlay,.medium-zoom-image--opened{z-index:5}:root{--max-width: 720px}@media (max-width: 720px){.main-inner{width:auto !important}.anchor-link{position:relative;transform:none;float:right}#back-to-top{display:none}.header-inner{width:100%}.site-brand{margin-left:1em}.header-inner{display:block;margin:0;max-width:none}.nav-toggle{display:block}.nav{display:none;text-align:center;margin:2em 0}.menu{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center}.menu-item{margin:0;padding:1em}.menu-item .icon{margin:0}.menu-item-name{display:block}.header.open .nav{display:block;animation:appear .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes appear{0%{opacity:0;height:0;margin:0;transform:scaleY(0);transform-origin:top}100%{opacity:1;height:10em;margin:2em 0;transform:scaleY(1);transform-origin:top}}.header.open .nav-curtain{animation:appearCurtain .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes appearCurtain{0%{visibility:hidden;opacity:0}100%{visibility:visible;opacity:1}}.header.fade .nav{display:block;animation:fade .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes fade{0%{opacity:1;height:10em;margin:2em 0;transform:scaleY(1);transform-origin:top}100%{opacity:0;height:0;margin:0;transform:scaleY(0);transform-origin:top}}.header.fade .nav-curtain{animation:fadeCurtain .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes fadeCurtain{0%{visibility:visible;opacity:1}100%{visibility:hidden;opacity:0}}#langs li{width:auto}}[data-small-caps="true"] .post-body h1,[data-small-caps="true"] .post-body h2,[data-small-caps="true"] .post-body h3,[data-small-caps="true"] .post-body h4,[data-small-caps="true"] .post-body h5,[data-small-caps="true"] .post-body h6{font-variant:small-caps}[data-small-caps="true"] .contents-title{font-variant:small-caps}[data-align="justify"] .post-body p,[data-align="justify"] .post-body li,[data-align="justify"] .post-body dd{text-align:justify;text-justify:distribute}[data-align="justify"] .footnotes a{word-break:break-all}[data-align="center"] .post-body p{text-align:center}[data-type="poetry"] .post-body{display:table;margin:0 auto}[data-type="poetry"] .post-body p{margin:0 0 1em}[data-type="poetry"] .post-body>p:first-child img,[data-type="poetry"] .post-body>p:first-child video{margin-top:0}[data-type="poetry"] .post-body>blockquote:first-child{margin-top:0}[data-type="poetry"] .post-body>blockquote:last-child{margin-bottom:0}[data-type="poetry"] .post-body>p:last-child{margin:0}[data-type="poetry"] .post-body>p:last-child img,[data-type="poetry"] .post-body>p:last-child video{margin-bottom:0}[data-type="poetry"] .post-body>p:last-child .caption{margin:1em 0 0}[data-type="poetry"] section.footnotes>ol>li:last-child>p:last-child{margin:0}[data-toc-num="true"] .contents ol{counter-reset:item}[data-toc-num="true"] .contents ol li::before{counter-increment:item;margin-right:0.5em}[data-toc-num="true"] .contents>ol>li::before{content:counters(item, ".") "."}[data-toc-num="true"] .contents li>ol>li::before{content:counters(item, ".")}@supports not ((backdrop-filter: none) or (-webkit-backdrop-filter: none)){.header-wrapper{background-color:var(--color-bg)}} diff --git a/css/meme.min.82b4d2edc73b987aa3e4d6c4d59bb3fc2d1d5fbf04374f90fadd06cefff07429.css b/css/meme.min.82b4d2edc73b987aa3e4d6c4d59bb3fc2d1d5fbf04374f90fadd06cefff07429.css new file mode 100644 index 0000000..9a8720c --- /dev/null +++ b/css/meme.min.82b4d2edc73b987aa3e4d6c4d59bb3fc2d1d5fbf04374f90fadd06cefff07429.css @@ -0,0 +1,10 @@ +html{scroll-behavior:smooth}html,body{margin:0;width:100%;height:100%;font-size:16px;text-size-adjust:none;-webkit-text-size-adjust:none;-moz-text-size-adjust:none}body{-moz-tab-size:4;tab-size:4;color:var(--color-contrast-high);background-color:var(--color-bg);overflow-wrap:break-word;word-wrap:break-word;line-height:1.618;transition:all .5s}.container{min-height:100%;min-width:100%;position:relative}.main{padding:2em 1em 15em;display:block}.main{padding-top:7em}.main-inner{margin:0 auto;display:block}.icon{width:1.05em;height:1em;fill:currentColor;display:inline-block}svg{vertical-align:middle}h1,h2,h3,h4,h5,h6{margin:1.618em 0 1em;color:var(--color-contrast-higher)}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{text-decoration:none !important;color:var(--color-contrast-higher)}h1{font-size:2em}h2{font-size:1.8em}h3{font-size:1.6em}h4{font-size:1.4em}h5{font-size:1.2em}h6{font-size:1em}a{color:var(--color-contrast-high);text-decoration:none;transition:all .5s}a:hover{color:var(--color-primary)}::selection{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.3)}::-webkit-scrollbar{width:0.5rem;height:0.5rem}::-webkit-scrollbar-track{background-color:var(--color-bg)}::-webkit-scrollbar-thumb{background-color:var(--color-contrast-low)}::-webkit-scrollbar-thumb:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}::-webkit-scrollbar-thumb:active{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}::-webkit-scrollbar-corner{background-color:var(--color-bg)}.list-title,.term-title,.list-year,.list-month,.post-title,.post-subtitle,.related-title,.post-nav,thead,dt{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}.post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5,.post-body h6{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}.contents-title{font-family:"glyph-correction","Noto Serif SC","EB Garamond",serif}code,pre,sup,.post-meta,.updated-badge,.post-gitinfo,.minimal-footer,.minimal-footer-about,.busuanzi-site-uv-and-pv,.copy-button{font-family:"glyph-correction","Source Code Pro","Noto Serif SC",monospace}body{font-family:"glyph-correction","EB Garamond","Noto Serif SC",serif}@font-face{font-family:'glyph-correction';font-display:swap;src:url("/fonts/glyph-correction.woff2") format("woff2"),url("/fonts/glyph-correction.woff") format("woff"),url("/fonts/glyph-correction.ttf") format("truetype"),url("/fonts/glyph-correction.eot") format("embedded-opentype");unicode-range:U+00B7, U+2014, U+2022, U+2026;font-weight:inherit;font-style:inherit}.drop-cap{margin-top:1rem !important}.emphasis-point{font-style:normal;text-emphasis:'•';-webkit-text-emphasis:'•';-moz-text-emphasis:'•';text-emphasis-position:under;-webkit-text-emphasis-position:under;-moz-text-emphasis-position:under}[data-indent="true"] .contents-title{text-align:center}[data-indent="true"] .post-body p{text-indent:2em;margin:0}[data-indent="true"] .post-body .caption{text-indent:0;margin:0 0 1em}[data-indent="true"] .post-body blockquote{margin:1em 0;padding:0;border:none}[data-indent="true"] .post-body img,[data-indent="true"] .post-body video{margin:1em auto}[data-indent="true"] .post-body table{margin:1em 0}[data-indent="true"] .post-body pre,[data-indent="true"] .post-body .highlight{margin:1rem 0}[data-indent="true"] .post-body h1,[data-indent="true"] .post-body h2,[data-indent="true"] .post-body h3,[data-indent="true"] .post-body h4,[data-indent="true"] .post-body h5,[data-indent="true"] .post-body h6{text-align:center}[data-indent="true"] .post-body .anchor-link{position:relative;transform:none;display:block;float:none}[data-indent="true"] .post-body ol,[data-indent="true"] .post-body ul{margin:0;padding-left:4em}[data-indent="true"] .post-body ol p,[data-indent="true"] .post-body ul p{text-indent:0}[data-indent="true"] .post-body li ol,[data-indent="true"] .post-body li ul{padding-left:2em}[data-indent="true"] .post-body dl{text-indent:2em}[data-indent="true"] .post-body dl dd{text-indent:0;margin-left:4em}[data-indent="true"] .post-body dl p{text-indent:0}@media (prefers-color-scheme: light){:root:not([data-theme]){--theme-name: "light";--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #006699;--chroma-name-color: #9999ff;--chroma-attribute-color: #330099;--chroma-literal-color: #cc3300;--chroma-number-color: #ff6600;--chroma-comment-color: #0099ff;--chroma-deleted-color: #ffcccc;--chroma-output-color: #aaaaaa}:root:not([data-theme]) .theme-icon-light{display:inline-block}:root:not([data-theme]) .theme-icon-dark{display:none}}:root{--theme-name: "light";--color-primary:hsl(220, 90%, 56%);--color-primary-h:220;--color-primary-s:90%;--color-primary-l:56%;--color-bg:hsl(0, 0%, 100%);--color-bg-h:0;--color-bg-s:0%;--color-bg-l:100%;--color-contrast-lower:hsl(0, 0%, 95%);--color-contrast-lower-h:0;--color-contrast-lower-s:0%;--color-contrast-lower-l:95%;--color-contrast-low:hsl(240, 1%, 83%);--color-contrast-low-h:240;--color-contrast-low-s:1%;--color-contrast-low-l:83%;--color-contrast-medium:hsl(240, 1%, 48%);--color-contrast-medium-h:240;--color-contrast-medium-s:1%;--color-contrast-medium-l:48%;--color-contrast-high:hsl(240, 4%, 20%);--color-contrast-high-h:240;--color-contrast-high-s:4%;--color-contrast-high-l:20%;--color-contrast-higher:hsl(240, 8%, 12%);--color-contrast-higher-h:240;--color-contrast-higher-s:8%;--color-contrast-higher-l:12%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #006699;--chroma-name-color: #9999ff;--chroma-attribute-color: #330099;--chroma-literal-color: #cc3300;--chroma-number-color: #ff6600;--chroma-comment-color: #0099ff;--chroma-deleted-color: #ffcccc;--chroma-output-color: #aaaaaa}:root .theme-icon-light{display:inline-block}:root .theme-icon-dark{display:none}@media (prefers-color-scheme: dark){:root:not([data-theme]){--theme-name: "dark";--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(231, 14%, 10%);--color-bg-h:231;--color-bg-s:14%;--color-bg-l:10%;--color-contrast-lower:hsl(230, 12%, 18%);--color-contrast-lower-h:230;--color-contrast-lower-s:12%;--color-contrast-lower-l:18%;--color-contrast-low:hsl(240, 2%, 37%);--color-contrast-low-h:240;--color-contrast-low-s:2%;--color-contrast-low-l:37%;--color-contrast-medium:hsl(80, 2%, 69%);--color-contrast-medium-h:80;--color-contrast-medium-s:2%;--color-contrast-medium-l:69%;--color-contrast-high:hsl(69, 9%, 84%);--color-contrast-high-h:69;--color-contrast-high-s:9%;--color-contrast-high-l:84%;--color-contrast-higher:hsl(60, 6%, 90%);--color-contrast-higher-h:60;--color-contrast-higher-s:6%;--color-contrast-higher-l:90%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #ff79c6;--chroma-name-color: #8be9fd;--chroma-attribute-color: #50fa7b;--chroma-literal-color: #f1fa8c;--chroma-number-color: #bd93f9;--chroma-comment-color: #6272a4;--chroma-deleted-color: #8b080b;--chroma-output-color: #44475a}:root:not([data-theme]) .theme-icon-light{display:none}:root:not([data-theme]) .theme-icon-dark{display:inline-block}:root:not([data-theme]) img{filter:brightness(75%)}}:root[data-theme="dark"]{--theme-name: "dark";--color-primary:hsl(201, 65%, 62%);--color-primary-h:201;--color-primary-s:65%;--color-primary-l:62%;--color-bg:hsl(231, 14%, 10%);--color-bg-h:231;--color-bg-s:14%;--color-bg-l:10%;--color-contrast-lower:hsl(230, 12%, 18%);--color-contrast-lower-h:230;--color-contrast-lower-s:12%;--color-contrast-lower-l:18%;--color-contrast-low:hsl(240, 2%, 37%);--color-contrast-low-h:240;--color-contrast-low-s:2%;--color-contrast-low-l:37%;--color-contrast-medium:hsl(80, 2%, 69%);--color-contrast-medium-h:80;--color-contrast-medium-s:2%;--color-contrast-medium-l:69%;--color-contrast-high:hsl(69, 9%, 84%);--color-contrast-high-h:69;--color-contrast-high-s:9%;--color-contrast-high-l:84%;--color-contrast-higher:hsl(60, 6%, 90%);--color-contrast-higher-h:60;--color-contrast-higher-s:6%;--color-contrast-higher-l:90%;--chroma-line-numbers-background: #ffffcc;--chroma-line-numbers-color: #7f7f7f;--chroma-keyword-color: #ff79c6;--chroma-name-color: #8be9fd;--chroma-attribute-color: #50fa7b;--chroma-literal-color: #f1fa8c;--chroma-number-color: #bd93f9;--chroma-comment-color: #6272a4;--chroma-deleted-color: #8b080b;--chroma-output-color: #44475a}:root[data-theme="dark"] .theme-icon-light{display:none}:root[data-theme="dark"] .theme-icon-dark{display:inline-block}:root[data-theme="dark"] img{filter:brightness(75%)}#theme-switcher{color:var(--color-contrast-medium);transition:color .5s;z-index:4}#theme-switcher:hover{color:var(--color-primary)}#theme-switcher .icon{margin-right:0 !important}.header{z-index:3}.header{position:fixed;width:100vw}.header-wrapper{padding:1em 0;-webkit-backdrop-filter:saturate(180%) blur(1em);backdrop-filter:saturate(180%) blur(1em);background:linear-gradient(90deg, rgba(247,149,51,0.101961) 0, rgba(243,112,85,0.101961) 15%, rgba(239,78,123,0.101961) 30%, rgba(161,102,171,0.101961) 44%, rgba(80,115,184,0.101961) 58%, rgba(16,152,173,0.101961) 72%, rgba(7,179,155,0.101961) 86%, rgba(109,186,130,0.101961) 100%);transition:background .5s}.header-inner{display:flex;justify-content:space-between;align-items:center;margin:0 auto;max-width:36em}.header-inner.list{max-width:36em}.site-brand{margin-right:1em}.brand{font-size:1em;color:var(--color-contrast-high);text-decoration:none}.brand:hover{color:var(--color-contrast-high)}:root{--header-height: calc( + max( + /* brand */ + 25.888px, + /* menu */ + 19.2px /* {.nav font-size} * {.menu line-height} */ + ) + /* .header-wrapper top+bottom margin */ + + 32px + )}*[id]{scroll-margin-top:var(--header-height)}#nav-toggle{display:none}.nav-toggle{display:none;position:absolute;top:1em;right:1em;margin-right:1em;width:1em;height:1em;cursor:pointer}.nav-toggle-inner{padding:1em;display:inline-block}.nav-toggle span{display:block;position:absolute;height:0.1em;width:1em;background-color:var(--color-contrast-high);transition:all .5s}.nav-toggle span:nth-child(1){top:0.4em}.nav-toggle span:nth-child(2){top:0.7em}.nav-toggle span:nth-child(3){top:1em}.nav-toggle.open span:nth-child(1){top:75%;transform:rotate(225deg)}.nav-toggle.open span:nth-child(2){width:0;opacity:0;transform:rotate(-135deg)}.nav-toggle.open span:nth-child(3){top:75%;transform:rotate(-45deg)}.nav-curtain{height:100vh;width:100vw;-webkit-backdrop-filter:saturate(180%) blur(1em);backdrop-filter:saturate(180%) blur(1em);background:linear-gradient(90deg, rgba(247,149,51,0.101961) 0, rgba(243,112,85,0.101961) 15%, rgba(239,78,123,0.101961) 30%, rgba(161,102,171,0.101961) 44%, rgba(80,115,184,0.101961) 58%, rgba(16,152,173,0.101961) 72%, rgba(7,179,155,0.101961) 86%, rgba(109,186,130,0.101961) 100%) rgba(0,0,0,0.5)}.nav{z-index:3;position:relative}.menu{padding:0;margin:0;list-style:none;line-height:1.5;font-weight:500}.menu-item{display:inline-block}.menu-item a{color:var(--color-contrast-medium)}.menu-item a:hover{color:var(--color-primary)}.active a{color:var(--color-primary)}.nav{text-align:right;font-size:80%}.menu-item{margin-left:0.5em}.menu-item .icon{margin:0 0.3em 0.2em 0}.list .main-inner{width:36em}.list-title{text-align:center}.list ul{list-style:none;padding:0}.list-item-title{flex:1}.list-item-time{text-align:right;margin-left:1em}.list-item{line-height:2;position:relative;transition:border .5s;border-bottom:1px dashed var(--color-contrast-low);margin-top:1em;padding-bottom:0.5em;display:flex;align-items:baseline}.list-item:hover{border-bottom-color:var(--color-primary)}.list-item:hover ::before{background:var(--color-primary)}.list-item ::before{content:" ";position:absolute;left:0.618em;top:0.618em;width:5.33333333px;height:5.33333333px;background:var(--color-contrast-low);border-radius:50%;border:1px solid var(--color-bg);transition:background .5s;font-size:1rem}.list-item-title{margin:0 0.618em 0 2em;font-size:1.2em;line-height:1.5}.list-item-time{margin:0 0.618em 0 2em;color:var(--color-contrast-medium);line-height:1.5}.list-read-more{margin-top:1em;font-size:1.2em;line-height:1.5}.list-year{display:flex;justify-content:space-between;align-items:baseline}.term-count{color:var(--color-contrast-medium);font-size:0.7em}.single .main-inner{width:36em}.post-title{text-align:center}.post-subtitle{font-size:1.8em;text-align:center;font-weight:700;margin-top:-0.618em}.post-description{text-align:center;margin:1rem 0;font-size:90%}.post-body{margin-top:5em !important}.post-body a{text-decoration:underline;text-decoration-color:var(--color-contrast-low)}.post-body a:hover{text-decoration-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.post p{margin:1em 0;line-height:2}.post img{display:block;margin:2em auto;max-width:100%;border:1px solid var(--color-contrast-lower);clear:both}.post video{display:block;max-width:100%;margin:2em auto;clear:both}.post sup{font-size:70%;vertical-align:super}.post sup a{text-decoration:none}.post ol,.post ul{margin:0;padding-left:2em;line-height:2}.post hr{border:none;margin:2.427em 0 1.5em;text-align:center}.post hr::after{content:"···";letter-spacing:2em;padding-left:2em}blockquote{margin:2em 0;padding-left:1em;color:var(--color-contrast-medium);border-left:3px solid var(--color-contrast-low)}blockquote a{color:var(--color-contrast-medium)}blockquote a:hover{color:var(--color-primary)}.drop-cap{float:left;font-size:48px;margin-right:16px;margin-top:8px;line-height:32px}.caption{display:block;text-align:center;margin:-1em 0 0;font-size:90%;color:var(--color-contrast-medium)}.contents{margin-top:5em}.contents ol,.contents ul{list-style:none}ol.toc,ul.toc{padding:0;overflow:auto hidden;white-space:nowrap}.footnotes{font-size:90%;margin-top:5rem}.footnotes hr{margin:0;height:1px;border:none;background-color:var(--color-contrast-medium)}.footnotes hr::after{content:none}.footnotes ol{margin:1.618rem 0 0 !important;padding:0 1rem 0 2rem !important}.footnote-icon{fill:hsla(var(--color-contrast-high-h), var(--color-contrast-high-s), var(--color-contrast-high-l), 0.5);transition:fill .5s;margin-bottom:0.3em}.footnote-icon:hover{fill:var(--color-primary)}.anchor-link{position:absolute;transform:translate(-150%)}.anchor-icon{width:0.75em;height:0.75em;vertical-align:baseline}:root{--anchor-opacity: 0}.anchor-link{opacity:var(--anchor-opacity);transition:all .25s}.post h1:hover,.post h2:hover,.post h3:hover,.post h4:hover,.post h5:hover,.post h6:hover,.post .anchor-link:hover{--anchor-opacity: 1}.table-container{margin:2em 0;overflow-x:auto}table{width:100%;border-collapse:collapse;border-spacing:0;border-color:var(--color-contrast-lower)}th{font-weight:700}th,td{font-size:0.9em;padding:0.4em;border:1px solid var(--color-contrast-lower)}table>tbody>tr:nth-of-type(odd){background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}table>tbody>tr:hover{background-color:var(--color-contrast-lower)}dt{font-weight:700}dd{margin-left:2em}code{padding:2px 4px;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);font-size:80%}pre{overflow:auto;overflow-wrap:normal;word-wrap:normal;font-size:0.8rem;margin:2rem 0;padding:1em;line-height:1.618;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}pre code{background-color:unset;font-size:0.8rem;padding:0}pre{max-height:20em}.copy-button{position:absolute;top:0;right:0;border:0;font-size:inherit;color:var(--color-bg);background-color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.5);transition:all .5s;cursor:pointer}.copy-button:hover{background-color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.copy-button{visibility:hidden;opacity:0}.katex-display,mjx-container[jax="CHTML"][display="true"]{overflow:auto hidden;text-indent:0}.footer{position:absolute;bottom:0;width:100%;font-size:90%;color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.footer a{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.footer a:hover{color:var(--color-primary)}.footer-inner{padding:1em;text-align:center}.footer-icon{margin:0 0.25em 0.3em}.footer-icon{fill:#f06292}@keyframes heartbeat{0%,100%{transform:scale(1)}10%,30%{transform:scale(0.9)}20%,40%,50%,60%,70%,80%{transform:scale(1.1)}}.footer-icon{animation:heartbeat 1.33s ease-in-out infinite}.post-meta{color:var(--color-contrast-medium);font-size:80%;text-align:center;margin:1rem 0}.post-meta a{color:var(--color-contrast-medium)}.post-meta a:hover{color:var(--color-primary)}.home .post-meta{margin:1rem 0}.post-meta-item{margin:0.5em;display:inline-block}.post-meta-icon{fill:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.5);margin-bottom:0.3em}.post-copyright{margin:0;list-style:none;margin-top:5em !important;padding:0.5em 1em;background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5);border-left:3px solid hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5);line-height:2}.copyright-item{line-height:1.5;margin:0.5em 0}.copyright-item-text{font-weight:500}.updated-badge-container{margin-top:5em;text-align:center}.updated-badge-left{fill:var(--color-contrast-low)}.updated-badge-right{fill:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.5)}.post-share{margin-top:5rem;color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.post-share a{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.8)}.post-share a:hover{color:inherit}.share-items{text-align:center}.share-item{margin:0 0.5em}.share-item{display:inline-block}.share-item .icon{transition:fill .5s}.twitter-icon:hover{fill:#1DA1F2}.facebook-icon:hover{fill:#1877F2}.linkedin-icon:hover{fill:#0077B5}.telegram-icon:hover{fill:#2CA5E0}.weibo-icon:hover{fill:#E6162D}.douban-icon:hover{fill:#007722}.qq-icon:hover{fill:#12B7F5}.qzone-icon:hover{fill:#FECE00}.qrcode-icon:hover{fill:var(--color-primary)}#qrcode-img{position:absolute;transform:translate(calc(-100% + 1em), calc(-100% - 1em));opacity:0;transition:opacity .5s}#qrcode-img img{display:none}.qrcode-container:hover #qrcode-img{opacity:1}.qrcode-container:hover #qrcode-img img{display:inline-block;border:1px solid var(--color-contrast-lower)}.related-posts{border:1px solid var(--color-contrast-lower);padding:0.6em 1em;line-height:2em;margin-top:5em}.related-title{font-size:1em;margin:0}.related-icon{float:right;margin-top:0.4em}.related-list{margin:0;padding:0;list-style:none}.related-link{line-height:1.5;display:inline-block}.post-tags{margin-top:5rem;text-align:center;font-size:90%}.post-tags-link{color:hsla(var(--color-contrast-medium-h), var(--color-contrast-medium-s), var(--color-contrast-medium-l), 0.9);margin:0 0.5em;line-height:2;display:inline-block}.tag-icon{margin-right:0.3em;font-size:80%}.post-nav{list-style:none;padding:0;display:flex;justify-content:space-between;border-top:1px solid var(--color-contrast-lower);font-weight:700;margin-top:5em;padding-top:0.618em}.post-nav-prev{margin-right:auto;max-width:42%}.post-nav-next{margin-left:auto;text-align:right;max-width:42%}.back-to-top{position:fixed;right:0;z-index:1}.back-to-top a{display:block;padding:1em;color:var(--color-contrast-medium)}.back-to-top a:hover{color:var(--color-primary)}.back-to-top{bottom:-3.6em;transition:bottom 0.3s ease-in-out}.back-to-top.show{bottom:0}.highlight{font-size:0.8rem;margin:2rem 0}.highlight pre{margin:0 !important;max-height:unset}.highlight .lntd pre{background-color:unset;overflow:visible}.highlight table>tbody>tr:nth-of-type(odd){background-color:inherit}.highlight table>tbody>tr:hover{background-color:inherit}span.lnt{user-select:none;display:block;margin-right:-1em !important;padding:0 !important;text-align:right}.chroma{color:var(--color-contrast-high);background-color:hsla(var(--color-contrast-lower-h), var(--color-contrast-lower-s), var(--color-contrast-lower-l), 0.5)}.lntable,.highlight>pre{max-height:20em}.chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}.chroma .lntable{border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block}.chroma .hl{display:block;width:100%;background-color:var(--chroma-line-numbers-background)}.chroma .lnt{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:var(--chroma-line-numbers-color)}.chroma .ln{margin-right:0.4em;padding:0 0.4em 0 0.4em;color:var(--chroma-line-numbers-color)}.chroma .k{color:var(--chroma-keyword-color)}.chroma .kc{color:var(--chroma-keyword-color)}.chroma .kd{color:var(--chroma-declaration-color);font-style:italic}.chroma .kn{color:var(--chroma-name-color)}.chroma .kp{color:var(--chroma-keyword-color)}.chroma .kr{color:var(--chroma-keyword-color)}.chroma .kt{color:var(--chroma-name-color)}.chroma .na{color:var(--chroma-attribute-color)}.chroma .nb{color:var(--chroma-name-color);font-style:italic}.chroma .nc{color:var(--chroma-attribute-color)}.chroma .nf{color:var(--chroma-attribute-color)}.chroma .nl{color:var(--chroma-name-color);font-style:italic}.chroma .nt{color:var(--chroma-keyword-color)}.chroma .nv{color:var(--chroma-name-color);font-style:italic}.chroma .vc{color:var(--chroma-name-color);font-style:italic}.chroma .vg{color:var(--chroma-name-color);font-style:italic}.chroma .vi{color:var(--chroma-name-color);font-style:italic}.chroma .s{color:var(--chroma-literal-color)}.chroma .sa{color:var(--chroma-literal-color)}.chroma .sb{color:var(--chroma-literal-color)}.chroma .sc{color:var(--chroma-literal-color)}.chroma .dl{color:var(--chroma-literal-color)}.chroma .sd{color:var(--chroma-literal-color)}.chroma .s2{color:var(--chroma-literal-color)}.chroma .se{color:var(--chroma-literal-color)}.chroma .sh{color:var(--chroma-literal-color)}.chroma .si{color:var(--chroma-literal-color)}.chroma .sx{color:var(--chroma-literal-color)}.chroma .sr{color:var(--chroma-literal-color)}.chroma .s1{color:var(--chroma-literal-color)}.chroma .ss{color:var(--chroma-literal-color)}.chroma .m{color:var(--chroma-number-color)}.chroma .mb{color:var(--chroma-number-color)}.chroma .mf{color:var(--chroma-number-color)}.chroma .mh{color:var(--chroma-number-color)}.chroma .mi{color:var(--chroma-number-color)}.chroma .il{color:var(--chroma-number-color)}.chroma .mo{color:var(--chroma-number-color)}.chroma .o{color:var(--chroma-keyword-color)}.chroma .ow{color:var(--chroma-keyword-color)}.chroma .c{color:var(--chroma-comment-color)}.chroma .ch{color:var(--chroma-comment-color)}.chroma .cm{color:var(--chroma-comment-color)}.chroma .c1{color:var(--chroma-comment-color)}.chroma .cs{color:var(--chroma-comment-color)}.chroma .cp{color:var(--chroma-keyword-color)}.chroma .cpf{color:var(--chroma-keyword-color)}.chroma .gd{color:var(--chroma-deleted-color)}.chroma .ge{text-decoration:underline}.chroma .gh{font-weight:bold}.chroma .gi{font-weight:bold}.chroma .go{color:var(--chroma-output-color)}.chroma .gu{font-weight:bold}.chroma .gl{text-decoration:underline}.socials{padding:0;margin:0;list-style:none}.socials-item{display:inline-block;margin:0.5em;border-radius:50%;background-color:var(--color-contrast-medium);transition:background-color .5s}.socials-item:hover{background-color:var(--color-primary)}.social-icon{fill:var(--color-bg);padding:0.5em}article.content.post.home{margin-top:5em}.summary-title-link{color:var(--color-contrast-higher)}.summary{line-height:2;display:block}.read-more-container{text-align:center;margin-top:1.618em}.read-more-link{display:inline-block}.pagination{list-style:none;margin:5em 0 0;padding:0;display:flex;justify-content:space-between}.pagination-prev{margin-right:auto}.pagination-next{margin-left:auto;text-align:right}.tree{overflow:auto hidden;white-space:nowrap}.tree ul{padding-left:2.4em}.tree>ul{padding:0}.list-categories>li{position:relative}.list-categories>li::before{content:" ";position:absolute;top:2.4em;left:0.1em;width:0.2em;height:calc(100% - 2.8em);background:var(--color-contrast-lower)}.category-item{color:var(--color-primary);font-size:1.2em}.category-item:hover{color:hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.75)}.category-count{color:var(--color-contrast-medium)}.category-post:hover{color:var(--color-contrast-medium)}.tag-cloud{text-align:center}.tag-cloud-item{margin:0.5rem;display:inline-block}.fof::before{background-image:url();background-repeat:no-repeat;background-size:cover;background-position:50% 50%;content:" ";position:fixed;width:100%;height:100%;top:0;left:0;z-index:1}.fof .main-inner{background:rgba(0,0,0,0.25);min-height:100%;min-width:100%;position:absolute;z-index:3}.fof video{position:fixed;top:50%;left:50%;min-width:100%;min-height:100%;width:auto;height:auto;z-index:2;transform:translateX(-50%) translateY(-50%)}.fof h1{font-size:3rem;text-transform:uppercase;letter-spacing:0.3rem;text-align:center;top:15%;left:5%;right:5%;position:absolute;color:#fff;margin:0.67em 0}.fof .fof-footer{font-size:2rem;position:absolute;bottom:15%;left:10%;right:10%;text-align:center}.fof a{color:#eee}.fof a:hover{color:#fff}@media only screen and (max-device-width: 1024px){.fof #bgvid{display:none}}.medium-zoom-overlay,.medium-zoom-image--opened{z-index:5}:root{--max-width: 656px}@media (max-width: 656px){.main-inner{width:auto !important}.anchor-link{position:relative;transform:none;float:right}#back-to-top{display:none}.header-inner{width:100%}.site-brand{margin-left:1em}.header-inner{display:block;margin:0;max-width:none}.nav-toggle{display:block}.nav{display:none;text-align:center;margin:2em 0}.menu{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center}.menu-item{margin:0;padding:1em}.menu-item .icon{margin:0}.menu-item-name{display:block}.header.open .nav{display:block;animation:appear .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes appear{0%{opacity:0;height:0;margin:0;transform:scaleY(0);transform-origin:top}100%{opacity:1;height:10em;margin:2em 0;transform:scaleY(1);transform-origin:top}}.header.open .nav-curtain{animation:appearCurtain .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes appearCurtain{0%{visibility:hidden;opacity:0}100%{visibility:visible;opacity:1}}.header.fade .nav{display:block;animation:fade .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes fade{0%{opacity:1;height:10em;margin:2em 0;transform:scaleY(1);transform-origin:top}100%{opacity:0;height:0;margin:0;transform:scaleY(0);transform-origin:top}}.header.fade .nav-curtain{animation:fadeCurtain .5s;animation-iteration-count:1;animation-fill-mode:forwards}@keyframes fadeCurtain{0%{visibility:visible;opacity:1}100%{visibility:hidden;opacity:0}}#langs li{width:auto}}[data-small-caps="true"] .post-body h1,[data-small-caps="true"] .post-body h2,[data-small-caps="true"] .post-body h3,[data-small-caps="true"] .post-body h4,[data-small-caps="true"] .post-body h5,[data-small-caps="true"] .post-body h6{font-variant:small-caps}[data-small-caps="true"] .contents-title{font-variant:small-caps}[data-align="justify"] .post-body p,[data-align="justify"] .post-body li,[data-align="justify"] .post-body dd{text-align:justify;text-justify:distribute}[data-align="justify"] .footnotes a{word-break:break-all}[data-align="center"] .post-body p{text-align:center}[data-type="poetry"] .post-body{display:table;margin:0 auto}[data-type="poetry"] .post-body p{margin:0 0 1em}[data-type="poetry"] .post-body>p:first-child img,[data-type="poetry"] .post-body>p:first-child video{margin-top:0}[data-type="poetry"] .post-body>blockquote:first-child{margin-top:0}[data-type="poetry"] .post-body>blockquote:last-child{margin-bottom:0}[data-type="poetry"] .post-body>p:last-child{margin:0}[data-type="poetry"] .post-body>p:last-child img,[data-type="poetry"] .post-body>p:last-child video{margin-bottom:0}[data-type="poetry"] .post-body>p:last-child .caption{margin:1em 0 0}[data-type="poetry"] section.footnotes>ol>li:last-child>p:last-child{margin:0}[data-toc-num="true"] .contents ol{counter-reset:item}[data-toc-num="true"] .contents ol li::before{counter-increment:item;margin-right:0.5em}[data-toc-num="true"] .contents>ol>li::before{content:counters(item, ".") "."}[data-toc-num="true"] .contents li>ol>li::before{content:counters(item, ".")}@supports not ((backdrop-filter: none) or (-webkit-backdrop-filter: none)){.header-wrapper{background-color:var(--color-bg)}} diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..b974bf7 Binary files /dev/null and b/favicon.ico differ diff --git a/fonts/glyph-correction.eot b/fonts/glyph-correction.eot new file mode 100644 index 0000000..1750ee5 Binary files /dev/null and b/fonts/glyph-correction.eot differ diff --git a/fonts/glyph-correction.ttf b/fonts/glyph-correction.ttf new file mode 100644 index 0000000..e01d2e3 Binary files /dev/null and b/fonts/glyph-correction.ttf differ diff --git a/fonts/glyph-correction.woff b/fonts/glyph-correction.woff new file mode 100644 index 0000000..7e39b24 Binary files /dev/null and b/fonts/glyph-correction.woff differ diff --git a/fonts/glyph-correction.woff2 b/fonts/glyph-correction.woff2 new file mode 100644 index 0000000..4513ec1 Binary files /dev/null and b/fonts/glyph-correction.woff2 differ diff --git a/icons/android-chrome-512x512.png b/icons/android-chrome-512x512.png new file mode 100644 index 0000000..b5f6299 Binary files /dev/null and b/icons/android-chrome-512x512.png differ diff --git a/icons/apple-touch-icon.png b/icons/apple-touch-icon.png new file mode 100644 index 0000000..a244fb4 Binary files /dev/null and b/icons/apple-touch-icon.png differ diff --git a/icons/mstile-150x150.png b/icons/mstile-150x150.png new file mode 100644 index 0000000..95ed2a6 Binary files /dev/null and b/icons/mstile-150x150.png differ diff --git a/icons/safari-pinned-tab.svg b/icons/safari-pinned-tab.svg new file mode 100644 index 0000000..1a8adb4 --- /dev/null +++ b/icons/safari-pinned-tab.svg @@ -0,0 +1 @@ +Created by potrace 1.11, written by Peter Selinger 2001-2013 \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..c94548b --- /dev/null +++ b/index.html @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ + 如我所见 + +
+ + + + +
+
+ + + + + + + +
+ + + + + + + + +
+
+ +

江南无所有,

+ +

聊赠一枝春。

+ +
+ +
+ + + + + + + + + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/js/meme.min.8cbe976441b5181abfd3093c9beee209b19cdbb1fa77c48d225a83ba81fa3fb1.js b/js/meme.min.8cbe976441b5181abfd3093c9beee209b19cdbb1fa77c48d225a83ba81fa3fb1.js new file mode 100644 index 0000000..fa09904 --- /dev/null +++ b/js/meme.min.8cbe976441b5181abfd3093c9beee209b19cdbb1fa77c48d225a83ba81fa3fb1.js @@ -0,0 +1 @@ +const throttle=(b,c)=>{let d,e,a;return function(){const f=this,g=arguments;d?(clearTimeout(e),e=setTimeout(function(){Date.now()-a>=c&&(b.apply(f,g),a=Date.now())},Math.max(c-(Date.now()-a),0))):(b.apply(f,g),a=Date.now(),d=!0)}},delayTime=420;window.addEventListener('DOMContentLoaded',b=>{const a=document.querySelector('.header');if(a){const b=window.getComputedStyle(a,null).getPropertyValue('height');document.documentElement.style.setProperty('--header-height',b)}},{once:!0}),window.addEventListener("DOMContentLoaded",j=>{const b=document.querySelector('.nav-toggle'),d=document.createElement('div');d.className='nav-toggle-inner',b.appendChild(d);for(let a=0;a<3;a++){const b=document.createElement('span');d.appendChild(b)}const c=document.getElementById('nav-toggle'),a=document.querySelector('.header'),e=document.querySelector('.nav-curtain');c.addEventListener('change',c=>{c.target.checked?(a.classList.add('open'),b.classList.add('open'),a.classList.remove('fade'),e.style='display: block'):(a.classList.remove('open'),b.classList.remove('open'),a.classList.add('fade'))}),e.addEventListener('animationend',a=>{c.checked||a.target.removeAttribute('style')}),window.addEventListener('scroll',throttle(function(){i()},delayTime));const g=window.getComputedStyle(document.documentElement,null).getPropertyValue('--max-width');let h=window.matchMedia(`(max-width: ${g})`);h.addListener(a=>{a.matches||f(!0)});function i(){const a=document.getElementById('search-input');if(a&&a===document.activeElement)return;f()}function f(d){c.checked&&(c.checked=!1,a.classList.remove('open'),b.classList.remove('open'),d?e.removeAttribute("style"):a.classList.add('fade'))}},{once:!0}),window.addEventListener("DOMContentLoaded",b=>{const a=document.getElementById('back-to-top');a!==null&&window.addEventListener('scroll',throttle(function(){window.scrollY>100?a.classList.add('show'):a.classList.remove('show')},delayTime))},{once:!0});const userPrefers=localStorage.getItem('theme');userPrefers==='dark'?changeModeMeta('dark'):userPrefers==='light'&&changeModeMeta('light'),window.matchMedia('(prefers-color-scheme: dark)').addListener(a=>{changeMode()}),window.addEventListener("DOMContentLoaded",b=>{changeMode();const a=document.getElementById('theme-switcher');a&&a.addEventListener('click',a=>{a.preventDefault(),getCurrentTheme()=="dark"?changeModeMeta('light'):changeModeMeta('dark'),changeMode(),storePrefers()})},{once:!0}),window.addEventListener('storage',function(a){if(a.key!=='theme')return;a.newValue==='dark'?changeModeMeta('dark'):changeModeMeta('light'),changeMode()});function getCurrentTheme(){return JSON.parse(window.getComputedStyle(document.documentElement,null).getPropertyValue("--theme-name"))}function changeModeMeta(a){document.documentElement.setAttribute('data-theme',a)}function changeMode(){const a=getCurrentTheme()==='dark',b=a?'#16171d':'#fff';if(document.querySelector('meta[name="theme-color"]').setAttribute('content',b),typeof mermaidConfig!='undefined'){const b=document.querySelectorAll('.mermaid');b.forEach(a=>{a.getAttribute('data-processed')?(a.removeAttribute('data-processed'),a.innerHTML=a.getAttribute('data-graph')):a.setAttribute('data-graph',a.textContent)}),a?(mermaidConfig.theme='dark',mermaid.initialize(mermaidConfig),mermaid.init()):(mermaidConfig.theme='default',mermaid.initialize(mermaidConfig),mermaid.init())}}function storePrefers(){window.localStorage.setItem('theme',getCurrentTheme())}window.addEventListener("DOMContentLoaded",d=>{const a='复制',c='已复制';document.querySelectorAll('.post-body > pre').forEach(a=>{let b=document.createElement('div');a.parentNode.replaceChild(b,a),b.appendChild(a)});function b(b){const d=document.querySelectorAll('table.lntable, .highlight > pre, .post-body > div > pre');d.forEach(e=>{var f;e.parentNode.style.position='relative';const d=document.createElement('button');d.className='copy-button',d.type='button',d.innerText=a,e.classList.contains('lntable')?(f=e.querySelectorAll('.lntd')[1]):(f=e.querySelector('code')),d.addEventListener('click',()=>{b.writeText(f.innerText).then(()=>{d.blur(),d.innerText=c,setTimeout(()=>{d.innerText=a},1e3)}).catch(a=>{d.innerText='Error',console.error(a)})}),e.appendChild(d),e.parentNode.addEventListener('mouseover',()=>{d.style='visibility: visible; opacity: 1'}),e.parentNode.addEventListener('mouseout',()=>{d.style='visibility: hidden; opacity: 0'})})}if(navigator&&navigator.clipboard)b(navigator.clipboard);else{const a=document.createElement('script');a.src='https://cdn.jsdelivr.net/npm/clipboard-polyfill@2.8.6/dist/clipboard-polyfill.min.js',a.defer=!0,a.onload=function(){b(clipboard)},document.head.appendChild(a)}},{once:!0}) \ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..48e0607 --- /dev/null +++ b/manifest.json @@ -0,0 +1,16 @@ +{ + "name": "Hugo Theme MemE", + "short_name": "MemE", + "icons": [ + { + "src": "./icons/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#fff", + "background_color": "#fff", + "display": "standalone", + "orientation": "portrait-primary", + "start_url": "/" +} diff --git a/page/1/index.html b/page/1/index.html new file mode 100644 index 0000000..c79dc80 --- /dev/null +++ b/page/1/index.html @@ -0,0 +1 @@ +https://example.com/ \ No newline at end of file diff --git a/posts/hello-world/index.html b/posts/hello-world/index.html new file mode 100644 index 0000000..092079e --- /dev/null +++ b/posts/hello-world/index.html @@ -0,0 +1,380 @@ + + + + + + + + + + + + + + + + + + Hello World | 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ + 如我所见 + +
+ + + + +
+
+ + + + + + + +
+ + + + + + +
+
+ + + + + + + + +
+ + +updatedupdated2022-01-112022-01-11 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/posts/index.html b/posts/index.html new file mode 100644 index 0000000..592c333 --- /dev/null +++ b/posts/index.html @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + Posts | 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ + 如我所见 + +
+ + + + +
+
+ + + + + + + +
+ + + + + + + +
+
+
+ + +

Posts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

二〇二二

+ + + + + + + + +

一月

+ + + + + + +
+
+
+ + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/posts/nginx+trojan-go\346\220\255\345\273\272/index.html" "b/posts/nginx+trojan-go\346\220\255\345\273\272/index.html" new file mode 100644 index 0000000..7bce3aa --- /dev/null +++ "b/posts/nginx+trojan-go\346\220\255\345\273\272/index.html" @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + + + + Nginx+Trojan Go搭建 | 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ + 如我所见 + +
+ + + + +
+
+ + + + + + + +
+ + + + + + +
+
+ + + +
+ +

Nginx+Trojan Go搭建

+ + + + + + + + + + + + + + +
+

配置系统Nginx服务

+

使用 apt 进行前置软件安装

+
+
+
+
1
+2
+
+
apt update
+apt install nginx screen curl unzip
+
+
+

创建站点文件夹,并编写测试网页文件

+
+
+
+
1
+2
+
+
mkdir -p /var/www/baoshuma.top
+vi /var/www/baoshuma.top/index.html
+
+
+
+
+
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+
+
<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+</head>
+
+<body>
+    <h1>Example Page</h1>
+    This is content......
+</body>
+
+</html>
+
+
+
+
+
+
1
+
+
vi /etc/nginx/sites-available/baoshuma.top
+
+
+
+
+
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+
+
server {
+    listen 80;
+
+    root /var/www/baoshuma.top;
+    index index.html index.htm index.nginx-debian.html;
+    server_name baoshuma.top www.baoshuma.top;
+
+    location / {
+        try_files $uri $uri/ =404;
+    }
+
+    if ( $remote_addr != 127.0.0.1 ) {
+        rewrite ^/(.*)$ https://baoshuma.top/$1 redirect;
+    } 
+
+    access_log /var/log/nginx/baoshuma.top.access.log;
+    error_log /var/log/nginx/baoshuma.top.error.log;
+}
+
+
+

创建软连接并重启nginx服务

+
+
+
+
1
+2
+3
+
+
ln -s /etc/nginx/sites-available/baoshuma.top /etc/nginx/sites-enabled
+systemctl restart nginx
+
+
+
+

通过ACME.SH进行SSL证书自动化

+
+
+
+
1
+2
+3
+4
+5
+6
+7
+
+
curl https://get.acme.sh | sh
+acme.sh --set-default-ca --server letsencrypt
+export CF_Key="XXX"
+export CF_Email="XXX"
+acme.sh --issue --dns dns_cf -d baoshuma.top -d '*.baoshuma.top' -k ec-256
+mkdir -p /etc/nginx/ssl
+acme.sh --installcert -d baoshuma.top --fullchain-file /etc/nginx/ssl/fullchain.cer --key-file /etc/nginx/ssl/baoshuma.top.key --ecc
+
+
+

配置Trojan-Go

+
+
+
+
1
+2
+3
+4
+5
+
+
wget https://github.com/p4gefau1t/trojan-go/releases/download/v0.10.6/trojan-go-linux-amd64.zip
+mkdir -p /etc/trojan-go/{bin,conf,logs}
+unzip -d /etc/trojan-go/bin trojan-go-linux-amd64.zip
+rm trojan-go-linux-amd64.zip
+vi /etc/trojan-go/conf/server.json
+
+
+
+
+
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+
+
{
+    "run_type": "server",
+    "local_addr": "0.0.0.0",
+    "local_port": 443,
+    "remote_addr": "127.0.0.1",
+    "remote_port": 80,
+    "password": [
+        "XXX"
+    ],
+    "log_level": 1,
+    "log_file": "/etc/trojan-go/logs/trojan-go-access.log",
+    "ssl": {
+        "verify": true,
+        "verify_hostname": true,
+        "cert": "/etc/nginx/ssl/fullchain.cer",
+        "key": "/etc/nginx/ssl/baoshuma.top.key",
+        "key_password": "",
+        "curves": "",
+        "cipher": "", 
+        "prefer_server_cipher": false,
+        "sni": "baoshuma.top",
+        "alpn": [
+            "http/1.1"
+        ],
+        "reuse_session": true,
+        "session_ticket": true,
+        "plain_http_response": "",
+        "fallback_addr": "127.0.0.1",
+        "fallback_port": 80,    
+        "fingerprint": ""
+    },
+    "tcp": {
+        "no_delay": true,
+        "keep_alive": true
+    }
+}
+
+
+

配置Trojan-Go开机自启服务

+
+
+
+
1
+
+
vi /lib/systemd/system/trojan-go.service
+
+
+
+
+
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+
+
[Unit]
+Description=Trojan-Go - An unidentifiable mechanism that helps you bypass GFW
+Documentation=https://p4gefau1t.github.io/trojan-go
+After=network.target nss-lookup.target
+
+[Service]
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+NoNewPrivileges=true
+ExecStart=/etc/trojan-go/bin/trojan-go -config /etc/trojan-go/conf/server.json
+Restart=on-failure
+RestartSec=10s
+LimitNOFILE=infinity
+
+[Install]
+WantedBy=multi-user.target
+
+
+
+
+
+
1
+2
+3
+4
+5
+6
+
+
systemctl enable trojan-go
+systemctl daemon-reload
+systemctl start trojan-go
+systemctl status trojan-go
+journalctl -u trojan-go -n 20 -f
+
+
+
+

BBR+cake

+
+
+
+
1
+2
+3
+4
+5
+6
+7
+8
+
+
echo 'net.core.default_qdisc=cake' | tee -a /etc/sysctl.conf
+echo 'net.ipv4.tcp_congestion_control=bbr' | tee -a /etc/sysctl.conf
+sysctl -p
+
+lsmod | egrep bbr
+
+
+reboot
+
+
+
+
+ + + + + + + + + +
+ + + + +
+ + +updatedupdated2022-01-122022-01-12 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/posts/\351\245\245\350\215\222\346\234\215\345\212\241\345\231\250\346\220\255\345\273\272\346\265\201\347\250\213\350\256\260\345\275\225/index.html" "b/posts/\351\245\245\350\215\222\346\234\215\345\212\241\345\231\250\346\220\255\345\273\272\346\265\201\347\250\213\350\256\260\345\275\225/index.html" new file mode 100644 index 0000000..598d2e7 --- /dev/null +++ "b/posts/\351\245\245\350\215\222\346\234\215\345\212\241\345\231\250\346\220\255\345\273\272\346\265\201\347\250\213\350\256\260\345\275\225/index.html" @@ -0,0 +1,550 @@ + + + + + + + + + + + + + + + + + + 饥荒服务器搭建流程 | 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ + 如我所见 + +
+ + + + +
+
+ + + + + + + +
+ + + + + + +
+
+ + + +
+ +

饥荒服务器搭建流程

+ + + + + + + + + + + + + + +
+

记录一下自己饥荒服务器搭建流程。

+

着重号测试

+

系统配置

+
    +
  • 操作系统:Ubuntu Server 18.04.1 LTS 64bit
  • +
  • CPU:2核
  • +
  • 内存:4GB
  • +
  • 系统盘:80GB SSD
  • +
  • 带宽:8Mbps(1200GB/月)
  • +
+

之后改成Ubuntu20了

+

配置服务器防火墙

+

开启10888、10999、10998 端口 使用UDP协议

+

使用密钥通过root用户连接主机

+

腾讯云的Ubuntu机子默认不能使用root用户登录,所以需要进行配置。

+

创建密钥并绑定服务器

+

服务器关了再创

+

使用FinalShell登录服务器

+

到此依然只能用ubuntu账号通过密钥登录,使用root还需要配置

+
+
+
+
1
+2
+3
+4
+5
+
+
sudo passwd root
+su - root
+cat /home/ubuntu/.ssh/authorized_keys >> /root/.ssh/authorized_keys
+
+passwd -d root
+
+
+

这时重新配置FinalShell,使用root账号即可登录

+

配置steamcmd

+
+
+
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+
+
dpkg --add-architecture i386
+apt update
+# libsdl2-2.0-0:i386 必须安装否则会有SDL报错
+# libcurl4-gnutls-dev:i386 如果没有则会在开启服务器的时候出现问题,可能是因为启动服务器用了bin里的程序
+apt install lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 libcurl4-gnutls-dev:i386
+
+useradd -m dst
+passwd dst
+su - dst
+
+mkdir steamcmd && cd steamcmd && wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz && tar -xvzf steamcmd_linux.tar.gz
+./steamcmd.sh
+
+
+
+
force_install_dir /home/dst/dstserver
+login anonymous
+app_update 343050 validate
+quit
+
+
+
+
1
+2
+3
+
+
cd /home/dst/dstserver/bin
+
+echo "./dontstarve_dedicated_server_nullrenderer -console -cluster ruwosuojian -shard Master" > master_start.sh && echo "./dontstarve_dedicated_server_nullrenderer -console -cluster ruwosuojian -shard Caves" > caves_start.sh && chmod +x master_start.sh caves_start.sh
+
+
+

先运行一遍指令,生成存档。

+

使用本地的饥荒创建世界后进行如下操作。 +dedicated_server_mods_setup.lua 文件放在/home/dst/dstserver/mods +cluster_token.txt cluster.ini 放在存档的根目录 +modoverrides.lua leveldataoverride.lua server.ini 分别放入Master、Caves

+
+
+
+
1
+2
+
+
screen -S master ./master_start.sh
+screen -S caves ./caves_start.sh
+
+
+

配置dst用户开机启动服务器

+
+

systemd 用户实例在用户首次登陆时启动,并在最后一个会话退出时终止。 但有时候,对于一些不依赖于会话的用户进程,在系统启动时加载用户实例,在会话全部结束时,也不停止用户实例是比较有用的。Lingering 就是用来实现这个的。 使用以下命令来启用驻留指定用户:

+
+
+
+
1
+
+
loginctl enable-linger username
+
+
+
+
+
+
+
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+
+
loginctl enable-linger dst
+export XDG_RUNTIME_DIR=/run/user/$(id -u) && systemctl --user import-environment PATH
+
+# 验证是否配置正确
+systemctl --user show-environment
+
+
+systemctl --user enable dstmaster
+systemctl --user enable dstcaves
+systemctl --user daemon-reload
+
+systemctl --user status dstcaves
+
+# 查看日志
+journalctl --user -u dstmaster -n 20 -f
+journalctl --user -u dstcaves -n 20 -f
+
+
+
+

就为了个以dst用户开机启动dst服务器,真是给我整吐了 +之后最好还要加一个定时备份存档

+ + +

https://wiki.archlinux.org/title/Systemd_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/User_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E9%9A%8F%E7%B3%BB%E7%BB%9F%E8%87%AA%E5%8A%A8%E5%90%AF%E5%8

+ +
+ + + + + + + + + +
+ + + + +
+ + +updatedupdated2022-01-122022-01-12 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..4f9540b --- /dev/null +++ b/robots.txt @@ -0,0 +1 @@ +User-agent: * \ No newline at end of file diff --git a/rss.xml b/rss.xml new file mode 100644 index 0000000..9cc93a3 --- /dev/null +++ b/rss.xml @@ -0,0 +1,589 @@ + + + + + + + + + + 如我所见 + https://example.com/ + 这是站点描述 + Hugo 0.91.2 https://gohugo.io/ + + zh-CN + + + iaeieue@gmail.com (iaeieue) + + + iaeieue@gmail.com (iaeieue) + + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) + + Wed, 12 Jan 2022 16:04:31 +0800 + + + + + + 饥荒服务器搭建流程 + https://example.com/posts/%E9%A5%A5%E8%8D%92%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%90%AD%E5%BB%BA%E6%B5%81%E7%A8%8B%E8%AE%B0%E5%BD%95/ + https://example.com/posts/%E9%A5%A5%E8%8D%92%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%90%AD%E5%BB%BA%E6%B5%81%E7%A8%8B%E8%AE%B0%E5%BD%95/ + Wed, 12 Jan 2022 15:43:35 +0800 + + iaeieue@gmail.com (iaeieue) + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) + + <p>记录一下自己饥荒服务器搭建流程。</p> +<p>..着重号..测试</p> +<h2 id="系统配置">系统配置</h2> +<ul> +<li>操作系统:Ubuntu Server 18.04.1 LTS 64bit</li> +<li>CPU:2核</li> +<li>内存:4GB</li> +<li>系统盘:80GB SSD</li> +<li>带宽:8Mbps(1200GB/月)</li> +</ul> +<p>之后改成Ubuntu20了</p> +<h2 id="配置服务器防火墙">配置服务器防火墙</h2> +<p>开启10888、10999、10998 端口 使用UDP协议</p> +<h2 id="使用密钥通过root用户连接主机">使用密钥通过root用户连接主机</h2> +<p>腾讯云的Ubuntu机子默认不能使用root用户登录,所以需要进行配置。</p> +<h3 id="创建密钥并绑定服务器">创建密钥并绑定服务器</h3> +<p>服务器关了再创</p> +<h3 id="使用finalshell登录服务器">使用FinalShell登录服务器</h3> +<p>到此依然只能用ubuntu账号通过密钥登录,使用root还需要配置</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">sudo passwd root +su - root +cat /home/ubuntu/.ssh/authorized_keys &gt;&gt; /root/.ssh/authorized_keys + +passwd -d root +</code></pre></td></tr></table> +</div> +</div><p>这时重新配置FinalShell,使用root账号即可登录</p> +<h2 id="配置steamcmd">配置steamcmd</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">dpkg --add-architecture i386 +apt update +<span class="c1"># libsdl2-2.0-0:i386 必须安装否则会有SDL报错</span> +<span class="c1"># libcurl4-gnutls-dev:i386 如果没有则会在开启服务器的时候出现问题,可能是因为启动服务器用了bin里的程序</span> +apt install lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 libcurl4-gnutls-dev:i386 + +useradd -m dst +passwd dst +su - dst + +mkdir steamcmd <span class="o">&amp;&amp;</span> <span class="nb">cd</span> steamcmd <span class="o">&amp;&amp;</span> wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz <span class="o">&amp;&amp;</span> tar -xvzf steamcmd_linux.tar.gz +./steamcmd.sh + +</code></pre></td></tr></table> +</div> +</div><pre tabindex="0"><code class="language-steamcmd" data-lang="steamcmd">force_install_dir /home/dst/dstserver +login anonymous +app_update 343050 validate +quit +</code></pre><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">cd</span> /home/dst/dstserver/bin + +<span class="nb">echo</span> <span class="s2">&#34;./dontstarve_dedicated_server_nullrenderer -console -cluster ruwosuojian -shard Master&#34;</span> &gt; master_start.sh <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s2">&#34;./dontstarve_dedicated_server_nullrenderer -console -cluster ruwosuojian -shard Caves&#34;</span> &gt; caves_start.sh <span class="o">&amp;&amp;</span> chmod +x master_start.sh caves_start.sh +</code></pre></td></tr></table> +</div> +</div><p>先运行一遍指令,生成存档。</p> +<p>使用本地的饥荒创建世界后进行如下操作。 +dedicated_server_mods_setup.lua 文件放在/home/dst/dstserver/mods +cluster_token.txt cluster.ini 放在存档的根目录 +modoverrides.lua leveldataoverride.lua server.ini 分别放入Master、Caves</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">screen -S master ./master_start.sh +screen -S caves ./caves_start.sh +</code></pre></td></tr></table> +</div> +</div><h2 id="配置dst用户开机启动服务器">配置dst用户开机启动服务器</h2> +<blockquote> +<p>systemd 用户实例在用户首次登陆时启动,并在最后一个会话退出时终止。 但有时候,对于一些不依赖于会话的用户进程,在系统启动时加载用户实例,在会话全部结束时,也不停止用户实例是比较有用的。Lingering 就是用来实现这个的。 使用以下命令来启用驻留指定用户:</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">loginctl enable-linger username +</code></pre></td></tr></table> +</div> +</div></blockquote> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">loginctl enable-linger dst +<span class="nb">export</span> <span class="nv">XDG_RUNTIME_DIR</span><span class="o">=</span>/run/user/<span class="k">$(</span>id -u<span class="k">)</span> <span class="o">&amp;&amp;</span> systemctl --user import-environment PATH + +<span class="c1"># 验证是否配置正确</span> +systemctl --user show-environment + + +systemctl --user <span class="nb">enable</span> dstmaster +systemctl --user <span class="nb">enable</span> dstcaves +systemctl --user daemon-reload + +systemctl --user status dstcaves + +<span class="c1"># 查看日志</span> +journalctl --user -u dstmaster -n <span class="m">20</span> -f +journalctl --user -u dstcaves -n <span class="m">20</span> -f + +</code></pre></td></tr></table> +</div> +</div><p>就为了个以dst用户开机启动dst服务器,真是给我整吐了 +之后最好还要加一个定时备份存档</p> +<!-- echo "XDG_RUNTIME_DIR=/run/user/$(id -u)" > ~/.config/environment.d/env.conf --> +<!-- echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)\nsystemctl --user import-environment PATH" >> ~/.bashrc --> +<p><a href="https://wiki.archlinux.org/title/Systemd_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/User_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E9%9A%8F%E7%B3%BB%E7%BB%9F%E8%87%AA%E5%8A%A8%E5%90%AF%E5%258">https://wiki.archlinux.org/title/Systemd_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/User_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E9%9A%8F%E7%B3%BB%E7%BB%9F%E8%87%AA%E5%8A%A8%E5%90%AF%E5%8</a></p> + + + + + + + + + + + + + + + + Nginx+Trojan Go搭建 + https://example.com/posts/nginx+trojan-go%E6%90%AD%E5%BB%BA/ + https://example.com/posts/nginx+trojan-go%E6%90%AD%E5%BB%BA/ + Wed, 12 Jan 2022 15:42:10 +0800 + + iaeieue@gmail.com (iaeieue) + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) + + <h2 id="配置系统nginx服务">配置系统Nginx服务</h2> +<p>使用 apt 进行前置软件安装</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">apt update +apt install nginx screen curl unzip +</code></pre></td></tr></table> +</div> +</div><p>创建站点文件夹,并编写测试网页文件</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">mkdir -p /var/www/baoshuma.top +vi /var/www/baoshuma.top/index.html +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="cp">&lt;!DOCTYPE html&gt;</span> +<span class="p">&lt;</span><span class="nt">html</span> <span class="na">lang</span><span class="o">=</span><span class="s">&#34;en&#34;</span><span class="p">&gt;</span> + +<span class="p">&lt;</span><span class="nt">head</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">&#34;UTF-8&#34;</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">http-equiv</span><span class="o">=</span><span class="s">&#34;X-UA-Compatible&#34;</span> <span class="na">content</span><span class="o">=</span><span class="s">&#34;IE=edge&#34;</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">meta</span> <span class="na">name</span><span class="o">=</span><span class="s">&#34;viewport&#34;</span> <span class="na">content</span><span class="o">=</span><span class="s">&#34;width=device-width, initial-scale=1.0&#34;</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">title</span><span class="p">&gt;</span>Document<span class="p">&lt;/</span><span class="nt">title</span><span class="p">&gt;</span> +<span class="p">&lt;/</span><span class="nt">head</span><span class="p">&gt;</span> + +<span class="p">&lt;</span><span class="nt">body</span><span class="p">&gt;</span> + <span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>Example Page<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span> + This is content...... +<span class="p">&lt;/</span><span class="nt">body</span><span class="p">&gt;</span> + +<span class="p">&lt;/</span><span class="nt">html</span><span class="p">&gt;</span> +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">vi /etc/nginx/sites-available/baoshuma.top +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-service" data-lang="service"><span class="err">server</span> <span class="err">{</span> + <span class="err">listen</span> <span class="err">80</span><span class="c">;</span> + + <span class="err">root</span> <span class="err">/var/www/baoshuma.top</span><span class="c">;</span> + <span class="err">index</span> <span class="err">index.html</span> <span class="err">index.htm</span> <span class="err">index.nginx-debian.html</span><span class="c">;</span> + <span class="err">server_name</span> <span class="err">baoshuma.top</span> <span class="err">www.baoshuma.top</span><span class="c">;</span> + + <span class="err">location</span> <span class="err">/</span> <span class="err">{</span> + <span class="na">try_files $uri $uri/ </span><span class="o">=</span><span class="s">404;</span> + <span class="err">}</span> + + <span class="na">if ( $remote_addr !</span><span class="o">=</span><span class="s"> 127.0.0.1 ) {</span> + <span class="err">rewrite</span> <span class="err">^/(.*)$</span> <span class="err">https://baoshuma.top/$1</span> <span class="err">redirect</span><span class="c">;</span> + <span class="err">}</span> + + <span class="err">access_log</span> <span class="err">/var/log/nginx/baoshuma.top.access.log</span><span class="c">;</span> + <span class="err">error_log</span> <span class="err">/var/log/nginx/baoshuma.top.error.log</span><span class="c">;</span> +<span class="err">}</span> +</code></pre></td></tr></table> +</div> +</div><p>创建软连接并重启nginx服务</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">ln -s /etc/nginx/sites-available/baoshuma.top /etc/nginx/sites-enabled +systemctl restart nginx + +</code></pre></td></tr></table> +</div> +</div><h2 id="通过acmesh进行ssl证书自动化">通过ACME.SH进行SSL证书自动化</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">curl https://get.acme.sh <span class="p">|</span> sh +acme.sh --set-default-ca --server letsencrypt +<span class="nb">export</span> <span class="nv">CF_Key</span><span class="o">=</span><span class="s2">&#34;XXX&#34;</span> +<span class="nb">export</span> <span class="nv">CF_Email</span><span class="o">=</span><span class="s2">&#34;XXX&#34;</span> +acme.sh --issue --dns dns_cf -d baoshuma.top -d <span class="s1">&#39;*.baoshuma.top&#39;</span> -k ec-256 +mkdir -p /etc/nginx/ssl +acme.sh --installcert -d baoshuma.top --fullchain-file /etc/nginx/ssl/fullchain.cer --key-file /etc/nginx/ssl/baoshuma.top.key --ecc +</code></pre></td></tr></table> +</div> +</div><h2 id="配置trojan-go">配置Trojan-Go</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">wget https://github.com/p4gefau1t/trojan-go/releases/download/v0.10.6/trojan-go-linux-amd64.zip +mkdir -p /etc/trojan-go/<span class="o">{</span>bin,conf,logs<span class="o">}</span> +unzip -d /etc/trojan-go/bin trojan-go-linux-amd64.zip +rm trojan-go-linux-amd64.zip +vi /etc/trojan-go/conf/server.json +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span><span class="lnt">17 +</span><span class="lnt">18 +</span><span class="lnt">19 +</span><span class="lnt">20 +</span><span class="lnt">21 +</span><span class="lnt">22 +</span><span class="lnt">23 +</span><span class="lnt">24 +</span><span class="lnt">25 +</span><span class="lnt">26 +</span><span class="lnt">27 +</span><span class="lnt">28 +</span><span class="lnt">29 +</span><span class="lnt">30 +</span><span class="lnt">31 +</span><span class="lnt">32 +</span><span class="lnt">33 +</span><span class="lnt">34 +</span><span class="lnt">35 +</span><span class="lnt">36 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="p">{</span> + <span class="nt">&#34;run_type&#34;</span><span class="p">:</span> <span class="s2">&#34;server&#34;</span><span class="p">,</span> + <span class="nt">&#34;local_addr&#34;</span><span class="p">:</span> <span class="s2">&#34;0.0.0.0&#34;</span><span class="p">,</span> + <span class="nt">&#34;local_port&#34;</span><span class="p">:</span> <span class="mi">443</span><span class="p">,</span> + <span class="nt">&#34;remote_addr&#34;</span><span class="p">:</span> <span class="s2">&#34;127.0.0.1&#34;</span><span class="p">,</span> + <span class="nt">&#34;remote_port&#34;</span><span class="p">:</span> <span class="mi">80</span><span class="p">,</span> + <span class="nt">&#34;password&#34;</span><span class="p">:</span> <span class="p">[</span> + <span class="s2">&#34;XXX&#34;</span> + <span class="p">],</span> + <span class="nt">&#34;log_level&#34;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="nt">&#34;log_file&#34;</span><span class="p">:</span> <span class="s2">&#34;/etc/trojan-go/logs/trojan-go-access.log&#34;</span><span class="p">,</span> + <span class="nt">&#34;ssl&#34;</span><span class="p">:</span> <span class="p">{</span> + <span class="nt">&#34;verify&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;verify_hostname&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;cert&#34;</span><span class="p">:</span> <span class="s2">&#34;/etc/nginx/ssl/fullchain.cer&#34;</span><span class="p">,</span> + <span class="nt">&#34;key&#34;</span><span class="p">:</span> <span class="s2">&#34;/etc/nginx/ssl/baoshuma.top.key&#34;</span><span class="p">,</span> + <span class="nt">&#34;key_password&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;curves&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;cipher&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;prefer_server_cipher&#34;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> + <span class="nt">&#34;sni&#34;</span><span class="p">:</span> <span class="s2">&#34;baoshuma.top&#34;</span><span class="p">,</span> + <span class="nt">&#34;alpn&#34;</span><span class="p">:</span> <span class="p">[</span> + <span class="s2">&#34;http/1.1&#34;</span> + <span class="p">],</span> + <span class="nt">&#34;reuse_session&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;session_ticket&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;plain_http_response&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span> + <span class="nt">&#34;fallback_addr&#34;</span><span class="p">:</span> <span class="s2">&#34;127.0.0.1&#34;</span><span class="p">,</span> + <span class="nt">&#34;fallback_port&#34;</span><span class="p">:</span> <span class="mi">80</span><span class="p">,</span> + <span class="nt">&#34;fingerprint&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span> + <span class="p">},</span> + <span class="nt">&#34;tcp&#34;</span><span class="p">:</span> <span class="p">{</span> + <span class="nt">&#34;no_delay&#34;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span> + <span class="nt">&#34;keep_alive&#34;</span><span class="p">:</span> <span class="kc">true</span> + <span class="p">}</span> +<span class="p">}</span> +</code></pre></td></tr></table> +</div> +</div><p>配置Trojan-Go开机自启服务</p> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">vi /lib/systemd/system/trojan-go.service +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt"> 1 +</span><span class="lnt"> 2 +</span><span class="lnt"> 3 +</span><span class="lnt"> 4 +</span><span class="lnt"> 5 +</span><span class="lnt"> 6 +</span><span class="lnt"> 7 +</span><span class="lnt"> 8 +</span><span class="lnt"> 9 +</span><span class="lnt">10 +</span><span class="lnt">11 +</span><span class="lnt">12 +</span><span class="lnt">13 +</span><span class="lnt">14 +</span><span class="lnt">15 +</span><span class="lnt">16 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-service" data-lang="service"><span class="k">[Unit]</span> +<span class="na">Description</span><span class="o">=</span><span class="s">Trojan-Go - An unidentifiable mechanism that helps you bypass GFW</span> +<span class="na">Documentation</span><span class="o">=</span><span class="s">https://p4gefau1t.github.io/trojan-go</span> +<span class="na">After</span><span class="o">=</span><span class="s">network.target nss-lookup.target</span> + +<span class="k">[Service]</span> +<span class="na">CapabilityBoundingSet</span><span class="o">=</span><span class="s">CAP_NET_ADMIN CAP_NET_BIND_SERVICE</span> +<span class="na">AmbientCapabilities</span><span class="o">=</span><span class="s">CAP_NET_ADMIN CAP_NET_BIND_SERVICE</span> +<span class="na">NoNewPrivileges</span><span class="o">=</span><span class="s">true</span> +<span class="na">ExecStart</span><span class="o">=</span><span class="s">/etc/trojan-go/bin/trojan-go -config /etc/trojan-go/conf/server.json</span> +<span class="na">Restart</span><span class="o">=</span><span class="s">on-failure</span> +<span class="na">RestartSec</span><span class="o">=</span><span class="s">10s</span> +<span class="na">LimitNOFILE</span><span class="o">=</span><span class="s">infinity</span> + +<span class="k">[Install]</span> +<span class="na">WantedBy</span><span class="o">=</span><span class="s">multi-user.target</span> +</code></pre></td></tr></table> +</div> +</div><div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">systemctl <span class="nb">enable</span> trojan-go +systemctl daemon-reload +systemctl start trojan-go +systemctl status trojan-go +journalctl -u trojan-go -n <span class="m">20</span> -f + +</code></pre></td></tr></table> +</div> +</div><h2 id="bbrcake">BBR+cake</h2> +<div class="highlight"><div class="chroma"> +<table class="lntable"><tr><td class="lntd"> +<pre tabindex="0" class="chroma"><code><span class="lnt">1 +</span><span class="lnt">2 +</span><span class="lnt">3 +</span><span class="lnt">4 +</span><span class="lnt">5 +</span><span class="lnt">6 +</span><span class="lnt">7 +</span><span class="lnt">8 +</span></code></pre></td> +<td class="lntd"> +<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">echo</span> <span class="s1">&#39;net.core.default_qdisc=cake&#39;</span> <span class="p">|</span> tee -a /etc/sysctl.conf +<span class="nb">echo</span> <span class="s1">&#39;net.ipv4.tcp_congestion_control=bbr&#39;</span> <span class="p">|</span> tee -a /etc/sysctl.conf +sysctl -p + +lsmod <span class="p">|</span> egrep bbr + + +reboot +</code></pre></td></tr></table> +</div> +</div> + + + + + + + + + + + + + + + Hello World + https://example.com/posts/hello-world/ + https://example.com/posts/hello-world/ + Tue, 11 Jan 2022 17:07:42 +0800 + + iaeieue@gmail.com (iaeieue) + + [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) + + + + + + + + + + + + + + + + + diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..ae1605d --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,24 @@ + + + + https://example.com/posts/ + 2022-01-12T16:00:54+08:00 + + https://example.com/ + 2022-01-12T16:00:54+08:00 + + https://example.com/posts/%E9%A5%A5%E8%8D%92%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%90%AD%E5%BB%BA%E6%B5%81%E7%A8%8B%E8%AE%B0%E5%BD%95/ + 2022-01-12T16:00:54+08:00 + + https://example.com/posts/nginx+trojan-go%E6%90%AD%E5%BB%BA/ + 2022-01-12T15:42:33+08:00 + + https://example.com/posts/hello-world/ + 2022-01-11T17:07:42+08:00 + + https://example.com/categories/ + + https://example.com/tags/ + + diff --git a/tags/index.html b/tags/index.html new file mode 100644 index 0000000..707a8a2 --- /dev/null +++ b/tags/index.html @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + Tags | 如我所见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+ + 如我所见 + +
+ + + + +
+
+ + + + + + + +
+ + + + + + + + +
+
+
+ +

Tags

+ + +
+
+
+ + + +
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +