Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: modernize, switch to builds.sr.ht
- Loading branch information
Showing
4 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
image: freebsd/latest | ||
packages: | ||
- go | ||
sources: | ||
- https://github.com/mdlayher/wol | ||
environment: | ||
GO111MODULE: "on" | ||
tasks: | ||
- build: | | ||
go version | ||
go get golang.org/x/lint/golint | ||
go get honnef.co/go/tools/cmd/staticcheck | ||
cd wol/ | ||
/home/build/go/bin/staticcheck ./... | ||
/home/build/go/bin/golint -set_exit_status ./... | ||
go test -v -race ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
image: archlinux | ||
packages: | ||
- go | ||
sources: | ||
- https://github.com/mdlayher/wol | ||
environment: | ||
GO111MODULE: "on" | ||
tasks: | ||
- build: | | ||
go version | ||
go get golang.org/x/lint/golint | ||
go get honnef.co/go/tools/cmd/staticcheck | ||
cd wol/ | ||
/home/build/go/bin/staticcheck ./... | ||
/home/build/go/bin/golint -set_exit_status ./... | ||
go test -v -race ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
wol [![Build Status](https://travis-ci.org/mdlayher/wol.svg?branch=master)](https://travis-ci.org/mdlayher/wol) [![Coverage Status](https://coveralls.io/repos/mdlayher/wol/badge.svg?branch=master)](https://coveralls.io/r/mdlayher/wol?branch=master) [![GoDoc](http://godoc.org/github.com/mdlayher/wol?status.svg)](http://godoc.org/github.com/mdlayher/wol) | ||
=== | ||
# wol [![builds.sr.ht status](https://builds.sr.ht/~mdlayher/wol.svg)](https://builds.sr.ht/~mdlayher/wol?) [![GoDoc](https://godoc.org/github.com/mdlayher/wol?status.svg)](https://godoc.org/github.com/mdlayher/wol) [![Go Report Card](https://goreportcard.com/badge/github.com/mdlayher/wol)](https://goreportcard.com/report/github.com/mdlayher/wol) | ||
|
||
Package `wol` implements a Wake-on-LAN client. MIT Licensed. | ||
Package `wol` implements a Wake-on-LAN client. MIT Licensed. | ||
|
||
This package exposes two types, which operate slightly differently: | ||
|
||
- `Client`: WoL client which uses UDP sockets to send magic packets | ||
- `RawClient` WoL client which uses raw Ethernet sockets to send magic packets | ||
|
||
For most use cases, the `Client` type will be sufficient. The `RawClient` type requires | ||
elevated privileges (root user) and currently works with Linux only. | ||
For most use cases, the `Client` type will be sufficient. The `RawClient` type | ||
requires elevated privileges (root user) and works on Linux or *BSD/macOS only. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
wol | ||
=== | ||
# wol | ||
|
||
Command `wol` is a simple Wake-on-LAN client. It can issue Wake-on-LAN magic | ||
packets using both UDP or raw ethernet sockets. | ||
packets using both UDP or Ethernet sockets. | ||
|
||
Usage | ||
----- | ||
## Usage | ||
|
||
``` | ||
```text | ||
$ ./wol -h | ||
Usage of ./wol: | ||
-a="": network address for Wake-on-LAN magic packet | ||
-i="": network interface to use to send Wake-on-LAN magic packet | ||
-p="": optional password for Wake-on-LAN magic packet | ||
-t="": target for Wake-on-LAN magic packet | ||
-a string | ||
network address for Wake-on-LAN magic packet | ||
-i string | ||
network interface to use to send Wake-on-LAN magic packet | ||
-p string | ||
optional password for Wake-on-LAN magic packet | ||
-t string | ||
target for Wake-on-LAN magic packet | ||
``` | ||
|
||
Issue Wake-on-LAN magic packet using UDP network address: | ||
|
||
``` | ||
$ ./wol -a 192.168.1.1:7 -t 00:12:7f:eb:6b:40 | ||
```text | ||
./wol -a 192.168.1.1:7 -t 00:12:7f:eb:6b:40 | ||
``` | ||
|
||
Issue Wake-on-LAN magic packet using raw ethernet sockets (requires elevated | ||
Issue Wake-on-LAN magic packet using Ethernet sockets (requires elevated | ||
privileges): | ||
|
||
``` | ||
$ sudo ./wol -i eth0 -t 00:12:7f:eb:6b:40 | ||
```text | ||
sudo ./wol -i eth0 -t 00:12:7f:eb:6b:40 | ||
``` |