goproxy icon indicating copy to clipboard operation
goproxy copied to clipboard

WARN unknown address , request from

Open zzsoszz opened this issue 1 year ago • 2 comments

使用config-prod这种非标准域名格式无法解析ip. 使用config-prod.com可以正常解析和返回页面。

Expected Behavior

期望可以config-prod可以解析成ip,并成功返回页面.

Current Behavior

$ curl http://config-prod:3000 -x 127.0.0.1:8888 curl: (52) Empty reply from server

Possible Solution

Context (Environment)

  1. proxy version is : proxy-linux-amd64
  2. full command is :
$ vi /etc/hosts
127.0.0.1 config-prod

$ ./proxy http -t tcp -p  :8888

$ curl http://config-prod:3000 -x 127.0.0.1:8888
curl: (52) Empty reply from server
  1. system is : ubuntu
  2. full log is:
2022/07/17 18:55:15.413854 INFO GET:http://config-prod:3000/
2022/07/17 18:55:15.413896 WARN unknown address , request from: 127.0.0.1:56412
2022/07/17 18:55:39.586027 INFO GET:http://config-prod:3000/
2022/07/17 18:55:39.586100 WARN unknown address , request from: 127.0.0.1:58278
2022/07/17 18:55:59.188942 INFO GET:http://config-prod:3000/
2022/07/17 18:55:59.188991 WARN unknown address , request from: 127.0.0.1:59224

zzsoszz avatar Jul 17 '22 11:07 zzsoszz

@zzsoszz & @snail007, hello! I'm afraid we are facing the same issue but on Windows. Unfortunately this is not only a warning, traffic is not passed if such addresses are requested. It turns out that proxy doesn't respect short hostnames in HTTP GET/POST even if they properly come from /etc/hosts or explicitly added as a command line parameter. Other commands like ping are certainly able to use these hostnames.

Can anybody tell me if there are plans to address this issue?

HectorB-2020 avatar Mar 21 '24 18:03 HectorB-2020

the domain must be contains one dot .

snail007 avatar Mar 21 '24 23:03 snail007