Zypper and Proxy

Hi there,

I am using a laptop and when at work I plug into an ethernet network which requires me to use a proxy. However, when out and about using wifi or 3G there is no need for using a proxy. Now I use a proxy switcher Gnome extension to easily switch between using a proxy and not using a proxy.

However, this only applies to that specific user not root. Hence, I will run in the issue that zypper cannot reach the repos when I am behind the proxy. I do not want to use the global proxy settings as in this case I am not able to use the internet when out and about.

I hope I made my issue clear, if not: How to configure zypper with a proxy so that it will reach the repos without using global proxy settings. Is there a way to do it like in Fedora or Debiasn based distros see How to Configure Proxy Settings in Linux – Justin Tung ?

Thanks in davance!

Zypper is using (lib)curl which reads its settings from /root/.curlrc (when run as root).

Thanks, but neither adding
PROXY= http://www-proxy.xxx.xxx
nor
HTTP_PROXY=“http://www-proxy.xxx.xxx

to /root/.curlrc did do the job.

I would like to redact the proxy settings that I posted accidentally.

Yes, apparently zypper reads /etc/sysconfig/proxy directly and ignores ~/.curlrc. Sorry.

If it is only about zypper, then the obvious solution is

tw:~ # HTTP_PROXY=http://1.2.3.4/ zypper ...

Thanks that does the job.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.