CHANGELOG-en_US.md
中文 · English
#xxx (no space between the config and #)# x xx xx xconst useRules = require('whistle/bin/use');
useRules({
name: 'Test',
rules: '******',
}, (err, alreadyExists) => {
if (err) return console.log(alreadyExists);
});
../ path segments.%plugin-name=xxx now supports all plugin hooks.frameScript for modifying WebSocket/TCP request content via JS.~/.whistlerc.Enabled Rules and grouping functionality.includeFilter://chance:0.5.delete:// protocol to delete request parameters, cookies, etc.req.passThrough({transformReq, transformRes, ...}).sharedStorage for data sharing across different instances.localhostCompatible mode by default.https-proxy and internal-http-proxy protocols.w2 ca upon expiration.--cluster [workers] startup mode, supporting multi-process operation.root.key & root.crt) via the web interface.server hooks support setting dynamic rules via req.setReqRules and req.setResRules.originalReq.remoteAddress and originalReq.remotePort).sniCallback returned false.ignore://* via ignore://-*.proxy and pac configurations with lineProps://proxyHostOnly, making the proxy effective only when the user configures a host.--httpsPort can obtain certificates from plugins.excludeFilter://from=httpServer, includeFilter://from=httpsServer, etc.enable://useLocalHost and enable://useSafePort.x-forwarded-host and x-forwarded-proto are disabled by default. They can be enabled via:-M x-forwarded-host|x-forwarded-proto.x-whistle-forwarded-props: host,proto,for,clientIp,ip.inspectors tab.api.selectIndex method to select captured packet data at a specific index.enable://bigData.reqWrite:///path/to/ and reqWrite:///path/to, where the former is automatically completed to index.html.resMerge://json1 resMerge://json2 uses shallow merge by default; deep merge can be enabled via resMerge://true.reqWrite, reqWriteRaw, resWrite, and resWriteRaw via enable://forceReqWrite and enable://forceResWrite.enable://authCapture.sniCallback.unhandledRejection events.req.url will contain the full path.enable://abort via disable://abort.proxy.on('perfDataChange').async-await syntax.whistleConfig supports configuring inheritAuth to reuse Whistle login accounts.w2 run in the plugin's root directory.options.getCert().options.require.--config localFile (higher priority than command line).w2 stop command; displays all running instances when none is found.--dnsServer parameter.http://dns.alidns.com/resolve.pac protocol supports setting username and password: pac://user:pass@pacPath.tunnelKey to pass tunnel proxy request headers.lineProps://proxyHost|proxyTunnel|proxyFirst configuration.-M disableForwardedHost and -M disableForwardedProto.pipe://xxx supports plugins internally obtaining original rule values.! in the Rules editor.pipe protocol now supports intelligent suggestions.auth method supports req.setRedirect(url) for redirection.
- Login Box Support: Plugin auth supports setting req.showLoginBox to pop up a login box.
- Internal Requests: Plugin auth method now supports handling Whistle internal requests.sniCallback(req, options) hook.customParser (or customFrames).
- Data Replacement: Fixed inaccurate matching issues in reqReplace and resReplace due to packet splitting.replaceStatus.
- Console Log Control: Support preventing log:// from intercepting console via disable://interceptConsole.
- CORS Handling: resCors://enable automatically ignores when the request header lacks an origin.Empty Request to reduce memory and CPU usage.
- Stack Overflow Fix: Fixed "Maximum call stack size exceeded" errors.
- Storage Separation: Plugins use different storage directories in different instances.reqDelay and resDelay.
- Plugin Loading: Third-party integrations can listen to plugin loading events.clientPort and serverPort in template strings.
- Plugin Variables: Support setting multiple %plugin-name=xxxx simultaneously in rules (up to 10).alert, confirm, prompt now use custom implementations to prevent Chrome restrictions.
- WebSocket Capture: Fixed an issue where WebSocket packets could not be captured.
- Plugin Storage: Fixed an issue where storage.setProperties in plugins could fail.
- Request Pause: Fixed response stream pause issues under certain conditions.
- Third-party Integration: Fixed internal request forwarding issues during third-party integrations.delete://reqH.xxxx.
- Forwarding Logic: Optimized the implementation of internal request forwarding logic.-M shadowRules (capture + set rules) or -M shadowRulesOnly (rules only).
- UI Requests: Display UI request status.
- Error Messages: Optimized error messages.
- Protocol Display: Display the HTTP protocol type forwarded by plugins.Online menu.proxy.getRuntimeInfo().Network > Tools > ToolBox supports generating certificates for corresponding domains.Open/Source to view captured packet data source code.disabledEditor=1 parameter.Network / Tools / Toolbox supports converting objects to Query parameters.util.openEditor(value) method.--shadowRules jsonString.-M parameter:disabledBackOption|disabledMultipleOption|notAllowDisableRulesrulesOnly and pluginsOnly/...whistle-path.5b6af7b9884e1165...///__domain__port__/path/to/...whistle-path.5b6af7b9884e1165...///path/to?_whistleInternalHost_=__domain__port__--max-semi-space-size=64.process.on('pforkError').
- Uncaught Exceptions: Optimized handling of uncaught exceptions during request processing.
- Timeout Handling: Added timeout event to onSocketEnd, compatible with various abnormal situations.excludeFilter and includeFilter configurations.
- Domain Matching: Domain wildcards now support obtaining submatch content.Proxy-Connection: close via disable://proxyConnection.
- Client Filtering: Support filtering captured packet data via the clientId URL parameter.content-length by default.content-length field, which can be disabled via delete://resH.content-length.process.on('pforkError').cipher protocol to support custom fallback encryption algorithms.allowPluginList and blockPluginList.-M proxifier to enable proxifier mode, automatically intercepting specific requests for certificate verification.socket.resume().lineProps://proxyHost|proxyTunnel to apply only to the current line.enable://proxyTunnel to support two-layer HTTP proxy.enable://proxyTunnel.https2http-proxy could not properly convert some requests.Disabled indicator on the page tab.req.originalReq.ruleUrl.res.disableTrailer.res.on('end', cb) events to ensure triggering.delete://body.delete://req.body and delete://res.body for separate deletion.reqBody://() or resBody://().trailers.delete://trailer.xxx|trailer.yyy.headerReplace://trailer.key:pattern=value and trailers://json.enable://servername removes SNI from HTTPS requests.statusCode moved into rule at the same level as file and other protocols.resCors://enable automatically sets CORS fields for OPTIONS requests.hideLeftMenu=true request parameter.ctrl[cmd] + r or ctrl[cmd] + shift + r to replay requests.Ctrl/Cmd + R to replay requests.Actions>Mark to mark captured packet data.w2 run -M prod for convenient Docker deployment.-M useMultipleRules.--addon "path1,path2" could not accept multiple paths.os.hostname() via ${hostname}.Node >= 14.1.includeFilter://h:key=pattern could not match response headers.Host.reqHeaders://cookie=xxx and reqCookies://test=123 could not take effect simultaneously.urlParams and pathReplace.content-length: 0.Collapse Parent.ReinstallAll button to copy plugin installation commands.-M safe to enable safe mode with strict server certificate verification.HTTPS > View all custom certificates highlights expired certificates and supports copying installation paths.127.0.0.1 localhost.x-powered-by response header added by default by Express.ERR_HTTP2_SESSION_ERROR on some websites.DELETE requests with content automatically downgrade to HTTP/1.1.internal-http-proxy protocol, similar to internal-proxy but uses tunnel proxy for WebSocket requests.--socksServer port and request exceptions occur.pipe were not caught and HTTP request pipe failure.style protocol configuration.includeFilter in Overview.includeFilter rules in the Overview panel.includeFilter://b:pattern failed.includeFilter and excludeFilter matching:
includeFilter.excludeFilter.excludeFilter://p1 excludeFilter://p2 includeFilter://p3 includeFilter://p4 is equivalent to !(p1 || p2) && (p3 || p4).reqBody://(xxxx) method://post could not take effect simultaneously.-M disableUpdateTips (for third-party integrations).x-powered-by response header added by default by Express.ERR_HTTP2_SESSION_ERROR on some websites.includeFilter://b:pattern failure.--socksServer and request exceptions occur.reqBody://(xxxx) method://post.react-virtualized library, greatly improving Network list rendering performance.Network > Filter > Max Rows Number.package-lock.json to ensure dependency consistency.x-forwarded-for chaos issues.forwardedFor://ip or reqHeaders://x-forwarded-for=ip.x-forwarded-for by default; proxy forwarding automatically adds non-local IPs.enable://strictHtml ensures injection only when the first non-whitespace character is <.enable://safeHtml prevents accidental injection into non-standard interfaces (checks not starting with {{).@url requests automatically carry x-whistle-runtime-id, helping plugins identify request source.options.isEnable() method to get plugin enable status.{{whistlePluginName}} - Gets plugin short name (excluding whistle.).{{whistlePluginPackage.xx.yy.zzz}} - Gets values from plugin package.json.internal-proxy could not accurately carry clientIp.gzip for all requests via startup parameter -M noGzip.cache://xxx now has the highest priority.cache://reserve.log://xxx/weinre://xxx injection and caching.URL column supports width modification.Network -> HTTPS -> Enable HTTP/2.pattern enable://h2.w2 start -r "@https://xxx".w2 start -r "@filepath".w2 start -r "www.test.com/path/to reqHeaders://x-test=1".xxx.har files use base64 encoding.[1]: "test" converted to { "[1]": "test" }[1]: "test" converted to var arr = []; arr[1] = 'test';[a.b[3].c]: abc."[xxx.yyy[n]]" avoids automatic escaping..test.com - Matches x.test.com and test.com*.test.com - Matches x.test.com, not test.com**.test.com - Matches x.test.com and all its descendant domains***.test.com - Matches test.com and all its descendant domainshttp://.test.com/path/to/*env.WHISTLE_PLUGIN_EXEC_PATH or startup parameter -M buildIn.url replacementUrl.Please ensure the Node version is the latest LTS (>= 10.16.0) or Stable (>= 12.12.0) version, otherwise anomalies may occur, such as: #24037, #24470
**/path/to If path/to contains *, e.g., */cgi-*, it is equivalent to ^*/cgi-*.v10.16.0 or above)options.getRules(cb), options.getValues(cb), options.getCustomCertsInfo(cb) respectively.View Custom Certs button for managing custom certificates.w2 run --inspect or w2 run --inspectBrk.Sync button to fetch plugin rules or values and set them in the UI Rules or Values."whistleConfig: { "hintUrl": "/cgi-xxx/xxx" }".req.sessionStorage.[get|set|remove].--socksPort 1080 (currently only supports regular TCP requests).req.passThrough(), req.request(url/options, cb), req.writeHead(code, message, headers) methods for forwarding requests from plugins to specified services.-M rules, where the UI won't show Network, cannot capture packets, and plugins cannot obtain captured packet data via req.getSession(cb).style://color=!xxx&fontStyle=xxxxx&bgColor=red.enable://proxyFirst (default: host > proxy).querystring.parse('+') automatically converting to space ' ' or %2B issue.--httpPort and --httpsPort for starting regular HTTP and HTTPS servers respectively, useful for reverse proxying, and can also start another http proxy (same function as default HTTP proxy) and https proxy (can serve as an HTTPS proxy server).resRules.txt.whistle.onWhistleLogSend(level, logStr) to obtain page log information for custom reporting."pluginHomepage": "http://xxx.xxx.com/".206 functionality, supporting iOS playback of locally replaced video files.--no-prev-options startup option, supporting w2 restart without reusing previous options.Rules > Settings > The later rules first. Default is top-to-bottom, with rules in Default having the lowest priority. This setting only applies to rules configured in Rules, not to reqScript or plugin-set rules.@url or @filepath or @whistle.xxx/path in Rules.shadowRules via command line -r, --shadowRules [shadowRules].replace, and support submatching.
pattern protocol://`${search.replace(pattern1,replacment)}`
www.test.com file://`${search.replace(/Course_(id)\,?/ig,$1cid)}${test.html}`
pattern1 is a regex or regular string (no quotes needed).:12345 operation.-l "webui1.example.com|webui2.example.com"..whistle.js in the current directory via command line w2 add. See: Command Line Parameters.w2 status [-S storage] or w2 --all.-M network. In this mode, only packet capture can be viewed; rules cannot be set nor plugins loaded.-L "script=a.b.com&vase=x.y.com&nohost=imweb.nohost.pro".Copy As CURL.@ symbol function in Rules.ws://www.test.com/xxx https://www.abc.com/a/b.-P uiPort._values.txt (does not support values.txt), matching private rules _rules.txt.-D, -baseDir.os.networkInterfaces.//xxx.statsServer.http://rootca.pro.tunnelServer, support for new protocol whistle.xxx://.socks, proxy protocol functionality.-l, --localUIHost to modify the domain for accessing the configuration page, default is local.whistlejs.com.x-whistle-policy for setting Whistle policies.w2 start -S newStorageDir -p newPort.