Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update-geo #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix update-geo #12

wants to merge 2 commits into from

Conversation

0-MegaMind-0
Copy link

@0-MegaMind-0 0-MegaMind-0 commented Sep 25, 2020

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>

Fix update-geo with the updated url as the old one doesn't resolve to any IP

Signed-off-by: MegaMind <57232930+0-MegaMind-0@users.noreply.github.com>
@sonarcloud
Copy link

sonarcloud bot commented Sep 25, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@TMineCola
Copy link

@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

@bluet bluet added the help wanted Extra attention is needed label Apr 7, 2021
@sonarcloud
Copy link

sonarcloud bot commented Feb 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants