Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fquirin authored Aug 18, 2018
1 parent 87d5ae5 commit 879eb5a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ String host = "localhost";
TinyReverseProxy reverseProxy = new TinyReverseProxy(host, port);

//Add paths - SEPIA defaults for custom-bundle:
reverseProxy.addPrefixPath("/sepia/assist", "http://localhost:20721");
reverseProxy.addPrefixPath("/sepia/teach", "http://localhost:20722");
reverseProxy.addPrefixPath("/sepia/chat", "http://localhost:20723");
boolean isPublic = true; //allows access from public and local IPs
reverseProxy.addPrefixPath("/sepia/assist", "http://localhost:20721", isPublic);
reverseProxy.addPrefixPath("/sepia/teach", "http://localhost:20722", isPublic);
reverseProxy.addPrefixPath("/sepia/chat", "http://localhost:20723", isPublic);

//Start proxy
reverseProxy.start();
```
SSL is supported and can for example be used with Letsencrypt certificates, you just need to convert them to a Java key-store. See this [bash script](https://github.com/SEPIA-Framework/sepia-installation-and-setup/blob/master/sepia-custom-bundle-folder/letsencrypt/copy-cert-to-keystore.sh) for an example.

Be sure to check-out the source to tweak the number of possible threads for more performance.
Hostname, port and proxy paths can be configured via the `proxy.properties` file in `settings`.

Before using: Be sure to check-out the source to tweak the number of possible threads for more performance. If you use the IP filter for local addresses make sure that there is NO OTHER proxy in front otherwhise all your IPs will be local and the filter will NOT WORK!

Good to know: Thanks to Undertow it also works as proxy for WebSocket servers out-of-the-box :-)

### To-do
Introduce a config-file and maybe some command-line options to handle custom path-to-target mappings.

0 comments on commit 879eb5a

Please sign in to comment.