<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>ivwv Blog</title>
        <link>https://blog.ivwv.site//</link>
        <description>一个NotionNext搭建的博客 </description>
        <lastBuildDate>Fri, 21 Feb 2025 03:46:14 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2025, ivwv</copyright>
        <item>
            <title><![CDATA[NodeJS: 使用 Axios 实现 HTTP、HTTPS 和 SOCKS5 代理请求]]></title>
            <link>https://blog.ivwv.site//article/nodejs-axios-use-http-https-socks5-proxy</link>
            <guid>https://blog.ivwv.site//article/nodejs-axios-use-http-https-socks5-proxy</guid>
            <pubDate>Wed, 30 Oct 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[在日常开发中，网络请求是不可避免的。通过使用代理服务器，可以更好地控制请求的来源、隐藏 IP 地址，或者绕过网络限制。在本篇文章中，我将分享如何使用 axios 库结合 HTTP、HTTPS 和 SOCKS5 代理来发送网络请求，并详细介绍实现过程。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-12fe18879324805eaea6d3728c87ee64"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-12fe1887932480e5a06df9db1c62d97c">在日常开发中，网络请求是不可避免的。通过使用代理服务器，可以更好地控制请求的来源、隐藏 IP 地址，或者绕过网络限制。在本篇文章中，我将分享如何使用 <code class="notion-inline-code">axios</code> 库结合 HTTP、HTTPS 和 SOCKS5 代理来发送网络请求，并详细介绍实现过程。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe1887932480fb988acda3a3f0705f" data-id="12fe1887932480fb988acda3a3f0705f"><span><div id="12fe1887932480fb988acda3a3f0705f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe1887932480fb988acda3a3f0705f" title="准备工作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">准备工作</span></span></h4><div class="notion-text notion-block-12fe1887932480d2b212dfd95cb999f4">首先，我们需要确保项目中安装了必要的依赖，包括 <code class="notion-inline-code">axios</code>、<code class="notion-inline-code">http-proxy-agent</code>、<code class="notion-inline-code">https-proxy-agent</code> 和 <code class="notion-inline-code">socks-proxy-agent</code>。可以使用以下命令进行安装：</div><div class="notion-text notion-block-12fe1887932480e4a204f99cc64c8a7a">安装完成后，就可以开始构建代码了。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe188793248038a0e2c62f18fe6784" data-id="12fe188793248038a0e2c62f18fe6784"><span><div id="12fe188793248038a0e2c62f18fe6784" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe188793248038a0e2c62f18fe6784" title="代码实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">代码实现</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe1887932480dbabd3ea9a781ea2de" data-id="12fe1887932480dbabd3ea9a781ea2de"><span><div id="12fe1887932480dbabd3ea9a781ea2de" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe1887932480dbabd3ea9a781ea2de" title="1. 导入必要的模块"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 导入必要的模块</span></span></h4><div class="notion-text notion-block-12fe188793248031ae76f97bbcf1a05d">我们首先导入 <code class="notion-inline-code">axios</code> 库及相应的代理模块：</div><div class="notion-text notion-block-12fe18879324804cb4e4d9cbd765d738">这里我们使用 <code class="notion-inline-code">axios</code> 作为 HTTP 客户端，用它来发送网络请求；而 <code class="notion-inline-code">http-proxy-agent</code>、<code class="notion-inline-code">https-proxy-agent</code> 和 <code class="notion-inline-code">socks-proxy-agent</code> 用于处理不同类型的代理协议。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe18879324807cbc70d6a956332437" data-id="12fe18879324807cbc70d6a956332437"><span><div id="12fe18879324807cbc70d6a956332437" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe18879324807cbc70d6a956332437" title="2. 配置 HTTP 代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 配置 HTTP 代理</span></span></h4><div class="notion-text notion-block-12fe1887932480bf9fa1f783063655fc">我们通过 <code class="notion-inline-code">HttpProxyAgent</code> 配置 HTTP 代理：</div><ul class="notion-list notion-list-disc notion-block-12fe18879324808d9a3ee26796d51427"><li><code class="notion-inline-code">HttpProxyAgent(&quot;&lt;http://127.0.0.1:7899&gt;&quot;)</code>：定义 HTTP 代理的地址。这里我们指定代理服务器位于本地的 7899 端口。</li></ul><ul class="notion-list notion-list-disc notion-block-12fe1887932480d4be7df29b6e43cbf4"><li><code class="notion-inline-code">httpAxios.defaults.httpAgent</code>：设置 <code class="notion-inline-code">axios</code> 请求的 <code class="notion-inline-code">httpAgent</code>，用于处理代理请求。</li></ul><ul class="notion-list notion-list-disc notion-block-12fe18879324809dbcbde12ea4cfc95f"><li><code class="notion-inline-code">httpAxios.defaults.proxy = true</code>：启用代理模式。</li></ul><ul class="notion-list notion-list-disc notion-block-12fe188793248017848bd5b36cefd487"><li><code class="notion-inline-code">httpAxios.get(&quot;&lt;http://ipinfo.io&gt;&quot;)</code>：发送 HTTP 请求，并输出响应内容。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe18879324802eaeeae099073e8053" data-id="12fe18879324802eaeeae099073e8053"><span><div id="12fe18879324802eaeeae099073e8053" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe18879324802eaeeae099073e8053" title="3. 配置 HTTPS 代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 配置 HTTPS 代理</span></span></h4><div class="notion-text notion-block-12fe1887932480a38e83e2724de255b7">对于 HTTPS 请求，我们可以使用 <code class="notion-inline-code">HttpsProxyAgent</code>：</div><ul class="notion-list notion-list-disc notion-block-12fe1887932480c0bafce7d79d55825b"><li><code class="notion-inline-code">HttpsProxyAgent(&quot;&lt;http://127.0.0.1:7899&gt;&quot;)</code>：这里我们依然使用同一个代理地址。</li></ul><ul class="notion-list notion-list-disc notion-block-12fe1887932480be9a23f2dc23ea6e38"><li><code class="notion-inline-code">httpsAxios.defaults.httpsAgent</code>：为 HTTPS 请求设置 <code class="notion-inline-code">httpsAgent</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-12fe1887932480969f27cfb0522050c9"><li><code class="notion-inline-code">httpsAxios.defaults.proxy = false</code>：禁用内置的 <code class="notion-inline-code">axios</code> 代理，因为我们手动定义了代理。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe188793248020b65bf3d8f5dbd4a6" data-id="12fe188793248020b65bf3d8f5dbd4a6"><span><div id="12fe188793248020b65bf3d8f5dbd4a6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe188793248020b65bf3d8f5dbd4a6" title="4. 配置 SOCKS5 代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4. 配置 SOCKS5 代理</span></span></h4><div class="notion-text notion-block-12fe1887932480278f2ef84cea43719a">为了支持 SOCKS5 代理，我们需要使用 <code class="notion-inline-code">SocksProxyAgent</code>：</div><ul class="notion-list notion-list-disc notion-block-12fe1887932480e693bedc58b6c26150"><li><code class="notion-inline-code">SocksProxyAgent(&quot;socks5://127.0.0.1:7898&quot;)</code>：定义 SOCKS5 代理地址。我们使用本地的 7898 端口。</li></ul><ul class="notion-list notion-list-disc notion-block-12fe18879324804ba119f4858bde9ea4"><li><code class="notion-inline-code">socks5Axios.defaults.httpsAgent</code>：将 <code class="notion-inline-code">socks5Agent</code> 作为 <code class="notion-inline-code">axios</code> 的 <code class="notion-inline-code">httpsAgent</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-12fe1887932480a3800fd192568dc836"><li><code class="notion-inline-code">socks5Axios.defaults.proxy = false</code>：禁用 <code class="notion-inline-code">axios</code> 自带的代理功能。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe1887932480f68127f7b7a0ecd4ab" data-id="12fe1887932480f68127f7b7a0ecd4ab"><span><div id="12fe1887932480f68127f7b7a0ecd4ab" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe1887932480f68127f7b7a0ecd4ab" title="5. 执行代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5. 执行代码</span></span></h4><div class="notion-text notion-block-12fe18879324806389e7d2f8c8833a60">最后，我们将所有代理请求依次执行：</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-12fe1887932480938c25c8aed9005ab1" data-id="12fe1887932480938c25c8aed9005ab1"><span><div id="12fe1887932480938c25c8aed9005ab1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12fe1887932480938c25c8aed9005ab1" title="完整代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">完整代码</span></span></h4><div class="notion-text notion-block-12fe188793248097be11f566a89c3078">以下是完整的代码实现：</div><div class="notion-blank notion-block-12fe1887932480288906e606cadd0342"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用 undici 为 Node.js 原生 fetch 请求设置代理]]></title>
            <link>https://blog.ivwv.site//article/nodejs-fetch-proxy-with-undici</link>
            <guid>https://blog.ivwv.site//article/nodejs-fetch-proxy-with-undici</guid>
            <pubDate>Sat, 26 Oct 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[在 Node.js 项目中，有时需要通过代理服务器发送 HTTP 请求。然而，许多第三方库（如原生 fetch）无法直接支持 https-proxy-agent 或 socks-proxy-agent 等代理库。在这种情况下，可以通过 undici 提供的全局调度器为请求设置代理。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-12be1887932480f68086e6e8d9bc7eda"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-table-of-contents notion-gray notion-block-12be1887932480aeb009c5aca040a1da"><a href="#12be18879324807b9aabe30a9ee32c4c" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:0">一、为什么使用 undici 处理代理</span></a><a href="#12be1887932480cab9d2e167c532eb16" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:0">二、通过 undici 设置全局代理</span></a><a href="#12be18879324805aa6f1c8d5fd2e87da" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">1. 安装 undici 依赖</span></a><a href="#12be1887932480068360f36b1a3915ee" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">2. 使用 HTTP 代理进行请求</span></a><a href="#12be18879324806bb1a0ce704fb61b0f" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">3. 使用 SOCKS5 代理进行请求</span></a><a href="#12be1887932480d68fe3e9135f6057d1" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:0">三、未使用代理的请求示例</span></a><a href="#12be18879324800d8f74fbfdaa9dbe36" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:0">总结</span></a></div><div class="notion-text notion-block-12be18879324800d8473f3b1fc5fce44">在 Node.js 项目中，有时需要通过代理服务器发送 HTTP 请求。然而，许多第三方库（如原生 <code class="notion-inline-code">fetch</code>）无法直接支持 <code class="notion-inline-code">https-proxy-agent</code> 或 <code class="notion-inline-code">socks-proxy-agent</code> 等代理库。在这种情况下，可以通过 <code class="notion-inline-code">undici</code> 提供的全局调度器为请求设置代理。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-12be18879324807b9aabe30a9ee32c4c" data-id="12be18879324807b9aabe30a9ee32c4c"><span><div id="12be18879324807b9aabe30a9ee32c4c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12be18879324807b9aabe30a9ee32c4c" title="一、为什么使用 undici 处理代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、为什么使用 undici 处理代理</span></span></h3><div class="notion-text notion-block-12be18879324802d94b4cb1a1411f9d5">在 Node.js 中，原生 <code class="notion-inline-code">fetch</code> 和部分第三方库无法直接使用 <code class="notion-inline-code">https-proxy-agent</code> 或 <code class="notion-inline-code">socks-proxy-agent</code> 进行代理。为了解决这一问题，可以借助 <code class="notion-inline-code">undici</code> 库，通过其全局调度器（Global Dispatcher）功能实现代理设置。<code class="notion-inline-code">undici</code> 是一个高效的 HTTP 客户端，提供了对代理服务器的全面支持。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-12be1887932480cab9d2e167c532eb16" data-id="12be1887932480cab9d2e167c532eb16"><span><div id="12be1887932480cab9d2e167c532eb16" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12be1887932480cab9d2e167c532eb16" title="二、通过 undici 设置全局代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、通过 undici 设置全局代理</span></span></h3><div class="notion-text notion-block-12be188793248057b735e8a325c24b6f">要在 Node.js 中为所有请求统一设置代理，可以利用 <code class="notion-inline-code">undici</code> 的全局调度器。以下是一个简单的例子，演示如何使用 HTTP 和 SOCKS5 代理发送请求。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-12be18879324805aa6f1c8d5fd2e87da" data-id="12be18879324805aa6f1c8d5fd2e87da"><span><div id="12be18879324805aa6f1c8d5fd2e87da" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12be18879324805aa6f1c8d5fd2e87da" title="1. 安装 undici 依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 安装 undici 依赖</span></span></h4><div class="notion-text notion-block-12be188793248055b344eee4a6a79dd3">在项目中使用 <code class="notion-inline-code">undici</code>，首先需要安装该库：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-12be1887932480068360f36b1a3915ee" data-id="12be1887932480068360f36b1a3915ee"><span><div id="12be1887932480068360f36b1a3915ee" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12be1887932480068360f36b1a3915ee" title="2. 使用 HTTP 代理进行请求"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 使用 HTTP 代理进行请求</span></span></h4><div class="notion-text notion-block-12be18879324803d811cc198cccc20b6">以下代码展示了如何通过 <code class="notion-inline-code">undici</code> 设置 HTTP 代理，并使用原生 <code class="notion-inline-code">fetch</code> 进行请求。</div><div class="notion-text notion-block-12be188793248034ae79fdce253242ce">该示例中，通过 HTTP 代理访问 <code class="notion-inline-code">https://httpbin.org/ip</code> 接口，并返回客户端的 IP 地址。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-12be18879324806bb1a0ce704fb61b0f" data-id="12be18879324806bb1a0ce704fb61b0f"><span><div id="12be18879324806bb1a0ce704fb61b0f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12be18879324806bb1a0ce704fb61b0f" title="3. 使用 SOCKS5 代理进行请求"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 使用 SOCKS5 代理进行请求</span></span></h4><div class="notion-text notion-block-12be18879324806fb425cce580268050">如果需要使用 SOCKS5 代理，只需将 <code class="notion-inline-code">uri</code> 设置为 SOCKS5 代理地址：</div><div class="notion-text notion-block-12be18879324802891e9c984abf5a541">通过该方式，所有请求将通过 SOCKS5 代理进行。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-12be1887932480d68fe3e9135f6057d1" data-id="12be1887932480d68fe3e9135f6057d1"><span><div id="12be1887932480d68fe3e9135f6057d1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12be1887932480d68fe3e9135f6057d1" title="三、未使用代理的请求示例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、未使用代理的请求示例</span></span></h3><div class="notion-text notion-block-12be18879324809fba5fd51679a68c2a">为了对比代理前后的效果，以下代码展示了未使用代理时的请求：</div><div class="notion-text notion-block-12be18879324803ab164d378080e9680">此请求不会经过代理服务器，获取到的 IP 地址为客户端本机的外网 IP。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-12be18879324800d8f74fbfdaa9dbe36" data-id="12be18879324800d8f74fbfdaa9dbe36"><span><div id="12be18879324800d8f74fbfdaa9dbe36" class="notion-header-anchor"></div><a class="notion-hash-link" href="#12be18879324800d8f74fbfdaa9dbe36" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">总结</span></span></h3><div class="notion-text notion-block-12be1887932480e6a961d1a78e346d83">通过 <code class="notion-inline-code">undici</code> 库的全局调度器功能，可以轻松为 Node.js 中的原生 <code class="notion-inline-code">fetch</code> 请求配置代理。无论是 HTTP 还是 SOCKS5 代理，均可通过 <code class="notion-inline-code">ProxyAgent</code> 设置，并通过 <code class="notion-inline-code">setGlobalDispatcher</code> 方法统一应用到所有请求。这种方法适合需要在项目中全局配置代理的场景，避免了为每个请求单独设置代理的麻烦，同时提高了代码的可维护性。</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows电脑设置网络唤醒(Wake-on-LAN)]]></title>
            <link>https://blog.ivwv.site//article/windows-set-wake-on-lan</link>
            <guid>https://blog.ivwv.site//article/windows-set-wake-on-lan</guid>
            <pubDate>Wed, 16 Oct 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[要通过 Ubuntu 服务器从非局域网中唤醒你的 Windows 电脑，你可以使用 Wake-on-LAN (WoL) 功能。尽管 WoL 通常在同一局域网内使用，但通过一些额外的配置，可以实现从外部网络唤醒电脑。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-121e1887932480449328e5a6c68102eb"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-8c9019d887d84de4ab23b37fbd906081"><div>要通过 Ubuntu 服务器从非局域网中唤醒你的 Windows 电脑，你可以使用 <b>Wake-on-LAN (WoL)</b> 功能。尽管 WoL 通常在同一局域网内使用，但通过一些额外的配置，可以实现从外部网络唤醒电脑。</div></blockquote><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-50b3e1ba8daf4edcb5925c3a8e1ce42b" data-id="50b3e1ba8daf4edcb5925c3a8e1ce42b"><span><div id="50b3e1ba8daf4edcb5925c3a8e1ce42b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#50b3e1ba8daf4edcb5925c3a8e1ce42b" title="1. 启用 Windows 电脑的 Wake-on-LAN 功能"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 启用 Windows 电脑的 Wake-on-LAN 功能</span></span></h4><div class="notion-text notion-block-c0a03596db1d43d0b98faf0074bb5ca6">首先，你需要确保你的 Windows 电脑支持并启用了 Wake-on-LAN：</div><ol start="1" class="notion-list notion-list-numbered notion-block-ce59f51d62b34e17bdbc48d4af5b189a"><li><b>BIOS/UEFI 设置(具体看自己电脑主板如何设置)</b>:</li><ol class="notion-list notion-list-numbered notion-block-ce59f51d62b34e17bdbc48d4af5b189a"><ul class="notion-list notion-list-disc notion-block-907a6a8e22e541988b5bd042ea1e9e41"><li>启动 Windows 电脑，进入 BIOS/UEFI 设置。</li></ul><ul class="notion-list notion-list-disc notion-block-3f0ed3141e5c4d65a8a490a608d03768"><li>找到网络适配器相关的设置，启用 <b>Wake on LAN</b> 功能。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-4fd74a7d41f1414c8c4d9b8ff47b2c74"><li><b>Windows 设置</b>:</li><ol class="notion-list notion-list-numbered notion-block-4fd74a7d41f1414c8c4d9b8ff47b2c74"><ul class="notion-list notion-list-disc notion-block-8715022a5c0d41699cd174c01a9b919e"><li>打开设置，依次点击: 网络和Internet → 状态 → 更改适配器选项</li><ul class="notion-list notion-list-disc notion-block-8715022a5c0d41699cd174c01a9b919e"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d8d6c22f416b4f708a6d49cd6e6b970a"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2F7a58a704-5230-481c-b7c4-da33dededa24%2Fimage.png?table=block&amp;id=d8d6c22f-416b-4f70-8a6d-49cd6e6b970a&amp;t=d8d6c22f-416b-4f70-8a6d-49cd6e6b970a&amp;width=851.984375&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></ul></ul><ul class="notion-list notion-list-disc notion-block-d12c306c851b46faa477865479495ccc"><li>右键点击你的有线网络适配器，选择 <b>属性</b>。</li><ul class="notion-list notion-list-disc notion-block-d12c306c851b46faa477865479495ccc"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-1387ed95386749d1a22dd3e67897434d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2F35a59520-8a8b-4d2c-a0bd-e721bf078c80%2Fimage.png?table=block&amp;id=1387ed95-3867-49d1-a22d-d3e67897434d&amp;t=1387ed95-3867-49d1-a22d-d3e67897434d&amp;width=851.984375&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></ul></ul><ul class="notion-list notion-list-disc notion-block-fd1b3f5862e346bea6a2ac7e65acca16"><li>在 <b>电源管理</b> 标签下，确保勾选三个都勾选上</li><ul class="notion-list notion-list-disc notion-block-fd1b3f5862e346bea6a2ac7e65acca16"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-531f3cd3e3ec43b0936a8ad2cb89b915"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:435px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2Fa2215c33-d7c0-4e74-9373-b34d044bcb96%2Fimage.png?table=block&amp;id=531f3cd3-e3ec-43b0-936a-8ad2cb89b915&amp;t=531f3cd3-e3ec-43b0-936a-8ad2cb89b915&amp;width=435&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-78317cd6912d4b399abd82d8681b3a0e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:465px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2F795359a9-ab03-4b39-ab02-4b34e585e392%2Fimage.png?table=block&amp;id=78317cd6-912d-4b39-9abd-82d8681b3a0e&amp;t=78317cd6-912d-4b39-9abd-82d8681b3a0e&amp;width=465&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></ul></ul></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-9e4a6c9e484548fc851bd4c5b3278dbb" data-id="9e4a6c9e484548fc851bd4c5b3278dbb"><span><div id="9e4a6c9e484548fc851bd4c5b3278dbb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#9e4a6c9e484548fc851bd4c5b3278dbb" title="2. 配置 Ubuntu 服务器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 配置 Ubuntu 服务器</span></span></h4><div class="notion-text notion-block-09d02ae542394a939f99ae55aed5fb05">在你的局域网下 Ubuntu 服务器上，需要安装一个可以发送 WoL 魔术包的工具。可以使用 <code class="notion-inline-code">etherwake</code> 或 <code class="notion-inline-code">wakeonlan</code>：</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-aa3e2440568c49fdbd7ade526dd588bb" data-id="aa3e2440568c49fdbd7ade526dd588bb"><span><div id="aa3e2440568c49fdbd7ade526dd588bb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#aa3e2440568c49fdbd7ade526dd588bb" title="3. 获取 Windows 电脑的 MAC 地址"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 获取 Windows 电脑的 MAC 地址</span></span></h4><div class="notion-text notion-block-0418212b5cec41c3801eae5ad200bb23">为了唤醒你的 Windows 电脑，需要知道它的 MAC 地址。在 Windows 上通过以下步骤获取：</div><ol start="1" class="notion-list notion-list-numbered notion-block-3b12e8968ac04ae8a1fe9f59b5ea3d8f"><li>打开命令提示符，输入：</li><ol class="notion-list notion-list-numbered notion-block-3b12e8968ac04ae8a1fe9f59b5ea3d8f"></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2c9b64d3c3a04b8bb74e4814cb139906"><li>找到与你的局域网连接相关的网络适配器，记下 <b>物理地址</b>，它是你的 MAC 地址。</li><ol class="notion-list notion-list-numbered notion-block-2c9b64d3c3a04b8bb74e4814cb139906"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-d0eed5bbb0ff49c1afb028e7c31e5907"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:535px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2F8e26b71f-b151-431b-8732-b32786031a60%2Fimage.png?table=block&amp;id=d0eed5bb-b0ff-49c1-afb0-28e7c31e5907&amp;t=d0eed5bb-b0ff-49c1-afb0-28e7c31e5907&amp;width=535&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-5475c9cdfdaa4237be5a86ef9fd00b28" data-id="5475c9cdfdaa4237be5a86ef9fd00b28"><span><div id="5475c9cdfdaa4237be5a86ef9fd00b28" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5475c9cdfdaa4237be5a86ef9fd00b28" title="4. 从 Ubuntu 服务器发送 Wake-on-LAN 包"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4. 从 Ubuntu 服务器发送 Wake-on-LAN 包</span></span></h4><div class="notion-text notion-block-1fe54839e85347c781c8a383288a7f33">在 Ubuntu 服务器上使用 <code class="notion-inline-code">wakeonlan</code> 工具发送唤醒包：</div><div class="notion-text notion-block-597c398bdf1e4cb5a09f385c8ded93fa">例如(需要将 <code class="notion-inline-code">-</code> 符号换成 <code class="notion-inline-code">:</code> ,如 <code class="notion-inline-code">00-11-22-33-44-55</code>  改成 <code class="notion-inline-code">00:11:22:33:44:55</code>  )</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-72a495219d6a41d390b74ab0b3a3f142" data-id="72a495219d6a41d390b74ab0b3a3f142"><span><div id="72a495219d6a41d390b74ab0b3a3f142" class="notion-header-anchor"></div><a class="notion-hash-link" href="#72a495219d6a41d390b74ab0b3a3f142" title="5. 通过 SSH 远程执行 WoL（非局域网）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5. 通过 SSH 远程执行 WoL（非局域网）</span></span></h4><div class="notion-text notion-block-7154d36a717d4842ade2f999b9f193f0">假如你有一台局域网内的 Ubuntu 服务器，并且在非局域网环境下可访问SSH(frp内网穿透，Tailscale异地组网之类的环境)，可以直接远程开机Windows电脑。</div><div class="notion-blank notion-block-fc5fff43faaf4dd792b14d40d95b1f50"> </div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-122a2071f1c8402d938fdb28e71b6c1d" data-id="122a2071f1c8402d938fdb28e71b6c1d"><span><div id="122a2071f1c8402d938fdb28e71b6c1d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#122a2071f1c8402d938fdb28e71b6c1d" title="各平台适用软件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">各平台适用软件</span></span></h4><div class="notion-text notion-block-95593fdc8ed54313b1c32d22df71231f">Adnroid: <!-- -->‣</div><div class="notion-text notion-block-1671c1ddaa9e43adb6b3de93b9658d2c">Windows: </div><div class="notion-blank notion-block-8c5c8de157de4b4aab357c9097fad0c9"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows10 家庭版升级为专业版]]></title>
            <link>https://blog.ivwv.site//article/windows10-home-update-to-pro</link>
            <guid>https://blog.ivwv.site//article/windows10-home-update-to-pro</guid>
            <pubDate>Sun, 07 Jan 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[windows10 家庭版系统，升级为专业版]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-5be6ab9b34b14bc481ccb3d608c1b308"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-blank notion-block-a9cd8bd98bfc449eac6c6ded9f9cb350"> </div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-4a833d5237f54f648d9dabfab2aa6734" data-id="4a833d5237f54f648d9dabfab2aa6734"><span><div id="4a833d5237f54f648d9dabfab2aa6734" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4a833d5237f54f648d9dabfab2aa6734" title="备份家庭版密钥"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">备份家庭版密钥</span></span></h3><div class="notion-text notion-block-4404d42802934c2bb55e252d61f6c09c">现在一般购买笔记本电脑，都会预装正版的家庭版系统，所以升级之前建议将自己原本家庭版的产品密钥进行备份，当升级专业版失败后，还可以使用原本的家庭版正版</div><ul class="notion-list notion-list-disc notion-block-e16c27cd6c3f4d959f59a662810e0ff1"><li>打开 <b>CMD </b>终端，输入以下内容</li></ul><ul class="notion-list notion-list-disc notion-block-4e9db603a0764fa6b5aa3e257fb7033e"><li><code class="notion-inline-code">wmic path softwarelicensingservice get OA3xOriginalProductKey</code></li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-ad85d148d742467f9b9898f232fe115d" data-id="ad85d148d742467f9b9898f232fe115d"><span><div id="ad85d148d742467f9b9898f232fe115d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ad85d148d742467f9b9898f232fe115d" title="升级步骤"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">升级步骤</span></span></h3><ul class="notion-list notion-list-disc notion-block-e8080a9cc76f4d44b5ddfd1bfa82291b"><li>打开飞行模式或关闭 <code class="notion-inline-code">WIFI </code>以及有线连接 (<b>断网环境，必须！否者会出现意想不到的失败哦！</b>)</li></ul><ul class="notion-list notion-list-disc notion-block-4013012359834b24a98026e52b9ee75b"><li>windows 打开 <b>设置</b> → <b>更新和安全</b> → <b>激活</b></li></ul><ul class="notion-list notion-list-disc notion-block-7eac7e02094647838fa049cc98adb705"><li>点击 <b>更改产品密钥</b></li></ul><ul class="notion-list notion-list-disc notion-block-5cd30bb46e2d40fe95ea52179e8c4013"><li>填入 <b>产品密钥: VK7JG-NPHTM-C97JM-9MPGT-3V66T</b></li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-0b85de26a4124d5aafbaec0e9aed83e1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2Ff92e0532-f57e-4a24-a326-6fbe59221e35%2FUntitled.png?table=block&amp;id=0b85de26-a412-4d5a-afba-ec0e9aed83e1&amp;t=0b85de26-a412-4d5a-afba-ec0e9aed83e1&amp;width=907.96875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-b0d8471fc5c54b949a74279b97ac05de"><li>继续点击<b>下一页</b>以及后续操作(<b>确保是断网环境</b>)</li></ul><ul class="notion-list notion-list-disc notion-block-8cbd811d08e54848892f325716458c63"><li>此时由于没有网络,并不能从 <b>Windows </b>服务器下载任何内容，我们只需要等待升级进度达到 <b>100%  </b>大概 2-3 分钟,不要着急</li></ul><ul class="notion-list notion-list-disc notion-block-1739b64719fc421088c76eea925a4ea8"><li>进度到 100% 后会自动重启,重启后还需要等待系统更新进度跑满，大概 5 分钟</li></ul><ul class="notion-list notion-list-disc notion-block-d1fbb1e8560f4ffd8e7bbaf59f86a4d6"><li>进入系统后,再次打开 <b>设置</b> → <b>更新和安全</b> → <b>激活 ,</b>会显示 <b>Windows10 专业版</b> 激活状态为<b>未激活</b></li></ul><ul class="notion-list notion-list-disc notion-block-bae23b41a82947afb0d79fc6674dc097"><li>联网</li></ul><ul class="notion-list notion-list-disc notion-block-9eba966ac6004c68a609b0c752a0fbf4"><li>右键左下角 Windows <b>开始</b></li></ul><ul class="notion-list notion-list-disc notion-block-be682c6820a048fe88eb3f633019ab01"><li>打开 <b>Windows Powershell(管理员)</b></li></ul><ul class="notion-list notion-list-disc notion-block-19d624fabe464ac6821f6ed57f32bf84"><li>输入 <code class="notion-inline-code">irm </code><code class="notion-inline-code"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://massgrave.dev/get">https://massgrave.dev/get</a></code><code class="notion-inline-code"> | iex</code> 后回车</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-54cbd98611e0439c8c48e7c951c016e3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:610px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2Fc9b47aea-5311-431f-950a-964e0eb732f1%2FUntitled.png?table=block&amp;id=54cbd986-11e0-439c-8c48-e7c951c016e3&amp;t=54cbd986-11e0-439c-8c48-e7c951c016e3&amp;width=610&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-63f0ac1fd2fd4aea8dc6b429f0c11d4e"><li>输入<b> 1</b> 后，使用 <b>HWID </b>方式激活(也可以选择<b> 2</b> 和 <b>3</b>),会自动激活 Windows10 专业版</li></ul><ul class="notion-list notion-list-disc notion-block-a4b46a4704874c368e224900f44ea0e6"><li>激活成功</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-512e9d606fff49c0bfc18ca8e5e0f149"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fc726d930-dd38-4607-94bf-c91fe1a6c1c1%2F6cf68093-35c5-40a1-9241-26bf51397ca0%2FUntitled.png?table=block&amp;id=512e9d60-6fff-49c0-bfc1-8ca8e5e0f149&amp;t=512e9d60-6fff-49c0-bfc1-8ca8e5e0f149&amp;width=907.96875&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NodeJS: 使用 Axios 和实现 HTTP、HTTPS 和 SOCKS5 代理请求]]></title>
            <link>https://blog.ivwv.site//article/nodejs-axios-use-proxy</link>
            <guid>https://blog.ivwv.site//article/nodejs-axios-use-proxy</guid>
            <pubDate>Mon, 16 Sep 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[在日常开发中，网络请求是不可避免的。通过使用代理服务器，可以更好地控制请求的来源、隐藏 IP 地址，或者绕过网络限制。在本篇文章中，我将分享如何使用 axios 库结合 HTTP、HTTPS 和 SOCKS5 代理来发送网络请求，并详细介绍实现过程。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-103e1887932480aab8dec8b357da4e57"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-103e1887932480f891ebfef21cc15b38">在日常开发中，网络请求是不可避免的。通过使用代理服务器，可以更好地控制请求的来源、隐藏 IP 地址，或者绕过网络限制。在本篇文章中，我将分享如何使用 <code class="notion-inline-code">axios</code> 库结合 HTTP、HTTPS 和 SOCKS5 代理来发送网络请求，并详细介绍实现过程。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-103e188793248075bec0dcecd3e61251" data-id="103e188793248075bec0dcecd3e61251"><span><div id="103e188793248075bec0dcecd3e61251" class="notion-header-anchor"></div><a class="notion-hash-link" href="#103e188793248075bec0dcecd3e61251" title="准备工作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">准备工作</span></span></h4><ul class="notion-list notion-list-disc notion-block-103e1887932480fb8507c2da77a1d0f0"><li>首先，我们需要确保项目中安装了必要的依赖，包括 <code class="notion-inline-code">axios</code>、<code class="notion-inline-code">http-proxy-agent</code>、<code class="notion-inline-code">https-proxy-agent</code> 和 <code class="notion-inline-code">socks-proxy-agent</code>。可以使用以下命令进行安装：</li></ul><ul class="notion-list notion-list-disc notion-block-103e1887932480a4ad55d8f171261a09"><li>准备一个 HTTP、HTTPS 和 SOCKS5 代理环境。</li></ul><div class="notion-text notion-block-103e188793248017b2f5dbaaa9d61f7f">准备完毕后，就可以开始构建代码了。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-103e1887932480d79704d6eb05a06201" data-id="103e1887932480d79704d6eb05a06201"><span><div id="103e1887932480d79704d6eb05a06201" class="notion-header-anchor"></div><a class="notion-hash-link" href="#103e1887932480d79704d6eb05a06201" title="代码实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">代码实现</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-103e188793248020a5f2d20d84e63a43" data-id="103e188793248020a5f2d20d84e63a43"><span><div id="103e188793248020a5f2d20d84e63a43" class="notion-header-anchor"></div><a class="notion-hash-link" href="#103e188793248020a5f2d20d84e63a43" title="1. 导入必要的模块"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1. 导入必要的模块</span></span></h4><div class="notion-text notion-block-103e18879324808a862ede289b128f4c">我们首先导入 <code class="notion-inline-code">axios</code> 库及相应的代理模块：</div><div class="notion-text notion-block-103e188793248069a6fcc88cc904800f">这里我们使用 <code class="notion-inline-code">axios</code> 作为 HTTP 客户端，用它来发送网络请求；而 <code class="notion-inline-code">http-proxy-agent</code>、<code class="notion-inline-code">https-proxy-agent</code> 和 <code class="notion-inline-code">socks-proxy-agent</code> 用于处理不同类型的代理协议。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-e82d3c9db61f4b8fa9b2edda3530b3f8" data-id="e82d3c9db61f4b8fa9b2edda3530b3f8"><span><div id="e82d3c9db61f4b8fa9b2edda3530b3f8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e82d3c9db61f4b8fa9b2edda3530b3f8" title="2. 配置 HTTP 代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2. 配置 HTTP 代理</span></span></h4><div class="notion-text notion-block-1ba09d203c5d431d8ada0c891e46ef7c">我们通过 <code class="notion-inline-code">HttpProxyAgent</code> 配置 HTTP 代理：</div><ul class="notion-list notion-list-disc notion-block-103e18879324801c8c15f64a025834bf"><li><code class="notion-inline-code">HttpProxyAgent(&quot;http://127.0.0.1:7899&quot;)</code>：定义 HTTP 代理的地址。这里我们指定代理服务器位于本地的 7899 端口。</li></ul><ul class="notion-list notion-list-disc notion-block-103e1887932480e58b43e48245516a6c"><li><code class="notion-inline-code">httpAxios.defaults.httpAgent</code>：设置 <code class="notion-inline-code">axios</code> 请求的 <code class="notion-inline-code">httpAgent</code>，用于处理代理请求。</li></ul><ul class="notion-list notion-list-disc notion-block-103e1887932480c2b14ed6726f992026"><li><code class="notion-inline-code">httpAxios.defaults.proxy = true</code>：启用代理模式。</li></ul><ul class="notion-list notion-list-disc notion-block-103e1887932480ed9d5ff392e488245f"><li><code class="notion-inline-code">httpAxios.get(&quot;http://ipinfo.io&quot;)</code>：发送 HTTP 请求，并输出响应内容。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-103e188793248093a1d2d71c80aa0488" data-id="103e188793248093a1d2d71c80aa0488"><span><div id="103e188793248093a1d2d71c80aa0488" class="notion-header-anchor"></div><a class="notion-hash-link" href="#103e188793248093a1d2d71c80aa0488" title="3. 配置 HTTPS 代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3. 配置 HTTPS 代理</span></span></h4><div class="notion-text notion-block-103e18879324803e90c5db8c6eed16cb">对于 HTTPS 请求，我们可以使用 <code class="notion-inline-code">HttpsProxyAgent</code>：</div><ul class="notion-list notion-list-disc notion-block-103e1887932480caa1e7c15d8a53de48"><li><code class="notion-inline-code">HttpsProxyAgent(&quot;&lt;http://127.0.0.1:7899&gt;&quot;)</code>：这里我们依然使用同一个代理地址。</li></ul><ul class="notion-list notion-list-disc notion-block-103e1887932480fcac27c36877a354d7"><li><code class="notion-inline-code">httpsAxios.defaults.httpsAgent</code>：为 HTTPS 请求设置 <code class="notion-inline-code">httpsAgent</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-103e188793248000b5eed4888d418663"><li><code class="notion-inline-code">httpsAxios.defaults.proxy = false</code>：禁用内置的 <code class="notion-inline-code">axios</code> 代理，因为我们手动定义了代理。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-103e18879324803c984adb5d3cb54ddb" data-id="103e18879324803c984adb5d3cb54ddb"><span><div id="103e18879324803c984adb5d3cb54ddb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#103e18879324803c984adb5d3cb54ddb" title="4. 配置 SOCKS5 代理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4. 配置 SOCKS5 代理</span></span></h4><div class="notion-text notion-block-103e188793248056b15df77e4d626ac5">为了支持 SOCKS5 代理，我们需要使用 <code class="notion-inline-code">SocksProxyAgent</code>：</div><ul class="notion-list notion-list-disc notion-block-596a02beca984a5183bf231c009dfda4"><li><code class="notion-inline-code">SocksProxyAgent(&quot;socks5://127.0.0.1:7898&quot;)</code>：定义 SOCKS5 代理地址。我们使用本地的 7898 端口。</li></ul><ul class="notion-list notion-list-disc notion-block-103e188793248044af0ccc0928efc975"><li><code class="notion-inline-code">socks5Axios.defaults.httpsAgent</code>：将 <code class="notion-inline-code">socks5Agent</code> 作为 <code class="notion-inline-code">axios</code> 的 <code class="notion-inline-code">httpsAgent</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-103e1887932480369de0dd7e720cfa65"><li><code class="notion-inline-code">socks5Axios.defaults.proxy = false</code>：禁用 <code class="notion-inline-code">axios</code> 自带的代理功能。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-103e18879324802d87b0c0396f599c88" data-id="103e18879324802d87b0c0396f599c88"><span><div id="103e18879324802d87b0c0396f599c88" class="notion-header-anchor"></div><a class="notion-hash-link" href="#103e18879324802d87b0c0396f599c88" title="5. 执行代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5. 执行代码</span></span></h4><div class="notion-text notion-block-103e1887932480b999d3f5ce87e49e60">最后，我们将所有代理请求依次执行：</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-103e188793248018a9a0f573597e4aa8" data-id="103e188793248018a9a0f573597e4aa8"><span><div id="103e188793248018a9a0f573597e4aa8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#103e188793248018a9a0f573597e4aa8" title="完整代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">完整代码</span></span></h4><div class="notion-text notion-block-103e188793248057ba48d423b300540b">以下是完整的代码实现：</div><div class="notion-blank notion-block-103e18879324807d9ea9ec12fcaceb06"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用arpspoof和nmap的使局域网设备断网]]></title>
            <link>https://blog.ivwv.site//article/arp-deception-attack-and-prevention-basic-tutorials-using-arpspoof-and-nmap</link>
            <guid>https://blog.ivwv.site//article/arp-deception-attack-and-prevention-basic-tutorials-using-arpspoof-and-nmap</guid>
            <pubDate>Mon, 29 Apr 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[在网络安全领域，ARP（地址解析协议）欺骗攻击是一种常见的局域网攻击手段，攻击者可以利用这种攻击来窃取数据、中间人攻击等。本教程将介绍如何使用arpspoof和nmap两个工具来进行ARP欺骗攻击的检测和防范。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-32ab4677ddb34140a62e69407823a15e"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-c3a471e9b57f42298c090a7c82fda00f">在网络安全领域，<b>ARP</b>（地址解析协议）欺骗攻击是一种常见的局域网攻击手段，攻击者可以利用这种攻击来窃取数据、中间人攻击等。本教程将介绍如何使用<b>arpspoof</b>和<b>nmap</b>两个工具来进行ARP欺骗攻击的检测和防范。</div><div class="notion-table-of-contents notion-gray notion-block-d491d7fcb02142cdaee320ad7d9421c2"><a href="#81354f88fbe74147b009fce141a6b41a" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:0">ARP欺骗攻击</span></a><a href="#2cba171d8d224b638212808a4b5a886b" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">1. ARP欺骗攻击简介</span></a><a href="#a3bd1339aa114abdaaa963e9953b627f" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">2. 使用nmap扫描局域网</span></a><a href="#ab14847932a2457c89ecc5f2854763d9" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">3. 检测ARP欺骗攻击</span></a><a href="#384c4fd9e22643f488983babb158a691" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">安装 dsniff 套件</span></a><a href="#7e7618b303aa42b889513028b24be5ea" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">确认安装</span></a><a href="#7cf21fd4e6ee47679dd50adbcdaadc15" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">使用</span></a><a href="#d419710286dd44d9ac144313e3f7433f" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">4. 防范措施</span></a><a href="#d9c06d3445fe4f1fa7f224dcf3c35fe6" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:0">如何防范</span></a><a href="#c30baab8ced94e5cb7a9489eee990732" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">1. 使用静态ARP条目</span></a><a href="#35d46e18a9e24b5789d3e729a812fe63" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">步骤：</span></a><a href="#2bacd206c696431790c02a1f5b67eb09" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">注意事项：</span></a><a href="#8093f2a7ef6448c6a24bad6777a30cb6" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">2. 启用ARP检测和防护</span></a><a href="#865c99b4d38042ab8a0e25db5edb230d" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">步骤：</span></a><a href="#5a8b767ebaa042499ee66a1aa953450a" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">注意事项：</span></a><a href="#4a3fa2d436c845358e0a9d3df6eb1354" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">3. 使用网络监控工具</span></a><a href="#1ff30058ca3446688c15e28e950de3a9" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">步骤：</span></a><a href="#89730f55deea46f29395dcf8fb665c63" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">注意事项：</span></a><a href="#b36c4be7f0bc4be991bcee097e2dcc7c" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">4. 加密通信</span></a><a href="#baab2feed6254f52a46ca08f2d479e1b" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">步骤：</span></a><a href="#4677f0d745b849eb818b057ec32a3fbd" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">注意事项：</span></a><a href="#c80541d1d8a54b5eacfd00989c4ccb0d" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:24px">5. 使用VPN</span></a><a href="#d1e9ea788fc84300933a2d84da32e915" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">步骤：</span></a><a href="#68a0b0f0474b49c6852375aabadfb6a4" class="notion-table-of-contents-item"><span class="notion-table-of-contents-item-body" style="display:inline-block;margin-left:48px">注意事项：</span></a></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-81354f88fbe74147b009fce141a6b41a" data-id="81354f88fbe74147b009fce141a6b41a"><span><div id="81354f88fbe74147b009fce141a6b41a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#81354f88fbe74147b009fce141a6b41a" title="ARP欺骗攻击"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">ARP欺骗攻击</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2cba171d8d224b638212808a4b5a886b" data-id="2cba171d8d224b638212808a4b5a886b"><span><div id="2cba171d8d224b638212808a4b5a886b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cba171d8d224b638212808a4b5a886b" title="1. ARP欺骗攻击简介"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. ARP欺骗攻击简介</b></span></span></h3><div class="notion-text notion-block-a5ad351b5aea469a9666e43887373574">ARP欺骗攻击利用<b>ARP</b>协议的不足之处，向目标主机发送虚假的ARP响应，从而将目标主机的流量重定向到攻击者控制的位置。这种攻击可能导致信息泄露、中间人攻击等安全问题。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-a3bd1339aa114abdaaa963e9953b627f" data-id="a3bd1339aa114abdaaa963e9953b627f"><span><div id="a3bd1339aa114abdaaa963e9953b627f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a3bd1339aa114abdaaa963e9953b627f" title="2. 使用nmap扫描局域网"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 使用nmap扫描局域网</b></span></span></h3><div class="notion-text notion-block-4dc6393526f24d2882aed094079d9dd2"><b>nmap </b>基本使用教程在之前的一篇文章中有讲解到 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://nmap.org/download.html#linux-rpm">网络扫描工具 Nmap 的基本使用</a></div><div class="notion-text notion-block-d61da83fe7504dc7b783075eecc85876">首先，我们可以使用nmap工具来扫描局域网，以了解当前网络中的设备和其IP地址。使用以下命令：</div><div class="notion-text notion-block-00353734bacb4bd18368b2a77a162513">例如：</div><div class="notion-text notion-block-32b7c4e936fb4a47879c22ea3d056df2">这将扫描192.168.1.0到192.168.1.255之间的所有IP地址，并列出活动主机和开放端口。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-ab14847932a2457c89ecc5f2854763d9" data-id="ab14847932a2457c89ecc5f2854763d9"><span><div id="ab14847932a2457c89ecc5f2854763d9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ab14847932a2457c89ecc5f2854763d9" title="3. 检测ARP欺骗攻击"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 检测ARP欺骗攻击</b></span></span></h3><div class="notion-text notion-block-3f63898a8680437e8141db2b93b7aa8b"><code class="notion-inline-code">arpspoof</code> 可能不在默认的软件源中，特别是在某些 Linux 发行版上。它通常包含在 <code class="notion-inline-code">dsniff</code> 套件中，因此你可以尝试安装 <code class="notion-inline-code">dsniff</code> 套件来获取 <code class="notion-inline-code">arpspoof</code> 工具。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-384c4fd9e22643f488983babb158a691" data-id="384c4fd9e22643f488983babb158a691"><span><div id="384c4fd9e22643f488983babb158a691" class="notion-header-anchor"></div><a class="notion-hash-link" href="#384c4fd9e22643f488983babb158a691" title="安装 dsniff 套件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装 <code class="notion-inline-code">dsniff</code> 套件</span></span></h4><div class="notion-text notion-block-f6983f25f1434ee9bc6becc4616f6b06">在 Debian 和 Ubuntu 系统上，你可以使用以下命令来安装 <code class="notion-inline-code">dsniff</code>：</div><div class="notion-text notion-block-b43b33300e624576a923a7e7a74743c7">安装 <code class="notion-inline-code">dsniff</code> 后，你应该可以找到 <code class="notion-inline-code">arpspoof</code> 工具：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-7e7618b303aa42b889513028b24be5ea" data-id="7e7618b303aa42b889513028b24be5ea"><span><div id="7e7618b303aa42b889513028b24be5ea" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7e7618b303aa42b889513028b24be5ea" title="确认安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">确认安装</span></span></h4><div class="notion-text notion-block-1cdebfcbd01444f9af80b9eb94629b74">如果 <code class="notion-inline-code">arpspoof</code> 安装成功，你可以运行以下命令来确认它的版本和帮助信息：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-7cf21fd4e6ee47679dd50adbcdaadc15" data-id="7cf21fd4e6ee47679dd50adbcdaadc15"><span><div id="7cf21fd4e6ee47679dd50adbcdaadc15" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7cf21fd4e6ee47679dd50adbcdaadc15" title="使用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">使用</span></span></h4><div class="notion-text notion-block-ea4b305bcd2740a3b4b65bb1df2f46b1">一旦我们了解了局域网上的设备，我们可以使用arpspoof工具来检测可能存在的ARP欺骗攻击。arpspoof工具可以发送虚假的ARP响应，从而欺骗其他设备。我们可以使用以下命令：</div><div class="notion-text notion-block-df7344ebeab847a096473319eb97ba19">例如：</div><div class="notion-text notion-block-e96ef576ae55441fa55d6f100a51e9b9">这将告诉网络中的设备192.168.1.100，网关的IP地址是192.168.1.1，并将流量重定向到攻击者控制的位置。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-d419710286dd44d9ac144313e3f7433f" data-id="d419710286dd44d9ac144313e3f7433f"><span><div id="d419710286dd44d9ac144313e3f7433f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d419710286dd44d9ac144313e3f7433f" title="4. 防范措施"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4. 防范措施</b></span></span></h3><div class="notion-text notion-block-6bc9e44bd850440ea30f6400a97314ab">要防范ARP欺骗攻击，可以采取一些措施，例如使用静态ARP条目、启用ARP检测和防护、使用VPN等。此外，网络监控和入侵检测系统也可以帮助及时发现和应对ARP欺骗攻击。</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-d9c06d3445fe4f1fa7f224dcf3c35fe6" data-id="d9c06d3445fe4f1fa7f224dcf3c35fe6"><span><div id="d9c06d3445fe4f1fa7f224dcf3c35fe6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d9c06d3445fe4f1fa7f224dcf3c35fe6" title="如何防范"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">如何防范</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-c30baab8ced94e5cb7a9489eee990732" data-id="c30baab8ced94e5cb7a9489eee990732"><span><div id="c30baab8ced94e5cb7a9489eee990732" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c30baab8ced94e5cb7a9489eee990732" title="1. 使用静态ARP条目"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. 使用静态ARP条目</b></span></span></h3><div class="notion-text notion-block-e8064b2672df4a5699484691c4e92533">静态ARP条目是一种手动配置的方式，将MAC地址与IP地址进行绑定，以防止ARP欺骗攻击。下面是具体的教程：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-35d46e18a9e24b5789d3e729a812fe63" data-id="35d46e18a9e24b5789d3e729a812fe63"><span><div id="35d46e18a9e24b5789d3e729a812fe63" class="notion-header-anchor"></div><a class="notion-hash-link" href="#35d46e18a9e24b5789d3e729a812fe63" title="步骤："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤：</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-5d2a0d79c23b4c1e801639d9ec72f768"><li>打开命令提示符或终端窗口。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-36afb5c69c9d44d08c5191768be1af8e"><li>使用以下命令添加静态ARP条目：</li></ol><div class="notion-text notion-block-26ca6045150945ce8edece16235ba824">例如：</div><ol start="1" class="notion-list notion-list-numbered notion-block-4f341de0d4b64cd388394aa01de9e00b"><li>重复以上步骤，为所有需要静态ARP条目的设备添加条目。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2bacd206c696431790c02a1f5b67eb09" data-id="2bacd206c696431790c02a1f5b67eb09"><span><div id="2bacd206c696431790c02a1f5b67eb09" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2bacd206c696431790c02a1f5b67eb09" title="注意事项："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>注意事项：</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-1353f4689ef84e80a1fa31b14c40471f"><li>确保提前获取目标设备的MAC地址，以确保正确配置静态ARP条目。</li></ul><ul class="notion-list notion-list-disc notion-block-008a1f71457142078583fa5f844397e8"><li>其中想要获取设备的 <b>MAC </b>地址，位于 <b>ifconfig </b>命令中对应网卡下的 <code class="notion-inline-code">ether</code> 的值</li></ul><ul class="notion-list notion-list-disc notion-block-25b88ffcfd634f50a298bce6a9c894e8"><li>静态ARP条目是针对每台设备的，因此需要为每台设备都添加相应的条目。</li></ul><ul class="notion-list notion-list-disc notion-block-8428a547ede844cc8e2acc8d8a55af60"><li>如需删除添加的 <b>ARP </b>条目，使用以下命令:</li><ul class="notion-list notion-list-disc notion-block-8428a547ede844cc8e2acc8d8a55af60"></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-8093f2a7ef6448c6a24bad6777a30cb6" data-id="8093f2a7ef6448c6a24bad6777a30cb6"><span><div id="8093f2a7ef6448c6a24bad6777a30cb6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8093f2a7ef6448c6a24bad6777a30cb6" title="2. 启用ARP检测和防护"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 启用ARP检测和防护</b></span></span></h3><div class="notion-text notion-block-0110fb6f24c94034ad5547b2f8150727">启用ARP检测和防护功能可以帮助识别和防止虚假的ARP响应。具体实施方法可能因网络设备而异，以下是一个基本的教程：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-865c99b4d38042ab8a0e25db5edb230d" data-id="865c99b4d38042ab8a0e25db5edb230d"><span><div id="865c99b4d38042ab8a0e25db5edb230d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#865c99b4d38042ab8a0e25db5edb230d" title="步骤："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤：</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-d7f6f62d1454485b90f581f1e5827d82"><li>登录网络设备的管理界面，通常是通过浏览器访问设备的管理地址。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-f55b9d78c38840b790b26e1a1c7c8a24"><li>导航到“ARP设置”或“安全设置”等相关菜单。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-f9f421bf4b6344e3a7b872e75c5858d9"><li>启用“ARP检测”、“ARP防护”或类似选项，并根据需要进行配置。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2c77c62d080d4255ae8ba05855d9bbfe"><li>保存设置并重新启动设备，使更改生效。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-5a8b767ebaa042499ee66a1aa953450a" data-id="5a8b767ebaa042499ee66a1aa953450a"><span><div id="5a8b767ebaa042499ee66a1aa953450a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5a8b767ebaa042499ee66a1aa953450a" title="注意事项："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>注意事项：</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-956af2c5cc7a44b6af53c3cf2812fce2"><li>网络设备的管理界面可能因品牌和型号而异，因此具体步骤可能会有所不同。</li></ul><ul class="notion-list notion-list-disc notion-block-fd0c614f428643aaaf71e04338bc7a15"><li>在启用ARP检测和防护功能后，定期检查日志以确保网络安全，并根据需要调整配置。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-4a3fa2d436c845358e0a9d3df6eb1354" data-id="4a3fa2d436c845358e0a9d3df6eb1354"><span><div id="4a3fa2d436c845358e0a9d3df6eb1354" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4a3fa2d436c845358e0a9d3df6eb1354" title="3. 使用网络监控工具"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 使用网络监控工具</b></span></span></h3><div class="notion-text notion-block-7df54d4e375d4bb6a4cc7a86cab5a02b">使用网络监控工具可以帮助检测异常的ARP响应和流量重定向，以下是一个基本的教程：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-1ff30058ca3446688c15e28e950de3a9" data-id="1ff30058ca3446688c15e28e950de3a9"><span><div id="1ff30058ca3446688c15e28e950de3a9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1ff30058ca3446688c15e28e950de3a9" title="步骤："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤：</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-b65153bed80f45738e55f34c8b9d8da1"><li>选择并安装适合的网络监控工具，如Wireshark、Snort等。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-fd249c13d4f04286add168be584a8140"><li>配置监控工具以捕获网络流量，并过滤出与ARP相关的数据包。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3ca951c6e82f4963b3476ea3e006a28b"><li>分析捕获的数据包，查找异常的ARP响应和流量重定向。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-6c448e40cddc4e9bb91041e9d0fb70e6"><li>根据发现的问题采取适当的措施，如阻止恶意流量或调整网络配置。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-89730f55deea46f29395dcf8fb665c63" data-id="89730f55deea46f29395dcf8fb665c63"><span><div id="89730f55deea46f29395dcf8fb665c63" class="notion-header-anchor"></div><a class="notion-hash-link" href="#89730f55deea46f29395dcf8fb665c63" title="注意事项："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>注意事项：</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-6772cf2b1bc84ebf87eaffc5153f1b9e"><li>网络监控工具的配置和使用可能需要一定的网络知识和技能。</li></ul><ul class="notion-list notion-list-disc notion-block-e3b3c68c30a94cd09a5b5ac9712ebf66"><li>定期检查网络流量和日志可以帮助及时发现并应对潜在的安全问题。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-b36c4be7f0bc4be991bcee097e2dcc7c" data-id="b36c4be7f0bc4be991bcee097e2dcc7c"><span><div id="b36c4be7f0bc4be991bcee097e2dcc7c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b36c4be7f0bc4be991bcee097e2dcc7c" title="4. 加密通信"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4. 加密通信</b></span></span></h3><div class="notion-text notion-block-d3c1aedd4c644acbbdb7820eade8adec">通过使用加密协议（如SSL/TLS）来加密网络通信，可以减少因ARP欺骗攻击导致的信息泄露和数据窃取风险。以下是一个基本的教程：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-baab2feed6254f52a46ca08f2d479e1b" data-id="baab2feed6254f52a46ca08f2d479e1b"><span><div id="baab2feed6254f52a46ca08f2d479e1b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#baab2feed6254f52a46ca08f2d479e1b" title="步骤："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤：</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-da7abd4630a446f8a843664f09b3b9d6"><li>配置服务器和客户端以支持SSL/TLS协议。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3ae1fd03152b4c9480b5ec857c163ec8"><li>将网站、应用程序或服务的通信通道从HTTP等不安全的协议切换到HTTPS等安全协议。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-77ad41671862464f95b6dc3053b3bdf5"><li>配置服务器证书和客户端证书，确保通信双方的身份验证和数据加密。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-16840d0ec09d40e48ca71e4234f1c73e"><li>定期更新证书，并监控通信流量以确保安全性。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-4677f0d745b849eb818b057ec32a3fbd" data-id="4677f0d745b849eb818b057ec32a3fbd"><span><div id="4677f0d745b849eb818b057ec32a3fbd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4677f0d745b849eb818b057ec32a3fbd" title="注意事项："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>注意事项：</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-87a7c5ff214a4394a522085da8ee5f73"><li>证书的管理和配置可能需要一定的安全知识和技能。</li></ul><ul class="notion-list notion-list-disc notion-block-2b3f1de5a5014c7f9d8e793ab5d2c503"><li>配置加密通信可能会增加服务器和客户端的计算负载，因此需要在安全性和性能之间进行权衡。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-c80541d1d8a54b5eacfd00989c4ccb0d" data-id="c80541d1d8a54b5eacfd00989c4ccb0d"><span><div id="c80541d1d8a54b5eacfd00989c4ccb0d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c80541d1d8a54b5eacfd00989c4ccb0d" title="5. 使用VPN"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>5. 使用VPN</b></span></span></h3><div class="notion-text notion-block-83c503c60b0344539a59d1b420a73b7b">通过使用虚拟专用网络（VPN）来建立安全的加密通道，可以保护网络通信免受ARP欺骗攻击的影响。以下是一个基本的教程：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-d1e9ea788fc84300933a2d84da32e915" data-id="d1e9ea788fc84300933a2d84da32e915"><span><div id="d1e9ea788fc84300933a2d84da32e915" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d1e9ea788fc84300933a2d84da32e915" title="步骤："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤：</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-9e870a32498d4fe7a2790015218c5fee"><li>选择并安装适合的VPN客户端和服务器软件。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-d110f4baa8c441008724a3725bbed5f2"><li>配置VPN服务器以支持安全的通信协议，如IPsec、OpenVPN等。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-c3f461906c4e427a9c365c5a40dd6143"><li>配置VPN客户端以连接到VPN服务器，并建立安全的加密通道。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-5fd9b71ff5404ef39c37707cc12c60ae"><li>将所有敏感数据和通信通过VPN隧道进行传输，确保安全性和隐私性。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-68a0b0f0474b49c6852375aabadfb6a4" data-id="68a0b0f0474b49c6852375aabadfb6a4"><span><div id="68a0b0f0474b49c6852375aabadfb6a4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#68a0b0f0474b49c6852375aabadfb6a4" title="注意事项："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>注意事项：</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-8d4c8c0254724f9ea62acfa5a0f5ae47"><li>VPN的配置和管理可能需要一定的网络知识和技能。</li></ul><ul class="notion-list notion-list-disc notion-block-5bdd7936b3324d9f981440748740eeb6"><li>选择安全可靠的VPN服务提供商，并定期更新和维护VPN服务器和客户端。</li></ul></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>