D
D
Davidaa_WoW2022-02-28 17:18:40
ubuntu
Davidaa_WoW, 2022-02-28 17:18:40

Why doesn't curl --resolve work?

I'm trying to run the command in Ubuntu: curl -v --resolve https://vk.com:443:172.20.10.177 https://vk.com
The ip address is correct, the port is correct, the syntax seems to be the same, but it gives an error:
Couldn' t parse CURLOPT_RESOLVE entry ' https://vk.com:443:172.20.10.177 '!
* Trying 87.240.137.158:443...

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
vreitech, 2022-02-28
@Davidaa_WoW

the syntax seems to be

the syntax is incorrect.
in man curl it says:
--resolve <host:port:address>
i.e. after --resolve, before the first colon, the host name must be specified. and you have a URL.

A
Alexander Karabanov, 2022-02-28
@karabanov

curl -v --resolve vk.com:443:87.240.139.194 https://vk.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question