ffip / hiperbridge Goto Github PK
View Code? Open in Web Editor NEWA GUI for HiPer Network Framework. 一个为 HiPer 跨区域组网模块制作的极简轻量型图形界面
Home Page: https://www.the.bb
License: GNU Affero General Public License v3.0
A GUI for HiPer Network Framework. 一个为 HiPer 跨区域组网模块制作的极简轻量型图形界面
Home Page: https://www.the.bb
License: GNU Affero General Public License v3.0
注:考虑到 Linux 图形页面环境比较复杂, Linux 会不可避免地需要 GTK 等依赖(一般桌面系统版本都会自带)
*新增 通过扩展套件局域网广播玩家远程服务器地址 (免游戏内手动输入地址)
新模块发布地址 https://gitcode.net/to/hiper/-/tree/master/utils/minecraft-boradcast
例如远端玩家 6.6.9.9 开启游戏,使用端口26535 本地只需启动 mcb -addr 6.6.9.9:26535 即可完成局域网广播及登入(听说这样能离线使用)
通过STDIN主动停止及配置重载
hiper当前在启动后可向控制台输入
quit:主动停止
reload:配置重载
即本次从启动到现在的时间间隔。
logging:
format: json
将日志变成json方便读取
以下项按优先级进行排序
如果网络启动成功,建议把密钥加密后保存到配置文件里面。然后凭证输入框内容变成8个⚪,如果启动从配置文件读到凭证,输入框就固定显示8个⚪。
运行过程中可以点开小齿轮,只是网卡类型无法更改。(方便调整其它选项)
设置项里面可以开启是否自动重启(遇到错误,类似守护功能)
启动状态最好由颜色区分(例如 启动中为橙色,正在运行为绿色,错误为红色)
ip地址点击后复制到粘贴板(鼠标移动上去出现气泡提示:点击复制)
启动位置居中
其它调整建议已通过QQ发送给@Steve-xmh。
将yml配置文件拖拽到窗口后,
调用hiper -config 拖拽进来的路径 test 进行配置检测。
若检测无错误 则将配置文件保存到 配置目录。替换hb配置文件内的密钥为新保存文件名
新版本启动流程:
hiper -config ./凭证.yml
即可分支版本已从HiPer Plus改为主分支故部分位置名称需由HiPer Plus改为HiPer
因为 Rust 自带的简易的 std::fs::write
函数为了避免性能开销并没有使用 flush
等操作刷新写入缓存,在更新速度较快的情况下有可能导致写入不完整。
需要手写一个写入函数来确保完整写入,方可解决一定概率下的安装失败问题。
相关链接:rust-lang/rust#51775
所有插件文件夹放置于addons目录下
文件夹结构为
addons/myip
--package.json
--other_file.ext
--
{
"package": {
"name": "GetMyIP",
"version": "1.0.3",
"repo": "https://github.com/who/getmyip"
},
"action": {
"type": "net",
"event": "join"
},
"script": {
"windows": {
"privilege": true,
"shell": "cmd",
"command": [
"curl ipinfo.io > ip.log"
]
},
"darwin": {
"privilege": false,
"shell": "zsh",
"command": [
"curl ipinfo.io > ip.log"
]
},
"linux": {
"privilege": false,
"shell": "bash",
"command": [
"curl ipinfo.io > ip.log"
]
},
}
}
以上代表意思为在 启动入网
的时候 执行 curl ipinfo.io > ip.log
,
repo
地址和 版本号 是方便后续做插件更新检查和更新下载。
因为用户基本上都有将单文件拖放到桌面运行的习惯,日志文件对于他们而言无用。
[HPR] {"level":"info","msg":"Validity of client certificate","time":"2022-09-17T03:34:41+08:00","valid":"2032-06-11 19:19:33"}
启动HiPer前如果配置项内 自动同步节点 (默认开启) 处于开启状态
先请求 https://cert.mcer.cn/point.yml 文件内容
若请求成功则替换 配置文件里面对于区域
若请求失败则直接启动。
新版本配置文件内容格式样本:
# This is the hiper minimization configuration file. - (6.6.9.9/7)
pki:
ca: "-----BEGIN HIPER CERTIFICATE-----\nnff6hHY99VsTLAiXvExd6eYyKRhcriqlr0O7BR+k6/qcqDQ==\n-----END HIPER CERTIFICATE-----"
cert: "-----BEGIN HIPER CERTIFICATE-----\nCmY99VsTLAiXvExdQI\n-----END HIPER CERTIFICATE-----"
key: "-----BEGIN HIPER X25519 PRIVATE KEY-----\nzmYzY99VsTLAiXvExdU=\n-----END HIPER X25519 PRIVATE KEY-----"
# --------------------------------------------------------------------------------------
# WARNING >>> AUTO SYNC AREA
# --------------------------------------------------------------------------------------
# The following configuration will change at any time.
# Please do not configure custom content in the above area.
# If you need to adjust the configuration, please modify the menu to manual mode.
point:
"6.6.6.6":
- "120.92.140.174:65533"
- "120.92.216.66:65533"
"6.7.8.9":
- "36.158.69.134:31055"
"7.7.7.7":
- "121.62.22.148:65533"
"7.7.1.1":
- "ddns.xiaomckedou233.top:65533"
"6.6.1.1":
- "160.119.69.222:65533"
"6.6.3.3":
- "104.218.235.107:65533"
"6.6.2.2":
- "154.12.53.189:65533"
tower:
hosts:
- "6.6.6.6"
- "6.7.8.9"
- "7.7.7.7"
- "7.7.1.1"
- "6.6.1.1"
- "6.6.3.3"
- "6.6.2.2"
relay:
relays:
- "6.6.6.6"
- "6.7.8.9"
- "7.7.7.7"
- "7.7.1.1"
- "6.6.1.1"
- "6.6.3.3"
- "6.6.2.2"
# --------------------------------------------------------------------------------------
# WARNING <<< AUTO SYNC AREA
# --------------------------------------------------------------------------------------
dns:
- "6.6.6.6"
错误信息:
{"level":"fatal","msg":"activate failed: Failed to find the tap device in registry with specified ComponentId 'tap0901', TAP driver may be not installed","time":"2022-08-03T20:56:43+08:00"}
考虑用户将可能长时间启动入网在线
为了溯源技术问题或安全问题需对日志进行持久化存储
为了更方便的查阅日志,日志可放于hiper根目录的logs目录下
文件名格式 hb_logs_2022_08_09_16_18_22.log 其中里面的时间为启动时间
每天23:59进行日志分割,分割后,新的日志名称为hb_logs_2022_08_10_00_00_00.log
通过测试points里面的节点地址延迟,取最低展示到界面。
避免先前启动的进程未关闭彻底导致的冲突问题。
windows:
taskkill /f /im
linux/macos:
kill -9 hiper
启动后入网可能需要1~5分钟对本节点进行全网通告,
未收到通告的节点将可能无法连接到该节点。
因此在启动后,能够显示一条5分钟后消失的提醒消息:
正在全网通告节点在线状态,视网络情况预计可能需要1~5分钟,请耐心等待。
避免下载非完整或客户端被感染或其它原因破损导致的故障和隐患,HiPer 现已将所有仓内文件进行sha1签名,详见目录内packages.sha1
最小化窗口到托盘图标
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.