朋友用 Go 搞了一个简单的 Http Server,通过 IP 地址(客户端的 IP 地址他是通过 Reques 的 RemoteAddr 获取的)限制用户的访问次数,然后让我帮忙测测有什么方式可以绕开,我用传统的 Header 中加 IP 方式,没搞定。
感觉 Go 中的 RemoteAddr 应该是拿的更加底层的 IP 信息。
// RemoteAddr allows HTTP servers and other software to record
// the network address that sent the request, usually for
// logging. This field is not filled in by ReadRequest and
// has no defined format. The HTTP server in this package
// sets RemoteAddr to an "IP:port" address before invoking a
// handler.
// This field is ignored by the HTTP client.
RemoteAddr string
V 站的大佬们,有什么方式可以 Fake 客户端的 IP 地址,使得 RemoteAddr 获取到的 IP 是伪造后的?
是不是要修改底层的协议才行?
顿时对 Go 好感倍增。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/425657
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.