github-actions[bot]andClaude Opus 5.5 9c51d3f8d2 feat: 适配 EasyTier 2.7.0(破坏性参数迁移、新参数补齐、连接信息加载优化与完整中文 i18n)
- 版本统一到 2.7.0:version.mk、easytier/easytier-noweb/luci-app-easytier 的 PKG_VERSION、
  download.sh 与 init.d 的兜底 tag、upload.htm 占位符与前端兜底值,全部由 2.6.x 改为 v2.7.0。
  luci-app-easytier/Makefile 新增 PKG_PO_VERSION:=$(PKG_VERSION),使 i18n 语言包 ipk 的
  文件名跟随插件版本号,而不是 LuCI feed 的 git 时间戳版本(git-YY.DDD.SSSSS-hash)。

- VPN Portal 破坏性变更适配:2.7.0 起 --vpn-portal 只接受 wg://主机:端口,客户端必须用
  --vpn-portal-client 名称=网段 逐个枚举,且门户必须有私钥,否则实例启动即退出。
  init.d 按新格式拆分拼接并做格式/私钥校验,遇到旧写法(URL path 带网段)或缺私钥时
  跳过门户启动并写入中文日志提示;CBI 新增 VPN 门户客户端列表(DynamicList)与门户私钥
  (password,经 ET_VPN_PORTAL_PRIVATE_KEY 环境变量下发,避免出现在进程命令行);
  config.toml 增加新版 [vpn_portal_config] 注释示例,并说明顶层 rpc_portal 会被静默忽略
  (RPC 端口只能由 -r 指定)。

- 补齐 2.7.0 常用新参数(CBI 表单 + get_etconfig 读取 + 命令行拼接):
  --disable-upnp、--lazy-p2p、--need-p2p、--disable-relay-quic、
  --enable-relay-foreign-network-quic、--tld-dns-zone、--instance-recv-bps-limit、
  --socket-mark、--stun-servers、--tcp-stun-servers;--multi-thread 改为始终显式传
  true/false,避免 2.7.0 默认值变化导致界面勾选与实际运行不一致。

- easytier-web 新增参数:--heartbeat-min-response-ms、--heartbeat-timeout-ms、
  --gateway-peer-url、--gateway-relay-data(init.d 拼接 + controller 读写 +
  easytier_web.htm 表单字段)。

- 配置文件模式容错:check_config 改为同步执行 --check-config 并检查退出码,校验失败时把
  2.7.0 更严格的解析规则(旧 [vpn_portal_config] client_cidr、[flags] 未知键)写入日志提示。

- 进程守护:core 与 web 的 procd respawn 显式设为 3600 5 20(存活满 1 小时归零,
  1 小时内崩溃超过 20 次才判定为崩溃循环并放弃拉起),避免参数配置错误时无限重启刷日志。

- 连接信息卡片加载优化:改为按标签页按需拉取(parts 参数),CLI 结果在
  /tmp/easytier_conninfo 缓存 3 秒,只刷新当前标签页,移除每 5 秒全量 XHR.poll 与重复请求;
  前端改为 10 秒自动刷新、页面隐藏时跳过,XHR 增加 20 秒超时与失败提示,改善低性能设备体验。

