This commit is contained in:
Josh at WLTechBlog
2025-08-18 13:01:03 -05:00
parent 4ea5615ef8
commit 1216210150
7 changed files with 84 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ import (
"github.com/go-rod/rod/lib/proto"
)
const Version = "2.0.0"
// Daemon is the main server that manages browser connections
type Daemon struct {
browser *rod.Browser
@@ -226,6 +228,12 @@ func (d *Daemon) handleCommand(w http.ResponseWriter, r *http.Request) {
var response Response
switch cmd.Action {
case "version":
response = Response{
Success: true,
Data: Version,
}
case "open-tab":
timeoutStr := cmd.Params["timeout"]