mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
Add proxy support for pypi package managers (#150)
* initial pypi registry implementation * support proxy mode for pypi package managers * support proxy mode for pypi package managers - 2 * rm default mode as proxy for pip3 * update goproxy version & fix pypi proxy failing on 304 * add PIP_RETRIES=0 env * update pmg e2e & add proxy mode e2e for pypi * rm safedep-test-pkg for pypi proxy e2e
This commit is contained in:
@@ -43,6 +43,14 @@ func (f *InterceptorFactory) CreateInterceptor(ecosystem packagev1.Ecosystem) (p
|
||||
f.confirmationChan,
|
||||
), nil
|
||||
|
||||
case packagev1.Ecosystem_ECOSYSTEM_PYPI:
|
||||
return NewPypiRegistryInterceptor(
|
||||
f.analyzer,
|
||||
f.cache,
|
||||
f.statsCollector,
|
||||
f.confirmationChan,
|
||||
), nil
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("proxy-based interception not yet supported for ecosystem: %s", ecosystem.String())
|
||||
}
|
||||
@@ -52,6 +60,7 @@ func (f *InterceptorFactory) CreateInterceptor(ecosystem packagev1.Ecosystem) (p
|
||||
func SupportedEcosystems() []packagev1.Ecosystem {
|
||||
return []packagev1.Ecosystem{
|
||||
packagev1.Ecosystem_ECOSYSTEM_NPM,
|
||||
packagev1.Ecosystem_ECOSYSTEM_PYPI,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user