unauthenticated http proxy, wget fails, curl works

100

Solution 1

Thanks for your help guys. I found the solution with some help from the ever helpful folks at #ubuntu. The problem turned out to be the no_proxy that was set to localhost once I unset it wget worked fine

Solution 2

I've found that some programs use the environment variable http_proxy (lower case), while others use HTTP_PROXY (upper case). Because it's quicker than looking up which program uses which variable, I tend to set 'em both.

Solution 3

After setting http_proxy like so:

export http_proxy="http://proxy.example.com:8080"

Use wget with this flag:

--proxy=on

You can use

--proxy-username="username" --proxy-passwd="password"

to set proxy username and password where required.

Share:
100

Related videos on Youtube

HiTaX
Author by

HiTaX

Updated on September 17, 2022

Comments

  • HiTaX
    HiTaX over 1 year

    i need to sent data with broadcast from a phone to another i use this to send data

    DatagramSocket udp = new DatagramSocket();
                    udp.setBroadcast(true);
                    String data = miniMe.name + "="
                            + InetAddress.getLocalHost().getHostAddress();
                    DatagramPacket packet = new DatagramPacket(data.getBytes(),
                            data.getBytes().length,InetAddress
                            .getByName("255.255.255.255"), 7667);
                    while (!endBroadCasting) {
                        udp.send(packet);
                        Log.e("host lobby", "boradcast");
                        Thread.sleep(1000);
                    }
    

    and use this for listen data :

     castListener = new DatagramSocket(7667);
                        DatagramPacket listenerPacket = new DatagramPacket(buf,
                                300);
                        while (isListening) {
                            Log.e("gamelist", "listening called");
                            castListener.receive(listenerPacket);
                            String temp = new String(listenerPacket.getData())
                                    .trim();
                            StringTokenizer token = new StringTokenizer(temp,
                                    "=");}
    

    but i did not get any thing from listener device

  • mtfk
    mtfk about 9 years
    It is worth to mention that there is something like https_proxy which also should be set if we want to have possibility to use https over the proxy. Otherwise wget/crul will not use proxy for https requests.