mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
changed names
This commit is contained in:
parent
f4a4274967
commit
052fdd3edf
37 changed files with 240 additions and 240 deletions
|
@ -1,4 +1,4 @@
|
|||
// Package address contains the types used by yggdrasil to represent IPv6 addresses or prefixes, as well as functions for working with these types.
|
||||
// Package address contains the types used by mesh to represent IPv6 addresses or prefixes, as well as functions for working with these types.
|
||||
// Of particular importance are the functions used to derive addresses or subnets from a NodeID, or to get the NodeID and bitmask of the bits visible from an address, which is needed for DHT searches.
|
||||
package address
|
||||
|
||||
|
@ -6,13 +6,13 @@ import (
|
|||
"crypto/ed25519"
|
||||
)
|
||||
|
||||
// Address represents an IPv6 address in the yggdrasil address range.
|
||||
// Address represents an IPv6 address in the mesh address range.
|
||||
type Address [16]byte
|
||||
|
||||
// Subnet represents an IPv6 /64 subnet in the yggdrasil subnet range.
|
||||
// Subnet represents an IPv6 /64 subnet in the mesh subnet range.
|
||||
type Subnet [8]byte
|
||||
|
||||
// GetPrefix returns the address prefix used by yggdrasil.
|
||||
// GetPrefix returns the address prefix used by mesh.
|
||||
// The current implementation requires this to be a multiple of 8 bits + 7 bits.
|
||||
// The 8th bit of the last byte is used to signal nodes (0) or /64 prefixes (1).
|
||||
// Nodes that configure this differently will be unable to communicate with each other using IP packets, though routing and the DHT machinery *should* still work.
|
||||
|
|
|
@ -30,7 +30,7 @@ type NodeConfig struct {
|
|||
Peers []string `comment:"List of connection strings for outbound peer connections in URI format,\ne.g. tls://a.b.c.d:e or socks://a.b.c.d:e/f.g.h.i:j. These connections\nwill obey the operating system routing table, therefore you should\nuse this section when you may connect via different interfaces."`
|
||||
InterfacePeers map[string][]string `comment:"List of connection strings for outbound peer connections in URI format,\narranged by source interface, e.g. { \"eth0\": [ tls://a.b.c.d:e ] }.\nNote that SOCKS peerings will NOT be affected by this option and should\ngo in the \"Peers\" section instead."`
|
||||
Listen []string `comment:"Listen addresses for incoming connections. You will need to add\nlisteners in order to accept incoming peerings from non-local nodes.\nMulticast peer discovery will work regardless of any listeners set\nhere. Each listener should be specified in URI format as above, e.g.\ntls://0.0.0.0:0 or tls://[::]:0 to listen on all interfaces."`
|
||||
AdminListen string `comment:"Listen address for admin connections. Default is to listen for local\nconnections either on TCP/9001 or a UNIX socket depending on your\nplatform. Use this value for yggdrasilctl -endpoint=X. To disable\nthe admin socket, use the value \"none\" instead."`
|
||||
AdminListen string `comment:"Listen address for admin connections. Default is to listen for local\nconnections either on TCP/9001 or a UNIX socket depending on your\nplatform. Use this value for meshctl -endpoint=X. To disable\nthe admin socket, use the value \"none\" instead."`
|
||||
MulticastInterfaces []MulticastInterfaceConfig `comment:"Configuration for which interfaces multicast peer discovery should be\nenabled on. Each entry in the list should be a json object which may\ncontain Regex, Beacon, Listen, and Port. Regex is a regular expression\nwhich is matched against an interface name, and interfaces use the\nfirst configuration that they match gainst. Beacon configures whether\nor not the node should send link-local multicast beacons to advertise\ntheir presence, while listening for incoming connections on Port.\nListen controls whether or not the node listens for multicast beacons\nand opens outgoing connections."`
|
||||
AllowedPublicKeys []string `comment:"List of peer public keys to allow incoming peering connections\nfrom. If left empty/undefined then all connections will be allowed\nby default. This does not affect outgoing peerings, nor does it\naffect link-local peers discovered via multicast."`
|
||||
PublicKey string `comment:"Your public key. Your peers may ask you for this to put\ninto their AllowedPublicKeys configuration."`
|
||||
|
|
|
@ -11,7 +11,7 @@ type platformDefaultParameters struct {
|
|||
// Admin socket
|
||||
DefaultAdminListen string
|
||||
|
||||
// Configuration (used for yggdrasilctl)
|
||||
// Configuration (used for meshctl)
|
||||
DefaultConfigFile string
|
||||
|
||||
// Multicast interfaces
|
||||
|
|
|
@ -7,10 +7,10 @@ package defaults
|
|||
func GetDefaults() platformDefaultParameters {
|
||||
return platformDefaultParameters{
|
||||
// Admin
|
||||
DefaultAdminListen: "unix:///var/run/yggdrasil.sock",
|
||||
DefaultAdminListen: "unix:///var/run/mesh.sock",
|
||||
|
||||
// Configuration (used for yggdrasilctl)
|
||||
DefaultConfigFile: "/etc/yggdrasil.conf",
|
||||
// Configuration (used for meshctl)
|
||||
DefaultConfigFile: "/etc/mesh.conf",
|
||||
|
||||
// Multicast interfaces
|
||||
DefaultMulticastInterfaces: []MulticastInterfaceConfig{
|
||||
|
|
|
@ -7,10 +7,10 @@ package defaults
|
|||
func GetDefaults() platformDefaultParameters {
|
||||
return platformDefaultParameters{
|
||||
// Admin
|
||||
DefaultAdminListen: "unix:///var/run/yggdrasil.sock",
|
||||
DefaultAdminListen: "unix:///var/run/mesh.sock",
|
||||
|
||||
// Configuration (used for yggdrasilctl)
|
||||
DefaultConfigFile: "/usr/local/etc/yggdrasil.conf",
|
||||
// Configuration (used for meshctl)
|
||||
DefaultConfigFile: "/usr/local/etc/mesh.conf",
|
||||
|
||||
// Multicast interfaces
|
||||
DefaultMulticastInterfaces: []MulticastInterfaceConfig{
|
||||
|
|
|
@ -7,10 +7,10 @@ package defaults
|
|||
func GetDefaults() platformDefaultParameters {
|
||||
return platformDefaultParameters{
|
||||
// Admin
|
||||
DefaultAdminListen: "unix:///var/run/yggdrasil.sock",
|
||||
DefaultAdminListen: "unix:///var/run/mesh.sock",
|
||||
|
||||
// Configuration (used for yggdrasilctl)
|
||||
DefaultConfigFile: "/etc/yggdrasil.conf",
|
||||
// Configuration (used for meshctl)
|
||||
DefaultConfigFile: "/etc/mesh.conf",
|
||||
|
||||
// Multicast interfaces
|
||||
DefaultMulticastInterfaces: []MulticastInterfaceConfig{
|
||||
|
|
|
@ -7,10 +7,10 @@ package defaults
|
|||
func GetDefaults() platformDefaultParameters {
|
||||
return platformDefaultParameters{
|
||||
// Admin
|
||||
DefaultAdminListen: "unix:///var/run/yggdrasil.sock",
|
||||
DefaultAdminListen: "unix:///var/run/mesh.sock",
|
||||
|
||||
// Configuration (used for yggdrasilctl)
|
||||
DefaultConfigFile: "/etc/yggdrasil.conf",
|
||||
// Configuration (used for meshctl)
|
||||
DefaultConfigFile: "/etc/mesh.conf",
|
||||
|
||||
// Multicast interfaces
|
||||
DefaultMulticastInterfaces: []MulticastInterfaceConfig{
|
||||
|
|
|
@ -9,8 +9,8 @@ func GetDefaults() platformDefaultParameters {
|
|||
// Admin
|
||||
DefaultAdminListen: "tcp://localhost:9001",
|
||||
|
||||
// Configuration (used for yggdrasilctl)
|
||||
DefaultConfigFile: "/etc/yggdrasil.conf",
|
||||
// Configuration (used for meshctl)
|
||||
DefaultConfigFile: "/etc/mesh.conf",
|
||||
|
||||
// Multicast interfaces
|
||||
DefaultMulticastInterfaces: []MulticastInterfaceConfig{
|
||||
|
|
|
@ -9,8 +9,8 @@ func GetDefaults() platformDefaultParameters {
|
|||
// Admin
|
||||
DefaultAdminListen: "tcp://localhost:9001",
|
||||
|
||||
// Configuration (used for yggdrasilctl)
|
||||
DefaultConfigFile: "C:\\Program Files\\Mesh\\yggdrasil.conf",
|
||||
// Configuration (used for meshctl)
|
||||
DefaultConfigFile: "C:\\Program Files\\Mesh\\mesh.conf",
|
||||
|
||||
// Multicast interfaces
|
||||
DefaultMulticastInterfaces: []MulticastInterfaceConfig{
|
||||
|
|
|
@ -12,7 +12,7 @@ void StartAWDLBrowsing() {
|
|||
serviceBrowser = [[NSNetServiceBrowser alloc] init];
|
||||
serviceBrowser.includesPeerToPeer = YES;
|
||||
}
|
||||
[serviceBrowser searchForServicesOfType:@"_yggdrasil._tcp" inDomain:@""];
|
||||
[serviceBrowser searchForServicesOfType:@"_mesh._tcp" inDomain:@""];
|
||||
}
|
||||
void StopAWDLBrowsing() {
|
||||
if (serviceBrowser == nil) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/Arceliar/phony"
|
||||
"github.com/RiV-chain/RiV-mesh/src/address"
|
||||
"github.com/RiV-chain/RiV-mesh/src/util"
|
||||
"github.com/RiV-chain/RiV-mesh/src/yggdrasil"
|
||||
"github.com/RiV-chain/RiV-mesh/src/mesh"
|
||||
"golang.org/x/net/icmp"
|
||||
"golang.org/x/net/ipv6"
|
||||
)
|
||||
|
@ -19,7 +19,7 @@ const tunConnTimeout = 2 * time.Minute
|
|||
type tunConn struct {
|
||||
phony.Inbox
|
||||
tun *TunAdapter
|
||||
conn *yggdrasil.Conn
|
||||
conn *mesh.Conn
|
||||
addr address.Address
|
||||
snet address.Subnet
|
||||
stop chan struct{}
|
||||
|
@ -181,7 +181,7 @@ func (s *tunConn) _write(bs []byte) (err error) {
|
|||
err = errors.New("address not allowed")
|
||||
return
|
||||
}
|
||||
msg := yggdrasil.FlowKeyMessage{
|
||||
msg := mesh.FlowKeyMessage{
|
||||
FlowKey: util.GetFlowKey(bs),
|
||||
Message: bs,
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ func (s *tunConn) _write(bs []byte) (err error) {
|
|||
return
|
||||
}
|
||||
s.Act(s.conn, func() {
|
||||
if e, eok := err.(yggdrasil.ConnError); !eok {
|
||||
if e, eok := err.(mesh.ConnError); !eok {
|
||||
if e.Closed() {
|
||||
s.tun.log.Debugln(s.conn.String(), "TUN/TAP generic write debug:", err)
|
||||
} else {
|
||||
|
|
|
@ -28,9 +28,9 @@ import (
|
|||
type MTU uint16
|
||||
|
||||
// TunAdapter represents a running TUN interface and extends the
|
||||
// yggdrasil.Adapter type. In order to use the TUN adapter with Mesh, you
|
||||
// should pass this object to the yggdrasil.SetRouterAdapter() function before
|
||||
// calling yggdrasil.Start().
|
||||
// mesh.Adapter type. In order to use the TUN adapter with Mesh, you
|
||||
// should pass this object to the mesh.SetRouterAdapter() function before
|
||||
// calling mesh.Start().
|
||||
type TunAdapter struct {
|
||||
rwc *ipv6rwc.ReadWriteCloser
|
||||
config *config.NodeConfig
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Package util contains miscellaneous utilities used by yggdrasil.
|
||||
// Package util contains miscellaneous utilities used by mesh.
|
||||
// In particular, this includes a crypto worker pool, Cancellation machinery, and a sync.Pool used to reuse []byte.
|
||||
package util
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue