LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unable to use wget via proxy (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-use-wget-via-proxy-4175594812/)

silv3r 12-05-2016 02:59 AM

unable to use wget via proxy
 
Hi All,

I have a problem downloading files from https from our internal network. I already export both proxy as below

[root@uk]# echo $http_proxy
http://setproxy.aaa.com/proxy.pac:8080
[root@uk]# echo $https_proxy
http://setproxy.aaa.com/proxy.pac:8080


wget are used as below

[root@uk]# wget https://www.google.com/
--2016-12-05 03:52:09-- https://www.google.com/
Resolving setproxy.aaa.com... 10.184.18.74
Connecting to setproxy.aaa.com|10.184.18.74|:80... connected.
Proxy tunneling failed: Method Not AllowedUnable to establish SSL connection.
[root@uk]#


even with username/passwd and --no-check-cert still failing

[root@uk]# wget --proxy-user aaa12345 --proxy-password 12334 https://www.google.com/
--2016-12-05 03:52:59-- https://www.google.com/
Resolving setproxy.aaa.com... 10.184.18.74
Connecting to setproxy.aaa.com|10.184.18.74|:80... connected.
Proxy tunneling failed: Method Not AllowedUnable to establish SSL connection.
[root@uk]#

[root@uk]# wget --no-check-certificate https://www.google.com/
--2016-12-05 03:58:14-- https://www.google.com/
Resolving setproxy.aaa.com... 10.184.18.74
Connecting to setproxy.aaa.com|10.184.18.74|:80... connected.
Proxy tunneling failed: Method Not AllowedUnable to establish SSL connection.
[root@uk]#


my version are
[root@uk]# wget --version
GNU Wget 1.12 built on linux-gnu.


Please help me, thank you gurus!

camp0 12-05-2016 05:30 AM

Hi,

From my point of view it looks that your proxy dont allow that, but im guessing.

Try to use also curl that may help.

Regards,
Luis

c0wb0y 12-05-2016 01:57 PM

Can you try:
Code:

wget --method=HEAD https://www.google.com/
If it went through, HEAD is allowed but not GET method as per log output. Regardless, check your proxy server.

AwesomeMachine 12-05-2016 02:24 PM

I think the target will not al;low the ssl connection. You might try --user-agent= and just leave it blank.

jefro 12-05-2016 06:21 PM

https://www.cyberciti.biz/faq/wget-e...tps-web-sites/ has some ideas to try.

silv3r 12-06-2016 12:59 AM

@camp0 - i tried using curl, still showing failed
[root@us /]# curl https://www.google.com/
curl: (7) Failed to connect to 2607:f8b0:400a:800::2004: Network is unreachable
[root@us]#


@c0wb0y - I do not see any --method options, different version maybe?
[root@us]# wget --method=HEAD https://www.google.com/
wget: unrecognized option '--method=HEAD'
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
[root@us]#


@AwesomeMachine - its just showing trying

[root@us]# wget --user-agent= https://www.google.com/
--2016-12-06 06:51:14-- https://www.google.com/
Resolving www.google.com (www.google.com)... 216.58.216.132, 2607:f8b0:400a:800::2004
Connecting to www.google.com (www.google.com)|216.58.216.132|:443...

@jefro - thanks for the useful site, I've bee through it before post it here :)

or issit possible i got the proxy server wrong?

thanks all for helping out :)

pingu_penguin 12-06-2016 01:21 AM

Read the error carefully. You are using ssl. It says method not allowed.

try substituting https with http if you want to download and see if it works.


Hope this helps.

c0wb0y 12-06-2016 01:27 AM

Oops, my bad. I misread the manpage.

How about this:
Code:

curl -4 https://www.google.com/
openssl s_client -connect google.com:443

We're you able to get past the proxy?

silv3r 12-06-2016 01:57 AM

@pingu_penguin - same for even http

[root@us~]# wget http://www.google.com/
--2016-12-06 07:55:30-- http://www.google.com/
Resolving setproxy.aaa.com (setproxy.aaa.com)... 152.51.8.191
Connecting to setproxy.aaa.com (setproxy.aaa.com)|152.51.8.191|:80...


@c0wb0y - i got error as below. curl ip4 not helping either
[root@us ~]# openssl s_client -connect google.com:443
socket: Connection timed out
connect:errno=110
[root@us~]#

cheers guys

c0wb0y 12-06-2016 02:16 AM

It's time for you now to check your proxy server.

pingu_penguin 12-06-2016 02:23 AM

I agree with c0wboy , check your proxy or use some other proxy.

silv3r 12-06-2016 02:27 AM

@c0wb0y and pingu_penguin - thank you guys, let me try to check if there's any other proxy server i can use. Will let u guys know if that fix it.

thanks again :)

BW-userx 12-06-2016 08:16 AM

try using axel to see if that will get past your proxy.

Axel behind authenticated proxy

silv3r 12-09-2016 01:34 AM

thanks everyone for your help, yeap - issues with my proxy server.. its working good after i change my proxy server and port.

thanks again, appreciate your help :)

ardvark71 12-09-2016 10:36 AM

Quote:

Originally Posted by silv3r (Post 5639832)
thanks everyone for your help, yeap - issues with my proxy server.. its working good after i change my proxy server and port.

thanks again, appreciate your help :)

Hi...

Glad you got it working. If you would, please mark this thread as "SOLVED" by clicking on "Thread Tools" directly above your initial post. Thanks! :)

Regards...


All times are GMT -5. The time now is 10:08 AM.