catproxy
Version:
a node proxy or host change tools
362 lines (157 loc) • 12.1 kB
HTML
<html lang="zh-hans" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Read Me · catproxy</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.2">
<meta name="author" content="jianxcao">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search-pro/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="docs/install.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="输入并搜索" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter active" data-level="1.1" data-path="./">
<a href="./">
Read Me
</a>
</li>
<li class="chapter " data-level="1.2" data-path="docs/install.html">
<a href="docs/install.html">
安装
</a>
</li>
<li class="chapter " data-level="1.3" data-path="docs/cmd.html">
<a href="docs/cmd.html">
命令说明
</a>
</li>
<li class="chapter " data-level="1.4" data-path="docs/manager.html">
<a href="docs/manager.html">
ui配置界面说明
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="docs/rule.html">
<a href="docs/rule.html">
规则配置说明
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" data-path="docs/moniter.html">
<a href="docs/moniter.html">
ui监控界面说明
</a>
</li>
<li class="chapter " data-level="1.6" data-path="docs/https.html">
<a href="docs/https.html">
https说明
</a>
</li>
<li class="chapter " data-level="1.7" data-path="docs/updateInfo.html">
<a href="docs/updateInfo.html">
更新日志
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
本书使用 GitBook 发布
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >Read Me</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="catproxy">catproxy</h1>
<p>在工作中是否经常遇到这种情况,需要将cdn的host切换成本地测试,或者线上出现bug,需要修复时候需要将前端文件映射到本地,这个时候通常会用到代理工具 fiddler或charles。</p>
<p>无论charles或者fiddler都可以切换host,但是都只能将一个host完整的切换过去,并不能按照目录区分切换</p>
<p>catproxy为解决这些问题而出</p>
<h2 id="主要功能">主要功能</h2>
<ul>
<li>完成页面资源从本地和服务器端映射</li>
<li>针对不同的资源做不同的ip映射</li>
<li>提供ui界面去修改映射关系</li>
<li>支持https的映射</li>
<li>支持对请求数据的监控</li>
<li>支持weinre的注入</li>
<li>可做代理服务器使用</li>
</ul>
<h2 id="原理">原理</h2>
<p> 将host配置成127.0.0.1或者设置当前设备的代理为catproxy的http服务器(包括端口和ip)
设置后所有请求都会被catproxy接管,catproxy会根据配置文件去请求响应配置的数据,实现对请求的代理</p>
<h2 id="说明文档"><a href="SUMMARY.md">说明文档</a></h2>
<h2 id="版本更新"><a href="docs/updateinfo.md">版本更新</a></h2>
<h2 id="license">License</h2>
<p><strong>MIT</strong></p>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="docs/install.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 安装">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Read Me","level":"1.1","depth":1,"next":{"title":"安装","level":"1.2","depth":1,"path":"docs/install.md","ref":"docs/install.md","articles":[]},"dir":"ltr"},"config":{"plugins":["edit-link","prism","-highlight","github","-search","search-pro","splitter","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/jianxcao/catproxy"},"livereload":{},"splitter":{},"search-pro":{"cutWordLib":"nodejieba","defineWord":["Gitbook Use"]},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit This Page","base":"https://github.com/jianxcao/catproxy/tree/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"summary":"docs/README.md","theme":"default","author":"jianxcao","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"catproxy","language":"zh-hans","gitbook":"3.2.2"},"file":{"path":"README.md","mtime":"2017-05-23T02:12:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-06-02T08:54:00.691Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-edit-link/plugin.js"></script>
<script src="gitbook/gitbook-plugin-github/plugin.js"></script>
<script src="gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
<script src="gitbook/gitbook-plugin-search-pro/search.js"></script>
<script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>