Page MenuHomeSoftware Heritage

proxy support for swh scanner
Open, NormalPublic

Description

It would be nice if swh scanner scan supported using a proxy to connect to archive.softwareheritage.org.
Especially useful in environments where all access to the Internet is behind a proxy and the setup is via well-known environment variables that are used by all programs.

Fortunately, it's an easy fix:
In the creation of the HTTP session in https://forge.softwareheritage.org/source/swh-scanner/browse/master/swh/scanner/scanner.py$193 one has simply to pass an extra trust_env=True to the into aiohttp.ClientSession() constructor, as explained in the last paragraph of https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support

Event Timeline

zvr created this task.Fri, Oct 9, 2:57 PM
zvr created this object in space S1 Public.
zack triaged this task as Normal priority.Fri, Oct 9, 2:58 PM
zack added a project: Code scanner.
zack added a project: Easy hack.