def node_test(self, node, proxies, auth, test_onion=True):
    rv = []
    node.addnode('0.0.0.0:1234', 'onetry')
    cmd = proxies[0].queue.get()
    assert isinstance(cmd, Socks5Command)
    assert_equal(cmd.atyp, AddressType.DOMAINNAME)
    assert_equal(cmd.addr, b'0.0.0.0')
    assert_equal(cmd.port, 1234)
    if (not auth):
        assert_equal(cmd.username, None)
        assert_equal(cmd.password, None)
    rv.append(cmd)
    if self.have_ipv6:
        node.addnode('[1233:3432:2434:2343:3234:2345:6546:4534]:5443', 'onetry')
        cmd = proxies[1].queue.get()
        assert isinstance(cmd, Socks5Command)
        assert_equal(cmd.atyp, AddressType.DOMAINNAME)
        assert_equal(cmd.addr, b'0000:0000:0000:0000:0000:0000:0000:0000')
        assert_equal(cmd.port, 5443)
        if (not auth):
            assert_equal(cmd.username, None)
            assert_equal(cmd.password, None)
        rv.append(cmd)
    if test_onion:
        node.addnode('bitcoinostk4e4re.onion:9333', 'onetry')
        cmd = proxies[2].queue.get()
        assert isinstance(cmd, Socks5Command)
        assert_equal(cmd.atyp, AddressType.DOMAINNAME)
        assert_equal(cmd.addr, b'bitcoinostk4e4re.onion')
        assert_equal(cmd.port, 9333)
        if (not auth):
            assert_equal(cmd.username, None)
            assert_equal(cmd.password, None)
        rv.append(cmd)
    node.addnode('node.noumenon:9333', 'onetry')
    cmd = proxies[3].queue.get()
    assert isinstance(cmd, Socks5Command)
    assert_equal(cmd.atyp, AddressType.DOMAINNAME)
    assert_equal(cmd.addr, b'node.noumenon')
    assert_equal(cmd.port, 9333)
    if (not auth):
        assert_equal(cmd.username, None)
        assert_equal(cmd.password, None)
    rv.append(cmd)
    return rv
def node_test(self, node, proxies, auth, test_onion=True):
    rv = []
    node.addnode('0.0.0.0:1234', 'onetry')
    cmd = proxies[0].queue.get()
    assert isinstance(cmd, Socks5Command)
    assert_equal(cmd.atyp, AddressType.DOMAINNAME)
    assert_equal(cmd.addr, b'0.0.0.0')
    assert_equal(cmd.port, 1234)
    if (not auth):
        assert_equal(cmd.username, None)
        assert_equal(cmd.password, None)
    rv.append(cmd)
    if self.have_ipv6:
        node.addnode('[1233:3432:2434:2343:3234:2345:6546:4534]:5443', 'onetry')
        cmd = proxies[1].queue.get()
        assert isinstance(cmd, Socks5Command)
        assert_equal(cmd.atyp, AddressType.DOMAINNAME)
        assert_equal(cmd.addr, b'0000:0000:0000:0000:0000:0000:0000:0000')
        assert_equal(cmd.port, 5443)
        if (not auth):
            assert_equal(cmd.username, None)
            assert_equal(cmd.password, None)
        rv.append(cmd)
    if test_onion:
        node.addnode('bitcoinostk4e4re.onion:9333', 'onetry')
        cmd = proxies[2].queue.get()
        assert isinstance(cmd, Socks5Command)
        assert_equal(cmd.atyp, AddressType.DOMAINNAME)
        assert_equal(cmd.addr, b'bitcoinostk4e4re.onion')
        assert_equal(cmd.port, 9333)
        if (not auth):
            assert_equal(cmd.username, None)
            assert_equal(cmd.password, None)
        rv.append(cmd)
    node.addnode('node.noumenon:9333', 'onetry')
    cmd = proxies[3].queue.get()
    assert isinstance(cmd, Socks5Command)
    assert_equal(cmd.atyp, AddressType.DOMAINNAME)
    assert_equal(cmd.addr, b'node.noumenon')
    assert_equal(cmd.port, 9333)
    if (not auth):
        assert_equal(cmd.username, None)
        assert_equal(cmd.password, None)
    rv.append(cmd)
    return rv