Giter Site home page Giter Site logo

nashaofu / wol Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 3.0 363 KB

Wol 是 wake on lan 的简写,是一个轻量、简洁的 Wol 管理服务,支持检测设备是否开机成功。

License: Apache License 2.0

Dockerfile 0.68% Shell 0.91% Rust 29.64% JavaScript 4.54% HTML 1.29% TypeScript 57.21% Less 5.74%
wake wake-on-lan wol

wol's Introduction

wol

Wol 是 wake on lan 的简写,是一个轻量、简洁的 Wol 管理服务,支持检测设备是否开机成功。

功能特性

  • 部署简单,且可私有部署。
  • 默认使用 yaml 作为配置文件,易于编辑与迁移。
  • 主题切换:支持浅色主题与暗黑主题。
  • 占用资源少,运行速度快。
  • 跨平台:可以在 Linux、macOS 和 Windows 操作系统上运行。
  • 支持 basic auth,保护服务配置
  • 支持检测设备是否启动(设备需支持 ping)

项目截图

截图说明 截图
浅色主题 浅色主题
深色主题 深色主题
添加新设备 添加新设备
开启页面认证 开启页面认证
页面认证 页面认证

安装和使用

Docker 中使用(Linux 推荐)

推荐使用 Docker 安装方式,使用简单方便,只需运行如下命令:

docker pull ghcr.io/nashaofu/wol:latest

# 使用docker host模式
docker run -d \
  --name wol \
  --net host \
  -v /path/to/wol.yaml:/opt/wol/wol.yaml \
  ghcr.io/nashaofu/wol:latest

# 不使用docker host模式
docker run -d \
  --name wol \
  -p 3300:3300 \
  -v /path/to/wol.yaml:/opt/wol/wol.yaml \
  ghcr.io/nashaofu/wol:latest

然后在浏览器中访问 http://127.0.0.1:3300 即可使用。

如果需要自定义配置,可将项目根目录下的 wol.example.yaml 文件拷贝到 /opt/wol 目录下并重命名为 wol.yaml,具体配置参考配置章节,也可以修改启动命令,指定配置文件位置。

系统中使用(Windows/Mac 推荐)

Windows/Mac 桌面版的 docker 不支持--net=host,所以推荐这种使用方式。

  1. 前往release页面下载wol-xxxx.zipxxxx表示系统架构,请根据自己的情况选择

  2. 解压出wol-xxxx.zip中的可执行文件,然后在终端中运行即可启动服务。同时也支持在启动时指定服务的端口号与配置文件。

    Usage: wol [OPTIONS]
    
    Options:
      -p, --port <PORT>      App listen port [default: 3300]
      -c, --config <CONFIG>  Config file path [default: ./wol.yaml]
      -h, --help             Print help
      -V, --version          Print version

配置

项目配置文件为wol.yaml,配置内容如下:

# basic auth 配置,auth 可为 null,表示关闭认证
auth:
  username: ""
  password: ""
# 设备列表
devices:
  - name: Windows # 设备名称
    mac: 00:00:00:00:00:00 # 设备 mac 地址
    ip: 192.168.1.1 # 设备 ipv4 地址
    port: 9 # wake on lan 唤醒端口号,一般为 9、7 或者 0

特别说明

在这个项目中,我们使用了 Wake-On-Lan(WOL)技术来实现远程唤醒功能。WOL 是一种网络唤醒技术,可以让计算机在休眠或关机状态下通过局域网进行唤醒操作。我们需要在配置 WOL 时添加目标设备的 MAC 地址和端口号。MAC 地址用于指定需要唤醒的设备,以确保唤醒指令能够准确地发送到目标计算机。端口号是用于接收唤醒指令的特定端口,通常为 9、7 或 0。同时,我们还需要添加目标计算机的 IP 地址,以便检测目标计算机是否已开启。

为了启用 WOL 功能,我们需要进入计算机的主板 BIOS 设置并打开 Wake On Lan 选项。需要注意的是,不同品牌的主板可能有不同的设置名称,因此请参考相应品牌的主板设置指南。完成这些步骤后,我们就可以通过局域网唤醒处于休眠状态或关机状态的计算机了。

贡献指南

如果您想为 Wol 做出贡献,可以按照以下步骤进行:

  1. 克隆项目到本地:

    git clone https://github.com/nashaofu/wol.git
  2. 创建新分支:

    git checkout -b my-feature-branch
  3. 启动项目:你需要安装 rust、nodejs 与 yarn

    # 启动服务端项目
    cargo run
    # 启动前端项目
    cd client && yarn && yarn dev
  4. 修改并提交代码:

    git add .
    git commit -m "Add new feature"
  5. 推送代码到远程仓库:

    git push origin my-feature-branch
  6. 创建 Pull Request:在 GitHub 上创建一个新的 Pull Request 并等待审核。

许可证

Wol 使用 Apache 许可证,详情请参阅 LICENSE 文件。

wol's People

Contributors

hhhguany avatar nashaofu avatar

Stargazers

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

Watchers

 avatar

wol's Issues

有没有考虑提供API接口呢?

感谢分享,项目很好用,web添加、管理设备很方便
能不能考虑加入API接口控制呢,那样就可以集成到其他自动化流程中去啦,例如IOS的快捷指令,居家的物联网自动化。

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.