From 1c8ee5d84b85d0cc018bb87d7738988fb03d59c8 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 2 Oct 2015 23:17:57 -0700 Subject: [PATCH] core: support IPv6 connections --- classes.py | 3 ++- config.yml.example | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/classes.py b/classes.py index 955a190..3c97aa3 100644 --- a/classes.py +++ b/classes.py @@ -99,7 +99,8 @@ class Irc(): port = self.serverdata["port"] checks_ok = True try: - self.socket = socket.socket() + stype = socket.AF_INET6 if self.serverdata.get("ipv6") else socket.AF_INET + self.socket = socket.socket(stype) self.socket.setblocking(0) # Initial connection timeout is a lot smaller than the timeout after # we've connected; this is intentional. diff --git a/config.yml.example b/config.yml.example index 41bdb40..931e5ed 100644 --- a/config.yml.example +++ b/config.yml.example @@ -101,7 +101,11 @@ servers: # ssl_fingerprint: "e0fee1adf795c84eec4735f039503eb18d9c35cc" ts6net: - ip: 127.0.0.1 + ip: ::1 + + # Determines whether IPv6 should be used for this connection. + ipv6: yes + port: 7000 recvpass: "abcd" sendpass: "abcd"