cauliframework / cauli

Debug Networking
https://cauli.works
MIT License
28 stars 5 forks source link

Add a floret to map requests that accepts Charles proxy configuration #216

Open brototyp opened 3 years ago

brototyp commented 3 years ago

I often use Charles proxy to map requests from production to staging or another environment. I hereby propose a floret that can do the same without the use of Charles and accepts the same xml configuration files that Charles accept.

Example configuration

<?xml version='1.0' encoding='UTF-8' ?>
<?charles serialisation-version='2.0' ?>
<map>
  <toolEnabled>true</toolEnabled>
  <mappings>
    <mapMapping>
      <sourceLocation>
        <protocol>https</protocol>
        <host>cauli.works</host>
        <port>80</port>
        <path>blog</path>
      </sourceLocation>
      <destLocation>
        <host>127.0.0.1</host>
        <port>4000</port>
      </destLocation>
      <preserveHostHeader>false</preserveHostHeader>
      <enabled>true</enabled>
    </mapMapping>
  </mappings>
</map>