mirror of
https://github.com/yggdrasil-network/water.git
synced 2025-05-20 00:45:09 +03:00
Update README.md (resolves #16)
This commit is contained in:
parent
1a3940420d
commit
ee9c96d609
1 changed files with 13 additions and 4 deletions
17
README.md
17
README.md
|
@ -15,7 +15,7 @@ See https://github.com/songgao/packets for functions for parsing various packets
|
||||||
## Supported Platforms
|
## Supported Platforms
|
||||||
|
|
||||||
* Linux
|
* Linux
|
||||||
* Windows
|
* Windows (experimental; APIs might change)
|
||||||
* macOS (point-to-point TUN only)
|
* macOS (point-to-point TUN only)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
@ -42,7 +42,12 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
ifce, err := water.NewTAP("O_O")
|
config := water.Config{
|
||||||
|
DeviceType: water.TAP,
|
||||||
|
}
|
||||||
|
config.Name = "O_O"
|
||||||
|
|
||||||
|
ifce, err := water.New(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -101,7 +106,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
ifce, err := water.NewTUN("")
|
ifce, err := water.New(water.Config{
|
||||||
|
DeviceType: water.TUN,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -161,7 +168,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
ifce, err := water.NewTAP("O_O")
|
ifce, err := water.New(water.Config{
|
||||||
|
DeviceType: water.TAP,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue