Skip to content

Commit

Permalink
Add Usage section to readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Haberman committed Nov 4, 2009
1 parent a8d50c2 commit 8eeb840
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ While shuffling bytes between the incoming browser and the outgoing server, fake

E.g. for automated testing, the [LocalhostInterceptor][2] can route browser traffic that would otherwise go to `http://www.somesite.com` to `http://localhost`. This is useful for containing (and asserting against) URLs within your application you either cannot easily change or are using to test cross-domain functionality.

Usage
=====

Run [Proxy][6] as the main class, passing in the port as the only argument. Or with the jar:

java -jar fakehttp.jar 8081

The fakehttp jar includes its own dependencies (netty and the Scala runtime library) to make copying/installing it easier.

To change things other than the port (e.g. interceptor or ssl mode), currently you just have to edit the [Proxy][6] class.

Note that you'll also have to configure your browser to use the proxy on the host/port you started fakehttp on.

SSL Modes
=========

Expand All @@ -31,3 +44,4 @@ fakehttp is Apache licensed, except for the CyberVillain stuff that drives [Clea
[3]: /stephenh/fakehttp/blob/master/src/main/scala/fakehttp/ssl/OpaqueSslMode.scala
[4]: /stephenh/fakehttp/blob/master/src/main/scala/fakehttp/ssl/ClearSslMode.scala
[5]: http://code.google.com/p/selenium/source/browse/selenium-rc/trunk/server-coreless/src/main/java/cybervillains/ca/CertificateCreator.java
[6]: /stephenh/fakehttp/blob/master/src/main/scala/fakehttp/Proxy.scala

0 comments on commit 8eeb840

Please sign in to comment.