API的这个端点是这样工作的:
curl -s -G
--connect-to "mumbai403::103.150.187.3:"
--cacert "ca.rsa.4096.crt"
--data-urlencode "pt=mytoken"
--data-urlencode "pubkey=mypubkey"
"https://mumbai403:1337/addKey"
但是,如果我删除connect-to
,直接提供IP,则没有响应:
curl -s -G
--cacert "ca.rsa.4096.crt"
--data-urlencode "pt=mytoken"
--data-urlencode "pubkey=mypubkey"
"https://103.150.187.3:1337/addKey"
为什么没有connect-to
不能工作?我需要摆脱它的原因是因为我不确定如何翻译该请求以使其在Postman和其他地方工作。
使用--resolve
获取实际目标IP(可能在负载均衡器后面)
嗯,但是你可能需要手动提供主机头文件。
https://ec.haxx.se/usingcurl/usingcurl-connections provide-a-replacement-name