Skip to main content

A HTTP/HTTPS Caching Proxy

Project description

Caching Proxy

CProxy (CP) is a HTTP caching proxy server written in Python 3. With the aim of being able to surf the Internet completely offline, it will intercept Browser's HTTPs requests and decrypt the the traffic on-the-fly to store each successful HTTP response.

This work is inspired by coursera-dl and edx-dl.

Installation

pip3 install cproxy

If you want to install CP manually, you should install the following packages

  • pyOpenSSL
  • brotli
  • chardet

Or simple run pip install -r requirements.txt in the package's home directory.

Usage

  1. Run the program by executing

    $ cproxy
    
  2. Change browser's proxy setting to

    http://loaclhost:8080
    
  3. Visit "http://cp.ca" to install Certificate Authority (CA) (this is required. Otherwise you can only visit http websites off-line). For more detailed guidance, please refer mitmproxy - Certificates.

  4. Viola, you can browse your favorite websites now.

  5. When disconnected from the Internet later, you can still visit those websites off-line. Or you can explicitly tell CP to use off-line mode

    cproxy -off
    
  6. For more options, run cproxy -h

    $ cproxy -h                                                              
    usage: CachingProxy arguments [-h] [-cd CACHE_DIR] [-p PORT] [-off] [-d]
    
    optional arguments:
      -h, --help            show this help message and exit
      -cd CACHE_DIR, --cache_dir CACHE_DIR
                            where to store caches
      -p PORT, --port PORT  server listening port
      -off, --offline       Offline mode
      -d, --debug           Enable debugging mode
    

TODOs

  • Caching HTTP/HTTPS websites
  • IPv6 support
  • Pre-fetching
  • Proxy (use proxychains for now)
  • Youtube support (lots of edx's videos are hosted on youtube. For now, youtube will be blocked when you visit course.edx.org thus to force player to use other video sources)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CProxy-0.1a1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

CProxy-0.1a1-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file CProxy-0.1a1.tar.gz.

File metadata

  • Download URL: CProxy-0.1a1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for CProxy-0.1a1.tar.gz
Algorithm Hash digest
SHA256 d3a6bccc1db67e21d1ae91f6d5906b768e8b9abaf3d1b897cd1a7c88ce676efb
MD5 0f24f96a5ca341278feb7001c0e6f9c5
BLAKE2b-256 656c618ba138bbc0728b9e1a684c3cc1ca1526f6adef5a2a952acbd5f49c669e

See more details on using hashes here.

File details

Details for the file CProxy-0.1a1-py3-none-any.whl.

File metadata

  • Download URL: CProxy-0.1a1-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for CProxy-0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bb6588e1f425ee1931904d3611470c17abf426ea352d46bd0e7158ebd6f5b01
MD5 854354a5895d9ba048e3d8aabd9357f7
BLAKE2b-256 4d492aa6d59e30bd1df6a1b89b6ba4ab6ae26a87063b99de2612d5acd97f5ac3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page