Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add more examples of endpoints

  • Loading branch information...
commit e50e993c798d64c2f1b162e0c88efe64ea2335b4 1 parent 63e5734
Matt Haggard authored
Showing with 21 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +20 −0 README.md
1  .gitignore
View
@@ -3,3 +3,4 @@
_trial_temp/
dist/
MANIFEST
+build/
20 README.md
View
@@ -9,6 +9,7 @@ Graceful swan takes flight. Hunter eyes his prey. KABLAM! Hunter falls. Swan
Install the dependencies:
pip install Twisted
+ pip install PyOpenSSL # if you want SSL support
Either clone repo:
@@ -51,6 +52,25 @@ Stop forwarding:
grace stop
+## It's not just for HTTP ##
+
+Because ``grace`` uses [Twisted's excellent endpoints](http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.serverFromString.html), you can forward just about any traffic to just about anywhere. Here's SSL to TCP:
+
+ grace start ssl:443:privateKey=key.pem:certKey=crt.pem tcp:host=127.0.0.1:port=7500
+
+TCP to SSL:
+
+ grace start tcp:9000 ssl:host=www.google.com:port=443:caCertsDir=/etc/ssl/certs
+
+TCP to domain socket:
+
+ grace start tcp:9000 unix:/var/foo/bar
+
+Domain socket to TCP:
+
+ grace start unix:/var/foo/bar tcp:host=127.0.0.1:port=7500
+
+
## Planned usage not yet supported ##
Upgrade ``grace`` to a new version and swap out the current ``grace`` process with a new one:
Please sign in to comment.
Something went wrong with that request. Please try again.