mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Remove broker /ip endpoint.
Doesn't seem to be used anywhere; may have been inherited from flash proxy.
This commit is contained in:
parent
2242be7a55
commit
2a46db2c01
1 changed files with 0 additions and 10 deletions
|
@ -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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue