summaryrefslogtreecommitdiff
path: root/device/uapi.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* device: simplify UAPI helper methodsJosh Bleecher Snyder2021-01-071-12/+5
| | | | | | | | | | | | | bufio is not required. strings.Builder is cheaper than bytes.Buffer for constructing strings. io.Writer is more flexible than io.StringWriter, and just as cheap (when used with io.WriteString). Run gofmt. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
* device: add UAPI helper methodsJason A. Donenfeld2021-01-071-2/+21
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* device: fix persistent_keepalive_interval data racesJosh Bleecher Snyder2021-01-071-3/+2
| | | | | Co-authored-by: David Anderson <danderson@tailscale.com> Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
* device: accept any io.Reader in device.IpcSetOperationJosh Bleecher Snyder2021-01-071-2/+2
| | | | | | | | | | Any io.Reader will do, and there are no performance concerns here. This is technically backwards incompatible, but it is very unlikely to break any existing code. It is compatible with the existing uses in wireguard-{windows,android,apple} and also will allow us to slightly simplify it if desired. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
* global: update header comments and modulesJason A. Donenfeld2020-05-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* device: return generic error from Ipc{Get,Set}Operation.David Anderson2020-05-021-4/+15
| | | | | | | This makes uapi.go's public API conform to Go style in terms of error types. Signed-off-by: David Anderson <danderson@tailscale.com>
* conn: introduce new package that splits out the Bind and Endpoint typesDavid Crawshaw2020-05-021-1/+2
| | | | | | | | | | The sticky socket code stays in the device package for now, as it reaches deeply into the peer list. This is the first step in an effort to split some code out of the very busy device package. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
* uapi: allow unsetting device private key with /dev/nullJason A. Donenfeld2020-02-041-1/+1
|
* uapi: allow preventing creation of new peers when updatingJason A. Donenfeld2019-10-041-1/+17
| | | | | | This enables race-free updates for wg-dynamic and similar tools. Suggested-by: Thomas Gschwantner <tharre3@gmail.com>
* uapi: skip peers with invalid keysJason A. Donenfeld2019-08-051-1/+6
|
* global: regroup all importsJason A. Donenfeld2019-05-141-1/+2
|
* uapi: remove unhelpful log messagesJason A. Donenfeld2019-03-201-7/+0
|
* uapi: report endpoint errorJason A. Donenfeld2019-03-191-1/+1
|
* uapi: make ipcerror conform to interfaceJason A. Donenfeld2019-03-101-2/+2
|
* global: begin modularizationJason A. Donenfeld2019-03-031-0/+426