<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Whistle on Jack Jiang'Blog</title><link>https://mysetsuna.github.io/tags/whistle/</link><description>Recent content in Whistle on Jack Jiang'Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Tue, 12 Mar 2024 15:50:26 +0800</lastBuildDate><atom:link href="https://mysetsuna.github.io/tags/whistle/index.xml" rel="self" type="application/rss+xml"/><item><title>Whistle使用技巧</title><link>https://mysetsuna.github.io/p/whistle%E4%BD%BF%E7%94%A8%E6%8A%80%E5%B7%A7/</link><pubDate>Tue, 12 Mar 2024 15:50:26 +0800</pubDate><guid>https://mysetsuna.github.io/p/whistle%E4%BD%BF%E7%94%A8%E6%8A%80%E5%B7%A7/</guid><description>&lt;p>通过Whistle.js配合浏览器插件SwitchyOmega，可以灵活的代理url。&lt;/p>
&lt;p>eg：本地3000接口代理mysite.com域名下，除了&lt;code>*/db&lt;/code>之外的所有请求，&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;span class="lnt">8
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">127.0.0.1:3000 mysite.com excludeFilter://*/db
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">mysite.com reqHeaders://{header}
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">// values
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">header = {
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &amp;#34;someHeader&amp;#34;: &amp;#34;myParams&amp;#34;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item></channel></rss>