Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
songgao committed Apr 2, 2019
1 parent 22263ed commit 37b84e6
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
# water
[![Build Status](https://travis-ci.org/songgao/water.svg?branch=master)](https://travis-ci.org/songgao/water)
[![GoDoc](https://godoc.org/github.com/songgao/water?status.svg)](https://godoc.org/github.com/songgao/water)

`water` is a native Go library for [TUN/TAP](http://en.wikipedia.org/wiki/TUN/TAP) interfaces.

`water` is designed to be simple and efficient. It

* wraps almost only syscalls and uses only Go standard types;
* exposes standard interfaces; plays well with standard packages like `io`, `bufio`, etc..
* does not handle memory management (allocating/destructing slice). It's up to user to decide whether/how to reuse buffers.

~~`water/waterutil` has some useful functions to interpret MAC frame headers and IP packet headers. It also contains some constants such as protocol numbers and ethernet frame types.~~

See https://github.com/songgao/packets for functions for parsing various packets.
`water` is a pure Go package for working with
[TUN/TAP](http://en.wikipedia.org/wiki/TUN/TAP) interfaces. It works well with
Go's standard library and has no external dependency.

## Supported Platforms

Expand All @@ -19,15 +12,18 @@ See https://github.com/songgao/packets for functions for parsing various packets
* macOS (point-to-point TUN only)

## Installation

```
go get -u github.com/songgao/water
go get -u github.com/songgao/water/waterutil
```

## Documentation
[http://godoc.org/github.com/songgao/water](http://godoc.org/github.com/songgao/water)

## Example
* [Linux](http://godoc.org/github.com/songgao/water?GOOS=linux)
* [macOS](http://godoc.org/github.com/songgao/water?GOOS=darwin)
* [Windows](http://godoc.org/github.com/songgao/water?GOOS=windows)

## Getting Started

### TAP on Linux:

Expand Down Expand Up @@ -234,9 +230,3 @@ If you are going to use multiple TAP devices on the Windows, there is a way to s
},
})
```

## TODO
* tuntaposx for TAP on Darwin

## Alternatives
`tuntap`: [https://code.google.com/p/tuntap/](https://code.google.com/p/tuntap/)

0 comments on commit 37b84e6

Please sign in to comment.