I need help configuring the system proxy

Forum Forums New users New Users and General Questions I need help configuring the system proxy

  • This topic has 23 replies, 6 voices, and was last updated Mar 15-7:22 pm by abc-nix.
Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #135913
    Member
    chermany4ever

      Hi guys. As I already talked about in my introduction thread, I’m new in the Linux world and I need help to set up the general system proxy. I decided to install antiX-19.5_x64-full because I saw a review on YouTube from two years ago and really liked it. It’s very very light and since I’m running it on a 2010 machine with a mechanical disk, makes total sense to me.

      I live on a large lot with several cabins that share the same wifi but I’m far from the router and that’s why I use my smartphone to repeat the signal ’cause my antenna doesn’t see it. The problem is that the apps I use to repeat wifi with the phone force me to use a proxy:port. Of course, when you install antiX 19.5 you have Firefox as the default browser and by changing the proxy:port in its net configs I can browse, but all the other functions, like installing other programs, remain blocked. With the help of some of the guys who replied to my introduction thread -thank you guys!!!- I’ve been able to figure out how to set up a proxy on linux. But for some strange reason I can’t get it to work. Maybe I’m doing something wrong? The fact is I’ve tried all the different combinations offered and I can’t get it to work. To check if the problem was the old version I tried antiX-23.1_x64-base and again, I tried all the different ways they told me to set it and I couldn’t get it working. Again, by changing the net config in Seamonkey I was able to browse, but all the other functions I need to connect for remain blocked.

      I know when someone asks for help and can’t solve the problem some may think that you are criticising the distro or the OS, but believe me, that’s not the case at all. Before deciding for antiX I tried many lightweight distros to see which one would be the best for me and I couldn’t understand how to set the proxy in Linux as it’s very different from windows. I want to learn how to fix this so I can continue to use antiX, use it more often, get used to it and leave windows behind. Thanks to all in advance!

      #135917
      Member
      abc-nix

        Does 19.5 also use connman to connect to wifi? Does it use cmst as a GUI manager for network connection? Is there the same option for proxy connection I described in the other thread or is there no option for proxy connection on the interface you are using? I don’t remember how antiX 19.5 worked, so this info is important.

        Maybe we need to know what the android program you use is called, so we can test ourselves if it works. It may need some extra options that a simple proxy config doesn’t achieve.

        #136044
        Member
        chermany4ever

          Hi there abc-nix and thanks again for your interest. It is Connman indeed. It uses CMST as a GUI manager. I’m gonna add a screenshot so you can see wich version it is. Since I tested latest antiX version to compare with 19.5 to try to solve this as explained I observed minor changes in the GUI. Same proxy options for connection are there.

          I use two android apps to repeat the wifi signal. One is called Wifi Repeater wich I use most of the time and the other one is called NetShare wich works fine also. As far as I know both are well known and trusted.

          Attachments:
          #136063
          Member
          abc-nix

            Thanks for the info. I indeed have tested with one of the apps recommended and indeed connman has some issue setting up a system proxy. I suspect that antiX or Debian have connman configured in a way that it doesn’t resolve DNS, and probably cannot use a proxy directly. I searched a bit on the forum and there was an issue related to a default file, which we will not be touching for now to avoid any problems.

            Instead, let us explore a workaround. Follow the next steps:
            0. Remove the proxy configuration from connman
            (through CMST, changing the proxy option to “Direct”).

            1. Add the proxy to APT (so apt works through the proxy).
            1.1. Edit /etc/apt/apt.conf. You can open the file with the command:
            sudo geany /etc/apt/apt.conf

            1.2. Add the following line at the bottom of the file and save it.
            Acquire::http::Proxy "http://192.168.49.1:2890";
            (make sure the IP and port are correct)

            1.3. Save the file and check that the proxy is working correctly with:
            sudo apt update

            2. Export the HTTP proxy variable for system-wide use (for browser, commands and other apps that use the http protocol).
            2.1. The easiest method is adding this option to the desktop-session.conf file (that runs before the graphical environment is started).
            geany $HOME/.desktop-session/desktop-session.conf

            2.2. Add the following at the bottom of the file.

            #### HTTP proxy options ####
            export http_proxy="http://192.168.49.1:2890/"
            export https_proxy=$http_proxy
            export ftp_proxy=$http_proxy

            (make sure the IP and port are correct)

            2.3. Save the changes and reboot the computer. Then try out the web browser and other apps that require internet connection.

            The above workaround is OK, but not the best solution. I would need to investigate a bit if antiX 19.5 has some configuration for connman to enable dns resolving, but for now it is better to not break any other thing.

            #136271
            Member
            chermany4ever

              Hello there abc-nix. Thanks for all the instructions. I didn’t answer before ’cause I was a bit busy and wanted to do this carefully and attentively. Today was calmer enough to try this workaround. I love workarounds.

              I followed your instructions exactly as you asked me to.

              Step 0: no problems.
              Step 1: no problems.
              Step 1.2: no problems.
              Step 1.3: as soon as I inserted the command “sudo apt update” and pressed Enter many downloads started which took some time, say, about 7 minutes, until they were all completed, but in the end I got an error, I copy you the message:

              “Reading package list… Done
              E: The “https://espejito.fder.edu.uy/mxlinux/packages/antix/buster buster Release” repository does not have a Release file.
              N: You cannot upgrade from such a repository safely and therefore it is disabled by default.
              N: See the apt-secure(8) manual page for details on creating repositories and configuring users. ”

              Step 2: —->
              Step 2.1: no problems.
              Step 2.2: as soon as I added the parameters you asked for and saved I got this warning message:

              ” (geany:6067): dbind-WARNING **: 18:48:02.144: Couldn’t register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. ”

              Step 2.3: with everything saved and the system rebooted I checked that I can browse with Firefox at a faster speed than before and the CNST shows me the wifi connected icon next to the clock but I tried to install Audacity from the Software Installer and I get the error that there’s no connection. I also tried running “antiX Updater” and it says “No internet connection detected!”. I’ll attach a screenshot.

              Maybe we can try something else? I’m open to your suggestions.

              Attachments:
              #136282
              Member
              abc-nix

                This workaround is only useful for programs that use the http protocol. I suspect that package manager/ software installer uses ping or some other program/library to check the network connection, so it will not work properly with the workaround.

                One issue at a time.

                “Reading package list… Done
                E: The “https://espejito.fder.edu.uy/mxlinux/packages/antix/buster buster Release” repository does not have a Release file.
                N: You cannot upgrade from such a repository safely and therefore it is disabled by default.

                This repo mirror seems to be broken. Use “repo manager” (in control Center – Software tab) to select a different mirror. After that try sudo apt update again.

                ” (geany:6067): dbind-WARNING **: 18:48:02.144: Couldn’t register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. ”

                This is a warning, No error here. Just an information message, but it has no impact on the system.

                the Software Installer and I get the error that there’s no connection. I also tried running “antiX Updater” and it says “No internet connection detected!”. I’ll attach a screenshot.

                They use ping or some other method to check for a connection, but they don’t use the http protocol, so they cannot correctly use the http proxy.

                The good thing: web browsing and apt (from terminal) work.
                The bad thing: anything that doesn’t use the http protocol will not work.

                Once I have some free time I will download the antiX 19.5 full ISO to test what changes does connman need to manage the proxy correctly. Will not be today though.

                #136288
                Member
                PPC

                  test what changes does connman need to manage the proxy correctly.

                  Not directly related to this problem, but with the way antiX works: that would be briliant. From what I’ve seen in connman’s GUI it *should* configure proxies – if it does not, then there’s something wrong with it, right? That may affect just a tiny fringe of antiX users but it’s a “problem” that eventually requires fixing.

                  P.

                  #136291
                  Member
                  Xunzi_23

                    In a situation like the one you describe I have found a TP Link TL-WN822N or similar dongle
                    with external antennae on a cable and placed outside on the side nearest to the wifi router
                    station extremely useful, in an extreme case using an aluminium reflector may be helpful.
                    Plenty of info on that online.

                    #136300
                    Member
                    fantasIA05

                      Hello, I have a case similar to yours: I want to share cell phone internet via USB cable to the PC using an Android application. I have a port and a proxy but the connman proxy configuration does not work for me but the Firefox proxy does. I tested it on antix 23 and 23.1, which I installed yesterday.
                      After searching a lot on the web I found a program called “proxyman” and it helped me have internet in almost the entire system except for APT. To open programs with proxyman you have to type the name of the program in a terminal and open it with the internet. If you open it without a terminal, it does not give the program internet. Here I leave more information about the program and a video on how to use it, in the video you can also notice that it does have internet but the APT does not work:
                      https://github.com/himanshub16/ProxyMan
                      https://www.youtube.com/watch?v=z_u4NgaDQfw
                      As abc-nix mentions, it seems that it is not possible to give APT internet so alternative methods will have to be found to update the system and install programs.
                      I share with you what I will do in this situation:
                      -Update system: Get a cell phone once a week that shares the internet without a proxy (that works) to update the system. In Debian, updates are not so frequent.
                      -Install programs: With appimages or .deb. Preferably appimage since some .deb files require installing some additional APT and cannot be installed. I have .deb and appimages on my usb and they worked without problems in my new installation of antix 23.1. Get the appimages from official sites to avoid problems, for example that program that shows audacity if it has an appimage on its official page.

                      #136301
                      Member
                      PPC

                        As abc-nix mentions, it seems that it is not possible to give APT internet

                        That’s exactly the opposite of what abc-nix said. Apt seemed to work correctly, when the OP applied the commands abc-nix suggested and tried to perform the update. The problem was with the repository that the user had selected (that seems to be off-line or have some other problem).

                        P.

                        • This reply was modified 2 months, 1 week ago by PPC.
                        #136331
                        Member
                        fantasIA05

                          As abc-nix mentions, it seems that it is not possible to give APT internet

                          That’s exactly the opposite of what abc-nix said. Apt seemed to work correctly, when the OP applied the commands abc-nix suggested and tried to perform the update. The problem what with the repository that the user had selected (that seems to be off-line or have some other problem).

                          P.

                          What you mention is correct. I misunderstood, I don’t speak English so there was confusion on my part and I’m also a newbie.
                          I’ll tell you what happened, when I followed the abc-nix steps the apt didn’t work and it was on a new installation, the debian repos gave me an error but the antix ones did work. That is, the complete opposite of what happened to the creator of the theme. It seems that for some reason the internet I use, using proxy, cannot access the default repository (which is the closest to my country). As I noticed that two debian repositories were failing, I changed them and now it works correctly. The APT works and already installed programs. Thanks to all for the help.

                          #136338
                          Member
                          PPC

                            @abc-nix – the tool the previous user recommended is basically a bunch of bash scripts that automate setting proxies in several ways (I just saw the video available at their git and took a cursory look at the code of one script). If it works, maybe it can be adapted to/incldued in antiX…

                            P.

                            #136348
                            Member
                            abc-nix

                              Thanks, @PPC and @fantasIA05 for the links and info. The proxyman approach is an improvement of the workaround we were exploring, including more environmental variables and some extra options. I was hoping for a more systemwide approach, but it doesn’t seem to be so easy.

                              I tested different options related to connman, and even if it manages DNS it seems to struggle with setting up the proxy. I would need time to check the connman source code, because setting up the proxy should work, but I suspect the port may be the issue here and not the proxy itself. DNS does resolv correctly to the proxy IP, but it doesn’t point to the correct port unfortunately, and resolvconf doesn’t seem to have this option.

                              I also switched to network-manager just to see if it is easier but still same results.

                              Right now the workaround seems to work for most cases. I will test more variables from proxyman to see if the package installer and antiX updater work with them.

                              For those who are OK with sharing the network connection with their android phone through a USB cable, they don’t need an external app. Here is from PPC’s unofficial antiX FAQ:

                              *TIP 1: Do you need Internet access in your laptop and have no WiFi? If you have a mobile data connection on your Android phone, and it’s USB cable, you can try to use that to access the Net from your laptop: your on your 3G/4G/5G phone internet connection. Connect your phone to your antiX computer, find and activate, on your phone the data sharing/ USB sharing data option and turn that on. Click Connman and check if, in the “Wired” Connections you get any indication that a USB connection is on-line. It works just like a Ethernet internet connection.
                              *TIP 2: You can do a similar procedure to use your WiFi on a computer that does not have a WiFi card. Access your WiFi network from your android device, connect it to your antiX computer using its USB cable, turn on the data sharing option on your phone and check, in Connman, if a “Wired” network connection is active and, if so enjoy your WiFi internet!

                              No need for external apps or proxies. Connman manages the connection as a wired connection.

                              I will continue investigating.

                              #136431
                              Member
                              chermany4ever

                                Once I have some free time I will download the antiX 19.5 full ISO to test what changes does connman need to manage the proxy correctly.

                                Allright then. Thought with the workaround we achieved full connection. Didn’t know the problem was deeper and needed more work. What I can do is install the latest antiX version so we are both on the same page. It’s a shame ’cause 19.5 at startup only takes up 100mb of ram, that’s amazing. The other day when I was testing antiX-23.1 at startup it takes up almost 300mb. But I’m willing, if you think it will be better for everyone. I’d be also sad to leave all the work we’ve done so far with 19.5 but the reality is that I checked the Control Center and the controls to configure the Keyboard don’t appear and the Mouse controls appear but doesn’t respond so I’m typing and moving around the desktop like a snail. I guess everything has a solution but maybe in the latest version this will be more polished? The other day I was testing it was using it live from the pendrive and didn’t install it nor did I check this, so I’m just assuming.

                                From what I’ve seen in connman’s GUI it *should* configure proxies – if it does not, then there’s something wrong with it, right? That may affect just a tiny fringe of antiX users but it’s a “problem” that eventually requires fixing.

                                Maybe many distros have this same problem. As I explained before, I tried several light well known distros before deciding for antiX and I had this problem with every single one of them.

                                In a situation like the one you describe I have found a TP Link TL-WN822N or similar dongle
                                with external antennae on a cable and placed outside on the side nearest to the wifi router
                                station extremely useful, in an extreme case using an aluminium reflector may be helpful.

                                I have a TP-LinkWN8200ND wall breaker I bought two years ago thinking it would get me out of trouble ’cause I was told it was compatible with Linux but once it got home it’s not. No Linux drivers for it. The previous model was apparently compatible but it’s no longer manufactured and this new model only has drivers for windows. This is the antenna I use with Windows7 and it works great but Windows7 is a heavy OS and so the programs, eat all ram with few tasks. That’s why I want to get rid of windows for good. I could try to sell this antenna and buy another wall breaker that is compatible with Linux but here in Argentina we’re in an economic crisis that has us on the edge of abyss. Everything is expensive and salaries are so low that nobody buys or sells anything. Recession has frozen everything unfortunately. My other small antenna Linux recognises without problems -in all distros I tested- is a small pendrive antenna that works well but has almost no range and if I put it in an extension usb cable it loses power and reaches even less. I also know modern smartphones come with wifi repeater hotspot from factory that repeats freely without the need to use apps with proxies but my smartphone isn’t that modern. At some point I might be able to buy one but in the meantime I think the best thing to do is look for alternatives. There also seem to be adroid apps that repeat direct wifi without a proxy but they only work in root mode. Rooting a smartphone it’s not easy, it’s risky and I’m not willing ruining mine for apps that I don’t know if actually work.

                                Hello, I have a case similar to yours: I want to share cell phone internet via USB cable to the PC using an Android application

                                Thank you brother but it’s too complicated. Each time I tried to use the phone as a modem through the cable it never worked. I prefer to keep exploring solutions from within the OS to make things as simple and user friendly as possible.

                                • This reply was modified 2 months, 1 week ago by chermany4ever.
                                • This reply was modified 2 months, 1 week ago by chermany4ever. Reason: corrections
                                #136436
                                Member
                                abc-nix

                                  I have a TP-LinkWN8200ND wall breaker I bought two years ago thinking it would get me out of trouble ’cause I was told it was compatible with Linux but once it got home it’s not. No Linux drivers for it.

                                  If what they say in this post is correct, the chip for the TP-link wireless adapter is RTL8192EU, which could work with antiX 23.1 “Modern Kernel”. When you have time to test antiX live again, try booting with the modern kernel (6.1) instead of the “legacy kernel”. And connect the repeater. At least rokytnji seems to have this chip and has wireless connection in this post.

                                  Allright then. Thought with the workaround we achieved full connection. Didn’t know the problem was deeper and needed more work. What I can do is install the latest antiX version so we are both on the same page.

                                  I haven’t found much luck with connman so don’t worry about testing the 23.1 edition. Hopefully we can improve the workaround to get most programs working.

                                  Also, no need to install the 23.1 release. You can also test live, apply the changes to desktop-session, log out and login and the proxy should work without installing or restarting. Also you can try connecting the phone through USB and enabling the shared connection on your android phone. It works out of the box for me.

                                  I’d be also sad to leave all the work we’ve done so far with 19.5 but the reality is that I checked the Control Center and the controls to configure the Keyboard don’t appear and the Mouse controls appear but doesn’t respond so I’m typing and moving around the desktop like a snail.

                                  Is this with antiX 19.5 or 23.1? Use the one that works best for you, even if it uses more RAM. As long as it is responsive, it is always the better option. You can later reduce RAM use with some optimizations.

                                Viewing 15 posts - 1 through 15 (of 24 total)
                                • You must be logged in to reply to this topic.