proxy: support arbitraty traceroute arguments

This commit is contained in:
Lan Tian
2021-02-27 16:42:42 +08:00
parent f6ddc5761b
commit f49f8bac5e
4 changed files with 24 additions and 7 deletions

View File

@@ -59,7 +59,9 @@ func birdHandler(httpW http.ResponseWriter, httpR *http.Request) {
// Initialize BIRDv4 socket
bird, err := net.Dial("unix", setting.birdSocket)
if err != nil {
panic(err)
httpW.WriteHeader(http.StatusInternalServerError)
httpW.Write([]byte(err.Error()))
return
}
defer bird.Close()