- Web 服务器地址文案:说明 EasyTier 2.7.0 起必须填写完整 URL
  (udp://config-server.easytier.cn:22020/账户名),帮助文案与占位符同步更新。

- i18n 补全:新增统计指标(traffic_*、peer_rpc_errors、tcp_proxy_connect、
  udp_broadcast_relay_*、vpn_portal_* 等)与 ACL 规则统计(字段名、动作/协议/连接状态等取值)
  的中文翻译,po/templates 同步更新,cli.htm 增加 ACL 与统计输出的翻译映射。

feat: adapt to EasyTier 2.7.0 (breaking CLI/config migration, new flags, faster
connection-info loading, complete Chinese i18n)

- Bump every version string to 2.7.0 (version.mk, easytier/easytier-noweb/
  luci-app-easytier Makefiles, download.sh and init.d fallbacks, upload.htm placeholders),
  and set PKG_PO_VERSION:=$(PKG_VERSION) so the i18n ipk filename follows the plugin
  version instead of the LuCI feed git timestamp (git-YY.DDD.SSSSS-hash).
- Handle the breaking VPN Portal changes in 2.7.0: --vpn-portal now accepts only
  wg://host:port, clients must be enumerated via --vpn-portal-client NAME=CIDR and a
  private key is required, otherwise the instance exits on startup. init.d validates and
  splits accordingly and skips the portal with a Chinese log hint on legacy values or a
  missing key; CBI gains a client list (DynamicList) and a private-key field (password,
  passed via the ET_VPN_PORTAL_PRIVATE_KEY environment variable so it stays out of the
  process command line); config.toml documents the new [vpn_portal_config] layout and the
  silently ignored top-level rpc_portal (RPC port is only settable through -r).
- Add commonly used new flags: --disable-upnp, --lazy-p2p, --need-p2p,
  --disable-relay-quic, --enable-relay-foreign-network-quic, --tld-dns-zone,
  --instance-recv-bps-limit, --socket-mark, --stun-servers, --tcp-stun-servers;
  --multi-thread is now always passed explicitly as true/false.
- Add new easytier-web options: --heartbeat-min-response-ms, --heartbeat-timeout-ms,
  --gateway-peer-url, --gateway-relay-data (init.d, controller and easytier_web.htm).
- Run --check-config synchronously in check_config and check its exit code, logging the
  stricter 2.7.0 parsing rules (legacy [vpn_portal_config] client_cidr, unknown [flags]
  keys) on failure.
- Set procd respawn to 3600 5 20 for both core and web (counter reset after one hour of
  uptime; give up only after more than 20 crashes within an hour) to avoid endless
  restart loops on misconfiguration.
- Speed up the connection-info card: per-tab on-demand fetching with a 3-second
  server-side cache, refresh only the active tab, drop the 5-second full XHR.poll;
  the front end now refreshes every 10 seconds, skips while the page is hidden, and uses
  a 20-second XHR timeout with proper error handling.
- Document that the Web server address requires a full URL since EasyTier 2.7.0.
- Complete Chinese translations for stats metrics and ACL rule output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:11:00 +08:00
2026-04-16 15:21:26 +08:00
2026-04-16 15:21:26 +08:00
2026-04-16 15:21:26 +08:00
2026-04-16 15:21:26 +08:00
2026-04-18 09:21:34 +08:00

luci-app-easytier

English | 简体中文

License OpenWrt Ask DeepWiki

OpenWrt LuCI web interface for managing EasyTier - a simple, secure, and decentralized VPN networking solution.

✨ Features

  • 🎨 Modern UI design with automatic light/dark theme switching
  • 📱 Perfect adaptation for mobile and desktop devices
  • 🌍 Full Chinese/English internationalization support
  • 📊 Real-time traffic monitoring and network interface status display
  • 🔄 Real-time performance metrics and version information
  • 📦 Support for compressed packages and binary file uploads
  • 🔧 Flexible configuration management with backup and restore

📋 Compatibility

OpenWrt Versions

  • ✅ OpenWrt 18.06 / 18.08
  • ✅ OpenWrt 19.x ~ 26.x
  • ✅ Support for IPK (22.03.x) and APK (SNAPSHOT) package formats

Architecture Support

  • ARM: aarch64, armv7, arm
  • MIPS: mips, mipsel
  • x86: x86_64

🚀 Quick Start

Method 1: Using Pre-compiled Packages

  1. Download the package for your architecture from Releases
  2. Upload to OpenWrt's /tmp directory
  3. Install:
# IPK package (OpenWrt 22.03.x)
opkg install /tmp/luci-app-easytier_*.ipk

# APK package (OpenWrt SNAPSHOT)
apk add --allow-untrusted /tmp/luci-app-easytier_*.apk
  1. Refresh your browser or re-login to LuCI interface
  2. Upload EasyTier binary in VPN → EasyTier

Method 2: GitHub Actions Auto-build

  1. Fork this repository
  2. Modify the architecture list in .github/workflows/build.yml (optional)
  3. Go to Actions page and manually trigger the Build-OpenWrt-EasyTier workflow
  4. Enter version number (e.g., v1.0.0) and release notes
  5. Wait for compilation to complete and download from Releases
image

Method 3: Local Compilation

# 1. Download OpenWrt SDK
wget https://downloads.openwrt.org/releases/22.03.7/targets/rockchip/armv8/openwrt-sdk-22.03.7-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz
tar -xJf openwrt-sdk-*.tar.xz
cd openwrt-sdk-*/

# 2. Clone the repository
git clone https://github.com/EasyTier/luci-app-easytier.git package/luci-app-easytier

# 3. Update feeds and configure
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig

# 4. Compile
make package/luci-app-easytier/compile V=s

# 5. Find the generated ipk
find bin/ -name "luci-app-easytier*.ipk"

📦 Dependencies

  • kmod-tun - TUN/TAP kernel module (required)
  • luci-compat - LuCI compatibility layer

Ensure kmod-tun is installed before installation:

opkg update
opkg install kmod-tun

🔧 Usage

Initial Configuration

  1. After installing the plugin, navigate to VPN → EasyTier
  2. Upload EasyTier binary files on the Upload Program page, or directly install the ipk/apk package containing the core (easytier.ipk / easytier.apk)
    • Supports single files: easytier-core, easytier-cli, easytier-web-embed
    • Supports compressed packages: .zip, .tar.gz, .tar
  3. Configure network parameters on the EasyTier Core page
  4. Enable and save the configuration

Configuration Methods

Two configuration methods are supported:

  1. Command-line parameters: Configure parameters through the LuCI interface
  2. Configuration file: Use the /etc/easytier/config.toml configuration file

Function Pages

  • Status - View running status, version info, connection info, and real-time traffic
  • EasyTier Core - Configure core parameters (network name, secret key, nodes, etc.)
  • Self-hosted Console - Configure easytier-web console
  • Logs - View running logs with level filtering support
  • Upload Program - Upload and manage EasyTier binary files

🛠️ Development Guide

Tech Stack

  • Backend: Lua 5.1 (LuCI legacy architecture)
  • Frontend: HTML + CSS + ES5 JavaScript
  • Rendering: Server-side rendering (SSR)
  • Internationalization: LuCI native i18n (.po files)

Development Requirements

Compatibility Principles

  • ✅ Must be compatible with OpenWrt 18.06 ~ 26.x
  • ✅ Use LuCI Lua1 architecture (also compatible with Lua2)
  • ❌ Do not use LuCI JS framework (view.js/form.js/rpc.js)
  • ❌ Do not use ES6+ syntax (let/const/arrow functions/fetch)

Frontend Standards

// ✅ Allowed
var xhr = new XMLHttpRequest();
function handleClick() { }
document.getElementById('id');

// ❌ Forbidden
const data = await fetch('/api');
let result = () => {};
import module from 'module';

Backend Standards

-- ✅ Use Lua1 API
local http = require "luci.http"
local uci = require "luci.model.uci".cursor()
http.write_json({success = true})

-- ❌ Do not use Lua2-specific syntax
-- Do not use new LuCI JS API

Internationalization

-- In Lua
local translate = i18n.translate
translate("Text to translate")

-- In HTM templates
<%:Text to translate%>

-- In JavaScript (injected by Lua)
var msg = '<%=translate("Text")%>';

Directory Structure

luci-app-easytier/
├── luasrc/
│   ├── controller/
│   │   └── easytier.lua          # Routes and API controller
│   ├── model/cbi/
│   │   ├── easytier.lua          # Configuration page
│   │   └── easytier_status.lua   # Status page
│   └── view/easytier/
│       ├── easytier_status.htm   # Status page template
│       ├── easytier_log.htm      # Log page
│       ├── easytier_upload.htm   # Upload page
│       └── ...
├── root/
│   ├── etc/
│   │   ├── config/easytier       # UCI config file
│   │   ├── init.d/easytier       # Init script
│   │   └── easytier/             # Config directory
│   └── usr/share/easytier/
│       └── download.sh           # Download script
├── po/
│   ├── zh_Hans/easytier.po       # Simplified Chinese translation
│   └── templates/easytier.pot    # Translation template
└── Makefile                      # OpenWrt package definition

API Design Standards

-- API path format
entry({"admin", "vpn", "easytier", "api_name"}, call("function_name")).leaf = true

-- Return JSON format
function api_name()
    luci.http.prepare_content("application/json")
    luci.http.write_json({
        success = true,
        data = {},
        message = "Success"
    })
end

Contributing Code

  1. Fork the project and create a branch
  2. Ensure code complies with development standards
  3. Test compatibility on OpenWrt 18.06 and the latest version
  4. Submit a Pull Request

🐛 Troubleshooting

Interface Not Showing After Installation

# Clear LuCI cache
rm -rf /tmp/luci-*
# Re-login to LuCI interface

util.pcdata Warning

sed -i 's/util.pcdata/xml.pcdata/g' /usr/lib/lua/luci/model/cbi/easytier.lua

Configuration File Conflict

When upgrading, if a configuration file conflict is prompted, the old configuration will be retained and the new configuration saved as /etc/config/easytier-opkg. You can ignore this error.

📄 License

This project is licensed under the Apache License 2.0.

🤝 Contributing

Issues and Pull Requests are welcome!


S
Description
OpenWrt里的EasyTier安装包(IPK和APK)
Readme
1.1 MiB
Languages
HTML 52.2%
Lua 24.5%
Shell 21.6%
Makefile 1.7%