diff options
Diffstat (limited to 'jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy-proxy.xml')
-rw-r--r-- | jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy-proxy.xml | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy-proxy.xml b/jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy-proxy.xml new file mode 100644 index 0000000000..7d84868619 --- /dev/null +++ b/jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy-proxy.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> + +<Configure id="Server" class="org.eclipse.jetty.server.Server"> + + <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory"> + <Set name="keyStorePath">src/main/resources/keystore.jks</Set> + <Set name="keyStorePassword">storepwd</Set> + <Set name="trustStore">src/main/resources/truststore.jks</Set> + <Set name="trustStorePassword">storepwd</Set> + <Set name="protocol">TLSv1</Set> + </New> + + <!-- + <Set class="org.eclipse.jetty.npn.NextProtoNego" name="debug" type="boolean">true</Set> + --> + + <!-- + This is the upstream server connector. It speaks non-SSL SPDY/2(HTTP) on port 9090. + --> + <Call name="addConnector"> + <Arg> + <New class="org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector"> + <Set name="Port">9090</Set> + <Set name="defaultAsyncConnectionFactory"> + <Call name="getAsyncConnectionFactory"> + <Arg>spdy/2</Arg> + </Call> + </Set> + </New> + </Arg> + </Call> + + <!-- + The ProxyEngine receives SPDY/x(HTTP) requests from proxy connectors below + and is configured to process requests for host "localhost". + Such requests are converted from SPDY/x(HTTP) to SPDY/2(HTTP) and forwarded + to 127.0.0.1:9090, where they are served by the upstream server above. + --> + <New id="proxyEngine" class="org.eclipse.jetty.spdy.proxy.SPDYProxyEngine"> + <Arg> + <New class="org.eclipse.jetty.spdy.SPDYClient$Factory"> + <Call name="start" /> + </New> + </Arg> + <Set name="proxyInfos"> + <Map> + <Entry> + <Item>localhost</Item> + <Item> + <New class="org.eclipse.jetty.spdy.proxy.ProxyEngine$ProxyInfo"> + <Arg type="short">2</Arg> + <Arg>127.0.0.1</Arg> + <Arg type="int">9090</Arg> + </New> + </Item> + </Entry> + </Map> + </Set> + </New> + + <!-- + These are the reverse proxy connectors accepting requests from clients. + They accept non-SSL (on port 8080) and SSL (on port 8443) HTTP, + SPDY/2(HTTP) and SPDY/3(HTTP). + Non-SPDY HTTP requests are converted to SPDY internally and passed to the + ProxyEngine above. + --> + <Call name="addConnector"> + <Arg> + <New class="org.eclipse.jetty.spdy.proxy.HTTPSPDYProxyConnector"> + <Arg><Ref id="proxyEngine" /></Arg> + <Set name="Port">8080</Set> + </New> + </Arg> + </Call> + <Call name="addConnector"> + <Arg> + <New class="org.eclipse.jetty.spdy.proxy.HTTPSPDYProxyConnector"> + <Arg><Ref id="proxyEngine" /></Arg> + <Arg><Ref id="sslContextFactory" /></Arg> + <Set name="Port">8443</Set> + </New> + </Arg> + </Call> + + +</Configure> |