/proxy-server

本地代理服务器,抓包工具,拦截 HTTP/HTTPS请求,保存图片,属于是demo,目前还不知道有什么用

Primary LanguageJavaScript

HTTPS Proxy Server

A Node.js proxy server that captures and logs all HTTP/HTTPS requests and responses.

Features

  • Captures all HTTP and HTTPS traffic
  • Logs requests and responses with timestamps
  • Generates SSL certificates on-the-fly for HTTPS interception
  • Works with any client that supports proxy configuration

Setup

  1. Install dependencies:

    yarn
    
  2. Start the proxy server:

    yarn start
    
  3. Install the CA certificate: The certificate will be generated at ./certs/ca.crt. You need to install this certificate in your system's trusted root certificate store.

  4. Configure your system proxy: Set your system's proxy settings to use 127.0.0.1:3000 for both HTTP and HTTPS.

Logs

All captured requests and responses are stored in the logs directory with timestamps and details.

Project Structure

  • index.js: Main entry point
  • certificateManager.js: Handles SSL certificate generation
  • logger.js: Manages request and response logging
  • httpProxy.js: Handles HTTP proxying
  • httpsProxy.js: Handles HTTPS proxying