From 2eb716e4bc88ed1ddf46ad8ad51175a0ad394e95 Mon Sep 17 00:00:00 2001 From: luna <129953723+musiclover789@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:24:07 +0800 Subject: [PATCH] Update remote-debugger.go --- luna_utils/remote-debugger.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/luna_utils/remote-debugger.go b/luna_utils/remote-debugger.go index 9481837..1a12191 100644 --- a/luna_utils/remote-debugger.go +++ b/luna_utils/remote-debugger.go @@ -57,6 +57,9 @@ var StartChromiumWithUserDataDir = func(chromiumPath, userDataDirFullPath string for _, arg := range customArgs { if len(arg) > 0 { fingerprintArgs = append(fingerprintArgs, arg) + if !strings.Contains(arg, "luna") { + chromiumCmdArgs = append(chromiumCmdArgs, arg) + } } } @@ -84,7 +87,7 @@ var StartChromiumWithUserDataDir = func(chromiumPath, userDataDirFullPath string fmt.Println("指纹信息路径错误:", err) } } - //---- + //------remote-debugging-port=12345 chromiumCmdArgs = append(chromiumCmdArgs, "--remote-debugging-port="+strconv.Itoa(port)) var proxyServer *reverse_proxy.ProxyServer @@ -247,7 +250,7 @@ func writeFile(filePath string, args []string, name string) error { err := os.Remove(filePath) if err != nil { - fmt.Println("删除文件失败:", err) + fmt.Println("删除文件失败-或不存在端口占用文件-忽略:", err) } // 写入文件