mirror of
https://github.com/elseif/MikroTikPatch.git
synced 2026-09-04 22:45:47 +00:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a988945f52 | ||
|
|
e94750a0d8 | ||
|
|
489427c34f | ||
|
|
f7a2316049 | ||
|
|
7410c6dc6b | ||
|
|
fc1d950da6 | ||
|
|
622ba70c2a | ||
|
|
4761e53917 | ||
|
|
74a6a9c8dd | ||
|
|
e29a43041c | ||
|
|
3dc5e43434 | ||
|
|
68dcd99bc0 | ||
|
|
63bff2eed4 | ||
|
|
7163a9d629 | ||
|
|
1403e9c3d5 | ||
|
|
e7899eef0a | ||
|
|
3bb2470535 | ||
|
|
072d684830 | ||
|
|
e2387c9ab3 | ||
|
|
3d7033276a | ||
|
|
34aba15f4c | ||
|
|
e6b0e3a7c7 | ||
|
|
bf1143fa81 | ||
|
|
53cfc32c64 | ||
|
|
4522e4c245 | ||
|
|
155823c638 | ||
|
|
5ef16bd0a2 | ||
|
|
37bc80919a | ||
|
|
57a1f98516 | ||
|
|
45cfa3693a | ||
|
|
bc4887e9e5 | ||
|
|
cd727fe33c |
69
.github/workflows/build_docker.yml
vendored
69
.github/workflows/build_docker.yml
vendored
@@ -7,14 +7,19 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
|
force:
|
||||||
|
description: "Force rebuild even if version already exists"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
jobs:
|
jobs:
|
||||||
Prepare:
|
Prepare:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
outputs:
|
outputs:
|
||||||
MATRIX: ${{ steps.get_versions.outputs.MATRIX }}
|
MATRIX: ${{ steps.filter_matrix.outputs.MATRIX }}
|
||||||
steps:
|
steps:
|
||||||
- name: Get versions and generate matrix
|
- name: Get versions and generate matrix
|
||||||
id: get_versions
|
id: get_versions
|
||||||
@@ -51,13 +56,53 @@ jobs:
|
|||||||
echo "Generated matrix: $MATRIX"
|
echo "Generated matrix: $MATRIX"
|
||||||
echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT
|
echo "MATRIX=$MATRIX" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Log in to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Filter already-published versions from matrix
|
||||||
|
id: filter_matrix
|
||||||
|
env:
|
||||||
|
IMAGE: "ghcr.io/${{ github.repository_owner }}/chr"
|
||||||
|
FORCE: ${{ github.event.inputs.force == 'true' }}
|
||||||
|
run: |
|
||||||
|
MATRIX='${{ steps.get_versions.outputs.MATRIX }}'
|
||||||
|
if [ "$FORCE" = "true" ]; then
|
||||||
|
echo "Force mode enabled, skipping version existence check."
|
||||||
|
FILTERED="$MATRIX"
|
||||||
|
else
|
||||||
|
FILTERED='[]'
|
||||||
|
while read -r row; do
|
||||||
|
VERSION=$(echo "$row" | jq -r '.version')
|
||||||
|
CHANNEL=$(echo "$row" | jq -r '.channel')
|
||||||
|
|
||||||
|
set +e
|
||||||
|
docker manifest inspect "${IMAGE}:${VERSION}" >/dev/null 2>&1
|
||||||
|
RET=$?
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$RET" -eq 0 ]; then
|
||||||
|
echo "Skipping already published version: ${VERSION}"
|
||||||
|
else
|
||||||
|
FILTERED=$(echo "$FILTERED" | jq -c --arg VERSION "$VERSION" --arg CHANNEL "$CHANNEL" '. + [{"version": $VERSION, "channel": $CHANNEL}]')
|
||||||
|
fi
|
||||||
|
done < <(echo "$MATRIX" | jq -c '.[]')
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Filtered matrix: $FILTERED"
|
||||||
|
echo "MATRIX=$FILTERED" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
Build:
|
Build:
|
||||||
|
if: needs.Prepare.outputs.MATRIX != '[]'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
needs: Prepare
|
needs: Prepare
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
matrix:
|
matrix:
|
||||||
include: ${{ fromJson(needs.Prepare.outputs.MATRIX) }}
|
include: ${{ fromJson(needs.Prepare.outputs.MATRIX != '[]' && needs.Prepare.outputs.MATRIX || '[{"version":"__NO_BUILD__","channel":""}]') }}
|
||||||
env:
|
env:
|
||||||
TZ: 'Asia/Shanghai'
|
TZ: 'Asia/Shanghai'
|
||||||
VERSION: ${{ matrix.version }}
|
VERSION: ${{ matrix.version }}
|
||||||
@@ -72,13 +117,21 @@ jobs:
|
|||||||
echo "Version: ${{ env.VERSION }}"
|
echo "Version: ${{ env.VERSION }}"
|
||||||
echo "Channel: ${{ env.CHANNEL }}"
|
echo "Channel: ${{ env.CHANNEL }}"
|
||||||
|
|
||||||
|
- name: Log in to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Download CHR image
|
- name: Download CHR image
|
||||||
run: |
|
run: |
|
||||||
# x86 架构
|
# x86 架构
|
||||||
mkdir -p "amd64"
|
mkdir -p "amd64"
|
||||||
wget -nv -O "amd64/chr-$VERSION.img.zip" \
|
wget -nv -O "amd64/chr-$VERSION.img.zip" \
|
||||||
"https://github.com/elseif/MikroTikPatch/releases/download/$VERSION/chr-$VERSION.img.zip"
|
"https://github.com/elseif/MikroTikPatch/releases/download/$VERSION/chr-$VERSION-legacy-bios.img.zip"
|
||||||
unzip "amd64/chr-$VERSION.img.zip" -d "amd64/"
|
unzip "amd64/chr-$VERSION.img.zip" -d "amd64/"
|
||||||
|
mv "amd64/chr-$VERSION-legacy-bios.img" "amd64/chr.img"
|
||||||
rm "amd64/chr-$VERSION.img.zip"
|
rm "amd64/chr-$VERSION.img.zip"
|
||||||
|
|
||||||
# arm64 架构
|
# arm64 架构
|
||||||
@@ -86,6 +139,7 @@ jobs:
|
|||||||
wget -nv -O "arm64/chr-$VERSION-arm64.img.zip" \
|
wget -nv -O "arm64/chr-$VERSION-arm64.img.zip" \
|
||||||
"https://github.com/elseif/MikroTikPatch/releases/download/$VERSION-arm64/chr-$VERSION-arm64.img.zip"
|
"https://github.com/elseif/MikroTikPatch/releases/download/$VERSION-arm64/chr-$VERSION-arm64.img.zip"
|
||||||
unzip "arm64/chr-$VERSION-arm64.img.zip" -d "arm64/"
|
unzip "arm64/chr-$VERSION-arm64.img.zip" -d "arm64/"
|
||||||
|
mv "arm64/chr-$VERSION-arm64.img" "arm64/chr.img"
|
||||||
rm "arm64/chr-$VERSION-arm64.img.zip"
|
rm "arm64/chr-$VERSION-arm64.img.zip"
|
||||||
|
|
||||||
ls -la amd64/ arm64/
|
ls -la amd64/ arm64/
|
||||||
@@ -185,13 +239,6 @@ jobs:
|
|||||||
ENTRYPOINT ["/start.sh"]
|
ENTRYPOINT ["/start.sh"]
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v4
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v4
|
uses: docker/setup-qemu-action@v4
|
||||||
|
|
||||||
|
|||||||
38
.github/workflows/main.yml
vendored
38
.github/workflows/main.yml
vendored
@@ -2,7 +2,7 @@
|
|||||||
name: Patch Mikrotik RouterOS
|
name: Patch Mikrotik RouterOS
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "00 10 * * *" # At UTC 10:00 (Beijing 18:00) on every day
|
- cron: "00 09 * * *" # At UTC 09:00 (Beijing 17:00) on every day
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
@@ -35,25 +35,25 @@ jobs:
|
|||||||
release: true
|
release: true
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
Patch_Testing_V7:
|
# Patch_Testing_V7:
|
||||||
if: |
|
# if: |
|
||||||
(github.event_name == 'schedule') ||
|
# (github.event_name == 'schedule') ||
|
||||||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
|
# (github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
|
||||||
uses: ./.github/workflows/patch_v7.yml
|
# uses: ./.github/workflows/patch_v7.yml
|
||||||
with:
|
# with:
|
||||||
channel: testing
|
# channel: testing
|
||||||
release: true
|
# release: true
|
||||||
secrets: inherit
|
# secrets: inherit
|
||||||
|
|
||||||
Patch_Development_V7:
|
# Patch_Development_V7:
|
||||||
if: |
|
# if: |
|
||||||
(github.event_name == 'schedule') ||
|
# (github.event_name == 'schedule') ||
|
||||||
(github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
|
# (github.event_name == 'workflow_dispatch' && (github.event.inputs.version == 'all' || github.event.inputs.version == 'v7'))
|
||||||
uses: ./.github/workflows/patch_v7.yml
|
# uses: ./.github/workflows/patch_v7.yml
|
||||||
with:
|
# with:
|
||||||
channel: development
|
# channel: development
|
||||||
release: true
|
# release: true
|
||||||
secrets: inherit
|
# secrets: inherit
|
||||||
|
|
||||||
Patch_Stable_V6:
|
Patch_Stable_V6:
|
||||||
if: |
|
if: |
|
||||||
|
|||||||
4
.github/workflows/patch_v7.yml
vendored
4
.github/workflows/patch_v7.yml
vendored
@@ -10,8 +10,8 @@ on:
|
|||||||
options:
|
options:
|
||||||
- stable
|
- stable
|
||||||
- long-term
|
- long-term
|
||||||
- testing
|
# - testing
|
||||||
- development
|
# - development
|
||||||
arch:
|
arch:
|
||||||
description: 'Architecture (x86, arm64)'
|
description: 'Architecture (x86, arm64)'
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
120
README.md
120
README.md
@@ -5,66 +5,100 @@
|
|||||||
[](./LICENSE)
|
[](./LICENSE)
|
||||||
[](./CODE_OF_CONDUCT.md)
|
[](./CODE_OF_CONDUCT.md)
|
||||||
|
|
||||||
|
**English** | [中文](./README_CN.md)
|
||||||
|
|
||||||
## ⚠️ 重要声明
|
> ## ⚠️ Important Notice
|
||||||
**此项目及工具仅供测试用途。使用风险自负。生产环境请使用官方授权版本。**
|
>
|
||||||
|
> **This project and its tools are for testing purposes only. Use at your own risk. Please use the officially licensed version for production environments.**
|
||||||
|
|
||||||
## 架构:x86、arm64
|
## 🏗️ Architecture Support
|
||||||
- **主页:** https://mikrotik.ltd/
|
### x86 / arm64 (This Project)
|
||||||
- **演示:** https://demo.mikrotik.ltd/
|
- **Homepage:** https://mikrotik.ltd/
|
||||||
- **授权: 安装option.npk后将自动授予最高级别许可证。**
|
- **Demo:** https://demo.mikrotik.ltd/
|
||||||
- **源代码:** https://github.com/elseif/MikroTikPatch
|
- **License: Installing `option.npk` will automatically grant the highest-level license.**
|
||||||
- **授权BOT:** https://t.me/ROS_Keygen_Bot
|
- **License Bot:** https://t.me/ROS_Keygen_Bot
|
||||||
- **Docker:** `docker run -d --privileged --name chr ghcr.io/elseif/chr:latest`
|
- **Docker:** `docker run -d --privileged --name chr ghcr.io/elseif/chr:latest`
|
||||||
|
|
||||||
## 架构:arm64, arm, mipsbe, mmips, ppc, smips, x86
|
### arm64, arm, mipsbe, mmips, ppc, smips, x86
|
||||||
- **主页:** https://routeros.ltd/
|
- **Homepage:** https://routeros.ltd/
|
||||||
- **授权: 需要赞助**,*CHR版本(x86/Arm64)支持在线直接获取授权*
|
- **License: Sponsorship required.** *CHR versions (x86/Arm64) support online direct licensing.*
|
||||||
- **功能:** 支持在线自定义制作品牌包
|
- **Features:** Supports online custom brand package creation.
|
||||||
|
---
|
||||||
|
|
||||||
## 支持的云功能
|
## 🔧 Feature Guide
|
||||||
| 功能 | 命令 |
|
> All features below require the `option.npk` package to be installed first.
|
||||||
|------|------|
|
### 1. Enable Container Mode (No Physical Reboot Required)
|
||||||
| 在线升级 | `system/package/update/install` |
|
```bash
|
||||||
| DDNS | `ip/cloud/set ddns-enabled=yes` |
|
# Step 1: Enable container mode
|
||||||
| 云备份 | `/system/backup/cloud/upload-file action=create-and-upload password=any` |
|
/system/device-mode/update container=yes
|
||||||
|
# Step 2: Force reboot (execute in a new terminal)
|
||||||
|
/system/shell cmd="reboot -f"
|
||||||
|
```
|
||||||
|
### 2. Shell Access
|
||||||
|
#### A. Via Terminal
|
||||||
|
```bash
|
||||||
|
/system/shell
|
||||||
|
# or shorthand
|
||||||
|
/sh
|
||||||
|
```
|
||||||
|
#### B. Via SSH / Telnet
|
||||||
|
```bash
|
||||||
|
# Username: devel
|
||||||
|
# Password: Same as the admin password
|
||||||
|
ssh devel@<router-ip>
|
||||||
|
```
|
||||||
|
### 3. x86 Architecture: CHR ↔ x86 Mode Switch
|
||||||
|
|
||||||
## 启用容器模式(无需物理重启)
|
```bash
|
||||||
1. 安装 `option.npk` 包;
|
# Execute after entering shell
|
||||||
2. 打开终端执行:`system/device-mode/update container=yes`;
|
keygen chr # Switch to CHR mode
|
||||||
3. 打开新终端执行:`system/shell cmd="reboot -f"`。
|
keygen x86 # Switch to x86 mode
|
||||||
|
```
|
||||||
|
### 4. Boot Auto-Run Script
|
||||||
|
|
||||||
## 通过终端进入shell
|
1. Create or edit the `/rw/disk/rc.local` file.
|
||||||
- 安装 `option.npk` 包
|
2. Write your script content, for example:
|
||||||
- 打开终端执行:`/system/shell` 或 `/sh`
|
|
||||||
|
|
||||||
## 通过ssh或telnet进入shell
|
|
||||||
- 安装 `option.npk` 包
|
|
||||||
- ssh或telnet登录用户名为:`devel`,密码与`admin`密码相同。
|
|
||||||
|
|
||||||
## x86架构支持CHR和x86模式切换
|
|
||||||
- 安装 `option.npk` 包
|
|
||||||
- 进入shell执行:`keygen chr` 或 `keygen x86`
|
|
||||||
|
|
||||||
## 支持开机自动运行脚本
|
|
||||||
- 安装 `option.npk` 包
|
|
||||||
- 创建或者编辑文件目录下的`rc.local`文件,即:`/rw/disk/rc.local`文件
|
|
||||||
- 写入脚本内容,例如:
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# This script will be executed *before* RouterOS *loader* start.
|
# This script will be executed *before* RouterOS *loader* start.
|
||||||
# You can put your own initialization stuff in here
|
# You can put your own initialization stuff in here
|
||||||
echo "Hello, world!"
|
echo "Hello, world!"
|
||||||
```
|
```
|
||||||
- 开机启动时将看到输出增加:`Starting rc.local...`
|
|
||||||
- 启动后进入shell执行:`cat /ram/startup.catlog | grep 'Hello'` 查看输出。
|
3. You will see the output during boot: `Starting rc.local...`
|
||||||
|
4. After boot, check the output:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Enter shell
|
||||||
|
cat /ram/startup.catlog | grep 'Hello'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ☁️ Cloud Services
|
||||||
|
|
||||||
|
| Feature | Command |
|
||||||
|
|------|------|
|
||||||
|
| Online Upgrade | `system/package/update/install` |
|
||||||
|
| Dynamic DNS | `ip/cloud/set ddns-enabled=yes` |
|
||||||
|
| Cloud Backup | `/system/backup/cloud/upload-file action=create-and-upload password=any` |
|
||||||
|
| Internet Detection | `/interface/detect-internet/set detect-interface-list=all` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📚 Resources
|
||||||
|
|
||||||
|
- [MikroTik Official Documentation](https://manual.mikrotik.com/)
|
||||||
|
- [Telegram Group](https://t.me/+99Mw06p3K7NlMmNl)
|
||||||
|
- [GitHub Source Code](https://github.com/elseif/MikroTikPatch)
|
||||||
|
|
||||||
|
|
||||||
### 更多关于RouterOS的信息请查看: https://manual.mikrotik.com/
|
---
|
||||||
|
## 💖 Sponsors
|
||||||
### 感谢赞助
|
|
||||||
[DartNode(aff)](https://dartnode.com?aff=SnazzyLobster067) | [ZMTO(aff)](https://console.zmto.com/?affid=1588) | [Vultr(aff)](https://www.vultr.com/?ref=9807160-9J)
|
|
||||||
[](https://dartnode.com "Powered by DartNode - Free VPS for Open Source")
|
[](https://dartnode.com "Powered by DartNode - Free VPS for Open Source")
|
||||||
|
[DartNode(aff)](https://dartnode.com?aff=SnazzyLobster067) | [ZMTO(aff)](https://console.zmto.com/?affid=1588) | [Vultr(aff)](https://www.vultr.com/?ref=9807160-9J)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
115
README_CN.md
Normal file
115
README_CN.md
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
# MikroTik RouterOS Patch
|
||||||
|
[](https://github.com/elseif/MikroTikPatch/actions/workflows/main.yml)
|
||||||
|

|
||||||
|
|
||||||
|
[](./LICENSE)
|
||||||
|
[](./CODE_OF_CONDUCT.md)
|
||||||
|
|
||||||
|
[English](./README.md) | **中文**
|
||||||
|
|
||||||
|
>## ⚠️ 重要声明
|
||||||
|
>
|
||||||
|
>**此项目及工具仅供测试用途。使用风险自负。生产环境请使用官方授权版本。**
|
||||||
|
|
||||||
|
## 🏗️ 架构支持
|
||||||
|
### x86 / arm64 (本项目)
|
||||||
|
- **主页:** https://mikrotik.ltd/
|
||||||
|
- **演示:** https://demo.mikrotik.ltd/
|
||||||
|
- **授权: 安装option.npk后将自动授予最高级别许可证。**
|
||||||
|
- **授权BOT:** https://t.me/ROS_Keygen_Bot
|
||||||
|
- **Docker:** `docker run -d --privileged --name chr ghcr.io/elseif/chr:latest`
|
||||||
|
|
||||||
|
### arm64, arm, mipsbe, mmips, ppc, smips, x86
|
||||||
|
- **主页:** https://routeros.ltd/
|
||||||
|
- **授权: 需要赞助**,*CHR版本(x86/Arm64)支持在线直接获取授权*
|
||||||
|
- **功能:** 支持在线自定义制作品牌包
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 功能指南
|
||||||
|
> 以下功能均需先安装 `option.npk` 包。
|
||||||
|
### 1. 启用容器模式(无需物理重启)
|
||||||
|
```bash
|
||||||
|
# 步骤 1:启用容器模式
|
||||||
|
/system/device-mode/update container=yes
|
||||||
|
# 步骤 2:强制重启(在新终端中执行)
|
||||||
|
/system/shell cmd="reboot -f"
|
||||||
|
```
|
||||||
|
### 2. Shell 访问
|
||||||
|
#### A. 通过终端
|
||||||
|
```bash
|
||||||
|
/system/shell
|
||||||
|
# 或简写
|
||||||
|
/sh
|
||||||
|
```
|
||||||
|
#### B. 通过 SSH / Telnet
|
||||||
|
```bash
|
||||||
|
# 用户名: devel
|
||||||
|
# 密码: 与 admin 密码相同
|
||||||
|
ssh devel@<router-ip>
|
||||||
|
```
|
||||||
|
### 3. x86 架构:CHR ↔ x86 模式切换
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 进入 shell 后执行
|
||||||
|
keygen chr # 切换为 CHR 模式
|
||||||
|
keygen x86 # 切换为 x86 模式
|
||||||
|
```
|
||||||
|
### 4. 开机自动运行脚本
|
||||||
|
|
||||||
|
1. 创建或编辑 `/rw/disk/rc.local` 文件
|
||||||
|
2. 写入脚本内容,例如:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/bin/sh
|
||||||
|
# This script will be executed *before* RouterOS *loader* start.
|
||||||
|
# You can put your own initialization stuff in here
|
||||||
|
echo "Hello, world!"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 开机启动时将看到输出:`Starting rc.local...`
|
||||||
|
4. 启动后查看输出:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 进入 shell
|
||||||
|
cat /ram/startup.catlog | grep 'Hello'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ☁️ 云服务
|
||||||
|
|
||||||
|
| 功能 | 命令 |
|
||||||
|
|------|------|
|
||||||
|
| 在线升级 | `system/package/update/install` |
|
||||||
|
| 动态域名 | `ip/cloud/set ddns-enabled=yes` |
|
||||||
|
| 云备份 | `/system/backup/cloud/upload-file action=create-and-upload password=any` |
|
||||||
|
| 网络检测 | `/interface/detect-internet/set detect-interface-list=all` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📚 相关资源
|
||||||
|
|
||||||
|
- [MikroTik 官方文档](https://manual.mikrotik.com/)
|
||||||
|
- [Telegram 群组](https://t.me/+99Mw06p3K7NlMmNl)
|
||||||
|
- [GitHub 源码](https://github.com/elseif/MikroTikPatch)
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
## 💖 感谢赞助
|
||||||
|
[](https://dartnode.com "Powered by DartNode - Free VPS for Open Source")
|
||||||
|
[DartNode(aff)](https://dartnode.com?aff=SnazzyLobster067) | [ZMTO(aff)](https://console.zmto.com/?affid=1588) | [Vultr(aff)](https://www.vultr.com/?ref=9807160-9J)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
6
chr.sh
6
chr.sh
@@ -294,6 +294,12 @@ create_autorun() {
|
|||||||
ask_until "$MSG_ADMIN_PASSWORD" "$RANDOM_ADMIN_PASS"
|
ask_until "$MSG_ADMIN_PASSWORD" "$RANDOM_ADMIN_PASS"
|
||||||
RANDOM_ADMIN_PASS=$resp
|
RANDOM_ADMIN_PASS=$resp
|
||||||
cat <<EOF > "$MNT/rw/autorun.scr"
|
cat <<EOF > "$MNT/rw/autorun.scr"
|
||||||
|
/tool mac-server set allowed-interface-list=none
|
||||||
|
/tool mac-server mac-winbox set allowed-interface-list=none
|
||||||
|
/tool mac-server ping set enabled=no
|
||||||
|
/ip neighbor discovery-settings set discover-interface-list=none
|
||||||
|
/tool bandwidth-server set enabled=no
|
||||||
|
/ip dns set allow-remote-requests=no
|
||||||
/user set admin password="$RANDOM_ADMIN_PASS"
|
/user set admin password="$RANDOM_ADMIN_PASS"
|
||||||
/ip dns set servers=$DNS
|
/ip dns set servers=$DNS
|
||||||
/ip address add address=$ADDRESS interface=[/interface ethernet get [find mac-address=$MAC] name]
|
/ip address add address=$ADDRESS interface=[/interface ethernet get [find mac-address=$MAC] name]
|
||||||
|
|||||||
10
index.html
10
index.html
@@ -442,9 +442,9 @@
|
|||||||
|
|
||||||
// Fetch latest version numbers from MikroTik servers
|
// Fetch latest version numbers from MikroTik servers
|
||||||
const loadingOverlay = document.getElementById("loading");
|
const loadingOverlay = document.getElementById("loading");
|
||||||
const [routeros7_stable, routeros7_testing, routeros6_longterm, routeros6_stable] = await Promise.all([
|
const [routeros7_stable, routeros7_longterm, routeros6_longterm, routeros6_stable] = await Promise.all([
|
||||||
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.stable?ts=${Date.now()}`, "7.19.4"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.stable?ts=${Date.now()}`, "7.19.4"),
|
||||||
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.testing?ts=${Date.now()}`, "7.20rc1"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWESTa7.long-term?ts=${Date.now()}`, "7.20rc1"),
|
||||||
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.long-term?ts=${Date.now()}`, "6.49.18"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.long-term?ts=${Date.now()}`, "6.49.18"),
|
||||||
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.stable?ts=${Date.now()}`, "6.49.19"),
|
fetch_latest_versions(`https://upgrade.mikrotik.ltd/routeros/NEWEST6.stable?ts=${Date.now()}`, "6.49.19"),
|
||||||
]);
|
]);
|
||||||
@@ -456,7 +456,7 @@
|
|||||||
const downloads =[
|
const downloads =[
|
||||||
{
|
{
|
||||||
title:"RouterOS v7",
|
title:"RouterOS v7",
|
||||||
versions:[ { title:"Stable", version:routeros7_stable }, { title:"Testing", version:routeros7_testing } ],
|
versions:[ { title:"Long-Term", version:routeros7_longterm },{ title:"Stable", version:routeros7_stable } ],
|
||||||
groups: [
|
groups: [
|
||||||
{ title:"ARM64 / AMPERE", arch:"arm64", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"ISO image for AMPERE", type:"iso" } ] },
|
{ title:"ARM64 / AMPERE", arch:"arm64", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"ISO image for AMPERE", type:"iso" } ] },
|
||||||
{ title:"X86", arch:"x86", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"CD Image", type:"iso" }, { title:"Install image", type:"install" } ] },
|
{ title:"X86", arch:"x86", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"CD Image", type:"iso" }, { title:"Install image", type:"install" } ] },
|
||||||
@@ -472,7 +472,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:"Cloud Hosted Router",
|
title:"Cloud Hosted Router",
|
||||||
versions:[ { title:"Long-Term", version:routeros6_longterm }, { title:"Stable", version:routeros6_stable }, { title:"Stable", version:routeros7_stable }, { title:"Testing", version:routeros7_testing } ],
|
versions:[ { title:"Long-Term", version:routeros6_longterm }, { title:"Stable", version:routeros6_stable }, { title:"Long-Term", version:routeros7_longterm }, { title:"Stable", version:routeros7_stable } ],
|
||||||
groups:[
|
groups:[
|
||||||
{ title:"X86", arch:"x86", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"VHDX image", type:"vhdx" }, { title:"VMDK image", type:"vmdk" }, { title:"VDI image", type:"vdi" }, { title:"VirtualPC image", type:"vhd" }, { title:"Raw disk image", type:"img" }, { title:"OVA template", type:"ova" } ] },
|
{ title:"X86", arch:"x86", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"VHDX image", type:"vhdx" }, { title:"VMDK image", type:"vmdk" }, { title:"VDI image", type:"vdi" }, { title:"VirtualPC image", type:"vhd" }, { title:"Raw disk image", type:"img" }, { title:"OVA template", type:"ova" } ] },
|
||||||
{ title:"ARM64 / AMPERE", arch:"arm64", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"VHDX image", type:"vhdx" }, { title:"VMDK image", type:"vmdk" }, { title:"VDI image", type:"vdi" }, { title:"VirtualPC image", type:"vhd" }, { title:"Raw disk image", type:"img" } ] }
|
{ title:"ARM64 / AMPERE", arch:"arm64", downloads:[ { title:"Main package", type:"main" }, { title:"Extra packages", type:"extra" }, { title:"VHDX image", type:"vhdx" }, { title:"VMDK image", type:"vmdk" }, { title:"VDI image", type:"vdi" }, { title:"VirtualPC image", type:"vhd" }, { title:"Raw disk image", type:"img" } ] }
|
||||||
@@ -709,8 +709,8 @@
|
|||||||
|
|
||||||
// Generate version selection buttons
|
// Generate version selection buttons
|
||||||
versionBtnsContainer.innerHTML = `
|
versionBtnsContainer.innerHTML = `
|
||||||
|
<button data-version="${routeros7_longterm}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Long-Term</button>
|
||||||
<button data-version="${routeros7_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Stable</button>
|
<button data-version="${routeros7_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Stable</button>
|
||||||
<button data-version="${routeros7_testing}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v7 Testing</button>
|
|
||||||
<button data-version="${routeros6_longterm}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Long-Term</button>
|
<button data-version="${routeros6_longterm}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Long-Term</button>
|
||||||
<button data-version="${routeros6_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Stable</button>
|
<button data-version="${routeros6_stable}" class="px-3 py-1.5 text-sm font-medium rounded-md hover:bg-blue-200 dark:hover:bg-gray-600 transition-all">v6 Stable</button>
|
||||||
`;
|
`;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user