@fanboynz/network-scanner 3.2.0 → 3.4.0

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.
@@ -388,6 +388,14 @@ function validateVpnConfig(vpnConfig) {
388
388
  * @returns {Promise<Object>} { success, interface, error }
389
389
  */
390
390
  async function connectForSite(siteConfig, forceDebug = false) {
391
+ // Platform guard: WireGuard routing here relies on the iproute2 `ip` command
392
+ // and wg-quick conventions, which are Linux-only. Fail with a clear message
393
+ // instead of a cryptic `ip: command not found` on macOS/Windows. WSL2 reports
394
+ // 'linux' and passes.
395
+ if (process.platform !== 'linux') {
396
+ return { success: false, error: `WireGuard routing is currently Linux-only (needs the iproute2 'ip' command + wg-quick; not available on ${process.platform}). Run on Linux/WSL2, or remove the 'vpn' option from the site config.` };
397
+ }
398
+
391
399
  const vpnConfig = normalizeVpnConfig(siteConfig.vpn);
392
400
  if (!vpnConfig) {
393
401
  return { success: false, error: 'Invalid VPN configuration' };
package/nwss.1 CHANGED
@@ -138,12 +138,32 @@ Maximum concurrent site processing (1-50, overrides config/default).
138
138
 
139
139
  .TP
140
140
  .BR \--dns " \fIIP\fR[,\fIIP\fR...]"
141
- Nameserver(s) for the DNS pre-check AND nettools' dig \(em does not affect Chrome
142
- navigation or whois. A single address pins all queries to it; several are
143
- rotated per query (each leading once, the rest as failover) to spread the
144
- load. Routing dig through these avoids dig timeouts on a flaky system resolver
145
- silently dropping dig-gated domains. Overrides /etc/resolv.conf. Invalid
146
- entries are warned and dropped.
141
+ Nameserver(s) for the DNS pre-check, nettools' dig, and \(em when they map to a
142
+ known public DoH provider \(em Chrome's page navigation via DNS-over-HTTPS on
143
+ direct connections (does not affect whois). A single address pins all queries
144
+ to it; several are rotated per query (each leading once, the rest as failover)
145
+ to spread the load. Routing dig through these avoids dig timeouts on a flaky
146
+ system resolver silently dropping dig-gated domains. Overrides
147
+ /etc/resolv.conf. Invalid entries are warned and dropped.
148
+ .IP
149
+ Chrome ignores \fB\--dns\fR for navigation and reads /etc/resolv.conf directly,
150
+ so a broken system resolver could fail a domain the pre-check already resolved.
151
+ When the \fB\--dns\fR servers match a known DoH provider (Google, Cloudflare,
152
+ Quad9, OpenDNS, AdGuard, CleanBrowsing, DNS.SB, Mullvad \(em including
153
+ malware/family/unfiltered variants), Chrome is launched with secure-DNS
154
+ \fIautomatic\fR mode pointed at that provider, so navigation resolves through
155
+ the same resolver. \fIautomatic\fR (not \fIsecure\fR) keeps a system-DNS
156
+ fallback if DoH is unreachable. Skipped under a proxy or VPN (the exit/tunnel
157
+ resolves); unmapped resolvers (custom/ISP, per-account providers, IPv6) fall
158
+ back to system DNS with a warning.
159
+
160
+ .TP
161
+ .B \--doh-disable
162
+ Opt out of the Chrome-navigation DoH pinning (default: off). Chrome then
163
+ resolves page navigation via the system /etc/resolv.conf even when \fB\--dns\fR
164
+ maps to a known provider; the pre-check and dig still honor \fB\--dns\fR. Use
165
+ when DoH adds latency, is blocked on the network, or system-path resolution is
166
+ specifically wanted.
147
167
 
148
168
  .TP
149
169
  .BR \--cleanup-interval " \fINUMBER\fR"
@@ -153,6 +173,14 @@ Browser restart interval in URLs processed (1-1000, overrides config/default).
153
173
  .B \--show-dead-domains
154
174
  At end of scan, list hostnames that did not resolve or were unreachable (\fBNXDOMAIN\fR/\fBENODATA\fR plus \fBERR_NAME_NOT_RESOLVED\fR/\fBERR_ADDRESS_UNREACHABLE\fR). Excludes blocks and timeouts, since those mean the domain is alive. Useful for pruning dead URLs.
155
175
 
176
+ .TP
177
+ .BI \--block-ads= FILE\fR[,\fIFILE\fR...]
178
+ Block ads/trackers during the scan using EasyList-format filter list(s) \(em network rules like \fB||domain^\fR, \fB/ads/*\fR, \fB||domain^$script\fR. Comma-separated for multiple lists. Cosmetic (\fB##\fR) rules are ignored; the scanned page's own top-level document is never blocked (only sub-resources).
179
+
180
+ .TP
181
+ .BI \--adblock-engine= js|rust
182
+ Matcher backend for \fB\-\-block-ads\fR (default: \fBjs\fR). \fBjs\fR is the built-in pure-JS matcher (no extra dependencies). \fBrust\fR uses Brave's \fBadblock-rs\fR \(em much faster on large lists, same rules and results, but requires \fBnpm install adblock-rs\fR (needs a Rust toolchain).
183
+
156
184
  .TP
157
185
  .BR \-h ", " \--help
158
186
  Show help message and exit.
@@ -318,6 +346,14 @@ Integer. Number of random content-zone clicks per load, capped at 20 (default: 3
318
346
  .B realistic_click
319
347
  Boolean. Higher click fidelity: denser mouse approach (15 steps), sub-pixel hand-tremor micro-moves during the press, and a small mouseup drift so the mousedown and mouseup coordinates differ. For sites that score click realism. Costs roughly 80-120ms per click (default: false).
320
348
 
349
+ .TP
350
+ .B click_elements
351
+ Array of CSS selectors. After the page loads, click each selector's first match \fBin order\fR (searched across the main frame and any iframe) \(em reaching content via organic navigation/gesture instead of a direct deep-load (which some sites JS-redirect away). Example: \fB["a[href*='/movie/']", ".play"]\fR clicks a movie link then a play button. The request interceptor stays attached, so the post-click page's requests are matched against \fBfilterRegex\fR/\fBdig\fR as usual; a click that navigates is followed and later selectors query the resulting page. Honors \fBrealistic_click\fR and \fBcursor_mode: "ghost"\fR (Bezier travel to the element); missing elements are skipped and never fail the scan.
352
+
353
+ .TP
354
+ .B click_wait
355
+ Per click: maximum time in milliseconds to wait for the element to appear and be visible (\fBwaitForSelector\fR) AND the navigation/settle wait after the click (default: 5000; capped at half the per-URL timeout).
356
+
321
357
  .TP
322
358
  .B delay
323
359
  Milliseconds to wait after page load (default: 4000).
@@ -342,6 +378,10 @@ Boolean. Allow first-party request matching (default: false).
342
378
  .B thirdParty
343
379
  Boolean. Allow third-party request matching (default: true).
344
380
 
381
+ .TP
382
+ .B redirect_first_party
383
+ Boolean (default: true). Whether redirect-destination domains (and chain hops) are treated as first-party. Set to \fBfalse\fR to keep redirect targets \fBthird-party\fR so \fBfilterRegex\fR/\fBdig\fR can match them under \fBthirdParty: true\fR \(em e.g. capturing the end domain of an ad/cloak redirect. The originally-scanned domain stays first-party either way; note this also un-excludes the redirect target's own same-domain resources.
384
+
345
385
  .TP
346
386
  .B fingerprint_protection
347
387
  Boolean or \fB"random"\fR. Enable browser fingerprint spoofing.