Commit 444dbcac authored by 王明明's avatar 王明明

超时处理

parent 9e13dd50
...@@ -20,7 +20,7 @@ func routeToU2(w http.ResponseWriter, r *http.Request) { ...@@ -20,7 +20,7 @@ func routeToU2(w http.ResponseWriter, r *http.Request) {
carrierType := data["type"] carrierType := data["type"]
var akm *Akm var akm *Akm
switch carrierType { switch carrierType {
case "u2": case "U2":
akm = EasyJet(carrierType.(string), data["proxy"].(string)) akm = EasyJet(carrierType.(string), data["proxy"].(string))
default: default:
util.WriteJson(w, util.ErrorJson("不支持的航司")) util.WriteJson(w, util.ErrorJson("不支持的航司"))
......
...@@ -76,7 +76,7 @@ func main() { ...@@ -76,7 +76,7 @@ func main() {
//resp, err := http.Get("http://127.0.0.1:9999/ping") //resp, err := http.Get("http://127.0.0.1:9999/ping")
//resp, err := http.Post("http://lcc.unififi.com/proxy/get-proxy", "application/json", strings.NewReader("{\n \"name\": \"NK\",\n \"type\": \"shopping\"\n}")) //resp, err := http.Post("http://lcc.unififi.com/proxy/get-proxy", "application/json", strings.NewReader("{\n \"name\": \"NK\",\n \"type\": \"shopping\"\n}"))
t1 := time.Now() t1 := time.Now()
resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", "application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}")) resp, err := http.Post("http://lcc.unififi.com/akamai/gen", "application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}"))
if err != nil { if err != nil {
//panic(err) //panic(err)
fmt.Println(err) fmt.Println(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment