Check IP before adding to knownnodes #1065

Merged
g1itch merged 1 commits from exceptions into v0.6 2018-01-25 13:17:18 +01:00
g1itch commented 2017-10-07 16:52:33 +02:00 (Migrated from github.com)

I rewrited helper_bootstrap a bit to ensure that only valid IP addresses will be added to knownnodes.

The problem is in last elements of this list:

import socket
socket.getaddrinfo('bootstrap8080.bitmessage.org', 80)

You don't see it because of except: without exception type in src/helper_bootstrap.py#L52

I rewrited `helper_bootstrap` a bit to ensure that only valid IP addresses will be added to knownnodes. The problem is in last elements of this list: ```python import socket socket.getaddrinfo('bootstrap8080.bitmessage.org', 80) ``` You don't see it because of `except:` without exception type in [src/helper_bootstrap.py#L52](../blob/v0.6/src/helper_bootstrap.py#L52)
PeterSurda commented 2017-10-18 06:17:50 +02:00 (Migrated from github.com)

I want to rewrite it as well to move the lookups into asyncore when using SOCKS. Then I can get rid of SocksiPi. The asyncore SOCKS resolving hasn't been tested but it probably works, just there isn't a way to communicate with it. Maybe through two queues like sql thread? Perhaps I also need to add some error handling.

Also, the onion bootstrap IP should be added even if not on tor, in order to allow bootstrapping when on a transparent proxy.

I want to rewrite it as well to move the lookups into asyncore when using SOCKS. Then I can get rid of SocksiPi. The asyncore SOCKS resolving hasn't been tested but it probably works, just there isn't a way to communicate with it. Maybe through two queues like sql thread? Perhaps I also need to add some error handling. Also, the onion bootstrap IP should be added even if not on tor, in order to allow bootstrapping when on a transparent proxy.
This repo is archived. You cannot comment on pull requests.
No description provided.