美文网首页
Charles 使用

Charles 使用

作者: McDu | 来源:发表于2020-10-22 14:42 被阅读0次

    rewrite 配置

    <?xml version='1.0' encoding='UTF-8' ?>
    <?charles serialisation-version='2.0' ?>
    <rewriteSet-array>
      <rewriteSet>
        <active>true</active>
        <name>qunarzz</name>
        <hosts>
          <locationPatterns>
            <locationMatch>
              <location>
                <host>q.qunarzz.com</host>
              </location>
              <enabled>true</enabled>
            </locationMatch>
          </locationPatterns>
        </hosts>
        <rules>
          <rewriteRule>
            <active>true</active>
            <ruleType>6</ruleType>
            <matchValue>http(s?)://q.qunarzz.com/(package_b2c_frontend|freecombine_admin_book)/(.*)</matchValue>
            <matchHeaderRegex>false</matchHeaderRegex>
            <matchValueRegex>true</matchValueRegex>
            <matchRequest>false</matchRequest>
            <matchResponse>false</matchResponse>
            <newValue>http://127.0.0.1:8001/$2/$3</newValue>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>true</matchWholeValue>
            <caseSensitive>false</caseSensitive>
            <replaceType>2</replaceType>
          </rewriteRule>
          <rewriteRule>
            <active>true</active>
            <ruleType>6</ruleType>
            <matchValue>http(s?)://q.qunarzz.com/(packagec2b|vacation_cms)/(.*)</matchValue>
            <matchHeaderRegex>false</matchHeaderRegex>
            <matchValueRegex>true</matchValueRegex>
            <matchRequest>false</matchRequest>
            <matchResponse>false</matchResponse>
            <newValue>http://127.0.0.1:8000/$2/$3</newValue>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>true</matchWholeValue>
            <caseSensitive>false</caseSensitive>
            <replaceType>2</replaceType>
          </rewriteRule>
        </rules>
      </rewriteSet>
    </rewriteSet-array>
    

    https://deliveroo.engineering/2018/12/04/how-to-use-charles-proxy-to-rewrite-https-traffic-for-web-applications.html

    https://www.cnblogs.com/wonyun/p/5586746.html

    相关文章

      网友评论

          本文标题:Charles 使用

          本文链接:https://www.haomeiwen.com/subject/bzoumktx.html