[GH-ISSUE #493] WARN unknown address , request from #396

Open
opened 2026-02-27 23:16:45 +03:00 by kerem · 2 comments
Owner

Originally created by @zzsoszz on GitHub (Jul 17, 2022).
Original GitHub issue: https://github.com/snail007/goproxy/issues/493

使用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
Originally created by @zzsoszz on GitHub (Jul 17, 2022). Original GitHub issue: https://github.com/snail007/goproxy/issues/493 <!--- Provide a general summary of the issue in the Title above --> 使用config-prod这种非标准域名格式无法解析ip. 使用config-prod.com可以正常解析和返回页面。 ## Expected Behavior <!--- Tell us what should happen --> 期望可以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) <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> 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 ``` 3. system is : ubuntu 4. 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 ```
Author
Owner

@HectorB-2020 commented on GitHub (Mar 21, 2024):

@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?

<!-- gh-comment-id:2013312493 --> @HectorB-2020 commented on GitHub (Mar 21, 2024): @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?
Author
Owner

@snail007 commented on GitHub (Mar 21, 2024):

the domain must be contains one dot .

<!-- gh-comment-id:2014046997 --> @snail007 commented on GitHub (Mar 21, 2024): the domain must be contains one dot .
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#396
No description provided.