Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: zypper SOCKS 5 proxy

  1. #1

    Question zypper SOCKS 5 proxy

    In Ubuntu with the apt package manger, I am able to set up a SOCKS 5 proxy and use apt through it. All that is needed is to edit /etc/apt/apt.conf.d/proxy.conf as follows:

    Code:
    ### Using reverse port forwarding to a SOCKS 5 proxy
    Acquire::http::Proxy "socks5h://127.0.0.1:7890/";
    Then I can run apt update/upgrade/install commands and apt will use that SOCKS 5 proxy (which in my case is a reverse port forward to a SOCKS 5 proxy set up with ssh -D <port>).

    Is there a way to get zypper to behave in a similar way, where it will use a SOCKS 5 proxy?

    My scenario is:

    Server A (internet access but limited ability to install other packages)
    Server B (openSUSE, no internet access, need to install other packages)

    I would like to do the following:

    Code:
    serverA: ssh -D 7777 -Nf myself@localhost   # opens a SOCKS 5 proxy listening on port 7777
    serverA: ssh -R 7890:127.0.0.1:7777 user@serverB  # sets up reverse port forwarding to the SOCKS 5 proxy
    Code:
    serverB: # configure zypper to use socks://127.0.0.1:7890
    serverB: zypper update
    Is this possible? I would prefer to not install squid or other utilities on serverA if possible.

  2. #2
    Join Date
    Sep 2012
    Posts
    5,027

    Default Re: zypper SOCKS 5 proxy

    Just set proxy via YaST to socks://127.0.0.1:7890

  3. #3

    Default Re: zypper SOCKS 5 proxy

    Which proxy do I set? I went to yast2 -> Network Services -> Proxy and I see the following:

    HTTP Proxy URL
    HTTPS Proxy URL
    FTP Proxy URL
    [ ] Use the Same Proxy for all Protocols
    No Proxy Domains

    Will one of those allow zypper to use the SOCKS proxy?

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,143
    Blog Entries
    2

    Default Re: zypper SOCKS 5 proxy

    No,
    None of those YaST proxy options will work.
    But I wouldn't say you shouldn't just try Arvidjaar's suggestion just to see if it works (I'd put that into the HTTP input field)

    I don't know that zypper has ever supported SOCKS5.

    IMO easiest solution is if you have control over your proxy, you could open up an http proxy specifically for your openSUSE box.
    How are web browsers accessing the Internet on your network, I'm sure those are connecting as web proxy clients and not as SOCKS clients (which is more typical of heavy apps like email clients, database clients, etc)... However web browsers are working, zypper and YaST can be configured to connect in a similar way.

    When I look at the following list of socksifiers, I seem to remember a very long time ago I did a little experimenting with the Dante socksifier, but I can't remember exactly what I did and results.

    https://cloudpedia.org/comparison-of-socksifiers

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,143
    Blog Entries
    2

    Default Re: zypper SOCKS 5 proxy

    The following looks promising...
    https://socks-relay.sourceforge.io/#docs

    Suggests that you can point any app at it and it will relay as a SOCKS client to the proxy server.

    If you give it a try, hope it works!

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6
    Join Date
    Sep 2012
    Posts
    5,027

    Default Re: zypper SOCKS 5 proxy

    Quote Originally Posted by tsu2 View Post
    None of those YaST proxy options will work.
    Guess what? I actually did test it before writing. Of course, for someone who begins every reply with "I have no idea what you are talking about" it is very unusual idea.

  7. #7
    Join Date
    Sep 2012
    Posts
    5,027

    Default Re: zypper SOCKS 5 proxy

    Quote Originally Posted by JLemur View Post
    Which proxy do I set?
    It depends on URL for your repositories. Show "zypper lr -d" output if you need more concrete reply.
    Will one of those allow zypper to use the SOCKS proxy?
    The one for protocol used by zypper to access your repositories.

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,143
    Blog Entries
    2

    Default Re: zypper SOCKS 5 proxy

    Quote Originally Posted by arvidjaar View Post
    Guess what? I actually did test it before writing. Of course, for someone who begins every reply with "I have no idea what you are talking about" it is very unusual idea.
    If it works, that would be surprising.
    As the @OP asked, which field did you enter that string?
    And, since you are pointing the proxy client to localhost, what proxy are you running on your local machine?

    ITSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9

    Default Re: zypper SOCKS 5 proxy

    I've tried a couple of ways with the yast2 proxy settings and haven't been able to get zypper to work through the socks proxy. I tried setting "Enable proxy," "Use same proxy for all protocols," and setting the HTTP proxy URL to "socks://127.0.0.1:7890."

    I found that the DNS configurations had not been set in my openSUSE server, and after setting it I was able to resolve the FQDNs for the repositories and run zypper. However, that is actually more of a setback than a step forward, because in my final deployment the server will not have internet access. It'll be behind a firewall and the only way in will be with ssh, which is why I'm wanting to set up a reverse port forward to allow zypper to update/install packages.

    Therefore, to test the proxy setting, I configured the proxy as mentioned above, then tore down my SOCKS 5 proxy on "serverA," and zypper was still able to install new packages, indicating it is not using the SOCKS 5 proxy.

  10. #10

    Default Re: zypper SOCKS 5 proxy

    Per tsu2's posts, I've also tried proxychains-ng (aka proxychains4). I can get telnet to use the SOCKS 5 proxy server on "serverA" by using proxychains4, but I can't get zypper to work. It seems to just ignore proxychains altogether (maybe it's not dynamically linked?).

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •