Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Nylon is a self-healing WireGuard mesh that routes around failures. If a link goes down, nylon reroutes traffic through the next-best path in seconds. No manual intervention, no central coordination servers, just like how a real network should be :)

Under the hood, nylon implements the [Babel routing protocol (RFC 8966)](https://datatracker.ietf.org/doc/html/rfc8966) on top of a [modified wireguard-go](https://github.com/encodeous/nylon/tree/main/polyamide/transports/wireguard), using measured latency as the routing metric.
Under the hood, nylon implements the [Babel routing protocol (RFC 8966)](https://datatracker.ietf.org/doc/html/rfc8966) on top of a [modified wireguard-go](https://github.com/encodeous/polyamide-wireguard-go), using measured latency as the routing metric.

Nylon targets under 10 seconds of convergence time after a link failure, as you can see in the demo below.

Expand Down
2 changes: 1 addition & 1 deletion core/ipc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bufio"
"fmt"

"github.com/encodeous/nylon/polyamide/transports/wireguard/ipc"
"github.com/encodeous/nylon/protocol"
"github.com/encodeous/polyamide-wireguard-go/ipc"
)

func SendIPCRequest(itf string, req *protocol.IpcRequest) (*protocol.IpcResponse, error) {
Expand Down
6 changes: 3 additions & 3 deletions core/nylon_transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"time"

"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/adapter"
"github.com/encodeous/nylon/polyamide/transports/wireguard/tun"
"github.com/encodeous/nylon/polyamide/transports/wireguard/tun/tuntest"
"github.com/encodeous/nylon/protocol"
"github.com/encodeous/nylon/state"
"github.com/encodeous/polyamide-wireguard-go/adapter"
"github.com/encodeous/polyamide-wireguard-go/tun"
"github.com/encodeous/polyamide-wireguard-go/tun/tuntest"
"github.com/gaissmai/bart"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
Expand Down
2 changes: 1 addition & 1 deletion core/nylon_tun.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"sync"

"github.com/encodeous/nylon/polyamide/transports/wireguard/tun"
"github.com/encodeous/polyamide-wireguard-go/tun"
)

// Reserve space for headers written by native TUN drivers.
Expand Down
2 changes: 1 addition & 1 deletion core/nylon_tun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/tun/tuntest"
"github.com/encodeous/nylon/state"
"github.com/encodeous/polyamide-wireguard-go/tun/tuntest"
"github.com/gaissmai/bart"
"github.com/stretchr/testify/require"
"net/netip"
Expand Down
2 changes: 1 addition & 1 deletion core/sys_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/netip"

"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/ipc"
"github.com/encodeous/polyamide-wireguard-go/ipc"
)

func InitUAPI(logger *slog.Logger, itfName string) (net.Listener, error) {
Expand Down
2 changes: 1 addition & 1 deletion core/sys_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/netip"

"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/ipc"
"github.com/encodeous/nylon/state"
"github.com/encodeous/polyamide-wireguard-go/ipc"
)

func InitUAPI(logger *slog.Logger, itfName string) (net.Listener, error) {
Expand Down
4 changes: 2 additions & 2 deletions core/sys_physical.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"runtime"

"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/device"
"github.com/encodeous/nylon/polyamide/transports/wireguard/tun"
"github.com/encodeous/polyamide-wireguard-go/device"
"github.com/encodeous/polyamide-wireguard-go/tun"
)

func newDefaultRuntime(n *Nylon) (Runtime, error) {
Expand Down
2 changes: 1 addition & 1 deletion core/sys_virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package core
import (
"fmt"

"github.com/encodeous/nylon/polyamide/transports/wireguard/adapter"
"github.com/encodeous/polyamide-wireguard-go/adapter"
)

// The integration environment supplies a complete runtime. Nylon does not know
Expand Down
2 changes: 1 addition & 1 deletion core/sys_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"

"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/ipc"
"github.com/encodeous/polyamide-wireguard-go/ipc"
"github.com/kmahyyg/go-network-compo/wintypes"
)

Expand Down
6 changes: 3 additions & 3 deletions core/sys_wireguard.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/encodeous/nylon/log"
"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/adapter"
"github.com/encodeous/nylon/polyamide/transports/wireguard/conn"
"github.com/encodeous/nylon/polyamide/transports/wireguard/device"
"github.com/encodeous/polyamide-wireguard-go/adapter"
"github.com/encodeous/polyamide-wireguard-go/conn"
"github.com/encodeous/polyamide-wireguard-go/device"
)

// NewWireGuardTransport creates the WireGuard transport for n and serves Nylon IPC
Expand Down
2 changes: 1 addition & 1 deletion docs/why-nylon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tableOfContents: false

