diff --git a/install.bat b/install.bat index a0414b9..d2fd6bc 100644 --- a/install.bat +++ b/install.bat @@ -8,5 +8,6 @@ REM adb install app-debug-androidTest.apk adb push atx-agent /data/local/tmp adb shell chmod 777 /data/local/tmp/atx-agent -adb shell /data/local/tmp/atx-agent -d -pause \ No newline at end of file +adb shell /data/local/tmp/atx-agent -d -t 10.240.187.224:8080 -nouia +REM adb shell /data/local/tmp/atx-agent -d -t 10.246.46.160:8200 -nouia +REM pause \ No newline at end of file diff --git a/main.go b/main.go index 03c9d77..2b5cafe 100644 --- a/main.go +++ b/main.go @@ -473,6 +473,13 @@ func ServeHTTP(lis net.Listener, tunnel *TunnelProxy) error { io.WriteString(w, "Success") }).Methods("POST") + m.HandleFunc("/info/rotation", func(w http.ResponseWriter, r *http.Request) { + var rotation int + json.NewDecoder(r.Body).Decode(&rotation) + log.Println("rotation change received:", rotation) + io.WriteString(w, "Success") + }) + m.HandleFunc("/upload/{filepath:.*}", func(w http.ResponseWriter, r *http.Request) { filepath := mux.Vars(r)["filepath"] if runtime.GOOS != "windows" {