ircv3-ideas icon indicating copy to clipboard operation
ircv3-ideas copied to clipboard

IRC over QUIC as a standard

Open TaaviE opened this issue 6 years ago • 22 comments

I think it's worth starting to think about providing IRC over QUIC for these reasons:

  • Mandatory strong encryption - This basically provides HSTS but for IRC, helping to somewhat solve this: https://github.com/ircv3/ircv3-specifications/issues/300
  • In theory provides lower overhead, latency and reduces transfer sizes - 0RTT is also really nice
  • Could in theory provide smooth connection migration when an IRC server goes down
  • Has a lot of development power behind it from big corporations
  • We'll most certainly see Websockets over QUIC(or HTTP/3) so that would be easier to provide when there's an existing QUIC capability in the server

What do you think? Should it maybe even be called IRCv4 :P?

TaaviE avatar Jan 13 '19 16:01 TaaviE

Could in theory provide smooth connection migration when an IRC server goes down

IRC connections are somewhat stateful, so I'm not sure how this could help, or be any different from making a new TCP connection to the new server and asking it to "resume".

grawity avatar Jan 13 '19 16:01 grawity

Could in theory provide smooth connection migration when an IRC server goes down

IRC connections are somewhat stateful, so I'm not sure how this could help, or be any different from making a new TCP connection to the new server and asking it to "resume".

Well, in theory that state could be migrated and then clients don't have to massively reconnect.

TaaviE avatar Jan 13 '19 17:01 TaaviE

Well, in theory that state could be migrated and then clients don't have to massively reconnect.

The same can be said of TCP.

progval avatar Jan 13 '19 17:01 progval

Well, in theory that state could be migrated and then clients don't have to massively reconnect.

The same can be said of TCP.

Maybe with just TCP but with TCP+TLS it's way more complex than what QUIC offers though?

TaaviE avatar Jan 13 '19 18:01 TaaviE

IRC doesn't specify any transport. Second paragraph of RFC1459: The IRC protocol has been developed on systems using the TCP/IP network protocol, although there is no requirement that this remain the only sphere in which it operates.

So it already supports QUIC in theory.

Herringway avatar Jan 13 '19 18:01 Herringway

Maybe with just TCP but with TCP+TLS it's way more complex than what QUIC offers though?

As far as I know, the transport is nearly irrelevant to the problem – most of the complexity is on the application layer anyway (getting the new server to recognize you, rebuild state, update routing for the nickname across the network). But do you have a specific mechanism in mind already? That is, what precisely does QUIC offer for this feature?

For everything else, QUIC would do the job, but it doesn't sound like it needs a specific "IRC over QUIC" profile, just a generic "QUIC as TLS substitute", same as SMTP or IMAP...

Has a lot of development power behind it from big corporations

Do any of them care about non-HTTP applications?

grawity avatar Jan 13 '19 18:01 grawity

So it already supports QUIC in theory.

It does not forbid QUIC, supporting it is a whole another topic.

Do any of them care about non-HTTP applications?

There's an expired RFC draft for DNS-over-QUIC, so there's some interest, but QUIC is still really new so making a definite decision if they care or not is rather hard to say.

But do you have a specific mechanism in mind already? That is, what precisely does QUIC offer for this feature?

You can read more about what QUIC inherently tries to provide for migration in the RFC: https://tools.ietf.org/html/draft-ietf-quic-transport-17#section-9

TaaviE avatar Jan 13 '19 19:01 TaaviE

You can read more about what QUIC inherently tries to provide for migration in the RFC:

It is all about migrating to new addresses for the same endpoint (or at least an endpoint that can exactly replicate the state at both QUIC and IRC levels), and currently seems to be limited by spec to clients only.

This would be very useful for roaming clients without having to use a bouncer, in place of the work-in-progress "RESUME" extension that's necessary for TCP. But I still don't see it helping with moving to a completely new endpoint – especially when the original one goes down unexpectedly and its state is lost (and I even suspect it would be simpler for the client to just reconnect and try resuming at IRC level.)

I think there should be documents about IRC's usage of e.g. transport layer roaming features (how they interact with bans and I:lines, whether the host change should be announced as a CHGHOST, etc.) or 0RTT usage and so on. But I feel like this should be a generic document and only using QUIC as an example, since many of those features aren't exclusive to it either.

grawity avatar Jan 13 '19 20:01 grawity

I would be interested in seeing an experimental implementation of this once the IETF publish the QUIC RFC.

SadieCat avatar Jan 13 '19 21:01 SadieCat

Moved to the ideas repo.

jwheare avatar Jan 14 '19 17:01 jwheare

Id rather go for SCTP instead of QUIC.

nyovaya avatar Sep 27 '19 09:09 nyovaya

SCTP gets mangled by middleboxes and will not have such a good support as QUIC/HTTP3 does in various (standard)libraries.

TaaviE avatar Sep 27 '19 12:09 TaaviE

I don't think it should be mandatory. Perhaps a feature where is mandatory for being labeled IRCv3, but also consider that unencrypted IRC may be used for networks that are already private/encrypted and is both redundant and hard to implement a Key Infrastructure.

VPNs, and darknets like TOR and I2P come to mind.

GIJack avatar Oct 26 '19 13:10 GIJack

SCTP gets mangled by middleboxes

Then, SCTP-over-UDP (RFC 6951), for the same reason QUIC uses UDP.

bortzmeyer avatar Nov 15 '19 09:11 bortzmeyer

The main reason i'm personally uninterested in SCTP is that there's no support in either Windows or macOS (which has it IPPROTO_SCTP in the headers but creating a socket using it results in an error) which makes it not very useful for the average user.

SadieCat avatar Nov 15 '19 10:11 SadieCat

We should then not blame SCTP but Microsoft and Apple for that.

nyovaya avatar Nov 15 '19 11:11 nyovaya

You can blame whoever you want but that doesn't change the reality that features which 90% of potential users can't use are useless.

If Google couldn't get OS vendors to care about SCTP then we won't be able to.

SadieCat avatar Nov 15 '19 14:11 SadieCat

There is a proper driver which can be installed for OSX and one for windows, but I heard its not in a good state. Maybe we should get more SCTP applications first and then demand OS vendors to add SCTP drivers.

nyovaya avatar Nov 15 '19 16:11 nyovaya

IMO SCTP talk should be left to some other issue.

TaaviE avatar Nov 15 '19 16:11 TaaviE

Please move SCTP discussion over here: https://github.com/ircv3/ircv3-ideas/issues/62

justjanne avatar Nov 16 '19 11:11 justjanne

The current QUIC interop situation is this: https://docs.google.com/spreadsheets/d/1D0tW89vOoaScs3IY9RGC0UesWGAwE6xyLk0l4JtvTVg/edit#gid=117825384

The current draft for IETF QUIC is still moving relatively quickly, so it makes sense to be cautious and wait for consensus before standardising this, but IMO it'd be interesting to experiment with the current 14th draft against which implementations are currently slowly converging.

justjanne avatar Nov 16 '19 11:11 justjanne

QUICv1 has been finished for a while at this point (A small v2 is currently being worked on), support should be good enough that devs shouldn't expect to run into issues with functionality or compatibility

TheDecryptor avatar May 12 '22 05:05 TheDecryptor