[tor-commits] [snowflake/master] Remove broker /ip endpoint.
dcf at torproject.org
dcf at torproject.org
Sat Jul 15 21:35:03 UTC 2017
commit 2a46db2c01985d144e25f537b5019b195af32782
Author: David Fifield <david at bamsoftware.com>
Date: Sat Jul 15 14:34:18 2017 -0700
Remove broker /ip endpoint.
Doesn't seem to be used anywhere; may have been inherited from flash
proxy.
---
broker/broker.go | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/broker/broker.go b/broker/broker.go
index d969ce5..a56f40b 100644
--- a/broker/broker.go
+++ b/broker/broker.go
@@ -217,15 +217,6 @@ func robotsTxtHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("User-agent: *\nDisallow:\n"))
}
-func ipHandler(w http.ResponseWriter, r *http.Request) {
- remoteAddr := r.RemoteAddr
- if net.ParseIP(remoteAddr).To4() == nil {
- remoteAddr = "[" + remoteAddr + "]"
- }
- w.Header().Set("Content-Type", "text/plain; charset=utf-8")
- w.Write([]byte(remoteAddr))
-}
-
func init() {
log.SetFlags(log.LstdFlags | log.LUTC)
@@ -234,7 +225,6 @@ func init() {
go ctx.Broker()
http.HandleFunc("/robots.txt", robotsTxtHandler)
- http.HandleFunc("/ip", ipHandler)
http.Handle("/proxy", SnowflakeHandler{ctx, proxyPolls})
http.Handle("/client", SnowflakeHandler{ctx, clientOffers})
More information about the tor-commits
mailing list