Nylon is a self-healing WireGuard mesh that routes around failures. If a link goes down, nylon reroutes traffic through the next-best path in seconds. No manual intervention, no central coordination servers.

Under the hood, nylon implements the [Babel routing protocol (RFC 8966)](https://datatracker.ietf.org/doc/html/rfc8966) on top of a [modified wireguard-go](https://github.com/encodeous/nylon/tree/main/polyamide/transports/wireguard), using measured latency as the routing metric.
Under the hood, nylon implements the [Babel routing protocol (RFC 8966)](https://datatracker.ietf.org/doc/html/rfc8966) on top of a [modified wireguard-go](https://github.com/encodeous/polyamide-wireguard-go), using measured latency as the routing metric.

### Main Features

Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/digineo/go-ping v1.2.0
github.com/dustin/go-broadcast v0.0.0-20211018055107-71439988bd91
github.com/encodeous/metric v0.0.0-20251111175231-f339c2f7c4bd
github.com/encodeous/polyamide-wireguard-go v0.0.0-20260930194717-ff21c4e94337
github.com/encodeous/tint v1.2.0
github.com/gaissmai/bart v0.25.0
github.com/goccy/go-yaml v1.19.1
Expand All @@ -23,11 +24,7 @@ require (
go.uber.org/goleak v1.3.0
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
golang.org/x/crypto v0.52.0
golang.org/x/net v0.55.0
golang.org/x/sys v0.47.0
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2
google.golang.org/protobuf v1.36.10
gvisor.dev/gvisor v0.0.0-20250503011706-39ed1f5ac29c
)

require (
Expand All @@ -52,7 +49,6 @@ require (
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.18.7 // indirect
Expand Down Expand Up @@ -83,8 +79,10 @@ require (
go.opentelemetry.io/otel/sdk v1.45.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.45.0 // indirect
go.opentelemetry.io/otel/trace v1.45.0 // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/time v0.12.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/
github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/encodeous/metric v0.0.0-20251111175231-f339c2f7c4bd h1:B32Ob80QTv5MomcVt709TsiWyD0QrpUYtnwW1jQFNlE=
github.com/encodeous/metric v0.0.0-20251111175231-f339c2f7c4bd/go.mod h1:DiXCPJtfZYioejF9zv9wfs3TXqWWglKGQ20DsBNVWVw=
github.com/encodeous/polyamide-wireguard-go v0.0.0-20260930194717-ff21c4e94337 h1:HuwThz05/Khp6lZ4yHjIZHWCf0y5Flr2JOP6nBE6wQQ=
github.com/encodeous/polyamide-wireguard-go v0.0.0-20260930194717-ff21c4e94337/go.mod h1:SulefP9J0mccyOLDA+5Aa5nO569HF9YgkSRmx48wkQA=
github.com/encodeous/tint v1.2.0 h1:1Y+32Iu+C8MXBoNjsM4YDf6iAkcks7csAI9f7b4fr8k=
github.com/encodeous/tint v1.2.0/go.mod h1:pyfyH+fKmtmIuWVWeMcSJjJKVJSb9sVlIfVsW3jkP+Q=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
Expand Down
10 changes: 5 additions & 5 deletions integration/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (

"github.com/encodeous/nylon/core"
"github.com/encodeous/nylon/polyamide"
"github.com/encodeous/nylon/polyamide/transports/wireguard/conn"
"github.com/encodeous/nylon/polyamide/transports/wireguard/conn/bindtest"
"github.com/encodeous/nylon/polyamide/transports/wireguard/device"
"github.com/encodeous/nylon/polyamide/transports/wireguard/tun"
"github.com/encodeous/nylon/polyamide/transports/wireguard/tun/tuntest"
"github.com/encodeous/nylon/state"
"github.com/encodeous/polyamide-wireguard-go/conn"
"github.com/encodeous/polyamide-wireguard-go/conn/bindtest"
"github.com/encodeous/polyamide-wireguard-go/device"
"github.com/encodeous/polyamide-wireguard-go/tun"
"github.com/encodeous/polyamide-wireguard-go/tun/tuntest"
)

type Signal chan bool
Expand Down
1 change: 0 additions & 1 deletion polyamide/transports/wireguard/.gitignore

This file was deleted.

17 changes: 0 additions & 17 deletions polyamide/transports/wireguard/LICENSE

This file was deleted.

31 changes: 0 additions & 31 deletions polyamide/transports/wireguard/Makefile

This file was deleted.

77 changes: 0 additions & 77 deletions polyamide/transports/wireguard/README.md

This file was deleted.

64 changes: 0 additions & 64 deletions polyamide/transports/wireguard/adapter/endpoints.go

This file was deleted.

Loading
Loading