代理失败的原因是?
来源:4-7 神兵利器 - ReverseProxy无坚不摧

慕粉1494638
2020-05-16
服务端
D:\project\src\gateway_demo\demo\proxy\reverse_proxy_simple>go run main.go
2020/05/16 22:59:33 Starting httpserver at 127.0.0.1:2002
2020/05/16 23:00:21 http: proxy error: dial tcp 127.0.0.1:2003: connectex: No connection could be made because the target machine actively refused it.
2020/05/16 23:02:53 http: proxy error: dial tcp 127.0.0.1:2003: connectex: No connection could be made because the target machine actively refused it.
2020/05/16 23:03:21 http: proxy error: dial tcp 127.0.0.1:2003: connectex: No connection could be made because the target machine actively refused it.
2020/05/16 23:03:39 http: proxy error: dial tcp 127.0.0.1:2003: connectex: No connection could be made because the target machine actively refused it.
2020/05/16 23:05:14 http: proxy error: dial tcp 127.0.0.1:2003: connectex: No connection could be made because the target machine actively refused it.
2020/05/16 23:06:53 http: proxy error: dial tcp 127.0.0.1:2003: connectex: No connection could be made because the target machine actively refused it.
2020/05/16 23:07:28 http: proxy error: dial tcp 127.0.0.1:2003: connectex: No connection could be made because the target machine actively refused it.
客户端
C:\Windows\System32>curl http://127.0.0.1:2002/sdadasds?sdsdsdsadadas=111
C:\Windows\System32>
1回答
-
牛儿吃草
2020-05-17
127.0.0.1:2003 这个代理服务器没有打开。
你需要进入这个目录 D:\project\src\gateway_demo\demo\proxy\real_server
然后执行:go run main.go10
相似问题