Git Product home page Git Product logo

regurgitator's Introduction

The regurgitator

Set up a proxy recorder in order to later spool off data. Useful for integration tests, and looking into your communication.

This application has been made in order to be able to create a static data source for setting up tests with gemini: https://github.com/bem/gemini

The source code is based on

For desired changes, please make a pull request.

Running the proxy

You need Java-8 and Maven 3.x. Check out, compile with maven and run:

mvn clean install
rm -f rm *-service/target/original*
java -jar *-service/target/*-service-*-SNAPSHOT.jar server *-app/src/main/resources/etc/*.yml

The strange path to the dropwizard.yml file is due to amedia deployment defaults. The configuration is a standard dropwizard configuration.

Configuration which is specific for the regurgitator is:

storageManager Class name of something which implements ServerResponseStore Defaults to feeble in-memory storage.
proxyPort Where the proxy listens

Notice that you at the time of writing has a storage choice of file storage and in-memory storage.

Testing the proxy

Get the index page from somewhere using the proxy:

GET -p http://localhost:9077 http://www.rb.no/
http --proxy=http:http://localhost:9077 http://www.rb.no/

You should be able to open http://localhost:9076/ and find the request there.

The tools:

You can also change your proxy setting in your favorite browser to use the regurgitator as proxy.

Using java-setup

You need to add the following to your java command:

-Dhttp.proxyHost=localhost  -Dhttp.nonProxyHosts= -Dhttp.proxyPort=9077

This can also be added to your MAVEN_OPTS, if you are running maven:

export MAVEN_OPTS="-Dhttp.proxyHost=localhost -Dhttp.proxyPort=9077 -Dhttp.nonProxyHosts= $MAVEN_OPTS"

Future directions

  • Support "cache mode". Fetch it if it is not already present
  • Paging in the key list
  • Invalidation of content
  • Searching for key / content

regurgitator's People

Contributors

nostra avatar win-abctech avatar pang-abc avatar

Watchers

James Cloos 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.