yggdrasil-go
yggdrasil-go copied to clipboard
URL decoding issue with link-local addresses
~~I must say Windows8 is much much better than 10 and 11.~~
PS C:\Program Files\Yggdrasil> .\yggdrasilctl.exe getself
Build name: yggdrasil
Build version: 0.5.4
IPv6 address: 202:f049:a4a5:831c:5df5:ad50:24b9:1265
IPv6 subnet: 302:f049:a4a5:831c::/64
Routing table size: 1
Public key: 21f6cb6b4f9c74414a55fb68ddb34505817ef3f4599975711539475813fe50b0
PS C:\Program Files\Yggdrasil> .\yggdrasilctl.exe getpeers
2024/01/22 03:59:03 Can't open config file from default location C:\Program Files\Yggdrasil\yggdrasil.conf
2024/01/22 03:59:03 Falling back to platform default tcp://localhost:9001
2024/01/22 03:59:03 Connecting to TCP socket localhost:9001
2024/01/22 03:59:03 Connected
2024/01/22 03:59:03 Sending request: getpeers
2024/01/22 03:59:03 Request sent
2024/01/22 03:59:03 Fatal error: parse "tls://[fe80::6ac7:faa3:6f10:585f%25%E4%BB%A5%E5%A4%AA%E7%BD%91]": invalid URL es
cape "%E4"
PS C:\Program Files\Yggdrasil> cat ..\..\ProgramData\Yggdrasil\yggdrasil.log
2024/01/22 03:45:22 Build name: yggdrasil
2024/01/22 03:45:22 Build version: 0.5.4
2024/01/22 03:45:22 Your public key is 21f6cb6b4f9c74414a55fb68ddb34505817ef3f4599975711539475813fe50b0
2024/01/22 03:45:22 Your IPv6 address is 202:f049:a4a5:831c:5df5:ad50:24b9:1265
2024/01/22 03:45:22 Your IPv6 subnet is 302:f049:a4a5:831c::/64
2024/01/22 03:45:22 TCP admin socket listening on 127.0.0.1:9001
2024/01/22 03:45:22 TLS listener started on [fe80::8520:621c:cd6e:7c6b%浠ュお缃慮:54919
2024/01/22 03:54:32 Build name: yggdrasil
2024/01/22 03:54:32 Build version: 0.5.4
2024/01/22 03:54:32 Your public key is 21f6cb6b4f9c74414a55fb68ddb34505817ef3f4599975711539475813fe50b0
2024/01/22 03:54:32 Your IPv6 address is 202:f049:a4a5:831c:5df5:ad50:24b9:1265
2024/01/22 03:54:32 Your IPv6 subnet is 302:f049:a4a5:831c::/64
2024/01/22 03:54:32 TCP admin socket listening on 127.0.0.1:9001
2024/01/22 03:54:32 TLS listener started on [fe80::8520:621c:cd6e:7c6b%浠ュお缃慮:55138
PS C:\Program Files\Yggdrasil>
The C:\ProgramData\Yggdrasil\yggdrasil.conf
is just generated without any modification.
looks like an issue with locale
It seems have nothing to do with Win8.
I reinstalled Win10 and get same error..... Don't know why T-T
The problem isn't your processor endianness. The problem appears to be because your network adapter is called 以太网
and Windows tries to put that into the link-local address, which the URL parser trips over.
I would guess that if you rename your 以太网
network interface to Ethernet
(or something in Latin script) in Control Panel that the problem goes away?
Problem demonstrated here: https://go.dev/play/p/TRVFjToeE4Y
In short, this looks like a problem in the upstream Go standard library and probably affects various non-Latin scripts.
Thanks,after I renamed 以太网
to Ethernet
, yggdrasilctl getpeers
doesn't get error. But I still can not ping to it.
The Error PC:
C:\Program Files\Yggdrasil>.\yggdrasilctl.exe getself
Build name: yggdrasil
Build version: 0.5.4
IPv6 address: 202:fbda:60ec:af56:d21b:f23d:a406:ebaa
IPv6 subnet: 302:fbda:60ec:af56::/64
Routing table size: 15
Public key: 2084b3e26a1525bc81b84b7f228aaf18a8f322aae5e212b8ba8b2005ae0df57a
C:\Program Files\Yggdrasil>.\yggdrasilctl.exe getpeers
URI State Dir IP Address Uptime RX TX Pr Last Error
tls://[fe80::e02d:40d4:e65b:dde6%25Ethernet] Down Out 0s 0kb 0kb 0 0s ago:
tls://[fe80::6ac7:faa3:6f10:585f%25Ethernet] Down Out 0s 0kb 0kb 0 0s ago:
tls://66.112.220.133:54321 Up Out 200:32ba:8921:bc85:a227:b4fd:aaec:b44 30m56s 19kb 8kb 0 -
tls://sin.yuetau.net:6643 Up Out 200:b858:3f39:af76:83ae:bb1:ebb2:604e 30m56s 17kb 10kb 0 -
tls://yggno.de:18227 Up Out 202:a2a5:dead:ded:9a54:4ab5:6aa7:1645 30m56s 16kb 7kb 0 -
tls://39.100.71.204:54321 Up Out 200:5a9:90d0:ca7:cda7:60b6:b372:ed71 30m53s 8kb 11kb 0 -
The OK PC:
PS C:\Program Files\Yggdrasil> .\yggdrasilctl.exe getself
Build name: yggdrasil
Build version: 0.5.4
IPv6 address: 201:9057:cd38:f9e3:a095:4537:c403:1525
IPv6 subnet: 301:9057:cd38:f9e3::/64
Routing table size: 15
Public key: 5bea0cb1c18717daaeb20eff3ab68f7dba82263510506020feb89cc74559739a
PS C:\Program Files\Yggdrasil> .\yggdrasilctl.exe getpeers
URI State Dir IP Address Uptime RX TX Pr Last Error
tls://39.100.71.204:54321 Up Out 200:5a9:90d0:ca7:cda7:60b6:b372:ed71 7h21m49s 575kb 536kb 0 -
tls://66.112.220.133:54321 Up Out 200:32ba:8921:bc85:a227:b4fd:aaec:b44 7h21m49s 33mb 727kb 0 -
tls://yggno.de:18227 Up Out 202:a2a5:dead:ded:9a54:4ab5:6aa7:1645 3h17m24s 91kb 43kb 0 -
tls://sin.yuetau.net:6643 Up Out 200:b858:3f39:af76:83ae:bb1:ebb2:604e 1h25m12s 48kb 27kb 0 -
PS C:\Program Files\Yggdrasil> ping 202:fbda:60ec:af56:d21b:f23d:a406:ebaa # ping the error pc yggdrasil-ip
Pinging 202:fbda:60ec:af56:d21b:f23d:a406:ebaa with 32 bytes of data:
Request timed out.
Both ErrorPC and OkPC are connecting to the same peers, OkPC should can ping to ErrorPC.
Notes the OkPC's conf file is generated by 0.4.7, I didn't change it when update to 0.5.4. ErrorPC's conf file is generated by 0.5.4 with just added same peers.
Try yggdrasilctl.exe getSessions
during/after pinging. If you see a session for the address you're trying to reach, but aren't getting ping responses, then it's probably a firewall on the host dropping the pings.
But I still can not ping to it.
Can you ping other nodes in the Yggdrasil network?
Like 200:b858:3f39:af76:83ae:bb1:ebb2:604e
from your output.
@neilalexander Thank you very much. I did find it in yggdrasilctl getSessions
. And after I turning off the ErrorPC's firewall, everything works.Thank you all.