<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>feng的博客</title><link>https://blog.swihp.cn/</link><description></description><item><title>如何使用日志中心的文件传输日志来监控文件修改</title><link>https://blog.swihp.cn/?id=1437</link><description>&lt;h3&gt;&lt;strong&gt;&lt;span style=&quot;font-family: 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;;&quot;&gt;启用文件传输日志&lt;/span&gt;&lt;/strong&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;默认情况下，此功能通常处于禁用状态。若要记录文件更改，请从要监控的文件传输协议的设置中启用传输日志。（控制面板→文件服务）&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;SMB：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;勾选&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;启用传输日志&lt;/span&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;复选框可对通过 SMB/CIFS 协议执行的文件操作启用日志记录。默认情况下，传输日志仅监控文件或文件夹的删除；但是，也可以前往&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;日志设置&lt;/span&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;以选择其他文件操作事件（创建、移动、重命名、读取、写入、权限更改）以供系统进行日志记录。请注意，选择的文件操作事件越多，便越可能会影响系统性能。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;AFP：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;勾选&lt;strong&gt;启用传输日志&lt;/strong&gt;，系统将会记录通过 AFP 协议访问文件的操作，包括创建、删除、读取、写入、移动及重命名文件或文件夹。&lt;span style=&quot;color: #2E3742; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;由于 Apple 已移除对AFP的支持，因此建议您使用&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://kb.synology.cn/DSM/tutorial/file_protocol_AFP_not_recommended&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer nofollow&quot; style=&quot;font-size: 16px; font-weight: inherit; white-space: normal; background-color: rgb(255, 255, 255); box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: underline; color: rgb(0, 103, 230); font-family: 宋体, SimSun;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;其他文件服务&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #2E3742; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;FTP：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;勾选&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;启用 FTP 文件传输日志&lt;/span&gt;&lt;/span&gt;会记录FTP、FTPS 和 SFTP &lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;下载或上传的文件的日志&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;File Station：&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;打开&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;File Station&lt;/span&gt;，然后单击&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;设置&lt;/span&gt;按钮，启用 File Station 日志来记录所有用户的操作。用户活动包括&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;新建文件夹&lt;/span&gt;、&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;上传&lt;/span&gt;、&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;下载&lt;/span&gt;、&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;删除&lt;/span&gt;、&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;重命名&lt;/span&gt;、&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;移动&lt;/span&gt;、&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;复制&lt;/span&gt;和&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; font-size: 16px; padding-left: 2px; padding-right: 2px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;属性设置&lt;/span&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;color: #505A64; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;WebDAV Server：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;打开&amp;nbsp;&lt;span style=&quot;color: #2E3742; font-size: 16px; background-color: #FFFFFF; font-family: 宋体, SimSun;&quot;&gt;WebDAV Server → 设置 → 高级设置 →&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px; font-family: 宋体, SimSun;&quot;&gt;启用 WebDAV 日志&lt;/span&gt;&lt;span style=&quot;color: #505A64; font-family: 宋体, SimSun;&quot;&gt;：这会记录与 WebDAV 活动相关的事件。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box; background-color: transparent; border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; margin: 15px 0px 5px; padding-top: 0px; font-size: 18px; color: rgb(0, 0, 0) !important;&quot;&gt;&lt;a id=&quot;x_anchor_id4a2657281d&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;;&quot;&gt;查看文件传输日志&lt;/span&gt;&lt;/strong&gt;&lt;/h3&gt;&lt;ol class=&quot;type_lower-decimal list-paddingleft-2&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; margin: 0px 0px 15px; padding-bottom: 0px; padding-left: 1.25em;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;进入&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;日志中心&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;日志&lt;/span&gt;（适用于 DSM）或&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;日志搜索&lt;/span&gt;。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;从右上角的下拉菜单中选择&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;文件传输&lt;/span&gt;。&lt;/span&gt;&lt;img src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/log001.png&quot; class=&quot;img_border img-cursor-pointer&quot; alt=&quot;&quot; style=&quot;box-sizing: border-box; max-width: 100%; vertical-align: top; border: 1px solid rgb(219, 221, 225); display: block; margin-bottom: 20px; margin-top: 10px; cursor: pointer; width: 800px;&quot; width=&quot;&quot; height=&quot;&quot; border=&quot;0&quot; vspace=&quot;0&quot; title=&quot;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;日志将显示每个事件的以下信息：&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;日志：用于此事件的文件传输协议类型。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;时间：事件发生的日期和时间。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;IP地址：此事件的源IP地址。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;用户：执行此事件的用户帐户。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;事件：已执行的操作（例如&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;Delete&lt;/span&gt;&amp;nbsp;、&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;Move&lt;/span&gt;&amp;nbsp;、&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;Rename&lt;/span&gt;&amp;nbsp;）。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;文件/文件夹：此事件涉及的文件类型（&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;文件&lt;/span&gt;或&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;文件夹&lt;/span&gt;）。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;文件大小：文件大小（文件夹显示为&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;NA&lt;/span&gt;&amp;nbsp;）。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;文件名：事件中涉及的文件或文件夹的路径。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;h3 style=&quot;box-sizing: border-box; background-color: transparent; border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; margin: 15px 0px 5px; padding-top: 0px; font-size: 18px; color: rgb(0, 0, 0) !important;&quot;&gt;&lt;a id=&quot;x_anchor_id747a0908aa&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;;&quot;&gt;搜索特定日志&lt;/span&gt;&lt;/strong&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;添加搜索条件以查找位于&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;文件传输&lt;/span&gt;中的特定日志。例如，如果您要搜索与&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Courier New&amp;quot;, monospace, &amp;quot; serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;photos&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;文件夹相关且在&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; font-family: &amp;quot;Courier New&amp;quot;, monospace, &amp;quot; serif&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;March 19 and March 24, 2023&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;之间发生的SMB&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;删除&lt;/span&gt;事件，请执行以下步骤。&lt;/span&gt;&lt;/p&gt;&lt;ol class=&quot;type_lower-decimal list-paddingleft-2&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; margin: 0px 0px 15px; padding-bottom: 0px; padding-left: 1.25em;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;单击&lt;/span&gt;&lt;img src=&quot;https://kb.synology.cn/_images/autogen/File_Transfer_log_monitor_modifications/2.png&quot; class=&quot;inline_s&quot; alt=&quot;2.png&quot; style=&quot;box-sizing: border-box; max-width: 100%; vertical-align: top; border: 1px solid transparent; display: inline-block; margin: 0px !important; height: 20px;&quot;/&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;放大镜图标并输入搜索条件。&lt;/span&gt;&lt;img src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/log002.png&quot; class=&quot;img_border&quot; alt=&quot;&quot; style=&quot;box-sizing: border-box; max-width: 100%; vertical-align: top; border: 1px solid rgb(219, 221, 225); display: block; margin-bottom: 20px; margin-top: 10px; width: 480px;&quot; width=&quot;&quot; height=&quot;&quot; border=&quot;0&quot; vspace=&quot;0&quot; title=&quot;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;单击&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;搜索&lt;/span&gt;可查看结果。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3 style=&quot;box-sizing: border-box; background-color: transparent; border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; margin: 15px 0px 5px; padding-top: 0px; font-size: 18px; color: rgb(0, 0, 0) !important;&quot;&gt;&lt;a id=&quot;x_anchor_idcaf2292537&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;;&quot;&gt;保留日志&lt;/span&gt;&lt;/strong&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;我们建议您保留日志，因为一旦达到限制，它们就会轮换：&lt;/span&gt;&lt;/p&gt;&lt;p&gt;连接日志 ：&amp;nbsp;10,000&lt;/p&gt;&lt;p&gt;传输日志 - SMB：100,000&lt;/p&gt;&lt;p&gt;传输日志 - AFP：20,000&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;传输日志 - File Station：20,000&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;传输日志 - FTP：20,000&lt;/p&gt;&lt;p&gt;传输日志 - TFTP：10,000&lt;/p&gt;&lt;p&gt;传输日志 - WebDAV：20,000&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;请按照以下步骤保留日志：&lt;/span&gt;&lt;/p&gt;&lt;ol class=&quot;type_lower-decimal list-paddingleft-2&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; margin: 0px 0px 15px; padding-bottom: 0px; padding-left: 1.25em;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;进入&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;套件中心 搜索&lt;/span&gt;并安装&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;日志中心&lt;/span&gt;。&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;进入&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;日志中心&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;存档设置&amp;nbsp;&lt;/span&gt;并配置&lt;/span&gt;&lt;a href=&quot;https://kb.synology.cn/DSM/help/LogCenter/logcenter_archive?version=7#t3_1&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer nofollow&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: underline; color: rgb(0, 103, 230); font-weight: inherit; font-family: 宋体, SimSun;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;DSM&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;的存档设置。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px;&quot;&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;请按以下步骤查看归档日志：&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;对于 DSM：&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;ol class=&quot;type_lower-decimal list-paddingleft-2&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; padding-left: 1.25em;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;进入&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;日志中心&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;日志&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;存档&lt;/span&gt;，然后&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;&amp;nbsp;&lt;/span&gt;从右上角的下拉菜单中选择&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;打开日志存档&lt;/span&gt;。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;单击&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;打开日志存档&lt;/span&gt;。&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;font-family: 宋体, SimSun;&quot;&gt;从右上角的下拉菜单中选择&lt;span style=&quot;box-sizing: border-box; font-weight: 600; font-family: 宋体, SimSun;&quot;&gt;文件传输&lt;/span&gt;。&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;div class=&quot;note&quot; style=&quot;box-sizing: border-box; background-color: rgb(240, 243, 246); border-radius: 10px; margin-bottom: 15px; margin-top: 15px; padding: 15px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;p class=&quot;note_title&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; margin: 5px 0px 0px; padding-bottom: 0px; font-weight: 600;&quot;&gt;备注：&lt;/p&gt;&lt;ol class=&quot;type_lower-decimal list-paddingleft-2&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; padding-left: 1.25em;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;a id=&quot;x_anchor_id0dd2a6deb3&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;搜索条件&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;事件&lt;/span&gt;仅适用于 DSM 7 及以上版本。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a id=&quot;x_anchor_id7e94cebf04&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;DSM 中的内置 Log Center 应用程序仅提供基本功能。若要访问&lt;a href=&quot;https://kb.synology.cn/DSM/help/LogCenter/logcenter_desc?version=7&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer nofollow&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;日志中心&lt;/span&gt;的全部功能&lt;/a&gt;，请从 DSM&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;套件中心&lt;/span&gt;安装套件。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;套件中的某些活动可能会导致&lt;a href=&quot;https://kb.synology.cn/DSM/tutorial/What_are_reasons_for_file_changes&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer nofollow&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;文件更改&lt;/a&gt;，但相应的更改历史记录可能仅记录在该特定套件的日志中。&lt;a id=&quot;x_anchor_iddec3bb90f8&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 07 May 2026 11:41:29 +0800</pubDate></item><item><title>如何通过 Web Assistant 或 Synology Assistant 找到我的Synology NAS ？</title><link>https://blog.swihp.cn/?id=1436</link><description>&lt;p pm-open-left=&quot;1&quot; style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;strong&gt;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;①、首先查看设备状态：是否正常开机、状态灯是否有异常、网络是否正常。&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;padding: 0px; margin: 0px; line-height: 1.38;&quot;&gt;&lt;strong&gt;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;②、设备正常开机、状态灯无异常情况下进行以下操作&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box; background-color: rgb(255, 255, 255); border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; margin: 15px 0px 5px; padding-top: 0px; font-size: 18px; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; white-space: normal;&quot;&gt;如何搜索Synology NAS&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;a id=&quot;x_anchor_id5&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;您可以通过以下任一工具找到Synology NAS ：&lt;/p&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;网页助手&lt;/span&gt;：在网页浏览器的地址栏中输入&lt;a href=&quot;http://find.synology.com/&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;find.synology.com&lt;/a&gt;或&lt;a href=&quot;synologynas:5000&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;synologynas:5000&lt;/a&gt;&amp;nbsp;（对于 Mac 计算机为&lt;a href=&quot;synologynas.local:5000&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;synologynas.local:5000&lt;/a&gt;&amp;nbsp;）。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Synology Assistant&lt;/span&gt;&amp;nbsp;：打开&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Synology Assistant&lt;/span&gt;桌面实用程序。如果尚未安装&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;Synology Assistant&lt;/span&gt;&amp;nbsp;，请先进入&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;&lt;a href=&quot;https://www.synology.cn/support/download&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;下载中心&lt;/a&gt;&lt;/span&gt;&amp;gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;“桌面应用程序”&lt;/span&gt;将其下载并安装到计算机上。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;如果仍然找不到Synology NAS，请继续执行以下方法来解决问题。&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box; background-color: rgb(255, 255, 255); border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; margin: 15px 0px 5px; padding-top: 0px; font-size: 18px; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; white-space: normal;&quot;&gt;&lt;a id=&quot;x_anchor_id6&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;无法通过 Web Assistant 找到Synology NAS&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;请先尝试以下每种方法，然后再通过 Web Assistant 搜索Synology NAS ：&lt;/p&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;确保Synology NAS和计算机已正确连接到 Internet 网络。&amp;nbsp;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;确保Synology NAS和计算机位于同一局域网和子网中。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;使用其他浏览器（如 Chrome 或 Firefox）。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果 DSM 仍可访问，请进入&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;DSM&lt;/span&gt;&amp;nbsp;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;控制面板&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;信息中心&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;设备分析&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;共享网络位置&lt;/span&gt;，并勾选&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;允许此 DiskStation 在 Web Assistant (find.synology.com) 中显示&lt;/span&gt;复选框。&lt;br style=&quot;box-sizing: border-box;&quot;/&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果您在设置Synology NAS时更改了服务器名称，则可能无法找到Synology NAS。如果 DSM 仍可访问，请进入&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;DSM&lt;/span&gt;&amp;nbsp;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;控制面板&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;网络&lt;/span&gt;&amp;gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;常规&lt;/span&gt;以将&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;服务器名称&lt;/span&gt;更改为&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;SynologyNAS&lt;/span&gt;&amp;nbsp;，然后再试一次。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果上述方法无效，请尝试使用 Synology Assistant 搜索Synology NAS 。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br/&gt;&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box; background-color: rgb(255, 255, 255); border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; margin: 15px 0px 5px; padding-top: 0px; font-size: 18px; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; white-space: normal;&quot;&gt;&lt;a id=&quot;x_anchor_id7&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;无法通过 Synology Assistant 找到Synology NAS&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;在再次通过 Synology Assistant 搜索Synology NAS之前，请尝试以下每种方法：&lt;/p&gt;&lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;&lt;p&gt;确保Synology NAS和计算机位于同一局域网和子网中。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;调整&lt;a href=&quot;https://kb.synology.cn/DSM/tutorial/how_to_allow_synology_assistant_through_firewall&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;防火墙设置&lt;/a&gt;以允许 Synology Assistant 通过 DSM 和Windows防火墙。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;暂时禁用或删除计算机上的防病毒软件。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;使用其他以太网电缆连接Synology NAS ，以检查电缆是否有缺陷。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果Synology NAS具有多个网络端口，请将以太网电缆连接到其他端口以检查端口是否有故障。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;在另一台计算机上运行 Synology Assistant 并搜索您的Synology NAS。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果您使用的是 Synology Assistant 7.0-50044 或更高版本，并且您尝试查找的Synology NAS运行的是 DSM 6.2.3 及更低版本或 DSM UC 3.0.1 及更低版本，请单击 Synology Assistant 中的齿轮图标并勾选以启用&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;允许与不支持密码加密的设备兼容&lt;/span&gt;。&amp;nbsp;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;按住Synology NAS背面的 RESET 按钮四秒钟（您会听到哔声）以重置Synology NAS设置。&amp;nbsp;若要了解有关如何重置Synology NAS的更多信息，请参阅&lt;a href=&quot;https://kb.synology.cn/DSM/tutorial/How_to_reset_my_Synology_NAS&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;本文&lt;/a&gt;（适用于 DSM 6.2.3 及更早版本）或&lt;a href=&quot;https://kb.synology.cn/DSM/tutorial/How_to_reset_my_Synology_NAS_7&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;本文&lt;/a&gt;（适用于 DSM 6.2.4 及以上版本）。&amp;nbsp;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;重置Synology NAS后，关闭计算机上的 WiFi 连接，并使用以太网电缆将Synology NAS直接连接到计算机，而无需通过网络交换机或路由器。将计算机的有线 LAN 接口设置为 DHCP，然后再次使用 Synology Assistant 搜索Synology NAS 。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal; background-color: rgb(255, 255, 255);&quot;&gt;如果在尝试上述方法后 Synology Assistant 仍无法找到Synology NAS ：&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;请关闭Synology NAS，卸下硬盘，重新启动Synology NAS，然后再次尝试搜索设备。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;即使未安装任何硬盘也无法找到Synology NAS ，这可能是由于硬件故障。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果 Synology Assistant 可以找到未安装任何硬盘的Synology NAS ，但在使用同一台计算机安装所有硬盘后仍找不到，请联系&lt;a href=&quot;https://account.synology.cn/support&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-decoration: none; color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;Synology 技术支持&lt;/a&gt;以获得进一步帮助。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;note&quot; style=&quot;box-sizing: border-box; background-color: rgb(240, 243, 246); border-radius: 10px; margin-bottom: 15px; margin-top: 15px; padding: 15px; color: rgb(46, 55, 66); font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; white-space: normal;&quot;&gt;&lt;p class=&quot;note_title&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; margin: 5px 0px 0px; padding-bottom: 0px; font-weight: 600;&quot;&gt;备注：&lt;/p&gt;&lt;ol class=&quot;type_lower-decimal list-paddingleft-2&quot; style=&quot;box-sizing: border-box; border-collapse: collapse; line-height: 1.5; padding-bottom: 0px; padding-left: 1.25em;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;a id=&quot;x_anchor_id8&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;如果您的所有Synology NAS设备都无法访问 Internet，请使用 Synology Assistant 搜索您的 NAS。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果在按住 RESET 按钮时Synology NAS没有发出哔声，这可能是由于硬件故障。如果您的Synology NAS仍在保修期内，请联系当地经销商以获取 RMA 服务。&lt;a id=&quot;x_anchor_id22&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a id=&quot;x_anchor_id10&quot; style=&quot;box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(0, 103, 230); font-weight: inherit;&quot;&gt;&lt;/a&gt;重置Synology NAS后，LAN IP地址可能会更改，并且管理员密码会重置。&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 07 May 2026 10:54:15 +0800</pubDate></item><item><title>群晖synology NAS FAQ问题整理</title><link>https://blog.swihp.cn/?id=1438</link><description>&lt;h4 synohead=&quot;4XQft4UaRk&quot; data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;value&amp;quot;:&amp;quot;12pt&amp;quot;,&amp;quot;_&amp;quot;:&amp;quot;font_size&amp;quot;}]}&quot; pm-open-left=&quot;1&quot; style=&quot;padding: 6.66667px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;1、&lt;a href=&quot;https://blog.swihp.cn/?id=1436&quot; target=&quot;_blank&quot;&gt;如何通过 find.synology.com 或者 Synology Assistant 在局域网之中找到 Synology 服务器&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;搜索不到NAS、无法访问NAS、无法登录NAS等问题都可以先尝试搜索NAS，看搜索结果中的状态。&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;①、首先查看设备状态：是否正常开机、状态灯是否有异常、网络是否正常。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;②、设备正常开机、状态灯无异常情况下，拿一台笔记本电脑，与NAS网线直连（网线一头插NAS空闲网口，一头插笔记本网线接口），再次搜索。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;Synology Assistant 安装过程中，&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;padding: 0px; margin: 0px; line-height: 1.38;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;③、NAS系统 DSM 版本≤6.2.x ，打开 Synology Assistant&amp;nbsp;→ 点击右上角 设置 &amp;nbsp;图标，在兼容性一栏 勾选“允许与不支持密码加密的设备兼容（此选项较不安全）”&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;padding: 0px; margin: 0px; line-height: 1.38;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/FAQ001.png&quot;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 synohead=&quot;xdXH1uX7Nr&quot; data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;value&amp;quot;:&amp;quot;12pt&amp;quot;,&amp;quot;_&amp;quot;:&amp;quot;font_size&amp;quot;}]}&quot; style=&quot;padding: 6.66667px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;2、&lt;a href=&quot;https://blog.swihp.cn/?id=1437&quot; target=&quot;_blank&quot; title=&quot;如何使用日志中心的文件传输日志来监控文件修改&quot; textvalue=&quot;如何使用日志中心的文件传输日志来监控文件修改&quot;&gt;如何使用日志中心的文件传输日志来监控文件修改&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;_&amp;quot;:&amp;quot;font_family&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;Arial&amp;quot;}]}&quot; style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: #FFFFFF; color: #191919; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;默认情况下，多数日志处于禁用状态。若要记录文件更改，请从要监控的文件传输协议的设置中启用传输日志。（控制面板→文件服务：&lt;span style=&quot;color: #191919; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;SMB /&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; color: #505A64;&quot;&gt;AFP /&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; color: #505A64;&quot;&gt;FTP&lt;/span&gt;）&lt;/span&gt;&lt;/p&gt;&lt;p data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;_&amp;quot;:&amp;quot;font_family&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;Arial&amp;quot;}]}&quot; style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;span style=&quot;background-color: #FFFFFF; color: #191919; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2E3742; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;File Station：&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;打开&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;File Station&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;，然后单击&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;设置&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;按钮，启用 File Station 日志来记录所有用户的操作。用户活动包括&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;新建文件夹&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;、&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;上传&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;、&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;下载&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;、&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;删除&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;、&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;重命名&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;、&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;移动&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;、&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;复制&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;和&lt;/span&gt;&lt;span style=&quot;background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;属性设置&lt;/span&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;_&amp;quot;:&amp;quot;font_family&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;Arial&amp;quot;}]}&quot; style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;span style=&quot;color: #505A64; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2E3742; background-color: #FFFFFF; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px;&quot;&gt;WebDAV Server：&lt;/span&gt;&lt;span style=&quot;color: #2E3742; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;打开&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2E3742; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; background-color: #FFFFFF;&quot;&gt;WebDAV Server → 设置 → 高级设置 →&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; background-color: #FFFFFF; box-sizing: border-box; font-weight: 700; color: #3C4650; padding-left: 2px; padding-right: 2px;&quot;&gt;启用 WebDAV 日志&lt;/span&gt;&lt;span style=&quot;font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; background-color: #FFFFFF; color: #505A64;&quot;&gt;：这会记录与 WebDAV 活动相关的事件。&lt;/span&gt;&lt;/p&gt;&lt;p data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;_&amp;quot;:&amp;quot;font_family&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;Arial&amp;quot;}]}&quot; style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;span style=&quot;font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; font-size: 16px; background-color: #FFFFFF; color: #505A64;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;通过日志中心可以查询用户登录NAS时间、操作文件等行为日志。&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;_&amp;quot;:&amp;quot;font_family&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;Arial&amp;quot;}]}&quot; style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;span style=&quot;font-size: 16px; background-color: #FFFFFF; color: #505A64; font-family: 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;;&quot;&gt;3、&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;margin: 15px 0px 5px; padding: 0px 0px 8px; outline: 0px; overflow-wrap: break-word; word-break: break-all; font-size: 18px; font-weight: 400; border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; font-family: Inter, Arial, Helvetica, 微软雅黑, &amp;quot;Microsoft YaHei&amp;quot;, Verdana, sans-serif; white-space: normal; box-sizing: border-box;&quot;&gt;&lt;a id=&quot;x_anchor_id4a2657281d&quot; style=&quot;color: rgb(0, 103, 230); box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-weight: inherit;&quot;&gt;&lt;/a&gt;&lt;br/&gt;&lt;/h3&gt;&lt;p data-syno-attrs=&quot;{&amp;quot;textMarks&amp;quot;:[{&amp;quot;_&amp;quot;:&amp;quot;font_family&amp;quot;,&amp;quot;value&amp;quot;:&amp;quot;Arial&amp;quot;}]}&quot; style=&quot;padding: 1.33333px 0px 0px; margin: 0px; line-height: 1.8;&quot;&gt;&lt;span data-syno-text=&quot;true&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Thu, 07 May 2026 09:40:09 +0800</pubDate></item><item><title>群晖 Synology NAS 在高校内验证登录</title><link>https://blog.swihp.cn/?id=1435</link><description>&lt;p data-v-2505e99a=&quot;&quot; style=&quot;white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; margin-top: 0px; margin-bottom: 0px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;群晖 Synology NAS 连接至校园网或者一些企业单位后，校园或者企业需要登录个人帐号验证后才能联网，由于群晖本身没有web浏览器用于网页登录认证导致 NAS 无法联网更新套件、更新系统等操作。推荐几种方法大家可以尝试下：&lt;/span&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; margin-top: 24px; margin-bottom: 0px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot; style=&quot;font-weight: 600;&quot;&gt;1. &lt;/span&gt;&lt;span style=&quot;font-weight: 600;&quot;&gt;使用代理&lt;/span&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;首先去群晖官网 &lt;a href=&quot;https://www.synology.cn/zh-cn/support/download&quot; target=&quot;_blank&quot;&gt;下载&lt;/a&gt; 套件 &lt;/span&gt;&lt;a href=&quot;https://archive.synology.cn/download/Package/ProxyServer&quot; target=&quot;_blank&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot; style=&quot;font-weight: 600;&quot;&gt;Proxy Server&lt;/span&gt;&lt;/a&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;，然后打开群晖套件中心，选择手动安装。&lt;/span&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;打开 Proxy Server 套件，做好配置，然后将个人电脑的代理服务器设置为 NAS IP 地址&lt;/span&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot; style=&quot;font-weight: 600;&quot;&gt;代理ip为群晖的ip地址，端口为Proxy Server中设置的端口&lt;/span&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;。&lt;/span&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;设置好代理服务器后，打开个人电脑网页刷新出上网认证网页，登录成功即可。&lt;/span&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;b&gt;2. Container Manager 导入一个浏览器容器&lt;/b&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;首先在其他docker中安装一个浏览器容器，然后导出容器，再导入Container Manager中。&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;通过容器中的浏览器页面登录认证后一样可以解决群晖NAS 上网认证问题&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;strong&gt;3. 咨询校园或者企业网络认证中心，Linux 登录验证方法&lt;/strong&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;margin-top: 24px; margin-bottom: 0px; white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;b&gt;例：&lt;a href=&quot;https://its.pku.edu.cn/download_ipgwclient.jsp&quot; target=&quot;_blank&quot;&gt;北京大学网络服务&lt;/a&gt; &lt;/b&gt;&lt;/p&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; margin-top: 24px; margin-bottom: 0px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span data-v-2505e99a=&quot;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;box-sizing: inherit; border: 0px; padding: 0px; margin: 10px 0px; font-family: &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, Tahoma, Arial, Helvetica, &amp;quot;sans-serif&amp;quot;; -webkit-font-smoothing: subpixel-antialiased; font-weight: 500; line-height: 1.1; color: rgb(51, 51, 51); font-size: 18px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;命令行【供参考】&lt;/span&gt;&lt;/h4&gt;&lt;div class=&quot;app-table&quot; style=&quot;box-sizing: inherit; border: 0px; padding: 0px; margin: 15px; font-family: &amp;quot;Microsoft Yahei&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, Tahoma, Arial, Helvetica, &amp;quot;sans-serif&amp;quot;; -webkit-font-smoothing: subpixel-antialiased; line-height: 1.5; color: rgb(51, 51, 51); font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;div style=&quot;box-sizing: inherit; border: 0px; padding: 0px; margin: 0px; -webkit-font-smoothing: subpixel-antialiased;&quot;&gt;由于网关登录方式调整，原网关命令行登录程序connect已经停止使用，新的命令行登录方式请参考下面的示例。&lt;/div&gt;&lt;ul style=&quot;list-style-type: none;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;Bash&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;code style=&quot;box-sizing: inherit; border: 0px; padding: 2px 4px; margin: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; -webkit-font-smoothing: subpixel-antialiased; font-size: 14.4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px; white-space-collapse: preserve;&quot;&gt; &amp;nbsp;curl -X POST &amp;nbsp;-d &amp;#39;cmd=open&amp;amp;username=**********&amp;amp;password=******&amp;amp;iprange=free&amp;#39; https://its4.pku.edu.cn/cas/ITSClient&lt;/code&gt;&lt;li&gt;&lt;p&gt;&lt;span style=&quot;box-sizing: inherit; font-weight: 700;&quot;&gt;Python&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;code style=&quot;box-sizing: inherit; border: 0px; padding: 2px 4px; margin: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; -webkit-font-smoothing: subpixel-antialiased; font-size: 14.4px; color: rgb(199, 37, 78); background-color: rgb(249, 242, 244); border-radius: 4px; white-space-collapse: preserve;&quot;&gt; &amp;nbsp;import requests
 &amp;nbsp;url = &amp;quot;https://its4.pku.edu.cn/cas/ITSClient&amp;quot;
 &amp;nbsp;payload = {
 &amp;nbsp; &amp;nbsp; &amp;nbsp;# 填写账号和密码
 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#39;username&amp;#39;: &amp;#39;********&amp;#39;,
 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#39;password&amp;#39;: &amp;#39;********&amp;#39;,
 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#39;iprange&amp;#39;: &amp;#39;free&amp;#39;,
 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#39;cmd&amp;#39;: &amp;#39;open&amp;#39;
 &amp;nbsp;}
 &amp;nbsp;headers = {&amp;#39;Content-type&amp;#39;: &amp;#39;application/x-www-form-urlencoded&amp;#39;}
 &amp;nbsp;result = requests.post(url, params=payload, headers=headers)
 &amp;nbsp;print(result.text)&lt;/code&gt;&lt;/ul&gt;&lt;div style=&quot;box-sizing: inherit; border: 0px; padding: 0px; margin: 0px; -webkit-font-smoothing: subpixel-antialiased;&quot;&gt;请使用学号或者职工号替代username后面的星号，并填写您的密码password。&lt;br style=&quot;box-sizing: inherit;&quot;/&gt;如需断开链接，请将open改为disconnect。&lt;/div&gt;&lt;/div&gt;&lt;p data-v-2505e99a=&quot;&quot; style=&quot;white-space: pre-wrap; word-break: break-word; font-size: 17px; line-height: 29px; margin-top: 24px; margin-bottom: 0px; padding: 0px; color: rgb(47, 50, 56); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, &amp;quot;PingFang SC&amp;quot;, &amp;quot;Hiragino Sans GB&amp;quot;, &amp;quot;Microsoft YaHei&amp;quot;, sans-serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 14 Oct 2025 14:14:33 +0800</pubDate></item><item><title>群晖Synology DSM安装常见问题</title><link>https://blog.swihp.cn/?id=1434</link><description>&lt;p&gt;安装时系统磁盘空间不足&lt;/p&gt;&lt;p&gt;可以浏览器输入 http://&amp;lt;ip&amp;gt;:5000/webman/clean_system_disk.cgi 尝试&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 30 Sep 2025 11:15:03 +0800</pubDate></item><item><title>群晖SynologyNAS DSM通过 acme.sh 实现域名证书自动更新</title><link>https://blog.swihp.cn/?id=1433</link><description>&lt;p&gt;注意事项：&lt;/p&gt;&lt;p&gt;①尽量使使用root帐号去操作，管理员帐号可能会出现各种报错。&lt;/p&gt;&lt;p&gt;②群晖默认证书保存目录：&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;/usr/syno/etc/certificate/_archive/$(cat /usr/syno/etc/certificate/_archive/DEFAULT)&lt;/p&gt;&lt;p&gt;默认情况下群晖的默认证书是官方的证书，acme导入证书前一定先手动导入一次证书。&lt;/p&gt;&lt;p&gt;③阿里与腾讯及其他域名供应商的 dns api 参数不一样，具体可参考 Acme.sh 官方文档 中的「DNS API」列表。&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/acmesh-official/acme.sh/wiki/dnsapi&quot; _src=&quot;https://github.com/acmesh-official/acme.sh/wiki/dnsapi&quot;&gt;https://github.com/acmesh-official/acme.sh/wiki/dnsapi&lt;/a&gt;&lt;/p&gt;&lt;p&gt;④准备申请证书的域名一定先去&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://ram.console.aliyun.com/profile/access-keys&quot; target=&quot;_blank&quot; title=&quot;阿里云&quot; style=&quot;text-wrap-mode: wrap;&quot;&gt;阿里云&lt;/a&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;、&lt;/span&gt;&lt;a href=&quot;https://console.dnspod.cn/account/token/token&quot; target=&quot;_blank&quot; style=&quot;text-wrap-mode: wrap;&quot;&gt;腾讯云(DNSPod)&lt;/a&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;&amp;nbsp;看下有没有解析记录，新申请的域名或者从没有使用的二级域名会申请失败。&lt;/span&gt;&lt;/p&gt;&lt;!--more--&gt;&lt;h2&gt;一、准备工作&lt;/h2&gt;&lt;p&gt;登录&amp;nbsp;&lt;a href=&quot;https://ram.console.aliyun.com/profile/access-keys&quot; target=&quot;_blank&quot; title=&quot;阿里云&quot;&gt;阿里云&lt;/a&gt;、&lt;a href=&quot;https://console.dnspod.cn/account/token/token&quot; target=&quot;_blank&quot;&gt;腾讯云(DNSPod)&lt;/a&gt; 创建并获取API密钥保存下来。&lt;/p&gt;&lt;h2&gt;二、使用ssh登录群晖&lt;/h2&gt;&lt;p&gt;1.下载acme.sh&lt;/p&gt;&lt;p&gt;acme.sh 是一个用于自动化获取和管理 Let’s Encrypt 证书的脚本。&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;curl&amp;nbsp;https://get.acme.sh&amp;nbsp;|&amp;nbsp;sh&amp;nbsp;-s&amp;nbsp;email=1396053199@qq.com&amp;nbsp;--force
或
wget&amp;nbsp;-O&amp;nbsp;-&amp;nbsp;&amp;nbsp;https://get.acme.sh&amp;nbsp;|&amp;nbsp;sh&amp;nbsp;-s&amp;nbsp;email=1396053199@qq.com&amp;nbsp;--force&lt;/pre&gt;&lt;p&gt;将 1396053199@qq.com 替换为自己的有效电子邮件地址，用于接收 Let’s Encrypt 的重要通知，如证书即将过期等信息。&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;安装过程会有报错，群晖系统默认没有&lt;/span&gt;安装或没有权限启用&amp;nbsp;cron&amp;nbsp;服务（定时任务工具），而 Acme.sh 依赖&amp;nbsp;cron&amp;nbsp;实现证书自动续签。&lt;/p&gt;&lt;p&gt;可以忽略这个报错，最后出现 Install success 就可以。acme.sh 会自动添加到系统环境变量中。&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/cert001.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;如果成功安装，脚本会将 acme.sh 下载到当前用户目录下，也就是 ~/.acme.sh 目录。&lt;/p&gt;&lt;p&gt;通过 cd ~/.acme.sh 或 cd /var/services/homes/当前登录的用户名/.acme.sh 进入目录&lt;/p&gt;&lt;p&gt;使用命令验证 acme.sh 是否安装成功：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;cd&amp;nbsp;~/.acme.sh&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#或&amp;nbsp;cd&amp;nbsp;/var/services/homes/sunfeng/.acme.sh&amp;nbsp;“sunfeng”为我当前登录的用户名
./acme.sh&amp;nbsp;--version&lt;/pre&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/cert002.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;2. 添加API密钥至/etc/profile&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;#阿里云&amp;nbsp;API&amp;nbsp;密钥添加到环境变量
echo&amp;nbsp;&amp;quot;export&amp;nbsp;Ali_Key=&amp;quot;AccessKey&amp;nbsp;ID&amp;quot;&amp;quot;&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;/etc/profile
echo&amp;nbsp;&amp;quot;export&amp;nbsp;Ali_Secret=&amp;quot;AccessKey&amp;nbsp;Secret&amp;quot;&amp;quot;&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;/etc/profile&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;source&amp;nbsp;/etc/profile

#&amp;nbsp;腾讯云&amp;nbsp;DNSPod&amp;nbsp;的&amp;nbsp;API&amp;nbsp;密钥添加到环境变量
echo&amp;nbsp;&amp;quot;export&amp;nbsp;DP_Id=&amp;quot;AccessKey&amp;nbsp;ID&amp;quot;&amp;quot;&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;/etc/profile
echo&amp;nbsp;&amp;quot;export&amp;nbsp;DP_Key=&amp;quot;AccessKey&amp;nbsp;Token&amp;quot;&amp;quot;&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;/etc/profile&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;source&amp;nbsp;/etc/profile&lt;/pre&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;#&amp;nbsp;删除包含&amp;quot;export&amp;nbsp;DP_Id=&amp;quot;的行
sudo&amp;nbsp;sed&amp;nbsp;-i&amp;nbsp;&amp;#39;/export&amp;nbsp;DP_Id=/d&amp;#39;&amp;nbsp;/etc/profile

#&amp;nbsp;删除包含&amp;quot;export&amp;nbsp;DP_Key=&amp;quot;的行
sudo&amp;nbsp;sed&amp;nbsp;-i&amp;nbsp;&amp;#39;/export&amp;nbsp;DP_Key=/d&amp;#39;&amp;nbsp;/etc/profile&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;3.申请证书，填写的域名一定是阿里、腾讯或其他域名供应商的管理页面上有过解析记录&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;./acme.sh&amp;nbsp;--issue&amp;nbsp;--dns&amp;nbsp;dns_ali&amp;nbsp;-d&amp;nbsp;example.com&amp;nbsp;-d&amp;nbsp;*.example.com

./acme.sh&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;使用&amp;nbsp;acme.sh&amp;nbsp;脚本执行证书申请操作
&amp;nbsp;&amp;nbsp;--issue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;核心参数：表示证书申请流程
&amp;nbsp;&amp;nbsp;--dns&amp;nbsp;dns_ali&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;指定&amp;nbsp;DNS&amp;nbsp;验证方式，这里使用阿里云（Aliyun）的&amp;nbsp;DNS&amp;nbsp;解析接口
&amp;nbsp;&amp;nbsp;-d&amp;nbsp;example.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;为主域名&amp;nbsp;example.com&amp;nbsp;申请证书
&amp;nbsp;&amp;nbsp;-d&amp;nbsp;*.example.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;同时为该域名的所有子域名（通配符）申请证书&lt;/pre&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/cert003.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;证书申请成功后会保存在 ~/.acme.sh （/root/.acme.sh/） 目录下&lt;/p&gt;&lt;p&gt;4、查看已安装证书信息：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;acme.sh&amp;nbsp;--info&amp;nbsp;-d&amp;nbsp;example.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;example.com&amp;nbsp;改为自己的域名&lt;/pre&gt;&lt;h2&gt;三、替换群晖NAS的默认证书&lt;/h2&gt;&lt;p style=&quot;text-wrap-mode: wrap;&quot;&gt;新申请的证书保存名录：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;#&amp;nbsp;ls&amp;nbsp;/root/.acme.sh/&amp;nbsp;可以看到多了一个example.com&amp;nbsp;或者&amp;nbsp;example.com_ecc的目录&amp;nbsp;此目录下就是新申请的证书
/root/.acme.sh/example.com_ecc/&lt;/pre&gt;&lt;p style=&quot;text-wrap-mode: wrap;&quot;&gt;群晖默认证书保存目录：&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;/usr/syno/etc/certificate/_archive/$(cat&amp;nbsp;/usr/syno/etc/certificate/_archive/DEFAULT)&lt;/pre&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;sudo&amp;nbsp;cp&amp;nbsp;-f&amp;nbsp;&amp;quot;/root/.acme.sh/example.com_ecc/fullchain.cer&amp;quot;&amp;nbsp;&amp;quot;/usr/syno/etc/certificate/_archive/$(cat&amp;nbsp;/usr/syno/etc/certificate/_archive/DEFAULT)/cert.pem&amp;quot;
sudo&amp;nbsp;cp&amp;nbsp;-f&amp;nbsp;&amp;quot;/root/.acme.sh/example.com_ecc/hkcnas.com.key&amp;quot;&amp;nbsp;&amp;quot;/usr/syno/etc/certificate/_archive/$(cat&amp;nbsp;/usr/syno/etc/certificate/_archive/DEFAULT)/privkey.pem&amp;quot;
sudo&amp;nbsp;cp&amp;nbsp;-f&amp;nbsp;&amp;quot;/root/.acme.sh/example.com_ecc/ca.cer&amp;quot;&amp;nbsp;&amp;quot;/usr/syno/etc/certificate/_archive/$(cat&amp;nbsp;/usr/syno/etc/certificate/_archive/DEFAULT)/chain.pem&amp;quot;&lt;/pre&gt;&lt;ol class=&quot;auto-hide-last-sibling-br list-paddingleft-2&quot; style=&quot;list-style-type: none;&quot;&gt;&lt;li&gt;&lt;div class=&quot;auto-hide-last-sibling-br paragraph-JOTKXA paragraph-element br-paragraph-space&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; line-height: 28px; overflow-anchor: auto;&quot;&gt;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: ; outline: none; border: 0px solid; margin: 0px; padding: 0px; font-weight: 600; line-height: 28px; overflow-anchor: auto; color: #000000 !important;&quot;&gt;路径格式&lt;/span&gt;：&lt;/div&gt;&lt;/li&gt;&lt;ul class=&quot;auto-hide-last-sibling-br list-paddingleft-2&quot; style=&quot;list-style-type: none;&quot;&gt;&lt;li&gt;&lt;p&gt;源路径&amp;nbsp;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;/root/.acme.sh/hkcnas.com_ecc/&lt;/code&gt;&amp;nbsp;是 ECC 证书的正确存放目录。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;目标路径使用了&amp;nbsp;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;$(cat /usr/syno/etc/certificate/_archive/DEFAULT)&lt;/code&gt;&amp;nbsp;动态获取群晖默认证书的 ID 目录，能自动定位当前正在使用的证书目录，无需手动填写 ID。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div class=&quot;auto-hide-last-sibling-br paragraph-JOTKXA paragraph-element br-paragraph-space&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; line-height: 28px; overflow-anchor: auto;&quot;&gt;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: ; outline: none; border: 0px solid; margin: 0px; padding: 0px; font-weight: 600; line-height: 28px; overflow-anchor: auto; color: #000000 !important;&quot;&gt;文件名映射&lt;/span&gt;：&lt;/div&gt;&lt;/li&gt;&lt;ul class=&quot;auto-hide-last-sibling-br list-paddingleft-2&quot; style=&quot;list-style-type: none;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;fullchain.cer&lt;/code&gt;&amp;nbsp;→&amp;nbsp;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;cert.pem&lt;/code&gt;（群晖要求的证书文件名）&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;hkcnas.com.key&lt;/code&gt;&amp;nbsp;→&amp;nbsp;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;privkey.pem&lt;/code&gt;（群晖要求的私钥文件名）&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;ca.cer&lt;/code&gt;&amp;nbsp;→&amp;nbsp;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; color: rgb(0, 0, 0); overflow-anchor: auto;&quot;&gt;chain.pem&lt;/code&gt;（群晖要求的中间证书文件名）&lt;br class=&quot;container-utlnW2 wrapper-d0Cc1k undefined&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; overflow-anchor: auto;&quot;/&gt;文件名映射完全符合群晖系统对证书文件的命名规范，确保服务能正确识别。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;div class=&quot;auto-hide-last-sibling-br paragraph-JOTKXA paragraph-element br-paragraph-space&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; line-height: 28px; overflow-anchor: auto;&quot;&gt;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: ; outline: none; border: 0px solid; margin: 0px; padding: 0px; font-weight: 600; line-height: 28px; overflow-anchor: auto; color: #000000 !important;&quot;&gt;参数&amp;nbsp;&lt;code style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 0px; padding: 0px; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-feature-settings: normal; font-size: 14px; font-variation-settings: normal; background: none 0% 0% / auto repeat scroll padding-box border-box rgba(0, 0, 0, 0.06); border-radius: 4px; overflow-anchor: auto;&quot;&gt;-f&lt;/code&gt;&lt;/span&gt;：&lt;br class=&quot;container-utlnW2 wrapper-d0Cc1k undefined&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; border: 0px solid; margin: 1em; padding: 0px; font-size: 20px; overflow-anchor: auto; content: &amp;quot;&amp;quot;; display: block;&quot;/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;强制覆盖目标文件（如果已存在），避免因文件已存在而复制失败，适合证书更新场景。&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;然后重启 Nginx 即可看到证书已更新&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;nginx&amp;nbsp;-s&amp;nbsp;reload&lt;/pre&gt;&lt;h2&gt;四、设置自动更新&lt;br/&gt;&lt;/h2&gt;&lt;p&gt;acme 申请证书每 60 天自动更新，默认情况下你无需任何操作，但是最开始下载安装 acme 时&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;&amp;nbsp;cron&amp;nbsp;服务报错，不确定是否可以自动更新。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;acme&lt;/span&gt;可以强制续签证书：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;acme.sh&amp;nbsp;--renew&amp;nbsp;-d&amp;nbsp;example.com&amp;nbsp;--force&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;example.com&amp;nbsp;改为自己的域名&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;！！！修改下面脚本中的&amp;nbsp;DOMAIN=&amp;quot;example.com&amp;quot; 与&amp;nbsp;DNS_MODE=&amp;quot;dns_ali&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;未检测到证书：强制执行续签&lt;/p&gt;&lt;p&gt;证书已过期（剩余 0 天）：强制执行续签&lt;/p&gt;&lt;p&gt;证书剩余有效期≤10 天：&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;强制&lt;/span&gt;执行续签&lt;/p&gt;&lt;p&gt;证书剩余有效期 &amp;gt; 10 天：不执行任何操作（无论是否超过 20 天）&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;#!/bin/bash
set&amp;nbsp;-e&amp;nbsp;&amp;nbsp;#&amp;nbsp;遇到错误立即退出

#&amp;nbsp;====================&amp;nbsp;配置参数&amp;nbsp;====================
DOMAIN=&amp;quot;example.com&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;你的域名
ACME_CERT_PATH=&amp;quot;/root/.acme.sh&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;acme.sh证书存放路径
SYNO_CERT_ARCHIVE=&amp;quot;/usr/syno/etc/certificate/_archive&amp;quot;&amp;nbsp;&amp;nbsp;#&amp;nbsp;群晖证书存档目录
DNS_MODE=&amp;quot;dns_ali&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;DNS验证方式（根据你的服务商修改&amp;nbsp;https://github.com/acmesh-official/acme.sh/wiki/dnsapi）
CERT_TYPE=&amp;quot;ecc&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;证书类型（ecc/rsa，留空自动适配）
RENEW_THRESHOLD=10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;少于此天数时强制续签（天）
#&amp;nbsp;=================================================

#&amp;nbsp;函数：显示信息
info()&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;-e&amp;nbsp;&amp;quot;\033[1;34m===&amp;nbsp;$1&amp;nbsp;===\033[0m&amp;quot;
}

#&amp;nbsp;函数：显示成功信息
success()&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;-e&amp;nbsp;&amp;quot;\033[1;32m===&amp;nbsp;$1&amp;nbsp;===\033[0m&amp;quot;
}

#&amp;nbsp;函数：显示错误信息
error()&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;-e&amp;nbsp;&amp;quot;\033[1;31m===&amp;nbsp;错误：$1&amp;nbsp;===\033[0m&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit&amp;nbsp;1
}

#&amp;nbsp;函数：检查证书剩余有效期（天）
check_cert_validity()&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;local&amp;nbsp;cert_file=$1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;[&amp;nbsp;!&amp;nbsp;-f&amp;nbsp;&amp;quot;$cert_file&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;获取证书过期时间（Unix时间戳）
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;local&amp;nbsp;end_date=$(openssl&amp;nbsp;x509&amp;nbsp;-in&amp;nbsp;&amp;quot;$cert_file&amp;quot;&amp;nbsp;-noout&amp;nbsp;-enddate&amp;nbsp;|&amp;nbsp;cut&amp;nbsp;-d=&amp;nbsp;-f2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;local&amp;nbsp;end_timestamp=$(date&amp;nbsp;-d&amp;nbsp;&amp;quot;$end_date&amp;quot;&amp;nbsp;+%s&amp;nbsp;2&amp;gt;/dev/null&amp;nbsp;||&amp;nbsp;true)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;local&amp;nbsp;current_timestamp=$(date&amp;nbsp;+%s)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;[&amp;nbsp;-z&amp;nbsp;&amp;quot;$end_timestamp&amp;quot;&amp;nbsp;]&amp;nbsp;||&amp;nbsp;[&amp;nbsp;&amp;quot;$end_timestamp&amp;quot;&amp;nbsp;-le&amp;nbsp;&amp;quot;$current_timestamp&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;0&amp;nbsp;&amp;nbsp;#&amp;nbsp;证书已过期
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;计算剩余天数
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;local&amp;nbsp;diff_seconds=$((end_timestamp&amp;nbsp;-&amp;nbsp;current_timestamp))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;local&amp;nbsp;diff_days=$((diff_seconds&amp;nbsp;/&amp;nbsp;86400))&amp;nbsp;&amp;nbsp;#&amp;nbsp;86400秒=1天
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;$diff_days
}

#&amp;nbsp;1.&amp;nbsp;检查证书是否已存在（支持RSA和ECC）
info&amp;nbsp;&amp;quot;检查证书是否已存在&amp;quot;
CERT_DIR_RSA=&amp;quot;$ACME_CERT_PATH/$DOMAIN&amp;quot;
CERT_DIR_ECC=&amp;quot;$ACME_CERT_PATH/${DOMAIN}_ecc&amp;quot;
CERT_EXISTS=0
CURRENT_CERT_DIR=&amp;quot;&amp;quot;
CERT_FILE=&amp;quot;&amp;quot;

#&amp;nbsp;优先检查配置的证书类型
if&amp;nbsp;[&amp;nbsp;&amp;quot;$CERT_TYPE&amp;quot;&amp;nbsp;=&amp;nbsp;&amp;quot;ecc&amp;quot;&amp;nbsp;]&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;[&amp;nbsp;-d&amp;nbsp;&amp;quot;$CERT_DIR_ECC&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CURRENT_CERT_DIR=&amp;quot;$CERT_DIR_ECC&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_FILE=&amp;quot;$CURRENT_CERT_DIR/fullchain.cer&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_EXISTS=1
elif&amp;nbsp;[&amp;nbsp;&amp;quot;$CERT_TYPE&amp;quot;&amp;nbsp;=&amp;nbsp;&amp;quot;rsa&amp;quot;&amp;nbsp;]&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;[&amp;nbsp;-d&amp;nbsp;&amp;quot;$CERT_DIR_RSA&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CURRENT_CERT_DIR=&amp;quot;$CERT_DIR_RSA&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_FILE=&amp;quot;$CURRENT_CERT_DIR/fullchain.cer&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_EXISTS=1
#&amp;nbsp;未指定类型时自动检测
elif&amp;nbsp;[&amp;nbsp;-z&amp;nbsp;&amp;quot;$CERT_TYPE&amp;quot;&amp;nbsp;]&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;[&amp;nbsp;-d&amp;nbsp;&amp;quot;$CERT_DIR_ECC&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CURRENT_CERT_DIR=&amp;quot;$CERT_DIR_ECC&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_FILE=&amp;quot;$CURRENT_CERT_DIR/fullchain.cer&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_TYPE=&amp;quot;ecc&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_EXISTS=1
elif&amp;nbsp;[&amp;nbsp;-z&amp;nbsp;&amp;quot;$CERT_TYPE&amp;quot;&amp;nbsp;]&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;[&amp;nbsp;-d&amp;nbsp;&amp;quot;$CERT_DIR_RSA&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CURRENT_CERT_DIR=&amp;quot;$CERT_DIR_RSA&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_FILE=&amp;quot;$CURRENT_CERT_DIR/fullchain.cer&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_TYPE=&amp;quot;rsa&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_EXISTS=1
fi

if&amp;nbsp;[&amp;nbsp;$CERT_EXISTS&amp;nbsp;-eq&amp;nbsp;1&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&amp;quot;发现已存在的$CERT_TYPE证书：$CURRENT_CERT_DIR&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;检查证书剩余有效期
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;info&amp;nbsp;&amp;quot;检查证书剩余有效期&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;REMAIN_DAYS=$(check_cert_validity&amp;nbsp;&amp;quot;$CERT_FILE&amp;quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&amp;quot;证书剩余有效期：$REMAIN_DAYS&amp;nbsp;天&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;根据剩余天数执行不同操作
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;[&amp;nbsp;$REMAIN_DAYS&amp;nbsp;-eq&amp;nbsp;0&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&amp;quot;证书已过期，将强制执行续签&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;elif&amp;nbsp;[&amp;nbsp;$REMAIN_DAYS&amp;nbsp;-le&amp;nbsp;$RENEW_THRESHOLD&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&amp;quot;证书剩余有效期不足$RENEW_THRESHOLD天，将执行续签&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;success&amp;nbsp;&amp;quot;证书有效期充足（剩余$REMAIN_DAYS天），无需更新&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit&amp;nbsp;0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi
else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&amp;quot;未发现已存在的证书，将执行新申请&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;未指定类型时默认使用ECC
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;[&amp;nbsp;-z&amp;nbsp;&amp;quot;$CERT_TYPE&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_TYPE=&amp;quot;ecc&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;&amp;quot;默认使用ECC证书类型&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi
fi

#&amp;nbsp;2.&amp;nbsp;生成证书命令参数
info&amp;nbsp;&amp;quot;准备证书更新/申请命令&amp;quot;
ACME_CMD_BASE=&amp;quot;$ACME_CERT_PATH/acme.sh&amp;quot;
DOMAIN_PARAMS=&amp;quot;-d&amp;nbsp;$DOMAIN&amp;nbsp;-d&amp;nbsp;*.${DOMAIN}&amp;quot;
FORCE_PARAM=&amp;quot;--force&amp;quot;
DNS_PARAM=&amp;quot;--dns&amp;nbsp;$DNS_MODE&amp;quot;
CERT_TYPE_PARAM=&amp;quot;&amp;quot;
if&amp;nbsp;[&amp;nbsp;&amp;quot;$CERT_TYPE&amp;quot;&amp;nbsp;=&amp;nbsp;&amp;quot;ecc&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_TYPE_PARAM=&amp;quot;--ecc&amp;quot;
fi

#&amp;nbsp;3.&amp;nbsp;执行更新或申请
info&amp;nbsp;&amp;quot;执行证书操作（$([&amp;nbsp;$CERT_EXISTS&amp;nbsp;-eq&amp;nbsp;1&amp;nbsp;]&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;echo&amp;nbsp;&amp;quot;续签&amp;quot;&amp;nbsp;||&amp;nbsp;echo&amp;nbsp;&amp;quot;新申请&amp;quot;)）&amp;quot;
if&amp;nbsp;[&amp;nbsp;$CERT_EXISTS&amp;nbsp;-eq&amp;nbsp;1&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;证书已存在，执行续签
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;!&amp;nbsp;$ACME_CMD_BASE&amp;nbsp;--renew&amp;nbsp;$DOMAIN_PARAMS&amp;nbsp;$FORCE_PARAM&amp;nbsp;$DNS_PARAM&amp;nbsp;$CERT_TYPE_PARAM;&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error&amp;nbsp;&amp;quot;证书续签失败，请检查acme.sh配置和网络&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi
else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;证书不存在，执行新申请
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;!&amp;nbsp;$ACME_CMD_BASE&amp;nbsp;--issue&amp;nbsp;$DOMAIN_PARAMS&amp;nbsp;$FORCE_PARAM&amp;nbsp;$DNS_PARAM&amp;nbsp;$CERT_TYPE_PARAM;&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error&amp;nbsp;&amp;quot;证书申请失败，请检查acme.sh配置和网络&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;申请后更新证书目录变量
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;[&amp;nbsp;&amp;quot;$CERT_TYPE&amp;quot;&amp;nbsp;=&amp;nbsp;&amp;quot;ecc&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CURRENT_CERT_DIR=&amp;quot;$CERT_DIR_ECC&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CURRENT_CERT_DIR=&amp;quot;$CERT_DIR_RSA&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CERT_FILE=&amp;quot;$CURRENT_CERT_DIR/fullchain.cer&amp;quot;
fi

#&amp;nbsp;4.&amp;nbsp;验证证书文件是否存在
info&amp;nbsp;&amp;quot;验证证书文件完整性&amp;quot;
REQUIRED_FILES=(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;$CURRENT_CERT_DIR/fullchain.cer&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;$CURRENT_CERT_DIR/$DOMAIN.key&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot;$CURRENT_CERT_DIR/ca.cer&amp;quot;
)

for&amp;nbsp;file&amp;nbsp;in&amp;nbsp;&amp;quot;${REQUIRED_FILES[@]}&amp;quot;;&amp;nbsp;do
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;[&amp;nbsp;!&amp;nbsp;-f&amp;nbsp;&amp;quot;$file&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error&amp;nbsp;&amp;quot;缺少必要的证书文件：$file&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi
done

#&amp;nbsp;5.&amp;nbsp;复制证书到群晖默认目录并替换
info&amp;nbsp;&amp;quot;复制证书到群晖系统目录&amp;quot;
#&amp;nbsp;获取群晖当前默认证书ID
CERT_ID=$(cat&amp;nbsp;&amp;quot;$SYNO_CERT_ARCHIVE/DEFAULT&amp;quot;&amp;nbsp;2&amp;gt;/dev/null&amp;nbsp;||&amp;nbsp;true)
if&amp;nbsp;[&amp;nbsp;-z&amp;nbsp;&amp;quot;$CERT_ID&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error&amp;nbsp;&amp;quot;无法获取群晖默认证书ID，请检查证书目录&amp;quot;
fi

DEST_DIR=&amp;quot;$SYNO_CERT_ARCHIVE/$CERT_ID&amp;quot;
if&amp;nbsp;[&amp;nbsp;!&amp;nbsp;-d&amp;nbsp;&amp;quot;$DEST_DIR&amp;quot;&amp;nbsp;];&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error&amp;nbsp;&amp;quot;群晖证书目标目录不存在：$DEST_DIR&amp;quot;
fi

#&amp;nbsp;强制复制并覆盖
echo&amp;nbsp;&amp;quot;复制证书到目标目录：$DEST_DIR&amp;quot;
cp&amp;nbsp;-f&amp;nbsp;&amp;quot;$CURRENT_CERT_DIR/fullchain.cer&amp;quot;&amp;nbsp;&amp;quot;$DEST_DIR/cert.pem&amp;quot;&amp;nbsp;||&amp;nbsp;error&amp;nbsp;&amp;quot;复制证书文件失败&amp;quot;
cp&amp;nbsp;-f&amp;nbsp;&amp;quot;$CURRENT_CERT_DIR/$DOMAIN.key&amp;quot;&amp;nbsp;&amp;quot;$DEST_DIR/privkey.pem&amp;quot;&amp;nbsp;||&amp;nbsp;error&amp;nbsp;&amp;quot;复制私钥文件失败&amp;quot;
cp&amp;nbsp;-f&amp;nbsp;&amp;quot;$CURRENT_CERT_DIR/ca.cer&amp;quot;&amp;nbsp;&amp;quot;$DEST_DIR/chain.pem&amp;quot;&amp;nbsp;||&amp;nbsp;error&amp;nbsp;&amp;quot;复制CA证书失败&amp;quot;

#&amp;nbsp;6.&amp;nbsp;重启相关服务确保生效
info&amp;nbsp;&amp;quot;重启服务使证书生效&amp;quot;
if&amp;nbsp;!&amp;nbsp;nginx&amp;nbsp;-s&amp;nbsp;reload;&amp;nbsp;then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error&amp;nbsp;&amp;quot;Nginx重启失败，请手动检查&amp;quot;
fi


success&amp;nbsp;&amp;quot;所有操作完成！证书已$(&amp;nbsp;[&amp;nbsp;$CERT_EXISTS&amp;nbsp;-eq&amp;nbsp;1&amp;nbsp;]&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;echo&amp;nbsp;&amp;quot;更新&amp;quot;&amp;nbsp;||&amp;nbsp;echo&amp;nbsp;&amp;quot;安装&amp;quot;&amp;nbsp;)并生效&amp;quot;&lt;/pre&gt;&lt;p&gt;复制上面的代码并修改 “&lt;strong style=&quot;text-wrap-mode: wrap;&quot;&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;example.com&lt;/span&gt;&lt;/strong&gt;”“&lt;strong style=&quot;text-wrap-mode: wrap;&quot;&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;dns_ali&lt;/span&gt;&lt;/strong&gt;”另存为 “update_synology_cert.sh”（文件名可以随便定义）&lt;/p&gt;&lt;p&gt;或者直接&amp;nbsp;&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/update_synology_cert.sh&quot; target=&quot;_blank&quot;&gt;下载&lt;/a&gt;&amp;nbsp;我的脚本修改&amp;nbsp;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;“&lt;/span&gt;&lt;strong style=&quot;text-wrap-mode: wrap;&quot;&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;example.com&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;”“&lt;/span&gt;&lt;strong style=&quot;text-wrap-mode: wrap;&quot;&gt;&lt;span style=&quot;color: #FF0000;&quot;&gt;dns_ali&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;”&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/update_synology_cert.sh&quot; target=&quot;_blank&quot; title=&quot;update_synology_cert.sh&quot;&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;update_synology_cert.sh&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;然后上传至群晖个人home目录下（目录自己随意选择），记住并复制“位置”信息。&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/cert004.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;打开计划任务：控制面板→计划任务→新增→用户自定义的脚本&lt;/p&gt;&lt;p&gt;用户帐号一定选择 “root”，&lt;/p&gt;&lt;p&gt;然后任务设置→用户自定义的脚本输入：&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;cd&amp;nbsp;/volume1/homes/sunfeng/
chmod&amp;nbsp;+x&amp;nbsp;update_synology_cert.sh
./update_synology_cert.sh&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/%E8%AE%A1%E5%88%92%E4%BB%BB%E5%8A%A1002.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;保存计划任务即可，以后就不用操心证书更新问题了&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 13 Aug 2025 12:43:55 +0800</pubDate></item><item><title>群晖docker安装dreamacro/clash + haishanh/yacd面板</title><link>https://blog.swihp.cn/?id=1432</link><description>&lt;p&gt;1、下载docker镜像&amp;nbsp;&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/dreamacro-clash.tar&quot; target=&quot;_blank&quot;&gt;dreamacro/clash&lt;/a&gt; 、 &lt;a href=&quot;https://nas.swihp.cn:39997/file/file/haishanh-yacd.tar&quot; target=&quot;_blank&quot;&gt;haishanh/yacd&lt;/a&gt;&amp;nbsp; 并导入NAS，如果你的NAS能访问docker 请忽略此步。&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/dockerupload.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;2、准备 clash 配置文件并修改配置（没有 clash 配置文件请止步直接放弃，后边的内容不适合您）&lt;/p&gt;&lt;p&gt;打开配置文件 查找并修改&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;external-controller:&amp;nbsp;&amp;#39;0.0.0.0:9090&amp;#39;
allow-lan:&amp;nbsp;true&lt;/pre&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash001.png&quot; width=&quot;&quot; height=&quot;&quot; border=&quot;0&quot; vspace=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; style=&quot;width: 397px; height: 135px;&quot;/&gt;&lt;/p&gt;&lt;p&gt;然后将配置文件上传至 NAS&amp;nbsp; 目录下&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash002.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3、打开 Container Manager → 项目 → 新增 ，直接 docker-compose 部署，&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/clash_compose.yaml&quot; target=&quot;_blank&quot; title=&quot;clash_compose.yaml&quot; textvalue=&quot;clash_compose.yaml&quot;&gt;clash_compose.yaml&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-markdown&quot;&gt;version:&amp;nbsp;&amp;#39;3&amp;#39;
services:
&amp;nbsp;&amp;nbsp;yacd:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;image:&amp;nbsp;haishanh/yacd
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;container_name:&amp;nbsp;yacd
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ports:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;31003:80&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;restart:&amp;nbsp;always&amp;nbsp;&amp;nbsp;#&amp;nbsp;自动重启配置
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;networks:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;clash-network

&amp;nbsp;&amp;nbsp;clash:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;image:&amp;nbsp;dreamacro/clash
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;container_name:&amp;nbsp;clash
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ports:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;7890:7890&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;7891:7891&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;7892:7892&amp;quot;&amp;nbsp;#可以去掉，一般用不到
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;7893:7893&amp;quot;&amp;nbsp;#可以去掉，一般用不到
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;9090:9090&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;volumes:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;./config.yaml:/root/.config/clash/config.yaml&amp;nbsp;&amp;nbsp;&amp;nbsp;#这里很重要
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;restart:&amp;nbsp;always&amp;nbsp;&amp;nbsp;#&amp;nbsp;自动重启配置
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;networks:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;clash-network

networks:
&amp;nbsp;&amp;nbsp;clash-network:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;driver:&amp;nbsp;bridge&lt;/pre&gt;&lt;p&gt;路径很重要 ！！！&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash003.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash004.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash005.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;4、打开 http://NAS_IP:31003 , 在 API Base URL 处输入 http://NAS_IP:9090&amp;nbsp;, 点击 ADD。（！！！“NAS_IP” 是NAS的局域网 IP 地址，一定改成自己NAS的局域网 IP 地址）&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash006.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash007.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;5、开始开心的玩耍吧&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash008.png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;NAS本身如果需要走代理也要启用一下，地址添写127.0.0.1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/clash009.png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sat, 09 Aug 2025 23:42:51 +0800</pubDate></item><item><title>群晖Synology NAS docker安装带 web UI 的openvpn</title><link>https://blog.swihp.cn/?id=1431</link><description>&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; position: relative; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255); margin-top: 0px !important;&quot;&gt;&lt;h1 tabindex=&quot;-1&quot; class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 16px; margin-left: 0px; line-height: 1.25; padding-bottom: 0.3em; border-bottom: 1px solid rgba(209, 217, 224, 0.7); margin-top: 0px !important;&quot;&gt;openvpn&lt;/h1&gt;&lt;a id=&quot;user-content-openvpn&quot; class=&quot;anchor&quot; aria-label=&quot;Permalink: openvpn&quot; href=&quot;https://github.com/GavinTan/openvpn#openvpn&quot; style=&quot;box-sizing: border-box; background-color: rgba(0, 0, 0, 0); color: rgb(9, 105, 218); float: left; padding-right: 4px; margin: auto; line-height: 1; position: absolute; top: 25.2969px; left: -28px; display: flex; width: 28px; height: 28px; border-radius: 6px; opacity: 0; justify-content: center; align-items: center; transform: translateY(calc(-50% - 0.3rem)); text-underline-offset: 0.2rem;&quot;&gt;&lt;svg class=&quot;octicon octicon-link&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; height=&quot;16&quot; aria-hidden=&quot;true&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;docker 版&lt;a href=&quot;https://hub.docker.com/r/yyxx/openvpn&quot; rel=&quot;nofollow&quot; style=&quot;box-sizing: border-box; background-color: rgba(0, 0, 0, 0); color: rgb(9, 105, 218); text-underline-offset: 0.2rem;&quot;&gt;openvpn&lt;/a&gt;，支持 web 管理。&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;openvpn 安全与加密相关配置参考于&lt;a href=&quot;https://github.com/angristan/openvpn-install?tab=readme-ov-file#security-and-encryption&quot; style=&quot;box-sizing: border-box; background-color: rgba(0, 0, 0, 0); color: rgb(9, 105, 218); text-underline-offset: 0.2rem;&quot;&gt;openvpn-install&lt;/a&gt;的Security and Encryption部分。&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn001.png&quot; alt=&quot;openvpn001.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn002.png&quot; alt=&quot;openvpn002.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn003.png&quot; alt=&quot;openvpn003.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn004.png&quot; alt=&quot;openvpn004.png&quot;/&gt;&lt;/p&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; position: relative; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;h2 tabindex=&quot;-1&quot; class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; border-bottom: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;一、快速安装&lt;/h2&gt;&lt;a id=&quot;user-content-quick-start&quot; class=&quot;anchor&quot; aria-label=&quot;Permalink: Quick Start&quot; href=&quot;https://github.com/GavinTan/openvpn#quick-start&quot; style=&quot;box-sizing: border-box; background-color: rgba(0, 0, 0, 0); color: rgb(9, 105, 218); float: left; padding-right: 4px; margin: auto; line-height: 1; position: absolute; top: 19.0938px; left: -28px; display: flex; width: 28px; height: 28px; border-radius: 6px; opacity: 0; justify-content: center; align-items: center; transform: translateY(calc(-50% - 0.3rem)); text-underline-offset: 0.2rem;&quot;&gt;&lt;svg class=&quot;octicon octicon-link&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; height=&quot;16&quot; aria-hidden=&quot;true&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;1、登录群晖 NAS web 管理页面，打开container manager&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;搜索并下载yyxx/openvpn镜像（或者直接导入我下载好的镜像包：&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/yyxx-openvpn.tar&quot; target=&quot;_blank&quot; title=&quot;yyxx-openvpn.tar&quot;&gt;yyxx/openvpn&lt;/a&gt;）&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&amp;nbsp; &amp;nbsp; ssh登录SynologyNAS并切换到root权限&lt;br/&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;login&amp;nbsp;as:&amp;nbsp;sunfeng
sunfeng@192.168.0.100&amp;#39;s&amp;nbsp;password:
sunfeng@SynologyNAS:~$&amp;nbsp;sudo&amp;nbsp;-i
Password:
root@SynologyNAS:~#&amp;nbsp;docker&amp;nbsp;pull&amp;nbsp;yyxx/openvpn&lt;/pre&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn005.png&quot; width=&quot;&quot; height=&quot;&quot; border=&quot;0&quot; vspace=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;2、新建openvpn证书及配置文件挂载目录&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;在ssh后台直接使用命令创建&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;mkdir&amp;nbsp;-p&amp;nbsp;/volume1/docker/openvpn/data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#路径不要照抄我的，改为自己的实际路径&lt;/pre&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;或者在web页面手动创建&lt;br/&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn006.png&quot;/&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;初始化生成证书及配置文件&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;cd&amp;nbsp;/volume1/docker/openvpn/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#先&amp;nbsp;cd&amp;nbsp;至openvpn目录下
docker&amp;nbsp;run&amp;nbsp;-v&amp;nbsp;$(pwd)/data:/data&amp;nbsp;--rm&amp;nbsp;yyxx/openvpn&amp;nbsp;--init&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#初始化生成证书及配置文件&lt;/pre&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;3、运行 openvpn&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;以host模式运行openvpn&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;docker&amp;nbsp;run&amp;nbsp;-d&amp;nbsp;\
&amp;nbsp;&amp;nbsp;--name&amp;nbsp;openvpn&amp;nbsp;\
&amp;nbsp;&amp;nbsp;--cap-add&amp;nbsp;NET_ADMIN&amp;nbsp;\
&amp;nbsp;&amp;nbsp;--network&amp;nbsp;host&amp;nbsp;\
&amp;nbsp;&amp;nbsp;-e&amp;nbsp;ADMIN_USERNAME=sunfeng&amp;nbsp;\
&amp;nbsp;&amp;nbsp;-e&amp;nbsp;ADMIN_PASSWORD=sunfeng&amp;nbsp;\
&amp;nbsp;&amp;nbsp;-e&amp;nbsp;OVPN_SUBNET=10.10.8.0/24&amp;nbsp;\
&amp;nbsp;&amp;nbsp;-e&amp;nbsp;WEB_PORT=31194&amp;nbsp;\
&amp;nbsp;&amp;nbsp;-v&amp;nbsp;$(pwd)/data:/data&amp;nbsp;\
&amp;nbsp;&amp;nbsp;-v&amp;nbsp;/etc/localtime:/etc/localtime:ro&amp;nbsp;\
&amp;nbsp;&amp;nbsp;yyxx/openvpn&lt;/pre&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;运行命令不一定照抄我的，可根据自己需求修改环境变量&lt;br/&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;font-size: 1.25em;&quot;&gt;4、compose 安装&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a id=&quot;user-content-compose&quot; class=&quot;anchor&quot; aria-label=&quot;Permalink: compose&quot; href=&quot;https://github.com/GavinTan/openvpn#compose&quot; style=&quot;box-sizing: border-box; background-color: rgba(0, 0, 0, 0); color: rgb(9, 105, 218); float: left; padding-right: 4px; margin: auto; line-height: 1; position: absolute; top: 12.5px; left: -28px; display: flex; width: 28px; height: 28px; border-radius: 6px; opacity: 0; justify-content: center; align-items: center; transform: translateY(-50%); text-underline-offset: 0.2rem;&quot;&gt;&lt;svg class=&quot;octicon octicon-link&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; height=&quot;16&quot; aria-hidden=&quot;true&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn007.png&quot;/&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;&quot;&gt;创建 docker-compose.yml&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;services:
&amp;nbsp;&amp;nbsp;openvpn:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;image:&amp;nbsp;yyxx/openvpn
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cap_add:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;NET_ADMIN
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;network_mode:&amp;nbsp;host&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#不需要host模式可以注释或删除此项，然后取消掉ports的注释
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ports:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#-&amp;nbsp;&amp;quot;1194:1194/udp&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#-&amp;nbsp;&amp;quot;8833:8833&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;environment:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;ADMIN_USERNAME=sunfeng
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;ADMIN_PASSWORD=sunfeng
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;新增：VPN子网配置（覆盖默认的10.8.0.0/24）
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;OVPN_SUBNET=10.10.8.0/24
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;新增：vpn端口（默认端口1194）
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;OVPN_PORT=31194
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;新增：vpn协议（默认udp）
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;OVPN_PROTO=udp
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;新增：Web管理界面端口（默认8833，可按需修改）
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;WEB_PORT=31195
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#-&amp;nbsp;OVPN_IPV6=true
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;volumes:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;./data:/data
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;/etc/localtime:/etc/localtime:ro
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#sysctls:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#-&amp;nbsp;net.ipv6.conf.default.disable_ipv6=0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#-&amp;nbsp;net.ipv6.conf.all.forwarding=1

#networks:
&amp;nbsp;&amp;nbsp;#default:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#enable_ipv6:&amp;nbsp;true&lt;/pre&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;&quot;&gt;&lt;span style=&quot;background-color: #FFFFFF; color: #1F2328; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px;&quot;&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/openvpn008.png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;&quot;&gt;&lt;span style=&quot;background-color: #FFFFFF; color: #1F2328; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px;&quot;&gt;创建完成，浏览器访问 https://&amp;nbsp;NAS_IP:31195 即可管理openvpn&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;&quot;&gt;&lt;span style=&quot;background-color: #FFFFFF; color: #1F2328; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px;&quot;&gt;IPV6&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a id=&quot;user-content-ipv6&quot; class=&quot;anchor&quot; aria-label=&quot;Permalink: IPV6&quot; href=&quot;https://github.com/GavinTan/openvpn#ipv6&quot; style=&quot;box-sizing: border-box; background-color: rgba(0, 0, 0, 0); color: rgb(9, 105, 218); float: left; padding-right: 4px; margin: auto; line-height: 1; position: absolute; top: 19.0938px; left: -28px; display: flex; width: 28px; height: 28px; border-radius: 6px; opacity: 0; justify-content: center; align-items: center; transform: translateY(calc(-50% - 0.3rem)); text-underline-offset: 0.2rem;&quot;&gt;&lt;svg class=&quot;octicon octicon-link&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; height=&quot;16&quot; aria-hidden=&quot;true&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/p&gt;&lt;blockquote style=&quot;box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(89, 99, 110); border-left: 4px solid rgb(209, 217, 224); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;&quot;&gt;注意：&lt;/p&gt;&lt;ol dir=&quot;auto&quot; style=&quot;box-sizing: border-box; padding-left: 2em;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;启用ipv6后客户端跟服务器的proto需要都指定udp6/tcp6&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;docker的网络需要启用ipv6支持&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;使用openvpn-connect客户端的需要使用3.4.1以后的版本&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;&lt;div class=&quot;highlight highlight-source-shell notranslate position-relative overflow-auto&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; display: flex; justify-content: space-between; background-color: rgb(246, 248, 250); color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; position: relative !important; overflow: auto !important;&quot;&gt;&lt;pre style=&quot;box-sizing: border-box; font-family: &amp;quot;Monaspace Neon&amp;quot;, ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; margin-top: 0px; margin-bottom: 0px; tab-size: 8; overflow-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 6px; word-break: normal; min-height: 52px;&quot;&gt;services:
&amp;nbsp;&amp;nbsp;openvpn:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;image:&amp;nbsp;yyxx/openvpn
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cap_add:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;NET_ADMIN
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ports:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;1194:1194/udp&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;&amp;quot;8833:8833&amp;quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;environment:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;ADMIN_USERNAME=admin
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;ADMIN_PASSWORD=admin
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;OVPN_IPV6=true
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;volumes:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;./data:/data
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;/etc/localtime:/etc/localtime:ro
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sysctls:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;net.ipv6.conf.default.disable_ipv6=0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;net.ipv6.conf.all.forwarding=1

networks:
&amp;nbsp;&amp;nbsp;default:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;enable_ipv6:&amp;nbsp;true&lt;/pre&gt;&lt;clipboard-copy aria-label=&quot;Copy&quot; class=&quot;ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center&quot; data-copy-feedback=&quot;Copied!&quot; data-tooltip-direction=&quot;w&quot; value=&quot;services:
  openvpn:
    image: yyxx/openvpn
    cap_add:
      - NET_ADMIN
    ports:
      - &amp;quot;1194:1194/udp&amp;quot;
      - &amp;quot;8833:8833&amp;quot;
    environment:
      - ADMIN_USERNAME=admin
      - ADMIN_PASSWORD=admin
      - OVPN_IPV6=true
    volumes:
      - ./data:/data
      - /etc/localtime:/etc/localtime:ro
    sysctls:
      - net.ipv6.conf.default.disable_ipv6=0
      - net.ipv6.conf.all.forwarding=1

networks:
  default:
    enable_ipv6: true&quot; tabindex=&quot;0&quot; role=&quot;button&quot; style=&quot;box-sizing: border-box; position: relative; font-size: 14px; line-height: 20px; text-wrap-mode: nowrap; vertical-align: middle; cursor: pointer; user-select: none; border: 0px; border-radius: 6px; appearance: none; color: rgb(9, 105, 218); background-color: rgba(0, 0, 0, 0); box-shadow: none; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1), background-color, box-shadow, border-color; width: 28px; height: 28px; display: flex !important; padding: 0px !important; justify-content: center !important; align-items: center !important; margin: 8px !important;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; height=&quot;16&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; data-view-component=&quot;true&quot; class=&quot;octicon octicon-copy js-clipboard-copy-icon&quot;&gt;&lt;/svg&gt;&lt;/clipboard-copy&gt;&lt;/div&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; position: relative; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255);&quot;&gt;&lt;h2 tabindex=&quot;-1&quot; class=&quot;heading-element&quot; dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; padding-bottom: 0.3em; border-bottom: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;环境变量参数&lt;/h2&gt;&lt;a id=&quot;user-content-环境变量参数&quot; class=&quot;anchor&quot; aria-label=&quot;Permalink: 环境变量参数&quot; href=&quot;https://github.com/GavinTan/openvpn#%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E5%8F%82%E6%95%B0&quot; style=&quot;box-sizing: border-box; background-color: rgba(0, 0, 0, 0); color: rgb(9, 105, 218); float: left; padding-right: 4px; margin: auto; line-height: 1; position: absolute; top: 19.0938px; left: -28px; display: flex; width: 28px; height: 28px; border-radius: 6px; opacity: 0; justify-content: center; align-items: center; transform: translateY(calc(-50% - 0.3rem)); text-underline-offset: 0.2rem;&quot;&gt;&lt;svg class=&quot;octicon octicon-link&quot; viewbox=&quot;0 0 16 16&quot; version=&quot;1.1&quot; width=&quot;16&quot; height=&quot;16&quot; aria-hidden=&quot;true&quot;&gt;&lt;path d=&quot;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;markdown-accessiblity-table data-catalyst=&quot;&quot; style=&quot;box-sizing: border-box; display: block; color: rgb(31, 35, 40); font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; text-wrap-mode: wrap; background-color: rgb(255, 255, 255); margin-bottom: 0px !important;&quot;&gt;&lt;/markdown-accessiblity-table&gt;&lt;/p&gt;&lt;table width=&quot;NaN&quot;&gt;&lt;thead style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot; class=&quot;firstRow&quot;&gt;&lt;th align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;环境变量&lt;/th&gt;&lt;th align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;说明&lt;/th&gt;&lt;th align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;默认值&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_DATA&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;数据存放目录&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;/data&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; background-color: rgb(246, 248, 250); border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_SUBNET&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;vpn子网&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;10.8.0.0/24&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_SUBNET6&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;vpn ipv6子网&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;fdaf:f178:e916:6dd0::/64&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; background-color: rgb(246, 248, 250); border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_PROTO&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;协议 tcp(6)/udp(6)&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;udp&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_PORT&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;vpn连接端口&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;1194&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; background-color: rgb(246, 248, 250); border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_MAXCLIENTS&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;vpn最大客户端连接数&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;200&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_MANAGEMENT&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;openvpn管理接口监听地址&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;127.0.0.1:7505&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; background-color: rgb(246, 248, 250); border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_IPV6&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;启用ipv6&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;OVPN_GATEWAY&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;启用vpn网关所有流量走vpn&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;false&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; background-color: rgb(246, 248, 250); border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;WEB_PORT&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;web端口&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;8833&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;ADMIN_USERNAME&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;web登录账号&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;admin&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; background-color: rgb(246, 248, 250); border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;ADMIN_PASSWORD&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;web登录密码&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;admin&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; border-top: 1px solid rgba(209, 217, 224, 0.7);&quot;&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600; margin-bottom: 0px;&quot;&gt;ENV_UPDATE_CONFIG&lt;/span&gt;&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;启用环境变量自动更新配置文件&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;box-sizing: border-box; padding: 6px 13px; border-color: rgb(209, 217, 224); border-image: none 100% / 1 / 0 stretch;&quot;&gt;true&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;h2&gt;最后分享一个小技巧，所有需要root登录NAS后台的命令都可以通过计划任务实现&lt;br/&gt;&lt;/h2&gt;&lt;p&gt;&lt;img class=&quot;ue-image&quot; src=&quot;https://nas.swihp.cn:39997/file/wordpress/synology/计划任务001.png&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 04 Aug 2025 10:56:06 +0800</pubDate></item><item><title>小米路由器3G R3G 刷入Breed和OpenWrt</title><link>https://blog.swihp.cn/?id=1430</link><description>&lt;p&gt;小米 R3G
市面上有R3G和R3Gv2两种型号, 注意区分, 后者是缩水版, 没有USB口. 内存只有128M, Flash只有16M. 这里描述的只适用于R3G.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;开整&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;注：刷写openwrt需要小米R3G路由器联网（即wan插口连接到intel网络）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;第一步、先给路由器通上电，重置路由器&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;第二步、进入路由器后台192.168.31.1/miwifi.com，将路由器系统 ROM 升级到最新开发版&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;ROM 的升级有两种方式&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;1、登陆路由器后台192.168.31.1在线升级&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;选择下载的文件进行升级。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;2、将升级包拷贝到U盘根目录, 并命名为 miwifi.bin,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;随后断开电源, 插上U盘, 并按住 reset 按钮后插入电源, 等到指示灯变为黄色闪烁(10-15秒)后松开 reset 键,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;之后路由器将更新 ROM 并重启进入正常状态(指示灯变为蓝色常亮)，&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;如果出现异常、失败、U盘无法读取的状况，会进入红灯状态，建议重试或更换U盘再试。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;3、ROM系统成功升级为小米3g开发版是前提条件&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;第三步、绑定完小米账号获取SSH权限&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ①&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;安装 “小米WiFi”手机APP, 连上路由器WIFI后绑定路由器；&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ② 登陆 http://d.miwifi.com/rom/ssh, 点击&amp;quot;下载工具包&amp;quot;；&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ③ ！！！特别提示！！！下载工具包时记下 root 密码（后边会用到）&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;工具包使用方法：小米路由器需升级到开发版0.5.28及以上，小米路由器mini需升级到开发版0.3.84及以上，小米路由器3即将支持。注意：稳定版不支持。&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;④ 开启 SSH&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;请将下载的工具包bin文件复制到U盘（FAT/FAT32格式）的根目录下，保证文件名为miwifi_ssh.bin；
断开小米路由器的电源，将U盘插入USB接口；
按住reset按钮之后重新接入电源，指示灯变为黄色闪烁状态即可松开reset键；
等待3-5秒后安装完成之后，小米路由器会自动重启，之后您就可以尽情折腾啦&amp;nbsp;：）&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;⑤ 连接SSH&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ssh连接方式，&lt;/span&gt;&lt;span style=&quot;text-wrap-mode: nowrap; text-decoration: underline;&quot;&gt;windows尽量别用CMD去连接ssh&lt;/span&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;，推荐工具MobaXterm，putty，xshell等&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;ssh&amp;nbsp;root@192.168.31.1&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;如果ssh连接报错：&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;Unable&amp;nbsp;to&amp;nbsp;negotiate&amp;nbsp;with&amp;nbsp;192.168.31.1&amp;nbsp;port&amp;nbsp;22:&amp;nbsp;no&amp;nbsp;matching&amp;nbsp;key&amp;nbsp;exchange&amp;nbsp;method&amp;nbsp;found.&amp;nbsp;Their&amp;nbsp;offer:&amp;nbsp;diffie-hellman-group1-sha1,diffie-hellman-group14-sha1&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;手动指定oKexAlgorithms&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;ssh&amp;nbsp;-oKexAlgorithms=+diffie-hellman-group1-sha1&amp;nbsp;root@192.168.31.1&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;ssh连接&amp;nbsp; ip 地址：192.168.31.1 ，帐号：root，密码：即下载工具包时特别提示保存的root密码&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;第五步、将breed文件上传到路由器 /tmp 目录下，刷入breed&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;！！！&lt;span style=&quot;font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Fira Sans&amp;quot;, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: #FFFFFF;&quot;&gt;R3G 请使用 2011版的breed&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/%E5%B0%8F%E7%B1%B33G/breed-mt7621-xiaomi-r3g.bin&quot; target=&quot;_blank&quot; title=&quot;下载&quot; textvalue=&quot;下载&quot;&gt;下载&lt;/a&gt;&lt;span style=&quot;font-family: -apple-system, system-ui, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen, Ubuntu, Cantarell, &amp;quot;Fira Sans&amp;quot;, &amp;quot;Droid Sans&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; text-wrap-mode: wrap; background-color: #FFFFFF;&quot;&gt;, 不要使用最新2022版的.&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;首先 cd /tmp，&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;到tmp的路径下面，然后将文件breed文件上传到tmp的路径下&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;然后执行这个命令：&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;mtd&amp;nbsp;-r&amp;nbsp;write&amp;nbsp;/tmp/breed-mt7621-xiaomi-r3g.bin&amp;nbsp;Bootloader&lt;/pre&gt;&lt;p&gt;回车后路由器会重启，注意&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;观察指示灯，长时间未重启可手动重启。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;重启完成后断电关机&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;然后按住 reset 键，上电直到l ed 闪烁，电脑浏览器访问192.168.1.1即可&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;第六步、恭喜你，已经刷进 breed 了，&lt;/span&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;开始配置breed&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;① 在小米 R3G 设置中, 删除normal_firmware_md5这个键值,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;（参考他人教程提示，未验证不删除是否会导致无法开机）&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;②&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;在环境变量编辑中, 添加一个环境变量, 变量名为 xiaomi.r3g.bootfw, 值为2 ，！！！必须设置！！！&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-javascript&quot;&gt;参数说明&amp;nbsp;xiaomi.r3g.bootfw&amp;nbsp;如果写入&amp;nbsp;Breed&amp;nbsp;到&amp;nbsp;bootloader,&amp;nbsp;这个参数是必须的.&amp;nbsp;Breed的启动流程如下
&amp;nbsp;1、如果&amp;nbsp;kernel0&amp;nbsp;存在,&amp;nbsp;那么启动&amp;nbsp;kernel0
&amp;nbsp;2、如果&amp;nbsp;kernel0&amp;nbsp;不存在,&amp;nbsp;kernel1&amp;nbsp;存在,&amp;nbsp;那么启动&amp;nbsp;kernel1
&amp;nbsp;3、如果&amp;nbsp;kernel0&amp;nbsp;和&amp;nbsp;kernel1&amp;nbsp;都存在,&amp;nbsp;则检查环境变量&amp;nbsp;xiaomi.r3g.bootfw&amp;nbsp;的值,&amp;nbsp;如果存在且值为2,&amp;nbsp;那么启动&amp;nbsp;kernel1,&amp;nbsp;否则启动&amp;nbsp;kernel0&lt;/pre&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;如果通过mtd写入了OpenWrt 到Kernel1, 但是不写这个环境变量, Breed就会从kernel0启动,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;无法进入系统, 然后重启, 再次从kernel0启动, 这样一直循环下去.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;至此就配置好breed&lt;/span&gt;&lt;/p&gt;&lt;p&gt;第七步、刷入open wrt&amp;nbsp; 小米3G 底包&lt;/p&gt;&lt;p&gt;1、点击 固件更新 固件项选择后缀为 initramfs.kernel.bin的底包, 闪存布局选择 固件 2 上传 刷入&lt;/p&gt;&lt;p&gt;小米R3G底包下载地址 : &lt;a href=&quot;https://nas.swihp.cn:39997/file/file/%E5%B0%8F%E7%B1%B33G/openwrt-ramips-mt7621-xiaomi_mir3g-initramfs-kernel.bin&quot; target=&quot;_blank&quot; title=&quot;小米 R3G 底包&quot; textvalue=&quot;小米 R3G 底包&quot;&gt;小米 R3G 底包&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;2、刷完之后，重启进入openwrt，电脑浏览器打开：&lt;a href=&quot;http://192.168.3.1/cgi-bin/luci/admin/system/flashops，&quot; _src=&quot;http://192.168.3.1/cgi-bin/luci/admin/system/flashops，&quot;&gt;http://192.168.3.1/cgi-bin/luci/admin/system/flashops&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt; 如无法打开页面可以看下路由器状态是否重启完成 或 确认下网关是否为 192.168.3.1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;帐号：root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;密码：password&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;在openwrt管理界面 系统&amp;gt;&amp;gt;备份/升级&amp;gt;&amp;gt;刷写新的固件&amp;gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;选择openwrt-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin升级&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;小米R3G sysupgrade系统包下载地址 ：&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/%E5%B0%8F%E7%B1%B33G/openwrt-ramips-mt7621-xiaomi_mir3g-squashfs-sysupgrade.bin&quot; target=&quot;_blank&quot; title=&quot;小米R3G sysupgrade系统包&quot;&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;小米R3G&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;sysupgrade系统包&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;text-wrap-mode: nowrap;&quot;&gt;注意：如果用的不是我提供的系统包，刷完 open wrt 后登录用户名密码可能不同&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Fri, 25 Jul 2025 21:32:25 +0800</pubDate></item><item><title>在windows下使用bat脚本“映射网络驱动器”</title><link>https://blog.swihp.cn/?id=1428</link><description>&lt;p&gt;分享一个局域网手动&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/映射网络驱动器.bat&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;映射网络驱动器.bat&lt;/a&gt;脚本：&lt;a href=&quot;https://nas.swihp.cn:39997/file/file/映射网络驱动器.bat&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;下载地址 &lt;/a&gt;&amp;nbsp;，双击脚本，根据提示输入正确信息即可。&lt;/p&gt;&lt;p&gt;外网通过webdav协议映射网络驱动器可以参考&lt;a href=&quot;https://hkc.nasclub.vip/?p=134&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;NAS （外网）映射网络驱动器（windows &amp;amp; mac）&lt;/a&gt;&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;下面分享一个自己写 bat 脚本，每次手动运行，重新映射新的共享文件夹：&lt;/p&gt;&lt;p class=&quot;marklang-paragraph&quot;&gt;直接复制下面的代码内容，在windows电脑上新建txt文本文档并粘贴内容，然后将txt文本文档重命名为“映射网络驱动器脚本.bat”。&lt;/p&gt;&lt;p&gt;！！！名字可以自行随意设置，但是“.bat”这个后缀不要动，在重命名txt文档时一定注意是将“.txt”替换为“.bat”&lt;/p&gt;&lt;pre class=&quot;io-enlighter-pre&quot;&gt;::&amp;nbsp;net&amp;nbsp;use&amp;nbsp;[映射到本地的盘符]&amp;nbsp;[网络磁盘路径]&amp;nbsp;[网络磁盘访问密码]&amp;nbsp;/user:[网络磁盘访问用户名]
::&amp;nbsp;例如：
::&amp;nbsp;net&amp;nbsp;use&amp;nbsp;Z:&amp;nbsp;\\10.10.11.8\Users&amp;nbsp;Admin@123&amp;nbsp;/user:administrator
::&amp;nbsp;将网络磁盘\\10.10.11.8\Users&amp;nbsp;映射到当前的PC的[Z:]上，&amp;nbsp;使用的账号为administrator/Admin@123
::&amp;nbsp;注意不要遗漏&amp;nbsp;&amp;#39;\&amp;#39;与&amp;quot;空格&amp;quot;

::&amp;nbsp;先删除现有映射连接
net&amp;nbsp;use&amp;nbsp;*&amp;nbsp;/del&amp;nbsp;/yes

::&amp;nbsp;创建映射连接
net&amp;nbsp;use&amp;nbsp;Z:&amp;nbsp;\\10.10.1.6\共享文件夹\&amp;nbsp;Admin@123&amp;nbsp;/user:administrator
net&amp;nbsp;use&amp;nbsp;Z:&amp;nbsp;\\10.10.1.6\home\&amp;nbsp;Admin@123&amp;nbsp;/user:administrator&lt;/pre&gt;&lt;hr/&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;0&quot; data-line=&quot;true&quot;&gt;在 Windows 下，还可以通过（.bat）脚本映射网络驱动器，并将其设置为开机自动运行。&lt;/div&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;1&quot; data-line=&quot;true&quot;&gt;&lt;h3 class=&quot;heading-h3&quot;&gt;一、创建映射网络驱动器的 bat 脚本&lt;/h3&gt;&lt;/div&gt;&lt;ol start=&quot;1&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;新建文本文件&lt;/strong&gt;，输入以下内容（根据实际情况修改）：&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;pre class=&quot;io-enlighter-pre&quot;&gt;@echo&amp;nbsp;off
REM&amp;nbsp;映射网络驱动器脚本&amp;nbsp;-&amp;nbsp;创建Z盘映射到\\server\share目录
net&amp;nbsp;use&amp;nbsp;Z:&amp;nbsp;\\server\share&amp;nbsp;/persistent:yes&amp;nbsp;/user:domain\username&amp;nbsp;password

REM&amp;nbsp;可选：添加延迟确保网络连接稳定后再映射
REM&amp;nbsp;timeout&amp;nbsp;/t&amp;nbsp;10&amp;nbsp;/nobreak

REM&amp;nbsp;提示映射成功
echo&amp;nbsp;网络驱动器Z:已映射完成！
pause&lt;/pre&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;4&quot; data-line=&quot;true&quot;&gt;&lt;strong&gt;参数说明&lt;/strong&gt;：&lt;/div&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;Z:：目标驱动器号，可改为其他未使用的盘符（如 Y:、X: 等）&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;\\server\share：实际的共享文件夹路径&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;/persistent:yes：保存映射，重启后保留&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;/user:domain\username password：可选参数，用于指定登录凭据（如需要）&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;chcp 65001 &amp;gt;nul&lt;/code&gt;&amp;nbsp;可将编码临时切换为&amp;nbsp;&lt;strong&gt;UTF-8&lt;/strong&gt;&amp;nbsp;，这样可以避免在执行&amp;nbsp;&lt;code&gt;net use&lt;/code&gt;&amp;nbsp;等命令时，因命令输出的字符编码与系统默认编码不一致而产生乱码。&lt;code&gt;&amp;gt;nul&lt;/code&gt;&amp;nbsp;表示将&amp;nbsp;&lt;code&gt;chcp&lt;/code&gt;&amp;nbsp;命令的执行结果输出到空设备，即不显示该命令的执行信息。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;chcp 936 &amp;gt;nul&lt;/code&gt;&amp;nbsp;命令又将编码切换回&amp;nbsp;&lt;strong&gt;GBK&lt;/strong&gt;&amp;nbsp;（代码页 936 代表 GBK 编码），确保后续&amp;nbsp;&lt;code&gt;echo&lt;/code&gt;&amp;nbsp;输出中文时能正常显示。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol start=&quot;2&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;保存为.bat 文件&lt;/strong&gt;，例如：MapNetworkDrive.bat&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;10&quot; data-line=&quot;true&quot;&gt;&lt;h3 class=&quot;heading-h3&quot;&gt;二、设置脚本开机自动运行&lt;/h3&gt;&lt;/div&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;11&quot; data-line=&quot;true&quot;&gt;有两种推荐方法：&lt;/div&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;12&quot; data-line=&quot;true&quot;&gt;&lt;h4 class=&quot;heading-h4&quot;&gt;方法一：使用系统 “启动” 文件夹（推荐）&lt;/h4&gt;&lt;/div&gt;&lt;ol start=&quot;1&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;按下Win + R 输入cmd 打开运行窗口，输入：&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;code&gt;shell:startup&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol start=&quot;2&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;将之前创建的 MapNetworkDrive.bat 文件复制到此文件夹中。&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;16&quot; data-line=&quot;true&quot;&gt;&lt;h4 class=&quot;heading-h4&quot;&gt;方法二：使用任务计划程序（更灵活）&lt;/h4&gt;&lt;/div&gt;&lt;ol start=&quot;1&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;打开 “任务计划程序”（通过开始菜单搜索）&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;点击 “创建任务”，设置如下：&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;2&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;/ol&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;常规&lt;/strong&gt;：&lt;/p&gt;&lt;p&gt;名称：自定义（如 &amp;quot;自动映射网络驱动器&amp;quot;）&lt;/p&gt;&lt;p&gt;勾选 “使用最高权限运行”&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;触发器&lt;/strong&gt;：&lt;/p&gt;&lt;p&gt;新建 &amp;gt; 开始任务：选择 “计算机启动时”&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;操作&lt;/strong&gt;：&lt;/p&gt;&lt;p&gt;新建 &amp;gt; 程序 / 脚本：浏览并选择之前创建的.bat 文件&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;条件&lt;/strong&gt;：&lt;/p&gt;&lt;p&gt;取消勾选 “只有在计算机使用交流电源时启动此任务”（如果需要）&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;28&quot; data-line=&quot;true&quot;&gt;&lt;h3 class=&quot;heading-h3&quot;&gt;三、注意事项&lt;/h3&gt;&lt;/div&gt;&lt;ol start=&quot;1&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;凭据管理&lt;/strong&gt;：&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;如果不想在脚本中明文存储密码，可使用：&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-indent: 2em;&quot;&gt;net use Z: \\server\share /persistent:yes&lt;/p&gt;&lt;p style=&quot;text-indent: 2em;&quot;&gt;系统会在首次运行时提示输入凭据，并自动保存。&lt;/p&gt;&lt;/ul&gt;&lt;ol start=&quot;2&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;网络连接延迟&lt;/strong&gt;：&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;如果开机后网络连接较慢，可在脚本中添加延迟：&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;35&quot; data-line=&quot;true&quot;&gt;&lt;div style=&quot;padding-left: 80px;&quot; data-zone-id=&quot;uwEAGQXEmro9n07ibwTR&quot; data-line-index=&quot;0&quot; data-line=&quot;true&quot;&gt;&lt;code&gt;timeout /t 30 /nobreak REM 等待30秒&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol start=&quot;3&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;验证映射结果&lt;/strong&gt;：&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;运行脚本后，通过Win + E打开资源管理器，检查是否成功映射。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p&gt;使用net use命令查看当前映射状态。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div data-zone-id=&quot;0&quot; data-line-index=&quot;39&quot; data-line=&quot;true&quot;&gt;通过以上步骤，你可以实现网络驱动器的自动映射，并在每次开机时自动连接。&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;marklang-paragraph&quot;&gt;&lt;strong&gt;net use命令&lt;em class=&quot;cos-icon cos-icon-research cosd-markdown-research-icon&quot;&gt;&lt;/em&gt;&lt;/strong&gt;‌主要用于在Windows系统中管理网络连接，包括建立、删除和列出计算机与共享资源的连接。该命令可以在命令提示符（CMD）下使用，适用于各种Windows操作系统版本。&lt;/p&gt;&lt;h3&gt;基本语法和参数&lt;/h3&gt;&lt;p class=&quot;marklang-paragraph&quot;&gt;net use命令的基本语法如下：&lt;/p&gt;&lt;div class=&quot;code-wrapper&quot;&gt;&lt;div class=&quot;code-right&quot;&gt;&lt;code&gt;net use [devicename | *] [\\computername\sharename[\\volume] [password | *] [/user:[domainname\]username] [/smartcard] [/savecred] [[/delete] | [/persistent:{yes | no}]]&lt;br/&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;devicename&lt;/strong&gt;‌：指定一个名字以便与资源相连接，或者指定要切断的设备。可以是磁盘驱动器（如D:至Z:）或打印机（如LPT1:至LPT3:）。使用星号（*）可以分配下一个可用设备名。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;\\computername&lt;/strong&gt;‌：指控制共享资源的计算机的名字（或者使用IP代替）。如果计算机名中包含有空字符，需将双反斜线（\）和计算机名一起用引号（&amp;quot; &amp;quot;）括起来。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;\sharename&lt;/strong&gt;‌：指共享资源的网络名字。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;password&lt;/strong&gt;‌：访问共享资源所需要的密码。使用星号（*）可以提示用户输入密码。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;/user&lt;/strong&gt;‌: 指定用户名和域名，用于登录到远程计算机。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;/smartcard&lt;/strong&gt;‌：使用智能卡进行身份验证。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;/savecred&lt;/strong&gt;‌：保存用户凭据，以便将来使用。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;/delete&lt;/strong&gt;‌：删除现有的连接。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;/persistent&lt;/strong&gt;‌: 设置连接的持久性，yes表示连接在重启后仍然保持，no表示连接在重启后断开。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;使用场景和示例&lt;/h3&gt;&lt;ol class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;查看当前网络连接&lt;/strong&gt;‌：不带任何参数使用&lt;code&gt;net use&lt;/code&gt;命令可以列出当前所有的网络连接。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;建立网络连接&lt;/strong&gt;‌：例如，&lt;code&gt;net use Z: \\192.168.1.10\share /user:administrator&lt;/code&gt;会将网络位置&lt;code&gt;\\192.168.1.1\share&lt;/code&gt;映射到本机的Z驱动器，并使用管理员账户登录。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;删除网络连接&lt;/strong&gt;‌：使用&lt;code&gt;net use * /del /y&lt;/code&gt;可以删除所有网络连接。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;管理域登录&lt;/strong&gt;‌：对于需要域登录才能访问的共享资源，可以使用&lt;code&gt;net use \\192.168.1.1\share /user:domain\username&lt;/code&gt;来登录域账户，并访问相应的共享资源。&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;高级用法和技巧&lt;/h3&gt;&lt;ul class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;映射默认共享&lt;/strong&gt;‌：例如，&lt;code&gt;net use Z: \\192.168.1.1\c$&lt;/code&gt;可以将远程主机的C盘映射到本地的Z盘。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;空连接&lt;/strong&gt;‌：使用空字符串作为密码可以建立空连接，例如&lt;code&gt;net use \\192.168.1.1\ipc$ /user:&amp;quot;&amp;quot;&lt;/code&gt;。&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;‌&lt;strong&gt;删除特定连接&lt;/strong&gt;‌：使用&lt;code&gt;net use \\192.168.1.1\share /delete&lt;/code&gt;可以删除特定的网络连接。&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;更多：&lt;/p&gt;&lt;p&gt;net use \\ip\ipc$ &amp;quot;密码&amp;quot; /user:&amp;quot;用户名&amp;quot; 建立IPC非空链接&lt;/p&gt;&lt;p&gt;net use h: \\ip\c$ &amp;quot;密码&amp;quot; /user:&amp;quot;用户名&amp;quot; 直接登陆后映射对方C：到本地为H:&lt;/p&gt;&lt;p&gt;net use h: \\ip\c$ 登陆后映射对方C：到本地为H:&lt;/p&gt;&lt;p&gt;net use \\ip\ipc$ /del 删除IPC链接&lt;/p&gt;&lt;p&gt;net use h: /del 删除映射对方到本地的为H:的映射&lt;/p&gt;&lt;p&gt;net user 用户名　密码　/add 建立用户&lt;/p&gt;&lt;p&gt;net user guest /active:yes 激活guest用户&lt;/p&gt;&lt;p&gt;net user 查看有哪些用户&lt;/p&gt;&lt;p&gt;net user 帐户名 查看帐户的属性&lt;/p&gt;&lt;p&gt;net localgroup administrators 用户名 /add 把“用户”添加到管理员中使其具有管理员权限,注意：administrator后加s用复数&lt;/p&gt;&lt;p&gt;net start 查看开启了哪些服务&lt;/p&gt;&lt;p&gt;net start 服务名　 开启服务；(如:net start telnet， net start schedule)&lt;/p&gt;&lt;p&gt;net stop 服务名 停止某服务&lt;/p&gt;&lt;p&gt;net time \\目标ip 查看对方时间&lt;/p&gt;&lt;p&gt;net time \\目标ip /set 设置本地计算机时间与“目标IP”主机的时间同步,加上参数/yes可取消确认信息&lt;/p&gt;&lt;p&gt;net view 查看本地局域网内开启了哪些共享&lt;/p&gt;&lt;p&gt;net view \\ip 查看对方局域网内开启了哪些共享&lt;/p&gt;&lt;p&gt;net config 显示系统网络设置&lt;/p&gt;&lt;p&gt;net logoff 断开连接的共享&lt;/p&gt;&lt;p&gt;net pause 服务名 暂停某服务&lt;/p&gt;&lt;p&gt;net send ip &amp;quot;文本信息&amp;quot; 向对方发信息&lt;/p&gt;&lt;p&gt;net ver 局域网内正在使用的网络连接嘈秃托畔&lt;/p&gt;&lt;p&gt;net share 查看本地开启的共享&lt;/p&gt;&lt;p&gt;net share ipc&lt;span id=&quot;MathJax-Element-1-Frame&quot; class=&quot;mjx-chtml MathJax_CHTML&quot; style=&quot;display: inline-block; line-height: 0; font-size: 17.22px; font-size-adjust: none; overflow-wrap: normal; word-spacing: normal; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; margin: 0px; padding: 1px 0px; position: relative;&quot; tabindex=&quot;0&quot; role=&quot;presentation&quot; data-mathml=&quot;&amp;lt;math xmlns=&amp;quot;http://www.w3.org/1998/Math/MathML&amp;quot;&amp;gt;&amp;lt;mrow class=&amp;quot;MJX-TeXAtom-ORD&amp;quot;&amp;gt;&amp;lt;mo&amp;gt;&amp;amp;#x5F00;&amp;lt;/mo&amp;gt;&amp;lt;/mrow&amp;gt;&amp;lt;mrow class=&amp;quot;MJX-TeXAtom-ORD&amp;quot;&amp;gt;&amp;lt;mo&amp;gt;&amp;amp;#x542F;&amp;lt;/mo&amp;gt;&amp;lt;/mrow&amp;gt;&amp;lt;mi&amp;gt;i&amp;lt;/mi&amp;gt;&amp;lt;mi&amp;gt;p&amp;lt;/mi&amp;gt;&amp;lt;mi&amp;gt;c&amp;lt;/mi&amp;gt;&amp;lt;/math&amp;gt;&quot;&gt;&lt;span id=&quot;MJXc-Node-1&quot; class=&quot;mjx-math&quot; aria-hidden=&quot;true&quot;&gt;&lt;span id=&quot;MJXc-Node-2&quot; class=&quot;mjx-mrow&quot;&gt;&lt;span id=&quot;MJXc-Node-3&quot; class=&quot;mjx-texatom&quot;&gt;&lt;span id=&quot;MJXc-Node-4&quot; class=&quot;mjx-mrow&quot;&gt;&lt;span id=&quot;MJXc-Node-5&quot; class=&quot;mjx-mo&quot;&gt;&lt;span class=&quot;mjx-char&quot;&gt;&lt;span class=&quot;mjx-charbox MJXc-TeX-unknown-R&quot;&gt;开&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-6&quot; class=&quot;mjx-texatom&quot;&gt;&lt;span id=&quot;MJXc-Node-7&quot; class=&quot;mjx-mrow&quot;&gt;&lt;span id=&quot;MJXc-Node-8&quot; class=&quot;mjx-mo&quot;&gt;&lt;span class=&quot;mjx-char&quot;&gt;&lt;span class=&quot;mjx-charbox MJXc-TeX-unknown-R&quot;&gt;启&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-9&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;i&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-10&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;p&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-11&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;c&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MJX_Assistive_MathML&quot; role=&quot;presentation&quot;&gt;开启ipc&lt;/span&gt;&lt;/span&gt;&amp;nbsp;共享&lt;/p&gt;&lt;p&gt;net share ipc&lt;span id=&quot;MathJax-Element-2-Frame&quot; class=&quot;mjx-chtml MathJax_CHTML&quot; style=&quot;display: inline-block; line-height: 0; font-size: 17.22px; font-size-adjust: none; overflow-wrap: normal; word-spacing: normal; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; margin: 0px; padding: 1px 0px; position: relative;&quot; tabindex=&quot;0&quot; role=&quot;presentation&quot; data-mathml=&quot;&amp;lt;math xmlns=&amp;quot;http://www.w3.org/1998/Math/MathML&amp;quot;&amp;gt;&amp;lt;mrow class=&amp;quot;MJX-TeXAtom-ORD&amp;quot;&amp;gt;&amp;lt;mo&amp;gt;/&amp;lt;/mo&amp;gt;&amp;lt;/mrow&amp;gt;&amp;lt;mi&amp;gt;d&amp;lt;/mi&amp;gt;&amp;lt;mi&amp;gt;e&amp;lt;/mi&amp;gt;&amp;lt;mi&amp;gt;l&amp;lt;/mi&amp;gt;&amp;lt;mrow class=&amp;quot;MJX-TeXAtom-ORD&amp;quot;&amp;gt;&amp;lt;mo&amp;gt;&amp;amp;#x5220;&amp;lt;/mo&amp;gt;&amp;lt;/mrow&amp;gt;&amp;lt;mrow class=&amp;quot;MJX-TeXAtom-ORD&amp;quot;&amp;gt;&amp;lt;mo&amp;gt;&amp;amp;#x9664;&amp;lt;/mo&amp;gt;&amp;lt;/mrow&amp;gt;&amp;lt;mi&amp;gt;i&amp;lt;/mi&amp;gt;&amp;lt;mi&amp;gt;p&amp;lt;/mi&amp;gt;&amp;lt;mi&amp;gt;c&amp;lt;/mi&amp;gt;&amp;lt;/math&amp;gt;&quot;&gt;&lt;span id=&quot;MJXc-Node-12&quot; class=&quot;mjx-math&quot; aria-hidden=&quot;true&quot;&gt;&lt;span id=&quot;MJXc-Node-13&quot; class=&quot;mjx-mrow&quot;&gt;&lt;span id=&quot;MJXc-Node-14&quot; class=&quot;mjx-texatom&quot;&gt;&lt;span id=&quot;MJXc-Node-15&quot; class=&quot;mjx-mrow&quot;&gt;&lt;span id=&quot;MJXc-Node-16&quot; class=&quot;mjx-mo&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-main-R&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-17&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;d&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-18&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;e&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-19&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;l&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-20&quot; class=&quot;mjx-texatom&quot;&gt;&lt;span id=&quot;MJXc-Node-21&quot; class=&quot;mjx-mrow&quot;&gt;&lt;span id=&quot;MJXc-Node-22&quot; class=&quot;mjx-mo&quot;&gt;&lt;span class=&quot;mjx-char&quot;&gt;&lt;span class=&quot;mjx-charbox MJXc-TeX-unknown-R&quot;&gt;删&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-23&quot; class=&quot;mjx-texatom&quot;&gt;&lt;span id=&quot;MJXc-Node-24&quot; class=&quot;mjx-mrow&quot;&gt;&lt;span id=&quot;MJXc-Node-25&quot; class=&quot;mjx-mo&quot;&gt;&lt;span class=&quot;mjx-char&quot;&gt;&lt;span class=&quot;mjx-charbox MJXc-TeX-unknown-R&quot;&gt;除&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-26&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;i&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-27&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;p&lt;/span&gt;&lt;/span&gt;&lt;span id=&quot;MJXc-Node-28&quot; class=&quot;mjx-mi&quot;&gt;&lt;span class=&quot;mjx-char MJXc-TeX-math-I&quot;&gt;c&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MJX_Assistive_MathML&quot; role=&quot;presentation&quot;&gt;/del删除ipc&lt;/span&gt;&lt;/span&gt;&amp;nbsp;共享&lt;/p&gt;&lt;p&gt;net share c$ /del 删除C：共享&lt;/p&gt;&lt;p&gt;net user guest 12345 用guest用户登陆后用将密码改为12345&lt;/p&gt;&lt;p&gt;net password 密码 更改系统登陆密码&lt;/p&gt;&lt;p&gt;netstat -a 查看开启了哪些端口,常用netstat -an&lt;/p&gt;&lt;p&gt;netstat -n 查看端口的网络连接情况，常用netstat -an&lt;/p&gt;&lt;p&gt;netstat -v 查看正在进行的工作&lt;/p&gt;&lt;p&gt;netstat -p 协议名 例：netstat -p tcq/ip 查看某协议使用情况（查看tcp/ip协议使用情况）&lt;/p&gt;&lt;p&gt;netstat -s 查看正在使用的所有协议使用情况&lt;/p&gt;&lt;p&gt;nbtstat -A ip 对方136到139其中一个端口开了的话，就可查看对方最近登陆的用户名（03前的为用户名）-注意：参数-A要大写&lt;/p&gt;&lt;p&gt;tracert -参数 ip(或计算机名) 跟踪路由（数据包），参数：“-w数字”用于设置超时间隔。&lt;/p&gt;&lt;p&gt;ping ip(或域名) 向对方主机发送默认大小为32字节的数据，参数：“-l[空格]数据包大小”；“-n发送数据次数”；“-t”指一直ping。&lt;/p&gt;&lt;p&gt;ping -t -l 65550 ip 死亡之ping(发送大于64K的文件并一直ping就成了死亡之ping)&lt;/p&gt;&lt;p&gt;ipconfig (winipcfg) 用于windows NT及XP(windows 95 98)查看本地ip地址，ipconfig可用参数“/all”显示全部配置信息&lt;/p&gt;&lt;p&gt;tlist -t 以树行列表显示进程(为系统的附加工具，默认是没有安装的，在安装目录的Support/tools文件夹内)&lt;/p&gt;&lt;p&gt;kill -F 进程名 加-F参数后强制结束某进程(为系统的附加工具，默认是没有安装的，在安装目录的Support/tools文件夹内)&lt;/p&gt;&lt;p&gt;del -F 文件名 加-F参数后就可删除只读文件,/AR、/AH、/AS、/AA分别表示删除只读、隐藏、系统、存档文件，/A-R、/A-H、/A-S、/A-A表示删除除只读、隐藏、系统、存档以外的文件。例如“DEL/AR *.*”表示删除当前目录下所有只读文件，“DEL/A-S *.*”表示删除当前目录下除系统文件以外的所有文件&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Wed, 21 May 2025 14:02:51 +0800</pubDate></item></channel></rss>