Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into minecraft
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoreeq committed Jul 10, 2021
2 parents 910cbe5 + 35020b0 commit e21b2f1
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 97 deletions.
92 changes: 47 additions & 45 deletions assets/peers.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,66 @@
tcp://140.238.168.104:17117
tcp://159.203.12.215:1010
tls://159.203.12.215:1020
tcp://185.165.169.234:8880
tcp://195.123.245.146:7743
tcp://[2001:470:1f13:e56::64]:39565
tcp://212.129.52.193:39565
tcp://213.188.197.95:10010
tcp://213.188.199.150:10010
tcp://213.188.210.9:10010
tcp://217.195.164.4:10000
tcp://37.205.14.171:46370
tcp://[2a03:3b40:fe:ab::1]:46370
tcp://[2a04:5b81:2010::90]:2000
tcp://[2a05:9403::8b]:7743
tls://217.195.164.4:10531
tcp://212.129.52.193:39565
tcp://[2a09:8280:1::3:312]:10010
tcp://[2a09:8280:1::3:313]:10010
tcp://[2a09:8280:1::a:2e2]:10010
tcp://37.205.14.171:46370
tcp://46.151.26.194:60575
tcp://51.15.204.214:12345
tcp://[2001:470:1f13:e56::64]:39565
tls://212.129.52.193:39575
tls://51.15.204.214:54321
tls://[2001:470:1f13:e56::64]:39575
tcp://78.27.153.163:33165
tcp://94.130.203.208:5999
tcp://bunkertreff.ddns.net:5454
tcp://curiosity.tdjs.tech:30003
tcp://lancis.iscute.moe:49273
tcp://lan.tdem.in:50001
tcp://longseason.1200bps.xyz:13121
tcp://ygg.cofob.ru:80
tcp://yugudorashiru.de:80
tls://ygg.cofob.ru:443
tls://yugudorashiru.de:443
tcp://213.188.197.95:10010
tcp://[2a09:8280:1::3:313]:10010
tls://213.188.197.95:10020
tls://[2a09:8280:1::3:313]:10020
tls://45.147.198.155:6010
tls://94.103.82.150:8080
tcp://yggdrasil.frank2.net:1337
tcp://185.165.169.234:8880
tls://185.165.169.234:8443
tcp://46.151.26.194:60575
tcp://lan.tdem.in:50001
tcp://ygg-ru.cofob.ru:18000
tcp://ygg-ru2.cofob.ru:80
tcp://ygg.loskiq.dev:17313
tcp://yggnode.cf:18226
tcp://ygg-ru2.cofob.ru:80
tcp://ygg-ru.cofob.ru:18000
tcp://ygg.tomasgl.ru:61933
tcp://ygg.tomasgl.ru:61933?key=c5e0c28a600c2118e986196a0bbcbda4934d8e9278ceabea48838dc5d8fae576
tcp://yggnode.cf:18226
tls://185.22.60.71:8443
tls://46.151.26.194:8443
tls://[2a01:d0:ffff:4353::2]:6010
tls://lan.tdem.in:50002
tls://ygg-ru.cofob.ru:18001
tls://ygg-ru2.cofob.ru:443
tls://ygg.loskiq.dev:17314
tls://ygg.tomasgl.ru:61944
tls://ygg.tomasgl.ru:61944?key=c5e0c28a600c2118e986196a0bbcbda4934d8e9278ceabea48838dc5d8fae576
tls://yggnode.cf:18227
tcp://yugudorashiru.de:80
tcp://y.zbin.eu:7743
tcp://[2a04:5b81:2010::90]:2000
tls://140.238.168.104:17121
tls://159.203.12.215:1020
tls://185.130.44.194:7040
tls://185.165.169.234:8443
tls://185.22.60.71:8443
tls://[2001:470:1f13:e56::64]:39575
tls://212.129.52.193:39575
tls://213.188.197.95:10020
tls://213.188.199.150:10020
tls://217.195.164.4:10531
tls://[2a01:d0:ffff:4353::2]:6010
tls://[2a07:e01:105:444:c634:6bff:feb5:6e28]:7040
tcp://140.238.168.104:17117
tls://140.238.168.104:17121
tcp://78.27.153.163:33165
tls://[2a09:8280:1::3:313]:10020
tls://[2a09:8280:1::a:2e2]:10020
tls://45.147.198.155:6010
tls://46.151.26.194:8443
tls://51.15.204.214:54321
tls://78.27.153.163:33166
tcp://curiosity.tdjs.tech:30003
tcp://213.188.199.150:10010
tcp://213.188.210.9:10010
tcp://[2a09:8280:1::3:312]:10010
tcp://[2a09:8280:1::a:2e2]:10010
tcp://lancis.iscute.moe:49273
tcp://longseason.1200bps.xyz:13121
tls://94.103.82.150:8080
tls://lancis.iscute.moe:49274
tls://lan.tdem.in:50002
tls://longseason.1200bps.xyz:13122
tls://ygg.cofob.ru:443
tls://ygg.loskiq.dev:17314
tls://yggnode.cf:18227
tls://ygg-ru2.cofob.ru:443
tls://ygg-ru.cofob.ru:18001
tls://ygg.tomasgl.ru:61944
tls://ygg.tomasgl.ru:61944?key=c5e0c28a600c2118e986196a0bbcbda4934d8e9278ceabea48838dc5d8fae576
tls://yugudorashiru.de:443
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/mitchellh/mapstructure v1.4.1
github.com/vishvananda/netlink v1.1.0
github.com/yggdrasil-network/yggdrasil-go v0.4.0
github.com/zhoreeq/meshname v0.1.0
github.com/zhoreeq/meshname v0.1.2
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b
golang.org/x/text v0.3.7-0.20210503195748-5c7c50ebbd4f
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ github.com/yggdrasil-network/yggdrasil-go v0.4.0 h1:H2CS2pTjCTzNQMHFU7sEW3Ge59fQ
github.com/yggdrasil-network/yggdrasil-go v0.4.0/go.mod h1:/iMJjOrXRsjlFgqhWOPhecOKi7xHmHiY4/En3A42Fog=
github.com/zhoreeq/meshname v0.1.0 h1:o7HlQeki4zxv+iorEhmmr4qRQdA2c43/+DLjeOO1Z6g=
github.com/zhoreeq/meshname v0.1.0/go.mod h1:3I8MpFZ304bAYiD+e+ovlMDDZat8aKyUlqllUok4qm0=
github.com/zhoreeq/meshname v0.1.2 h1:82jjvRNx9U5OA+WgufQwu/6TFdfCaOeSaXW1ili4K0I=
github.com/zhoreeq/meshname v0.1.2/go.mod h1:3I8MpFZ304bAYiD+e+ovlMDDZat8aKyUlqllUok4qm0=
gitlab.com/golang-commonmark/puny v0.0.0-20191124015043-9f83538fa04f h1:Wku8eEdeJqIOFHtrfkYUByc4bCaTeA6fL0UJgfEiFMI=
gitlab.com/golang-commonmark/puny v0.0.0-20191124015043-9f83538fa04f/go.mod h1:Tiuhl+njh/JIg0uS/sOJVYi0x2HEa5rc1OAaVsb5tAs=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
2 changes: 1 addition & 1 deletion make_assets
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PEER_LIST=${PEER_LIST:-"assets/peers.txt"}
# Create peers.go "asset" file
make_peers_go() {
PEERS_GO_FILE="src/autopeering/peers.go"
printf "package autopeering\nvar PublicPeers = []string{\n" >$PEERS_GO_FILE
printf "package autopeering\n\nvar PublicPeers = []string{\n" >$PEERS_GO_FILE
while IFS= read -r line
do
printf "\t\"$line\",\n" >> $PEERS_GO_FILE
Expand Down
12 changes: 8 additions & 4 deletions src/autopeering/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const (
linkLocalPrefix = "fe80"
autopeerTimeout = time.Minute
autopeerTimeout = 30 * time.Second
peerCheckTimeout = 10 * time.Second
)

Expand Down Expand Up @@ -69,6 +69,7 @@ func (ap *AutoPeering) checkPeerLoop() {

for _, p := range ap.core.GetPeers() {
if p.Remote[:4] != linkLocalPrefix {
ap.log.Debugln("autopeering: remote peer is connected ", p.Remote)
havePeers = true
break
}
Expand All @@ -77,15 +78,18 @@ func (ap *AutoPeering) checkPeerLoop() {
if havePeers {
ap.hadPeers = time.Now()
} else if time.Since(ap.hadPeers) > autopeerTimeout {
ap.log.Debugln("autopeering: adding a new peer")
ap.hadPeers = time.Now()
peers := RandomPick(GetClosestPeers(*ap.publicPeers, 10), 1)
if len(peers) == 1 {
peerUri := ap.getPeerUri(peers[0])

ap.log.Infoln("autopeering: adding new peer", peerUri)
if err := ap.core.CallPeer(peerUri, ""); err != nil {
ap.log.Infoln("autopeering: Failed to connect to peer:", err)
}
go func(){
if err := ap.core.CallPeer(peerUri, ""); err != nil {
ap.log.Infoln("autopeering: peer connection failed:", err)
}
}()
}
}

Expand Down
92 changes: 47 additions & 45 deletions src/autopeering/peers.go
Original file line number Diff line number Diff line change
@@ -1,67 +1,69 @@
package autopeering

var PublicPeers = []string{
"tcp://140.238.168.104:17117",
"tcp://159.203.12.215:1010",
"tls://159.203.12.215:1020",
"tcp://185.165.169.234:8880",
"tcp://195.123.245.146:7743",
"tcp://[2001:470:1f13:e56::64]:39565",
"tcp://212.129.52.193:39565",
"tcp://213.188.197.95:10010",
"tcp://213.188.199.150:10010",
"tcp://213.188.210.9:10010",
"tcp://217.195.164.4:10000",
"tcp://37.205.14.171:46370",
"tcp://[2a03:3b40:fe:ab::1]:46370",
"tcp://[2a04:5b81:2010::90]:2000",
"tcp://[2a05:9403::8b]:7743",
"tls://217.195.164.4:10531",
"tcp://212.129.52.193:39565",
"tcp://[2a09:8280:1::3:312]:10010",
"tcp://[2a09:8280:1::3:313]:10010",
"tcp://[2a09:8280:1::a:2e2]:10010",
"tcp://37.205.14.171:46370",
"tcp://46.151.26.194:60575",
"tcp://51.15.204.214:12345",
"tcp://[2001:470:1f13:e56::64]:39565",
"tls://212.129.52.193:39575",
"tls://51.15.204.214:54321",
"tls://[2001:470:1f13:e56::64]:39575",
"tcp://78.27.153.163:33165",
"tcp://94.130.203.208:5999",
"tcp://bunkertreff.ddns.net:5454",
"tcp://curiosity.tdjs.tech:30003",
"tcp://lancis.iscute.moe:49273",
"tcp://lan.tdem.in:50001",
"tcp://longseason.1200bps.xyz:13121",
"tcp://ygg.cofob.ru:80",
"tcp://yugudorashiru.de:80",
"tls://ygg.cofob.ru:443",
"tls://yugudorashiru.de:443",
"tcp://213.188.197.95:10010",
"tcp://[2a09:8280:1::3:313]:10010",
"tls://213.188.197.95:10020",
"tls://[2a09:8280:1::3:313]:10020",
"tls://45.147.198.155:6010",
"tls://94.103.82.150:8080",
"tcp://yggdrasil.frank2.net:1337",
"tcp://185.165.169.234:8880",
"tls://185.165.169.234:8443",
"tcp://46.151.26.194:60575",
"tcp://lan.tdem.in:50001",
"tcp://ygg-ru.cofob.ru:18000",
"tcp://ygg-ru2.cofob.ru:80",
"tcp://ygg.loskiq.dev:17313",
"tcp://yggnode.cf:18226",
"tcp://ygg-ru2.cofob.ru:80",
"tcp://ygg-ru.cofob.ru:18000",
"tcp://ygg.tomasgl.ru:61933",
"tcp://ygg.tomasgl.ru:61933?key=c5e0c28a600c2118e986196a0bbcbda4934d8e9278ceabea48838dc5d8fae576",
"tcp://yggnode.cf:18226",
"tcp://yugudorashiru.de:80",
"tcp://y.zbin.eu:7743",
"tls://140.238.168.104:17121",
"tls://159.203.12.215:1020",
"tls://185.130.44.194:7040",
"tls://185.165.169.234:8443",
"tls://185.22.60.71:8443",
"tls://46.151.26.194:8443",
"tls://[2001:470:1f13:e56::64]:39575",
"tls://212.129.52.193:39575",
"tls://213.188.197.95:10020",
"tls://213.188.199.150:10020",
"tls://217.195.164.4:10531",
"tls://[2a01:d0:ffff:4353::2]:6010",
"tls://[2a07:e01:105:444:c634:6bff:feb5:6e28]:7040",
"tls://[2a09:8280:1::3:313]:10020",
"tls://[2a09:8280:1::a:2e2]:10020",
"tls://45.147.198.155:6010",
"tls://46.151.26.194:8443",
"tls://51.15.204.214:54321",
"tls://78.27.153.163:33166",
"tls://94.103.82.150:8080",
"tls://lancis.iscute.moe:49274",
"tls://lan.tdem.in:50002",
"tls://ygg-ru.cofob.ru:18001",
"tls://ygg-ru2.cofob.ru:443",
"tls://longseason.1200bps.xyz:13122",
"tls://ygg.cofob.ru:443",
"tls://ygg.loskiq.dev:17314",
"tls://yggnode.cf:18227",
"tls://ygg-ru2.cofob.ru:443",
"tls://ygg-ru.cofob.ru:18001",
"tls://ygg.tomasgl.ru:61944",
"tls://ygg.tomasgl.ru:61944?key=c5e0c28a600c2118e986196a0bbcbda4934d8e9278ceabea48838dc5d8fae576",
"tls://yggnode.cf:18227",
"tcp://y.zbin.eu:7743",
"tcp://[2a04:5b81:2010::90]:2000",
"tls://185.130.44.194:7040",
"tls://[2a07:e01:105:444:c634:6bff:feb5:6e28]:7040",
"tcp://140.238.168.104:17117",
"tls://140.238.168.104:17121",
"tcp://78.27.153.163:33165",
"tls://78.27.153.163:33166",
"tcp://curiosity.tdjs.tech:30003",
"tcp://213.188.199.150:10010",
"tcp://213.188.210.9:10010",
"tcp://[2a09:8280:1::3:312]:10010",
"tcp://[2a09:8280:1::a:2e2]:10010",
"tcp://lancis.iscute.moe:49273",
"tcp://longseason.1200bps.xyz:13121",
"tls://lancis.iscute.moe:49274",
"tls://longseason.1200bps.xyz:13122"}
"tls://yugudorashiru.de:443"}
4 changes: 3 additions & 1 deletion src/meshname/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func (s *MeshnameServer) Init(yggcore *core.Core, yggConfig *config.NodeConfig,
s.server = _meshname.New(
log,
popConfig.Meshname.Listen,
map[string]*net.IPNet{"ygg": yggIPNet, "meshname": yggIPNet},
map[string]*net.IPNet{"ygg": yggIPNet, "meshname": yggIPNet, "vapordns": yggIPNet},
false, // enable meship protocol
false, // allow remote queries
)

if dnsRecords, err := _meshname.ParseDNSRecordsMap(popConfig.Meshname.Config); err == nil {
Expand Down

0 comments on commit e21b2f1

Please sign in to comment.