Bug 1167025

Summary: dnf doesn't work with SOCKS
Product: [Fedora] Fedora Reporter: Ladislav Nesnera <nesnera>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, jsilhan, mluscon, nesnera, packaging-team-maint, pnemade, rholy, tim.lauridsen, tmlcoch
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-30 01:30:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ladislav Nesnera 2014-11-22 18:27:05 UTC
Description of problem:


I you would like to run dnf socksified but as seams it doesn't work. (I've tried tsocks)

How reproducible:
Run tsocks dnf. CPU is 100% busy but does nothing.
Compare it with e.g. wget, yum

Hint - daemon?

Comment 1 Honza Silhan 2014-11-24 10:47:33 UTC
Thanks for the report. Disclaimer: I haven't came in contact with SOCKS.

Ladislav, could setting the proxy in conf file [1] instead of using tsocks help to your use case?

Tomas, do you have any ideas why it doesn't work?

[1] http://dnf.readthedocs.org/en/latest/api_conf.html?#dnf.conf.Conf.proxy

Comment 2 Tomas Mlcoch 2014-11-24 15:22:27 UTC
Hi Ladislav,

I dig into this [1] and it seems to me more like a problem in Tsocks than Librepo.

Frankly, I wasn't able to use tsocks with curl or wget, let alone the librepo. Also, I found out that I'm not alone and that applications based on LibCURL may have troubles with Tsocks in general [2].

As Jan remarked, for dnf there are much better and convenient options how to set a proxy server:

1) The mentioned "proxy" option in dnf configuration
2) Standard "http_proxy" environment variable

Especially the last one can be considered as a typical way how to temporary set a proxy server to an application (or at least more typical than the tsocks):

$ sudo http_proxy=socks5h://proxyurl:proxyport dnf update

Should work like a charm (Instead of "socks5h" use the appropriate value - socks4://, socks4a://, socks5:// or socks5h://)


[1] https://github.com/Tojaj/librepo/wiki/HOWTO:-SOCKS-Proxy-setup
[2] http://curl.haxx.se/mail/lib-2010-01/index.html#258

Comment 3 Ladislav Nesnera 2014-11-25 00:03:36 UTC
Suggestion "http_proxy=socks5h://proxyurl:proxyport dnf update" solves my problem perfectly.
Guys, thanks a lot for perfect support.

Comment 4 Ladislav Nesnera 2015-01-17 15:11:58 UTC
Unfortunately I must correct my previous post. The trick with the environment variable "http_proxy" does not work at all. Sorry for false confirmation. Dnf's proxy option does not work too (definitely not for my aim - ssh socks tunneling).
I succeeded with "proxychains" application - http://proxychains.sourceforge.net/

Comment 5 Fedora End Of Life 2015-05-29 13:22:25 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-06-30 01:30:29 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.