gnome-twitch
gnome-twitch copied to clipboard
Connect to IRC using TLS
According to Twitch's IRC docs, it looks like TLS is supported:
Use server irc.chat.twitch.tv. For SSL, use port 443; otherwise, use port 6667.
There's also a somewhat contradictory thread on the dev forum indicating it should be port 6697:
https://discuss.dev.twitch.tv/t/notice-of-upcoming-changes-websockets-and-secure-connections/2269/27
In any case, assuming it's currently possible, using TLS connections by default would be a good move. It looks like GSocketClient should make this change pretty transparent. I'm not sure why only the non-secure ports are listed in the response from http://api.twitch.tv/api/channels/CHANNEL/chat_properties
at this time (considering the age of the thread above), but a fix may be as simple as just ignoring the port scraped from that API and hardcoding the port to 6697 or 443 (whichever is correct) here: https://github.com/vinszent/gnome-twitch/blob/692a9dc91b74a4ce1924f56cc2c054283f77d00b/src/gt-irc.c#L1092-L1098
6697 works fine and is the standard IRC TLS port.