Git Product home page Git Product logo

proctor's Introduction

About

proctor will proxy your HTTP traffic for you. All it needs is a list of allowed remote servers and a port to listen on.

This is really just a simple and quick proof of concept I made to learn how HTTP proxies work. It's not heavily tested, featureful, or otherwise ready for serious use. I did all the HTTP parsing and other bits myself to see how they work. I would recommend using the appropriate libraries instead.

Usage

proctor

USAGE:
    proctor.exe [FLAGS] --port <port> [HOSTNAME]...

ARGS:
    <HOSTNAME>...    Remote servers that can be connected to on port 443

FLAGS:
    -d, --debug      Debug mode
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -p, --port <port>    Port to listen on

You must specify at least one HOSTNAME.

To see it work, you might run a test like this:

cargo run -- -p 8080 api.giphy.com

The above command tells your proctor to listen on localhost:8080 and only allow proxy connections to api.giphy.com. Any other proxy request would be denied.

Then in a different shell:

curl -x https:://localhost:8080 'http://api.giphy.com/v1/gifs/search?q=I&api_key=dc6zaTOxFJmzC' --ssl-reqd

However, this example will just result in an error unless you setup cURL to work with giphy's api. For instance, you would need an API key and other things.

proctor's People

Contributors

dagit avatar

Stargazers

 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.