Giter Club home page Giter Club logo

webproxy's Introduction

WebProxy

Create an HTTP / HTTPS proxy server based on MITMProxy and log all requests to the log file and parse the log for rewriting into the database.

基于MITMProxy创建HTTP/HTTPS代理服务器,并记录所有请求到日志文件,解析日志去重写入数据库。

Installation(安装)

MITMProxy

http://docs.mitmproxy.org/en/stable/install.html

Python module

cd t1.proxy/
pip install -r requirements.txt

Start Proxy Server (启动代理服务器)

代理服务器IP 本机IP(内网外网IP均可)
代理服务器端口 8088
mitmdump -p 8088 -s traffic.py

Config devices proxy (配置各端代理)

在各端配置好代理后,访问http://mitm.it下载CA证书,并按照以下方式进行验证。

iOS

  • 打开设置-无线局域网-所连接的Wifi-配置代理-手动
  • 填上代理服务器IP和端口
  • 打开设置-通用-关于本机-证书信任设置
  • 开启mitmproxy选项。

Android

  • 打开设置-WLAN-长按所连接的网络-修改网络-高级选项-手动
  • 填入代理服务器IP和端口
  • 打开设置-安全-信任的凭据
  • 查看安装的证书是否存在

macOS

  • 打开系统配置(System Preferences.app)- 网络(Network)- 高级(Advanced)- 代理(Proxies)- Web Proxy(HTTP)和Secure Web Proxy(HTTPS)
  • 填上代理服务器IP和端口
  • 打开Keychain Access.app
  • 选择login(Keychains)和Certificates(Category)中找到mitmproxy
  • 点击mitmproxy,在Trust中选择Always Trust

Start Traffic Stash (去重并入库)

# 创建好数据库(编码使用utf8mb4),并配置MySQL数据库信息
export host="127.0.0.1"
export user="your_username"
export password="your_password"
export database="t1.proxy"

# 启动脚本
python stash.py proxy.mitm

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.