Fix update-geo
Fix update-geo with the updated url as the old one doesn't resolve to any IP
Error
$ proxybroker update-geo
The update in progress, please waite for a while...
Traceback (most recent call last):
File "/usr/lib/python3.7/urllib/request.py", line 1350, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.7/http/client.py", line 1262, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1308, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1257, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1028, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 968, in send
self.connect()
File "/usr/lib/python3.7/http/client.py", line 940, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.7/socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.7/socket.py", line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/proxybroker", line 8, in <module>
sys.exit(cli())
File "/home/user/.local/lib/python3.7/site-packages/proxybroker/cli.py", line 369, in cli
ns.func()
File "/home/user/.local/lib/python3.7/site-packages/proxybroker/utils.py", line 118, in update_geoip_db
urllib.request.urlretrieve(url, local_file)
File "/usr/lib/python3.7/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/lib/python3.7/urllib/request.py", line 1378, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.7/urllib/request.py", line 1352, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and
0 Security Hotspots to review)
0 Code Smells
@0-MegaMind-0 Thanks for PR, I try to survey this issue but I found it's according to "significant changes to accessing GeoLite2 databases" Relative link and they try to let user accept privacy policy before using their databases.
Because of above and privacy issue I think this PR cannot be accept, also I don't suggest that you add your license key in source code. It may lead to legal dispute.
Maybe you would try to redirect user to registe thier own license key and config it in proxybroker?
Sincerely







