@browserbridge/bbx 1.6.2 → 1.6.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserbridge/bbx",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "agent-tools",
@@ -973,15 +973,20 @@ function getProxyExampleHost(bindHost) {
973
973
  return bindHost;
974
974
  }
975
975
 
976
- for (const entries of Object.values(os.networkInterfaces())) {
976
+ /** @type {string | null} */
977
+ let firstIpv4 = null;
978
+ for (const [name, entries] of Object.entries(os.networkInterfaces())) {
977
979
  for (const entry of entries ?? []) {
978
980
  if (!entry.internal && entry.family === 'IPv4') {
979
- return entry.address;
981
+ if (name.toLowerCase() === 'ethernet 0') {
982
+ return entry.address;
983
+ }
984
+ firstIpv4 ??= entry.address;
980
985
  }
981
986
  }
982
987
  }
983
988
 
984
- return '<host>';
989
+ return firstIpv4 ?? '<host>';
985
990
  }
986
991
 
987
992
  /**
@@ -235,6 +235,9 @@ export function applyWindowsTcpTransportDefaults(env = process.env) {
235
235
  if (env[BRIDGE_TCP_PORT_ENV] != null && env[BRIDGE_TCP_PORT_ENV] !== '') {
236
236
  return false;
237
237
  }
238
+ if (readProxyConfig(env)) {
239
+ return false;
240
+ }
238
241
  if (env[BRIDGE_HOME_ENV]) {
239
242
  return false;
240
243
  }