|
|
|
|
@ -137,6 +137,16 @@ func (h *HTTPBin) IP10(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
writeJSON(w, body, http.StatusOK)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (h *HTTPBin) IP20(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
cmip := models.QueryIp10()
|
|
|
|
|
ret := models.Ret20{Data: []string{}}
|
|
|
|
|
ret.Ret = "ok"
|
|
|
|
|
ret.Ip = cmip.Ip
|
|
|
|
|
ret.Updatetime = cmip.Updatetime
|
|
|
|
|
body, _ := json.Marshal(ret)
|
|
|
|
|
writeJSON(w, body, http.StatusOK)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (h *HTTPBin) Ssh(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
cmip := models.QueryIp10()
|
|
|
|
|
result := fmt.Sprintf("ssh -p 221 root@%s",cmip.Ip)
|
|
|
|
|
|