[GH-ISSUE #410] http反向代理localhost的问题 #321

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

Originally created by @dtboy1995 on GitHub (Nov 30, 2020).
Original GitHub issue: https://github.com/snail007/goproxy/issues/410

请问作者http反向可以代理localhost地址吗 (场景是把局域网的请求变成http://localhost/*)

  • Android 8
  • Sdk latest
  • 命令
proxy http -t tcp -p :8080 -T tcp -P "192.168.3.33"
  • Android 得到的错误
2020-11-30 17:43:58.503 32169-675/com.host900.goproxy E/GoLog: 2020/11/30 09:43:58 unknown address , request from: [::1]:42927
2020-11-30 17:43:58.505 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:43:58 GET:http://localhost:8080/xxxx
2020-11-30 17:43:58.505 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:43:58 unknown address , request from: [::1]:42929
2020-11-30 17:44:06.427 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 GET:http://localhost:8080/
2020-11-30 17:44:06.427 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 unknown address , request from: [::1]:43543
2020-11-30 17:44:06.434 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 GET:http://localhost:8080/
2020-11-30 17:44:06.434 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 unknown address , request from: [::1]:43545
2020-11-30 17:44:06.440 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 GET:http://localhost:8080/
2020-11-30 17:44:06.440 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 unknown address , request from: [::1]:43549

我知道您设计反向代理是按标准来的,需要dns=>ip 像nginx一样,但是我的这种场景使用您的库可以实现吗?不胜感激

Originally created by @dtboy1995 on GitHub (Nov 30, 2020). Original GitHub issue: https://github.com/snail007/goproxy/issues/410 请问作者http反向可以代理localhost地址吗 (场景是把局域网的请求变成http://localhost/*) - Android 8 - Sdk latest - 命令 ``` proxy http -t tcp -p :8080 -T tcp -P "192.168.3.33" ``` - Android 得到的错误 ```log 2020-11-30 17:43:58.503 32169-675/com.host900.goproxy E/GoLog: 2020/11/30 09:43:58 unknown address , request from: [::1]:42927 2020-11-30 17:43:58.505 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:43:58 GET:http://localhost:8080/xxxx 2020-11-30 17:43:58.505 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:43:58 unknown address , request from: [::1]:42929 2020-11-30 17:44:06.427 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 GET:http://localhost:8080/ 2020-11-30 17:44:06.427 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 unknown address , request from: [::1]:43543 2020-11-30 17:44:06.434 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 GET:http://localhost:8080/ 2020-11-30 17:44:06.434 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 unknown address , request from: [::1]:43545 2020-11-30 17:44:06.440 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 GET:http://localhost:8080/ 2020-11-30 17:44:06.440 32169-2616/com.host900.goproxy E/GoLog: 2020/11/30 09:44:06 unknown address , request from: [::1]:43549 ``` **我知道您设计反向代理是按标准来的,需要dns=>ip 像nginx一样,但是我的这种场景使用您的库可以实现吗?不胜感激**
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#321
No description provided.