cloverstd / tcping

ping over a tcp connection
MIT License
794 stars 162 forks source link

Not working with IPv6 destination address: too many colons in address #37

Open recolic opened 8 months ago

recolic commented 8 months ago

I tried to tcping 2603:1040:401:5::1a, tried the following syntax:

./tcping [2603:1040:401:5::1a]
./tcping [2603:1040:401:5::1a] 9201
./tcping 2603:1040:401:5::1a

None of them worked. Log:

PC➜  tcping git:(master) ./tcping [2603:1040:401:5::1a]
Ping tcp://2603:1040:401:5::1a:80() Failed(dial tcp: address 2603:1040:401:5::1a:80: too many colons in address) - time=13.49µs dns=0s
Ping tcp://2603:1040:401:5::1a:80() Failed(dial tcp: address 2603:1040:401:5::1a:80: too many colons in address) - time=6.51µs dns=0s
^C
Ping statistics tcp://2603:1040:401:5::1a:80
    2 probes sent.
    0 successful, 2 failed.
Approximate trip times:
    Minimum = 6.51µs, Maximum = 13.49µs, Average = 10µs⏎

PC➜  tcping git:(master) ./tcping [2603:1040:401:5::1a] 9201
Ping tcp://2603:1040:401:5::1a:9201() Failed(dial tcp: address 2603:1040:401:5::1a:9201: too many colons in address) - time=10.37µs dns=0s
Ping tcp://2603:1040:401:5::1a:9201() Failed(dial tcp: address 2603:1040:401:5::1a:9201: too many colons in address) - time=6.37µs dns=0s
Ping tcp://2603:1040:401:5::1a:9201() Failed(dial tcp: address 2603:1040:401:5::1a:9201: too many colons in address) - time=5.81µs dns=0s
Ping tcp://2603:1040:401:5::1a:9201() Failed(dial tcp: address 2603:1040:401:5::1a:9201: too many colons in address) - time=6.56µs dns=0s

Ping statistics tcp://2603:1040:401:5::1a:9201
    4 probes sent.
    0 successful, 4 failed.
Approximate trip times:
    Minimum = 5.81µs, Maximum = 10.37µs, Average = 7.277µs⏎ 

PC➜  tcping git:(master) ./tcping 2603:1040:401:5::1a
2603:1040:401:5::1a is an invalid target.
yuqaf1989 commented 7 months ago

I've add a pr to fix this error https://github.com/cloverstd/tcping/pull/38

kang000feng commented 3 months ago

https://github.com/cloverstd/tcping/pull/38

Hello yuqaf , thanks for your pr! Looks the project owner give up this project , May I ask can you combine and release a new binary file for Linux arm6 and amd64 platforms? Thanks so much

yuqaf1989 commented 3 months ago

@kang000feng I've add a release for my pr https://github.com/yuqaf1989/tcping/releases/tag/v0.1.1-fix-ipv6