curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Test the news server connectivity over http proxy with curl.

From: Hongyi Zhao via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 18 Mar 2021 15:17:05 +0800

Hi,

On Ubuntu 20.04, I have a local HTTP proxy listening on port 8080
which works as shown below:

$ curl -Ix http://127.0.0.1:8080 https://www.google.com
HTTP/1.1 200 Connection established.
Proxy-Connection: close
Proxy-Agent: DeleGate/9.9.13

HTTP/2 200
content-type: text/html; charset=ISO-8859-1
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
date: Thu, 18 Mar 2021 07:15:10 GMT
server: gws
x-xss-protection: 0
x-frame-options: SAMEORIGIN
expires: Thu, 18 Mar 2021 07:15:10 GMT
cache-control: private
set-cookie: 1P_JAR=2021-03-18-07; expires=Sat, 17-Apr-2021 07:15:10
GMT; path=/; domain=.google.com; Secure
set-cookie: NID=211=BaboCRvGis4P61Ed-pZIkTga_XGnCHFDUAcb7eadKV4cXT1YANbjr3IIgqgWxcSsuJRotxjom4phjW-U7I92u01iXzsTWGSXpqz9wU1xjj2Sj-Wn0XjJ6u4STBFBRS-Ck9uyc3N74FzMnYG_FXm5mwMk8MiKPELp7GwjhBHPgck;
expires=Fri, 17-Sep-2021 07:15:10 GMT; path=/; domain=.google.com;
HttpOnly
alt-svc: h3-29=":443"; ma=2592000,h3-T051=":443";
ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443";
ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000;
v="46,43"

Then I try to test the news server connectivity over this HTTP proxy
with curl but failed:

$ curl -vIx socks5://127.0.0.1:18888 telnet://news.rusnet.ru:119
* Trying 127.0.0.1:18888...
* TCP_NODELAY set
* SOCKS5 communication to news.rusnet.ru:119
* SOCKS5 connect to IPv4 195.208.113.96:119 (locally resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 18888 (#0)
^C
werner_at_X10DAi:~$ curl -vIx http://127.0.0.1:8080 telnet://news.rusnet.ru:119
* Trying 127.0.0.1:8080...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to news.rusnet.ru:119
> CONNECT news.rusnet.ru:119 HTTP/1.1
> Host: news.rusnet.ru:119
> User-Agent: curl/7.68.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 403 Forbidden
< Date: Thu, 18 Mar 2021 07:11:54 GMT
< Server: DeleGate/9.9.13
< DeleGate-Ver: 9.9.13 (delay=0)
< MIME-Version: 1.0
< Content-Type: text/html
< Content-Length: 1776
< Proxy-Connection: keep-alive, timeout=60, maxreq=60
<
* Received HTTP code 403 from proxy after CONNECT
* CONNECT phase completed!
* Closing connection 0
curl: (56) Received HTTP code 403 from proxy after CONNECT

Any hints for this problem?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao_at_gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-03-18