Compare commits
2 Commits
273ff161c7
...
47030e4eaa
53
index/install/zerotier/windows.cmd
Normal file
53
index/install/zerotier/windows.cmd
Normal file
@@ -0,0 +1,53 @@
|
||||
@echo off
|
||||
:: 检查管理员权限
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo 请以管理员身份运行此脚本。
|
||||
goto exit1
|
||||
)
|
||||
|
||||
@REM :: 检查 curl 是否存在
|
||||
@REM where curl >nul 2>&1
|
||||
@REM if %errorlevel% neq 0 (
|
||||
@REM echo 未检测到 curl 安装
|
||||
@REM goto exit1
|
||||
@REM )
|
||||
|
||||
@REM :: 检查 zerotier-cli 是否存在
|
||||
@REM where zerotier-cli >nul 2>&1
|
||||
@REM if %errorlevel% neq 0 (
|
||||
@REM echo 未检测到 ZeroTier 安装
|
||||
@REM goto exit1
|
||||
@REM )
|
||||
|
||||
:: 下载 planet 文件
|
||||
echo 正在下载 planet 文件...
|
||||
curl -s https://o.nmgjg.com.cn/install/zerotier/planet -o "C:\ProgramData\ZeroTier\One\planet"
|
||||
if %errorlevel% neq 0 (
|
||||
echo planet 文件下载失败
|
||||
goto exit1
|
||||
)
|
||||
|
||||
:: 加入新网络
|
||||
echo planet 文件下载完成,正在加入网络...
|
||||
zerotier-cli join af7c492762d601cd
|
||||
|
||||
:: 重启服务
|
||||
echo 正在重启 ZeroTier 服务...
|
||||
net stop ZeroTierOneService >nul 2>&1
|
||||
net start ZeroTierOneService >nul 2>&1
|
||||
|
||||
:: 退出旧网络
|
||||
echo 退出旧网络...
|
||||
zerotier-cli leave 12ac4a1e71a3002511
|
||||
|
||||
echo 操作已完成
|
||||
goto exit0
|
||||
|
||||
:exit1
|
||||
echo ERROR:脚本异常退出
|
||||
pause
|
||||
|
||||
:exit0
|
||||
echo 操作成功完成!
|
||||
pause
|
||||
@@ -1,36 +0,0 @@
|
||||
# 检查是否安装了 ZeroTier
|
||||
# if (-not (Test-Path "zerotier-cli")) {
|
||||
# Write-Host "未检测到 ZeroTier 安装,退出..."
|
||||
# exit 1
|
||||
# }
|
||||
|
||||
# 检查管理员权限
|
||||
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
|
||||
if (-not $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||
Write-Host "请以管理员身份运行此脚本。"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 检查是否安装了 curl
|
||||
# if (-not (Test-Path "C:\Program Files\curl\bin\curl.exe")) {
|
||||
# Write-Host "未检测到 curl 安装,退出..."
|
||||
# exit 1
|
||||
# }
|
||||
|
||||
# 下载 planet 文件
|
||||
Write-Host "正在下载 planet 文件..."
|
||||
& "C:\Program Files\curl\bin\curl.exe" -s https://o.nmgjg.com.cn/install/zerotier/planet -o "C:\ProgramData\ZeroTier\One\planet"
|
||||
|
||||
# 加入新网络
|
||||
Write-Host "planet 文件下载完成,正在加入网络..."
|
||||
& "zerotier-cli" join af7c492762d601cd
|
||||
|
||||
# 重启服务
|
||||
Write-Host "正在重启 ZeroTier 服务..."
|
||||
Restart-Service -Name "ZeroTierOneService" -Force
|
||||
|
||||
# 退出旧网络
|
||||
Write-Host "退出旧网络..."
|
||||
& "zerotier-cli" leave 12ac4a1e71a3002511
|
||||
|
||||
Write-Host "操作已完成"
|
||||
@@ -18,9 +18,9 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<!-- 这两行加载太tm慢了!!!私人废物CDN!!! -->
|
||||
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css"> -->
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
|
||||
@@ -29,14 +29,14 @@
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.task-list-item-checkbox {
|
||||
margin-left: -20px;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
.task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.task-list-item-checkbox {
|
||||
margin-left: -20px;
|
||||
vertical-align: middle;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
@@ -139,17 +139,17 @@
|
||||
</head>
|
||||
<body class="vscode-body vscode-light">
|
||||
<h1 id="内网穿透升级通知">内网穿透升级通知</h1>
|
||||
<p>因设备数量增加,超过官方免费版 Zerotier 25 个设备的限制,且官方服务器在国外,访问不稳定,我计划<strong>在近 2 月内</strong>将所有办公室设备进行逐步迁移。</p>
|
||||
<p>因设备数量增加,超过官方免费版 Zerotier 25 个设备的限制,且官方服务器在国外,访问不稳定,我计划<strong>在近两个月内</strong>将所有办公室设备进行逐步迁移。</p>
|
||||
<h2 id="影响">影响</h2>
|
||||
<ol>
|
||||
<li>迁移过程中大部分电脑不影响正常使用,所有内部服务将在两个网络上同时提供服务制止迁移结束</li>
|
||||
<li>因 IOS 设备不越狱无法修改 planet 文件,届时<strong>所有 IOS 设备将无法使用内网穿透</strong>*(其实这个影响不大,设备数量不多)*</li>
|
||||
<li>迁移过程中大部分电脑不影响正常使用,所有内部服务将在两个网络上同时提供服务直至迁移结束</li>
|
||||
<li>因 iOS 设备不越狱无法修改 Planet 文件,届时<strong>所有 iOS 设备将无法使用内网穿透</strong>(备注:当前受影响设备数量不多)</li>
|
||||
</ol>
|
||||
<h2 id="方式">方式</h2>
|
||||
<ul>
|
||||
<li>本次迁移使用<strong>远程编辑配置文件</strong>的方式,<strong>请各位在看的这个通知的当天晚上不要关闭自己的电脑</strong>(特殊情况除外)</li>
|
||||
<li>本次迁移使用<strong>远程编辑配置文件</strong>的方式,<strong>请各位在收到本通知的当天晚上保持电脑开启</strong>(特殊情况除外)</li>
|
||||
<li>我会通过私有 Windows 配置服务器自动配置 Windows 电脑,完成后自动关机,无须干预</li>
|
||||
<li>过程中<strong>理论上不影响电脑正常使用</strong>手动重启后生效</li>
|
||||
<li>过程中<strong>理论上不影响电脑正常使用</strong>,手动重启后生效</li>
|
||||
<li>其他系统需手动更改</li>
|
||||
<li>安卓设备需使用第三方客户端</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
# 内网穿透升级通知
|
||||
因设备数量增加,超过官方免费版 Zerotier 25 个设备的限制,且官方服务器在国外,访问不稳定,我计划**在近 2 月内**将所有办公室设备进行逐步迁移。
|
||||
|
||||
因设备数量增加,超过官方免费版 Zerotier 25 个设备的限制,且官方服务器在国外,访问不稳定,我计划**在近两个月内**将所有办公室设备进行逐步迁移。
|
||||
|
||||
## 影响
|
||||
1. 迁移过程中大部分电脑不影响正常使用,所有内部服务将在两个网络上同时提供服务制止迁移结束
|
||||
2. 因 IOS 设备不越狱无法修改 planet 文件,届时**所有 IOS 设备将无法使用内网穿透***(其实这个影响不大,设备数量不多)*
|
||||
1. 迁移过程中大部分电脑不影响正常使用,所有内部服务将在两个网络上同时提供服务直至迁移结束
|
||||
2. 因 iOS 设备不越狱无法修改 Planet 文件,届时**所有 iOS 设备将无法使用内网穿透**(备注:当前受影响设备数量不多)
|
||||
|
||||
## 方式
|
||||
- 本次迁移使用**远程编辑配置文件**的方式,**请各位在看的这个通知的当天晚上不要关闭自己的电脑**(特殊情况除外)
|
||||
- 本次迁移使用**远程编辑配置文件**的方式,**请各位在收到本通知的当天晚上保持电脑开启**(特殊情况除外)
|
||||
- 我会通过私有 Windows 配置服务器自动配置 Windows 电脑,完成后自动关机,无须干预
|
||||
- 过程中**理论上不影响电脑正常使用**手动重启后生效
|
||||
- 过程中**理论上不影响电脑正常使用**,手动重启后生效
|
||||
- 其他系统需手动更改
|
||||
- 安卓设备需使用第三方客户端
|
||||
|
||||
## 时间
|
||||
2025 年 5 月 - 2025 年 6 月
|
||||
|
||||
|
||||
**感谢配合!**
|
||||
Reference in New Issue
Block a user