cdp-tunnel 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -812,8 +812,8 @@
812
812
  </div>
813
813
  </div>
814
814
  <div class="add-conn-form">
815
- <input type="text" class="input-tag" id="newConnTag" placeholder="名称">
816
- <input type="text" class="input-url" id="newConnUrl" placeholder="ws://localhost:58288/plugin">
815
+ <input type="text" class="input-tag" id="newConnTag" placeholder="名称" value="local">
816
+ <input type="text" class="input-url" id="newConnUrl" placeholder="ws://localhost:9221/plugin" value="ws://localhost:9221/plugin">
817
817
  <button class="btn btn-primary btn-sm" id="addConnBtn">添加连接</button>
818
818
  </div>
819
819
  </div>
@@ -271,6 +271,14 @@
271
271
  function loadAndRenderConnections() {
272
272
  if (typeof Config !== 'undefined' && Config.getConnections) {
273
273
  Config.getConnections(function(connections) {
274
+ if ((!connections || connections.length === 0) && Config.addConnection) {
275
+ Config.addConnection({ tag: 'local', url: 'ws://localhost:9221/plugin' }, function() {
276
+ Config.getConnections(function(updated) {
277
+ renderConnections(updated);
278
+ });
279
+ });
280
+ return;
281
+ }
274
282
  renderConnections(connections);
275
283
  });
276
284
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "CDP Bridge",
4
- "version": "2.8.1",
4
+ "version": "2.8.2",
5
5
  "description": "Chrome DevTools Protocol Bridge for Playwright/Puppeteer automation",
6
6
  "permissions": [
7
7
  "debugger",
@@ -1,5 +1,5 @@
1
1
  var Config = {
2
- WS_URL: 'ws://localhost:58288/plugin',
2
+ WS_URL: 'ws://localhost:9221/plugin',
3
3
  RECONNECT_DELAY: 3000,
4
4
  DEBUGGER_VERSION: '1.3',
5
5
  HEARTBEAT_INTERVAL: 25000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdp-tunnel",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Bridge Chrome's debugger API to WebSocket — control your existing browser with Playwright/Puppeteer via CDP",
5
5
  "main": "server/proxy-server.js",
6
6
  "bin": "./cli/index.js",