Giter Site home page Giter Site logo

ffip / hiperbridge Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 4.0 976 KB

A GUI for HiPer Network Framework. 一个为 HiPer 跨区域组网模块制作的极简轻量型图形界面

Home Page: https://www.the.bb

License: GNU Affero General Public License v3.0

Rust 97.46% Shell 2.54%
gui hiper network rust

hiperbridge's People

Contributors

ffip avatar lorki avatar steve-xmh avatar zkitefly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hiperbridge's Issues

需求:多平台兼容

注:考虑到 Linux 图形页面环境比较复杂, Linux 会不可避免地需要 GTK 等依赖(一般桌面系统版本都会自带)

  • Linux - Ubuntu(可能仅支持 20.04+ 版本)
  • Linux - CentOS(可能会因为版本太旧无法使用)
  • Linux - FreeBSD
  • Linux - OpenBSD
  • MacOS

需求:针对现有版本的优化与调整项

以下项按优先级进行排序

  • 如果网络启动成功,建议把密钥加密后保存到配置文件里面。然后凭证输入框内容变成8个⚪,如果启动从配置文件读到凭证,输入框就固定显示8个⚪。

  • 运行过程中可以点开小齿轮,只是网卡类型无法更改。(方便调整其它选项)

  • 设置项里面可以开启是否自动重启(遇到错误,类似守护功能)

  • 启动状态最好由颜色区分(例如 启动中为橙色,正在运行为绿色,错误为红色)

  • ip地址点击后复制到粘贴板(鼠标移动上去出现气泡提示:点击复制)

  • 启动位置居中

其它调整建议已通过QQ发送给@Steve-xmh

需求 配置文件推拽加载

将yml配置文件拖拽到窗口后,
调用hiper -config 拖拽进来的路径 test 进行配置检测。
若检测无错误 则将配置文件保存到 配置目录。替换hb配置文件内的密钥为新保存文件名

调整:证书安全增强+在线配置适配

新版本启动流程:

  1. 用户输入凭证 > 检测凭证对应的配置文件在本地是否存在
  2. 如果存在则运行 hiper -config ./凭证.yml 即可
  3. 如果不存在则请求 https://cert.mcer.cn/凭证.yml
  4. 请求成功 > 将文件保存到同路径下 > 步骤 2
  5. 请求失败或404 > 提示用户已超过下载时效或凭证无效 > 用户可选择 导入配置 或 确定(关闭窗口)
  6. 用户选择 导入配置 > 弹出文件打开对话框 > 读取文件内容 | 步骤 4
  • 凭证证书基础支持
  • 导入证书支持(用其它方式代替)

缺陷 命名错误

分支版本已从HiPer Plus改为主分支故部分位置名称需由HiPer Plus改为HiPer

需求 事件响应插件支持

计划表

  • 基础插件草案
  • 基础插件实现
  • 插件自动更新
  • 插件添加删除(无期限推迟,详情请查阅插件开发说明

描述

所有插件文件夹放置于addons目录下
文件夹结构为

addons/myip
--package.json
--other_file.ext

--

Package.json 内容

{
    "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 地址和 版本号 是方便后续做插件更新检查和更新下载。

需求 自动更新节点信息

启动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

优化:新增启动后全网通告延迟提醒

启动后入网可能需要1~5分钟对本节点进行全网通告,
未收到通告的节点将可能无法连接到该节点。

因此在启动后,能够显示一条5分钟后消失的提醒消息:

正在全网通告节点在线状态,视网络情况预计可能需要1~5分钟,请耐心等待。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.