Bug#1006266: reportbug: does not work if Socks proxy is used in environment
Package: reportbug
Version: 7.10.3+deb11u1
Severity: normal
X-Debbugs-Cc: axst@users.sourceforge.net
Dear Maintainer,
I use Tor Socks and these environment settings:
$ set | grep -i proxy
ALL_PROXY=socks://127.0.0.1:9050/
NO_PROXY=localhost,127.0.0.0/8,::1,10.0.0.0/8,192.168.0.0/16
all_proxy=socks://127.0.0.1:9050/
no_proxy=localhost,127.0.0.0/8,::1,10.0.0.0/8,192.168.0.0/16
Report Bugs complains and exits:
Checking for newer versions at madison...
Traceback (most recent call last):
File "/usr/bin/reportbug", line 2381, in <module>
main()
File "/usr/bin/reportbug", line 1120, in main
return iface.user_interface()
File "/usr/bin/reportbug", line 1697, in user_interface
(avail, toonew) = checkversions.check_available(
File "/usr/lib/python3/dist-packages/reportbug/checkversions.py", line 294, in check_available
stuff = get_versions_available(package, timeout, dists, http_proxy, arch)
File "/usr/lib/python3/dist-packages/reportbug/checkversions.py", line 135, in get_versions_available
page = open_url(url, http_proxy, timeout)
File "/usr/lib/python3/dist-packages/reportbug/urlutils.py", line 183, in open_url
page = urlopen(url, proxies, timeout)
File "/usr/lib/python3/dist-packages/reportbug/urlutils.py", line 127, in urlopen
return requests.get(url, headers=headers, proxies=proxies, timeout=timeout).text
File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 412, in send
conn = self.get_connection(request.url, proxies)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 309, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 182, in proxy_manager_for
manager = self.proxy_manager[proxy] = SOCKSProxyManager(
File "/usr/lib/python3/dist-packages/urllib3/contrib/socks.py", line 198, in __init__
raise ValueError("Unable to determine SOCKS version from %s" % proxy_url)
ValueError: Unable to determine SOCKS version from socks://127.0.0.1:9050/
If I put a line with “http_proxy” without arguments into ~/.reportbugrc, there is no
change. If I add “all_proxy” without argounts, Report Bug cannot reach the Debian servers:
Error retrieving information on existing bug reports from the BTS. The following error was detected:
Unable to connect to Debian BTS (error: "ServerNotFoundError('Unable to find the server at bugs.debian.org')");
Do you still want to file a report [y|N|q|?]?
I hope this report can be sent out anyway.
-- Package-specific info:
** Environment settings:
EDITOR="/usr/bin/utvim"
PAGER="/usr/bin/less"
INTERFACE="text"
** /home/axel/.reportbugrc:
reportbug_version "7.10.3+deb11u1"
mode novice
ui text
realname "Axel Stammler"
email "axst@users.sourceforge.net"
no-cc
list-cc-me
smtphost reportbug.debian.org
http_proxy
all_proxy
-- System Information:
Debian Release: 11.2
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-11-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages reportbug depends on:
ii apt 2.2.4
ii python3 3.9.2-3
ii python3-reportbug 7.10.3+deb11u1
ii sensible-utils 0.0.14
reportbug recommends no packages.
Versions of packages reportbug suggests:
pn claws-mail <none>
pn debconf-utils <none>
pn debsums <none>
pn default-mta | postfix | exim4 | mail-transport-agent <none>
pn dlocate <none>
pn emacs-bin-common <none>
ii file 1:5.39-3
ii gnupg 2.2.27-2
ii python3-urwid 2.1.2-1
pn reportbug-gtk <none>
ii xdg-utils 1.1.3-4.1
Versions of packages python3-reportbug depends on:
ii apt 2.2.4
ii file 1:5.39-3
ii python3 3.9.2-3
ii python3-apt 2.2.1
ii python3-debian 0.1.39
ii python3-debianbts 3.1.0
ii python3-requests 2.25.1+dfsg-2
ii sensible-utils 0.0.14
python3-reportbug suggests no packages.
-- debconf-show failed
Reply to: