Giter Site home page Giter Site logo

proxy-server's Introduction

proxy-server

基于node.js的代理服务器

##怎么使用?

需要安装两个模块
一个是supervisor,用于启动proxy.js
一个是request,用来请求http资源

然后在浏览器设置代理127.0.0.1:3000
启动代理服务器 supervisor proxy.js

本系统以y.qq.com为例,代理其中的一个cdn_djl.js文件
在rule.txt下设置规则,不用的规则注释掉,规则示例:

jsqmt.qq.com/cdn_djl.js ./cdn_djl.js
// ctc.qzonestyle.gtimg.cn/utp/dnsgetForMusic.js dnsgetForMusic.js

前面是规则匹配线上的文件,后边是线下的代理文件
当修改了本地代理文件后,y.qq.com就会执行本地代理文件

当然,本代理服务器还很多缺点,这边作为演示。比如还不支持https,不支持文件上传的代理,才疏学浅,还没有找到方法解决。希望提供优化建议

proxy-server's People

Contributors

zhazhaxia avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.