1. added multipath protocol and schema suport

2. added SCTP protocol and schema support
3. added set of NAS models support (Asustor, ReadyNAS, Drobo, QNAP, WD, Synology, Terramaster)
4. moved to fc00::/7 private segment
5. added Windows, MacOS and Linux UI for peers edit and current status
This commit is contained in:
vadym 2022-10-27 22:03:37 +03:00
parent cfa293d189
commit d8a4000141
198 changed files with 8589 additions and 697 deletions

View file

@ -3,7 +3,7 @@ package multicast
import (
"encoding/json"
"github.com/yggdrasil-network/yggdrasil-go/src/admin"
"github.com/RiV-chain/RiV-mesh/src/admin"
)
type GetMulticastInterfacesRequest struct{}

View file

@ -14,13 +14,13 @@ import (
"github.com/Arceliar/phony"
"github.com/gologme/log"
"github.com/yggdrasil-network/yggdrasil-go/src/core"
"github.com/RiV-chain/RiV-mesh/src/core"
"golang.org/x/net/ipv6"
)
// Multicast represents the multicast advertisement and discovery mechanism used
// by Yggdrasil to find peers on the same subnet. When a beacon is received on a
// configured multicast interface, Yggdrasil will attempt to peer with that node
// by RiV-mesh to find peers on the same subnet. When a beacon is received on a
// configured multicast interface, RiV-mesh will attempt to peer with that node
// automatically.
type Multicast struct {
phony.Inbox
@ -195,11 +195,10 @@ func (m *Multicast) _getAllowedInterfaces() map[string]*interfaceInfo {
continue
}
interfaces[iface.Name] = &interfaceInfo{
iface: iface,
beacon: ifcfg.Beacon,
listen: ifcfg.Listen,
port: ifcfg.Port,
priority: ifcfg.Priority,
iface: iface,
beacon: ifcfg.Beacon,
listen: ifcfg.Listen,
port: ifcfg.Port,
}
break
}

View file

@ -4,6 +4,7 @@
package multicast
import (
"syscall"

View file

@ -4,6 +4,8 @@
package multicast
import (
"fmt"
"os"
"syscall"
"golang.org/x/sys/unix"
@ -18,17 +20,13 @@ func (m *Multicast) multicastReuse(network string, address string, c syscall.Raw
var reuseaddr error
control = c.Control(func(fd uintptr) {
// Previously we used SO_REUSEPORT here, but that meant that machines running
// Yggdrasil nodes as different users would inevitably fail with EADDRINUSE.
// The behaviour for multicast is similar with both, so we'll use SO_REUSEADDR
// instead.
reuseaddr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR, 1)
// Previously we used SO_REUSEPORT here, but that meant that machines running
// RiV-mesh nodes as different users would inevitably fail with EADDRINUSE.
// The behaviour for multicast is similar with both, so we'll use SO_REUSEADDR
// instead.
if reuseaddr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR, 1); reuseaddr != nil {
fmt.Fprintf(os.Stderr, "Failed to set SO_REUSEADDR on socket: %s\n", reuseaddr)
}
})
switch {
case reuseaddr != nil:
return reuseaddr
default:
return control
}
return control
}