diff --git a/.vscode/launch.json b/.vscode/launch.json index 20c690e..fdb146b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "request": "launch", "mode": "auto", "program": "${workspaceFolder}", - "args":["-config","example_config/n1.yaml","-mode","super", "--example"], + "args":["-config","example_config/static_mode/n1.yaml","-mode","edge"], } ] } \ No newline at end of file diff --git a/device/device.go b/device/device.go index 8479190..39a70ed 100644 --- a/device/device.go +++ b/device/device.go @@ -85,7 +85,7 @@ type Device struct { IsSuperNode bool ID config.Vertex graph *path.IG - l2fib map[tap.MacAddress]config.Vertex + l2fib sync.Map LogTransit bool LogControl bool DRoute config.DynamicRouteInfo @@ -323,7 +323,6 @@ func NewDevice(tapDevice tap.Device, id config.Vertex, bind conn.Bind, logger *L device.IsSuperNode = IsSuperNode device.ID = id device.graph = graph - device.l2fib = make(map[tap.MacAddress]config.Vertex) device.rate.limiter.Init() device.indexTable.Init() diff --git a/device/receive.go b/device/receive.go index d057f89..43bb530 100644 --- a/device/receive.go +++ b/device/receive.go @@ -540,7 +540,9 @@ func (peer *Peer) RoutineSequentialReceiver() { if should_receive { // Write message to tap device if packet_type == path.NornalPacket { src_macaddr := tap.GetSrcMacAddr(elem.packet[path.EgHeaderLen:]) - device.l2fib[src_macaddr] = src_nodeID // Write to l2fib table + if !tap.IsBoardCast(src_macaddr) { + device.l2fib.Store(src_macaddr, src_nodeID) // Write to l2fib table + } _, err = device.tap.device.Write(elem.buffer[:MessageTransportOffsetContent+len(elem.packet)], MessageTransportOffsetContent+path.EgHeaderLen) if err != nil && !device.isClosed() { device.log.Errorf("Failed to write packet to TUN device: %v", err) diff --git a/device/receivesendproc.go b/device/receivesendproc.go index deaf22d..da01df5 100644 --- a/device/receivesendproc.go +++ b/device/receivesendproc.go @@ -62,9 +62,6 @@ func (device *Device) SpreadPacket(skip_list map[config.Vertex]bool, packet []by } continue } - if device.LogTransit { - fmt.Printf("Spread Packet packet through %d to %d\n", device.ID, peer_out.ID) - } device.SendPacket(peer_out, packet, MessageTransportOffsetContent) } } @@ -468,7 +465,6 @@ func (device *Device) process_RequestPeerMsg(content path.RequestPeerMsg) error if peer.ID >= path.Special_NodeID { continue } - response := path.BoardcastPeerMsg{ Request_ID: content.Request_ID, NodeID: peer.ID, diff --git a/device/send.go b/device/send.go index af3b4cb..4eff00d 100644 --- a/device/send.go +++ b/device/send.go @@ -252,14 +252,14 @@ func (device *Device) RoutineReadFromTUN() { // lookup peer if tap.IsBoardCast(dstMacAddr) { dst_nodeID = path.Boardcast - } else if val, ok := device.l2fib[dstMacAddr]; !ok { //Lookup failed + } else if val, ok := device.l2fib.Load(dstMacAddr); !ok { //Lookup failed dst_nodeID = path.Boardcast } else { - dst_nodeID = val + dst_nodeID = val.(config.Vertex) } EgBody.SetSrc(device.ID) EgBody.SetDst(dst_nodeID) - EgBody.SetPacketLength(uint16(len(elem.packet))) + EgBody.SetPacketLength(uint16(len(elem.packet) - path.EgHeaderLen)) EgBody.SetTTL(200) EgBody.SetUsage(path.NornalPacket) diff --git a/example_config/n1.yaml b/example_config/n1.yaml deleted file mode 100644 index 0bc200e..0000000 --- a/example_config/n1.yaml +++ /dev/null @@ -1,65 +0,0 @@ -interface: - itype: 'stdio' - ifaceid: 1 - name: 'netcat1' - macaddr: 'BB:AA:CC:DD:EE:01' - mtu: 1500 - recvaddr: '127.0.0.1:4001' - sendaddr: '127.0.0.1:5001' - humanfriendly: true -nodeid: 1 -nodename: 'Node1' -privkey: 'SM8pGjT0r8njy1/7ffN4wMwF7nnJ8UYSjGRWpCqo3ng=' -listenport: 3001 -loglevel: - loglevel: "error" - logtransit: true -supernode: - enable: false - pubkeyv4: "" - pubkeyv6: "" - regurlv4: "" - regurlv6: "" - apiurl: "" -nexthoptable: - 1: - 2: 2 - 3: 2 - 4: 2 - 5: 2 - 6: 2 - 2: - 1: 1 - 3: 3 - 4: 4 - 5: 3 - 6: 4 - 3: - 1: 2 - 2: 2 - 4: 4 - 5: 5 - 6: 4 - 4: - 1: 2 - 2: 2 - 3: 3 - 5: 3 - 6: 6 - 5: - 1: 3 - 2: 3 - 3: 3 - 4: 3 - 6: 3 - 6: - 1: 4 - 2: 4 - 3: 4 - 4: 4 - 5: 4 -peers: - - nodeid: 2 - pubkey: 'NuYJ/3Ght+C4HovFq5Te/BrIazo6zwDJ8Bdu4rQCz0o=' - endpoint: '127.0.0.1:3002' - diff --git a/example_config/n2.yaml b/example_config/n2.yaml deleted file mode 100644 index 0b35552..0000000 --- a/example_config/n2.yaml +++ /dev/null @@ -1,70 +0,0 @@ -interface: - itype: 'stdio' - ifaceid: 2 - name: 'netcat2' - macaddr: 'BB:AA:CC:DD:EE:02' - mtu: 1500 - recvaddr: '127.0.0.1:4002' - sendaddr: '127.0.0.1:5002' - humanfriendly: true -nodeid: 2 -nodename: 'Node2' -privkey: '4Pb81ZCfhNjIT/fobxsUo4ZZ3fls/g9Py/u6/jpa1Vc=' -listenport: 3002 -loglevel: - loglevel: "error" - logtransit: true -supernode: - enable: false - pubkeyv4: '' - pubkeyv6: '' - regurlv4: '' - regurlv6: '' - apiurl: '' -nexthoptable: - 1: - 2: 2 - 3: 2 - 4: 2 - 5: 2 - 6: 2 - 2: - 1: 1 - 3: 3 - 4: 4 - 5: 3 - 6: 4 - 3: - 1: 2 - 2: 2 - 4: 4 - 5: 5 - 6: 4 - 4: - 1: 2 - 2: 2 - 3: 3 - 5: 3 - 6: 6 - 5: - 1: 3 - 2: 3 - 3: 3 - 4: 3 - 6: 3 - 6: - 1: 4 - 2: 4 - 3: 4 - 4: 4 - 5: 4 -peers: - - nodeid: 1 - pubkey: '51/RzDlzd0vuFUbNMvFeVA/5ZgtUQKb+6HD+C5Ea2jA=' - endpoint: '127.0.0.1:3001' - - nodeid: 3 - pubkey: '9HsPa7QAgBjvSyW1EBuqGCyZtWdAZHkSIlGraTd4+1E=' - endpoint: '127.0.0.1:3003' - - nodeid: 4 - pubkey: 'QHX2qo9+qn6hPxQ4/E5J7k07HZaBsD9rRxm90+YqTSA=' - endpoint: '127.0.0.1:3004' diff --git a/example_config/n3.yaml b/example_config/n3.yaml deleted file mode 100644 index c134187..0000000 --- a/example_config/n3.yaml +++ /dev/null @@ -1,70 +0,0 @@ -interface: - itype: 'stdio' - ifaceid: 3 - name: 'netcat3' - macaddr: 'BB:AA:CC:DD:EE:03' - mtu: 1500 - recvaddr: '127.0.0.1:4003' - sendaddr: '127.0.0.1:5003' - humanfriendly: true -nodeid: 3 -nodename: 'Node3' -privkey: '8InEcDezmnCyiLA7HC6/qFMKELb4XHdLd3jIu4Jk7lU=' -listenport: 3003 -loglevel: - loglevel: "error" - logtransit: true -supernode: - enable: false - pubkeyv4: '' - pubkeyv6: '' - regurlv4: '' - regurlv6: '' - apiurl: '' -nexthoptable: - 1: - 2: 2 - 3: 2 - 4: 2 - 5: 2 - 6: 2 - 2: - 1: 1 - 3: 3 - 4: 4 - 5: 3 - 6: 4 - 3: - 1: 2 - 2: 2 - 4: 4 - 5: 5 - 6: 4 - 4: - 1: 2 - 2: 2 - 3: 3 - 5: 3 - 6: 6 - 5: - 1: 3 - 2: 3 - 3: 3 - 4: 3 - 6: 3 - 6: - 1: 4 - 2: 4 - 3: 4 - 4: 4 - 5: 4 -peers: - - nodeid: 2 - pubkey: 'NuYJ/3Ght+C4HovFq5Te/BrIazo6zwDJ8Bdu4rQCz0o=' - endpoint: '127.0.0.1:3002' - - nodeid: 4 - pubkey: 'QHX2qo9+qn6hPxQ4/E5J7k07HZaBsD9rRxm90+YqTSA=' - endpoint: '127.0.0.1:3004' - - nodeid: 5 - pubkey: 'q91lHawt/0XcfONJ/gHvGirQlVztTxS0Br3zOpuh60o=' - endpoint: '127.0.0.1:3005' \ No newline at end of file diff --git a/example_config/n4.yaml b/example_config/n4.yaml deleted file mode 100644 index 077f2b3..0000000 --- a/example_config/n4.yaml +++ /dev/null @@ -1,70 +0,0 @@ -interface: - itype: 'stdio' - ifaceid: 4 - name: 'netcat4' - macaddr: 'BB:AA:CC:DD:EE:04' - mtu: 1500 - recvaddr: '127.0.0.1:4004' - sendaddr: '127.0.0.1:5004' - humanfriendly: true -nodeid: 4 -nodename: 'Node4' -privkey: 'qPPlRulMI8NFq+Mp5+dq8j486RdRXCATkmFGlNXawXI=' -listenport: 3004 -loglevel: - loglevel: "error" - logtransit: true -supernode: - enable: false - pubkeyv4: '' - pubkeyv6: '' - regurlv4: '' - regurlv6: '' - apiurl: '' -nexthoptable: - 1: - 2: 2 - 3: 2 - 4: 2 - 5: 2 - 6: 2 - 2: - 1: 1 - 3: 3 - 4: 4 - 5: 3 - 6: 4 - 3: - 1: 2 - 2: 2 - 4: 4 - 5: 5 - 6: 4 - 4: - 1: 2 - 2: 2 - 3: 3 - 5: 3 - 6: 6 - 5: - 1: 3 - 2: 3 - 3: 3 - 4: 3 - 6: 3 - 6: - 1: 4 - 2: 4 - 3: 4 - 4: 4 - 5: 4 -peers: - - nodeid: 2 - pubkey: 'NuYJ/3Ght+C4HovFq5Te/BrIazo6zwDJ8Bdu4rQCz0o=' - endpoint: '127.0.0.1:3002' - - nodeid: 3 - pubkey: '9HsPa7QAgBjvSyW1EBuqGCyZtWdAZHkSIlGraTd4+1E=' - endpoint: '127.0.0.1:3003' - - nodeid: 6 - pubkey: 'XwQfrzumgOXkfgkm3n/QR/RdqBGkclGTmtLBgmoboBM=' - endpoint: '127.0.0.1:3006' diff --git a/example_config/n5.yaml b/example_config/n5.yaml deleted file mode 100644 index 127acb8..0000000 --- a/example_config/n5.yaml +++ /dev/null @@ -1,64 +0,0 @@ -interface: - itype: 'stdio' - ifaceid: 5 - name: 'netcat5' - macaddr: 'BB:AA:CC:DD:EE:05' - mtu: 1500 - recvaddr: '127.0.0.1:4005' - sendaddr: '127.0.0.1:5005' - humanfriendly: true -nodeid: 5 -nodename: 'Node5' -privkey: 'IMW0j2o4cxBqXDPX2sqX8KkXbAHkrLGjklnrM4zh/3s=' -listenport: 3005 -loglevel: - loglevel: "error" - logtransit: true -supernode: - enable: false - pubkeyv4: '' - pubkeyv6: '' - regurlv4: '' - regurlv6: '' - apiurl: '' -nexthoptable: - 1: - 2: 2 - 3: 2 - 4: 2 - 5: 2 - 6: 2 - 2: - 1: 1 - 3: 3 - 4: 4 - 5: 3 - 6: 4 - 3: - 1: 2 - 2: 2 - 4: 4 - 5: 5 - 6: 4 - 4: - 1: 2 - 2: 2 - 3: 3 - 5: 3 - 6: 6 - 5: - 1: 3 - 2: 3 - 3: 3 - 4: 3 - 6: 3 - 6: - 1: 4 - 2: 4 - 3: 4 - 4: 4 - 5: 4 -peers: - - nodeid: 3 - pubkey: '9HsPa7QAgBjvSyW1EBuqGCyZtWdAZHkSIlGraTd4+1E=' - endpoint: '127.0.0.1:3003' diff --git a/example_config/n6.yaml b/example_config/n6.yaml deleted file mode 100644 index efd64c9..0000000 --- a/example_config/n6.yaml +++ /dev/null @@ -1,64 +0,0 @@ -interface: - itype: 'stdio' - ifaceid: 6 - name: 'netcat6' - macaddr: 'BB:AA:CC:DD:EE:06' - mtu: 1500 - recvaddr: '127.0.0.1:4006' - sendaddr: '127.0.0.1:5006' - humanfriendly: true -nodeid: 6 -nodename: 'Node6' -privkey: 'yFCnbYnsOZoq10+ErLdMwWWBh5PVOUv7G4A5T2AyiUc=' -listenport: 3006 -loglevel: - loglevel: "error" - logtransit: true -supernode: - enable: false - pubkeyv4: '' - pubkeyv6: '' - regurlv4: '' - regurlv6: '' - apiurl: '' -nexthoptable: - 1: - 2: 2 - 3: 2 - 4: 2 - 5: 2 - 6: 2 - 2: - 1: 1 - 3: 3 - 4: 4 - 5: 3 - 6: 4 - 3: - 1: 2 - 2: 2 - 4: 4 - 5: 5 - 6: 4 - 4: - 1: 2 - 2: 2 - 3: 3 - 5: 3 - 6: 6 - 5: - 1: 3 - 2: 3 - 3: 3 - 4: 3 - 6: 3 - 6: - 1: 4 - 2: 4 - 3: 4 - 4: 4 - 5: 4 -peers: - - nodeid: 4 - pubkey: 'QHX2qo9+qn6hPxQ4/E5J7k07HZaBsD9rRxm90+YqTSA=' - endpoint: '127.0.0.1:3004' diff --git a/example_config/p2p_mode/Example_static.png b/example_config/p2p_mode/Example_static.png new file mode 100644 index 0000000..c7de733 Binary files /dev/null and b/example_config/p2p_mode/Example_static.png differ diff --git a/example_config/p2p_mode/n1.yaml b/example_config/p2p_mode/n1.yaml new file mode 100644 index 0000000..c6a1879 --- /dev/null +++ b/example_config/p2p_mode/n1.yaml @@ -0,0 +1,101 @@ +interface: + itype: stdio + ifaceid: 1 + name: tap1 + macaddr: AA:BB:CC:DD:EE:01 + mtu: 1400 + recvaddr: 127.0.0.1:4001 + sendaddr: 127.0.0.1:5001 + humanfriendly: true +nodeid: 1 +nodename: Node01 +privkey: aABzjKhWdkFfQ29ZuijtMp1h1TNJe66SDCwvfmvQznw= +listenport: 3001 +loglevel: + loglevel: normal` + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 2 + pubkey: csT+hco4Jpa7btMeC9subHk2ZqzxcljcBk/57V0cSEk= + pskey: "" + endpoint: 127.0.0.1:3002 + static: true \ No newline at end of file diff --git a/example_config/p2p_mode/n2.yaml b/example_config/p2p_mode/n2.yaml new file mode 100644 index 0000000..4711e53 --- /dev/null +++ b/example_config/p2p_mode/n2.yaml @@ -0,0 +1,111 @@ +interface: + itype: stdio + ifaceid: 2 + name: tap2 + macaddr: AA:BB:CC:DD:EE:02 + mtu: 1400 + recvaddr: 127.0.0.1:4002 + sendaddr: 127.0.0.1:5002 + humanfriendly: true +nodeid: 2 +nodename: Node02 +privkey: UNZMzPX5fG/8yGC8edVj/ksF9N6ARRqdq7fqE/PD7ls= +listenport: 3002 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 1 + pubkey: CooSkIP7/wiC7Rh83UYnB2yPkJijkNFmhtorHtyYlzY= + pskey: "" + endpoint: 127.0.0.1:3001 + static: true +- nodeid: 3 + pubkey: 0meQ0pQCAkLZdpfyMqggpnk0k3UKG2M8jfIMlQjTRWs= + pskey: "" + endpoint: 127.0.0.1:3003 + static: true +- nodeid: 4 + pubkey: 2EfY85KF1S+3dZ3A55eZcyi0QU+sOzOyuADtJs2U2Ww= + pskey: "" + endpoint: 127.0.0.1:3004 + static: true \ No newline at end of file diff --git a/example_config/p2p_mode/n3.yaml b/example_config/p2p_mode/n3.yaml new file mode 100644 index 0000000..94ff448 --- /dev/null +++ b/example_config/p2p_mode/n3.yaml @@ -0,0 +1,111 @@ +interface: + itype: stdio + ifaceid: 3 + name: tap3 + macaddr: AA:BB:CC:DD:EE:03 + mtu: 1400 + recvaddr: 127.0.0.1:4003 + sendaddr: 127.0.0.1:5003 + humanfriendly: true +nodeid: 3 +nodename: Node03 +privkey: gJy35nbsd8FuuxyWHjsefN+U+oM7RkuIB1EanNLSVHg= +listenport: 3003 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 2 + pubkey: csT+hco4Jpa7btMeC9subHk2ZqzxcljcBk/57V0cSEk= + pskey: "" + endpoint: 127.0.0.1:3002 + static: true +- nodeid: 4 + pubkey: 2EfY85KF1S+3dZ3A55eZcyi0QU+sOzOyuADtJs2U2Ww= + pskey: "" + endpoint: 127.0.0.1:3004 + static: true +- nodeid: 5 + pubkey: yS7a/e0l0qF7z9MO/P79yYVfLI6UAli2iKjEZa6XmgY= + pskey: "" + endpoint: 127.0.0.1:3005 + static: true \ No newline at end of file diff --git a/example_config/p2p_mode/n4.yaml b/example_config/p2p_mode/n4.yaml new file mode 100644 index 0000000..4cb926a --- /dev/null +++ b/example_config/p2p_mode/n4.yaml @@ -0,0 +1,111 @@ +interface: + itype: stdio + ifaceid: 4 + name: tap4 + macaddr: AA:BB:CC:DD:EE:04 + mtu: 1400 + recvaddr: 127.0.0.1:4004 + sendaddr: 127.0.0.1:5004 + humanfriendly: true +nodeid: 4 +nodename: Node04 +privkey: wAdLgCk0SHiO11/aUf9944focD1BUCH5b6Pe+cRHHXQ= +listenport: 3004 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 2 + pubkey: csT+hco4Jpa7btMeC9subHk2ZqzxcljcBk/57V0cSEk= + pskey: "" + endpoint: 127.0.0.1:3002 + static: true +- nodeid: 3 + pubkey: 0meQ0pQCAkLZdpfyMqggpnk0k3UKG2M8jfIMlQjTRWs= + pskey: "" + endpoint: 127.0.0.1:3003 + static: true +- nodeid: 6 + pubkey: EXLAGpDrkB5cjP7lr4dL0FGZG0rssmQNtWx9k/CGChk= + pskey: "" + endpoint: 127.0.0.1:3006 + static: true \ No newline at end of file diff --git a/example_config/p2p_mode/n5.yaml b/example_config/p2p_mode/n5.yaml new file mode 100644 index 0000000..0b54f22 --- /dev/null +++ b/example_config/p2p_mode/n5.yaml @@ -0,0 +1,101 @@ +interface: + itype: stdio + ifaceid: 5 + name: tap5 + macaddr: AA:BB:CC:DD:EE:05 + mtu: 1400 + recvaddr: 127.0.0.1:4005 + sendaddr: 127.0.0.1:5005 + humanfriendly: true +nodeid: 5 +nodename: Node05 +privkey: gLmzeCbmN/hjiE+ehNXL9IxuG9hhWIYv2s16/DOW6FE= +listenport: 3005 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 3 + pubkey: 0meQ0pQCAkLZdpfyMqggpnk0k3UKG2M8jfIMlQjTRWs= + pskey: "" + endpoint: 127.0.0.1:3003 + static: true \ No newline at end of file diff --git a/example_config/p2p_mode/n6.yaml b/example_config/p2p_mode/n6.yaml new file mode 100644 index 0000000..51b9c87 --- /dev/null +++ b/example_config/p2p_mode/n6.yaml @@ -0,0 +1,101 @@ +interface: + itype: stdio + ifaceid: 6 + name: tap6 + macaddr: AA:BB:CC:DD:EE:03 + mtu: 1400 + recvaddr: 127.0.0.1:4006 + sendaddr: 127.0.0.1:5006 + humanfriendly: true +nodeid: 6 +nodename: Node06 +privkey: IIX5F6oWZUS2dlhxWFJ7TxdJtDCr5jzeuhxUB6YM7Us= +listenport: 3006 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 4 + pubkey: 2EfY85KF1S+3dZ3A55eZcyi0QU+sOzOyuADtJs2U2Ww= + pskey: "" + endpoint: 127.0.0.1:3004 + static: true \ No newline at end of file diff --git a/example_config/static_mode/Example_static.png b/example_config/static_mode/Example_static.png new file mode 100644 index 0000000..c7de733 Binary files /dev/null and b/example_config/static_mode/Example_static.png differ diff --git a/example_config/static_mode/n1.yaml b/example_config/static_mode/n1.yaml new file mode 100644 index 0000000..c6a1879 --- /dev/null +++ b/example_config/static_mode/n1.yaml @@ -0,0 +1,101 @@ +interface: + itype: stdio + ifaceid: 1 + name: tap1 + macaddr: AA:BB:CC:DD:EE:01 + mtu: 1400 + recvaddr: 127.0.0.1:4001 + sendaddr: 127.0.0.1:5001 + humanfriendly: true +nodeid: 1 +nodename: Node01 +privkey: aABzjKhWdkFfQ29ZuijtMp1h1TNJe66SDCwvfmvQznw= +listenport: 3001 +loglevel: + loglevel: normal` + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 2 + pubkey: csT+hco4Jpa7btMeC9subHk2ZqzxcljcBk/57V0cSEk= + pskey: "" + endpoint: 127.0.0.1:3002 + static: true \ No newline at end of file diff --git a/example_config/static_mode/n2.yaml b/example_config/static_mode/n2.yaml new file mode 100644 index 0000000..4711e53 --- /dev/null +++ b/example_config/static_mode/n2.yaml @@ -0,0 +1,111 @@ +interface: + itype: stdio + ifaceid: 2 + name: tap2 + macaddr: AA:BB:CC:DD:EE:02 + mtu: 1400 + recvaddr: 127.0.0.1:4002 + sendaddr: 127.0.0.1:5002 + humanfriendly: true +nodeid: 2 +nodename: Node02 +privkey: UNZMzPX5fG/8yGC8edVj/ksF9N6ARRqdq7fqE/PD7ls= +listenport: 3002 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 1 + pubkey: CooSkIP7/wiC7Rh83UYnB2yPkJijkNFmhtorHtyYlzY= + pskey: "" + endpoint: 127.0.0.1:3001 + static: true +- nodeid: 3 + pubkey: 0meQ0pQCAkLZdpfyMqggpnk0k3UKG2M8jfIMlQjTRWs= + pskey: "" + endpoint: 127.0.0.1:3003 + static: true +- nodeid: 4 + pubkey: 2EfY85KF1S+3dZ3A55eZcyi0QU+sOzOyuADtJs2U2Ww= + pskey: "" + endpoint: 127.0.0.1:3004 + static: true \ No newline at end of file diff --git a/example_config/static_mode/n3.yaml b/example_config/static_mode/n3.yaml new file mode 100644 index 0000000..94ff448 --- /dev/null +++ b/example_config/static_mode/n3.yaml @@ -0,0 +1,111 @@ +interface: + itype: stdio + ifaceid: 3 + name: tap3 + macaddr: AA:BB:CC:DD:EE:03 + mtu: 1400 + recvaddr: 127.0.0.1:4003 + sendaddr: 127.0.0.1:5003 + humanfriendly: true +nodeid: 3 +nodename: Node03 +privkey: gJy35nbsd8FuuxyWHjsefN+U+oM7RkuIB1EanNLSVHg= +listenport: 3003 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 2 + pubkey: csT+hco4Jpa7btMeC9subHk2ZqzxcljcBk/57V0cSEk= + pskey: "" + endpoint: 127.0.0.1:3002 + static: true +- nodeid: 4 + pubkey: 2EfY85KF1S+3dZ3A55eZcyi0QU+sOzOyuADtJs2U2Ww= + pskey: "" + endpoint: 127.0.0.1:3004 + static: true +- nodeid: 5 + pubkey: yS7a/e0l0qF7z9MO/P79yYVfLI6UAli2iKjEZa6XmgY= + pskey: "" + endpoint: 127.0.0.1:3005 + static: true \ No newline at end of file diff --git a/example_config/static_mode/n4.yaml b/example_config/static_mode/n4.yaml new file mode 100644 index 0000000..4cb926a --- /dev/null +++ b/example_config/static_mode/n4.yaml @@ -0,0 +1,111 @@ +interface: + itype: stdio + ifaceid: 4 + name: tap4 + macaddr: AA:BB:CC:DD:EE:04 + mtu: 1400 + recvaddr: 127.0.0.1:4004 + sendaddr: 127.0.0.1:5004 + humanfriendly: true +nodeid: 4 +nodename: Node04 +privkey: wAdLgCk0SHiO11/aUf9944focD1BUCH5b6Pe+cRHHXQ= +listenport: 3004 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 2 + pubkey: csT+hco4Jpa7btMeC9subHk2ZqzxcljcBk/57V0cSEk= + pskey: "" + endpoint: 127.0.0.1:3002 + static: true +- nodeid: 3 + pubkey: 0meQ0pQCAkLZdpfyMqggpnk0k3UKG2M8jfIMlQjTRWs= + pskey: "" + endpoint: 127.0.0.1:3003 + static: true +- nodeid: 6 + pubkey: EXLAGpDrkB5cjP7lr4dL0FGZG0rssmQNtWx9k/CGChk= + pskey: "" + endpoint: 127.0.0.1:3006 + static: true \ No newline at end of file diff --git a/example_config/static_mode/n5.yaml b/example_config/static_mode/n5.yaml new file mode 100644 index 0000000..0b54f22 --- /dev/null +++ b/example_config/static_mode/n5.yaml @@ -0,0 +1,101 @@ +interface: + itype: stdio + ifaceid: 5 + name: tap5 + macaddr: AA:BB:CC:DD:EE:05 + mtu: 1400 + recvaddr: 127.0.0.1:4005 + sendaddr: 127.0.0.1:5005 + humanfriendly: true +nodeid: 5 +nodename: Node05 +privkey: gLmzeCbmN/hjiE+ehNXL9IxuG9hhWIYv2s16/DOW6FE= +listenport: 3005 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 3 + pubkey: 0meQ0pQCAkLZdpfyMqggpnk0k3UKG2M8jfIMlQjTRWs= + pskey: "" + endpoint: 127.0.0.1:3003 + static: true \ No newline at end of file diff --git a/example_config/static_mode/n6.yaml b/example_config/static_mode/n6.yaml new file mode 100644 index 0000000..51b9c87 --- /dev/null +++ b/example_config/static_mode/n6.yaml @@ -0,0 +1,101 @@ +interface: + itype: stdio + ifaceid: 6 + name: tap6 + macaddr: AA:BB:CC:DD:EE:03 + mtu: 1400 + recvaddr: 127.0.0.1:4006 + sendaddr: 127.0.0.1:5006 + humanfriendly: true +nodeid: 6 +nodename: Node06 +privkey: IIX5F6oWZUS2dlhxWFJ7TxdJtDCr5jzeuhxUB6YM7Us= +listenport: 3006 +loglevel: + loglevel: normal + logtransit: true + logcontrol: false +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: false + connurlv4: 127.0.0.1:3000 + pubkeyv4: j8i4dY1i7CUqd/ftaCSfCWosnURiztM+ExI7QRezU2Y= + connurlv6: '[::1]:3000' + pubkeyv6: cCcPlZw0hVkPSi15G+jpJpKE3TdCVEtO1nSiaedukGw= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: + 1: + 2: 2 + 3: 2 + 4: 2 + 5: 2 + 6: 2 + 2: + 1: 1 + 3: 3 + 4: 4 + 5: 3 + 6: 4 + 3: + 1: 2 + 2: 2 + 4: 4 + 5: 5 + 6: 4 + 4: + 1: 2 + 2: 2 + 3: 3 + 5: 3 + 6: 6 + 5: + 1: 3 + 2: 3 + 3: 3 + 4: 3 + 6: 3 + 6: + 1: 4 + 2: 4 + 3: 4 + 4: 4 + 5: 4 +peers: +- nodeid: 4 + pubkey: 2EfY85KF1S+3dZ3A55eZcyi0QU+sOzOyuADtJs2U2Ww= + pskey: "" + endpoint: 127.0.0.1:3004 + static: true \ No newline at end of file diff --git a/example_config/super_mode/n1.yaml b/example_config/super_mode/n1.yaml new file mode 100644 index 0000000..f4a704f --- /dev/null +++ b/example_config/super_mode/n1.yaml @@ -0,0 +1,60 @@ +interface: + itype: stdio + ifaceid: 1 + name: tap1 + macaddr: AA:BB:CC:DD:EE:FF + mtu: 1400 + recvaddr: 127.0.0.1:4001 + sendaddr: 127.0.0.1:5001 + humanfriendly: true +nodeid: 1 +nodename: Node01 +privkey: 6GyDagZKhbm5WNqMiRHhkf43RlbMJ34IieTlIuvfJ1M= +listenport: 3001 +loglevel: + loglevel: normal + logtransit: true + logcontrol: true +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: true + connurlv4: 127.0.0.1:3000 + pubkeyv4: LJ8KKacUcIoACTGB/9Ed9w0osrJ3WWeelzpL2u4oUic= + connurlv6: '[::1]:2999' + pubkeyv6: HCfL6YJtpJEGHTlJ2LgVXIWKB/K95P57LHTJ42ZG8VI= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: {} +peers: [] \ No newline at end of file diff --git a/example_config/super_mode/n2.yaml b/example_config/super_mode/n2.yaml new file mode 100644 index 0000000..2993271 --- /dev/null +++ b/example_config/super_mode/n2.yaml @@ -0,0 +1,60 @@ +interface: + itype: stdio + ifaceid: 2 + name: tap2 + macaddr: AA:BB:CC:DD:EE:FF + mtu: 1400 + recvaddr: 127.0.0.1:4002 + sendaddr: 127.0.0.1:5002 + humanfriendly: true +nodeid: 2 +nodename: Node02 +privkey: OH8BsVUU2Rqzeu9B2J5GPG8PUmxWfX8uVvNFZKhVF3o= +listenport: 3002 +loglevel: + loglevel: normal + logtransit: true + logcontrol: true +dynamicroute: + sendpinginterval: 20 + dupchecktimeout: 40 + conntimeout: 30 + savenewpeers: true + supernode: + usesupernode: true + connurlv4: 127.0.0.1:3000 + pubkeyv4: LJ8KKacUcIoACTGB/9Ed9w0osrJ3WWeelzpL2u4oUic= + connurlv6: '[::1]:2999' + pubkeyv6: HCfL6YJtpJEGHTlJ2LgVXIWKB/K95P57LHTJ42ZG8VI= + apiurl: http://127.0.0.1:3000/api + supernodeinfotimeout: 40 + p2p: + usep2p: false + sendpeerinterval: 20 + peeralivetimeout: 30 + graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 + ntpconfig: + usentp: true + maxserveruse: 5 + servers: + - time.google.com + - time1.google.com + - time2.google.com + - time3.google.com + - time4.google.com + - time1.facebook.com + - time2.facebook.com + - time3.facebook.com + - time4.facebook.com + - time5.facebook.com + - time.cloudflare.com + - time.apple.com + - time.asia.apple.com + - time.euro.apple.com + - time.windows.com +nexthoptable: {} +peers: [] \ No newline at end of file diff --git a/example_config/super_mode/s1.yaml b/example_config/super_mode/s1.yaml new file mode 100644 index 0000000..8da8b1b --- /dev/null +++ b/example_config/super_mode/s1.yaml @@ -0,0 +1,23 @@ +nodename: NodeSuper +privkeyv4: mL5IW0GuqbjgDeOJuPHBU2iJzBPNKhaNEXbIGwwYWWk= +privkeyv6: +EdOKIoBp/EvIusHDsvXhV1RJYbyN3Qr8nxlz35wl3I= +listenport: 3000 +repushconfiginterval: 10 +loglevel: + loglevel: normal + logtransit: true + logcontrol: true +graphrecalculatesetting: + jittertolerance: 20 + jittertolerancemultiplier: 1.1 + nodereporttimeout: 40 + recalculatecooldown: 5 +peers: +- nodeid: 1 + pubkey: ZqzLVSbXzjppERslwbf2QziWruW3V/UIx9oqwU8Fn3I= + endpoint: 127.0.0.1:3001 + static: true +- nodeid: 2 + pubkey: dHeWQtlTPQGy87WdbUARS4CtwVaR2y7IQ1qcX4GKSXk= + endpoint: 127.0.0.1:3002 + static: true \ No newline at end of file