osa1 / tiny

A terminal IRC client
MIT License
1.01k stars 59 forks source link

ipv6 #28

Closed whoizit closed 7 years ago

whoizit commented 7 years ago

trying connect to bitlbee via "/connect host:port" via ipv6, but get Conection error (HUP). Will try to reconnect in 30 seconds.

but same with irssi works

tiny connected to bitlbee over ipv4

I can connect to default irc mozilla server.. ipv6 related problem?

osa1 commented 7 years ago

It's right that tiny doesn't support ipv6 yet, but this shouldn't be too hard to implement.

Can you give the exact /connect command you tried to use?

Thanks for the issue.

whoizit commented 7 years ago

I'm using host proxy.on.hyperboria.name, but u can't connect too it, cause it CJDNS darknet with own ipv6 subnet addresses. Also cause I'm turn off irc server on this address. Opened IRC servers with ipv6 addresses on this network for example irc.fc00.io, irc.hypeirc.net

U can try ipv6.irc.freenode.net, same behavior: /connect ipv6.irc.freenode.net 6667

osa1 commented 7 years ago

Thanks for the details. I'll be fixing this over the weekend.

osa1 commented 7 years ago

I have an implementation of this but I can't test it because it seems like I can't connect to any IPv6 IRC servers on my system. For example, when I tried to connect to freenode over IPv6 from irssi I get this:

11:02 -!- Irssi: Looking up ipv6.irc.freenode.net
11:02 -!- Irssi: Connecting to ipv6.irc.freenode.net [2001:5a0:3604:1:64:86:243:181] port 6667
11:02 -!- Irssi: Unable to connect server ipv6.irc.freenode.net port 6667 [Network is unreachable]

So I'm not sure how to test my patch.

DanielOaks commented 7 years ago

Hmm, would you be able to setup a local testing server that just listens on localhost, maybe connecting to ::1 in the client or something?

whoizit commented 7 years ago

u can publish patch right here, we can test it

osa1 commented 7 years ago

@atommixz good idea, thanks. Just pushed the code to ipv6 branch.

whoizit commented 7 years ago

Can't compile on current nightly. I tried to add a line #![feature(const_atomic_bool_new)] to term_input-0.1.1/src/lib.rs but the same error

   Compiling term_input v0.1.1
error: `std::sync::atomic::AtomicBool::new` is not yet stable as a const fn
  --> /home/atommixz/.cargo/registry/src/github.com-1ecc6299db9ec823/term_input-0.1.1/src/lib.rs:77:36
   |
77 | static GOT_SIGWINCH : AtomicBool = AtomicBool::new(false);
   |                                    ^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: in Nightly builds, add `#![feature(const_atomic_bool_new)]` to the crate attributes to enable

error: aborting due to previous error

error: Could not compile `term_input`.
osa1 commented 7 years ago

Ops, it seems the latest nightly just broke the build. It should be fixed now. Could you pull the branch and try again?

whoizit commented 7 years ago

2017-09-18-225604_1918x386_scrot Looks like works for me. But I can't connect to another one, its correct? Unsupported command: "/connect irc.mozilla.org 6667"

osa1 commented 7 years ago

The syntax is /connect host:port, so you should try /connect irc.mozilla.org:6667. If you're already connected to this host (irc.mozilla.org) then tiny will just open that tab instead of creating a new connection.

whoizit commented 7 years ago

Ok. It works. Only one warning

   Compiling tiny v0.2.3 (file:///home/atommixz/build/tiny)
warning: unused extern crate
  --> src/lib.rs:10:1
   |
10 | extern crate alloc_system;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unused_extern_crates)] on by default

    Finished dev [unoptimized + debuginfo] target(s) in 49.1 secs
whoizit commented 7 years ago

Thank you very much. Very nice software!

whoizit commented 7 years ago

I can't connect to 2 ipv6 servers same time. First server OK, second NOT OK.

02:37 Disconnected. Will try to reconnect in 30 seconds.
Connecting...                                           
Disconnected. Will try to reconnect in 30 seconds. 

but I can with irssi

osa1 commented 7 years ago

Hmm.. Connecting to multiple ipv6 servers should work. We create a new socket for each just like how we do it for ipv4 servers. Could you share with me the /connect ... commands you're running?

osa1 commented 7 years ago

Merged the branched to master, bumped version number and published it on crates.io.

Please open the issue again (or open a new issue) if it doesn't work for you.