mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Re-remove ipHandler function.
Had been removed in2a46db2c01
and was erroneously restored in the merge36debdfdd2
.
This commit is contained in:
parent
36debdfdd2
commit
8dcd337ce4
1 changed files with 0 additions and 10 deletions
|
@ -12,7 +12,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
@ -222,15 +221,6 @@ func robotsTxtHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Write([]byte("User-agent: *\nDisallow:\n"))
|
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 main() {
|
func main() {
|
||||||
var acmeEmail string
|
var acmeEmail string
|
||||||
var acmeHostnamesCommas string
|
var acmeHostnamesCommas string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue