From a94e6bf0c076287de88e7c229dff81d14c919969 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 11 Nov 2015 17:18:20 +1100 Subject: [PATCH] 481903 Module Descriptions --- .../java/org/eclipse/jetty/start/Module.java | 12 +++++++++++ .../java/org/eclipse/jetty/start/Modules.java | 4 ++++ .../config/modules/unixsocket-forwarded.mod | 11 ++++------ .../main/config/modules/unixsocket-http.mod | 17 +++++----------- .../main/config/modules/unixsocket-http2c.mod | 12 ++++------- .../modules/unixsocket-proxy-protocol.mod | 17 ++++++++-------- .../main/config/modules/unixsocket-secure.mod | 16 ++++++--------- .../src/main/config/modules/unixsocket.mod | 20 +++++++++---------- 8 files changed, 52 insertions(+), 57 deletions(-) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java index f0dc31423ee..b20f56523a9 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Module.java @@ -56,6 +56,9 @@ public class Module /** The name of the module */ private String name; + /** The module description */ + private List description; + /** The version of Jetty the module supports */ private Version version; @@ -226,6 +229,7 @@ public class Module private void init(BaseHome basehome) { + description = new ArrayList<>(); xmls = new ArrayList<>(); defaultConfig = new ArrayList<>(); iniTemplate = new ArrayList<>(); @@ -317,6 +321,9 @@ public class Module case "": // ignore (this would be entries before first section) break; + case "DESCRIPTION": + description.add(line); + break; case "DEPEND": depends.add(line); break; @@ -411,6 +418,11 @@ public class Module return Collections.unmodifiableSet(optional); } + public List getDescription() + { + return description; + } + public boolean isSelected() { return !selections.isEmpty(); diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java index 98b38bd2853..d9f26062421 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java @@ -78,6 +78,10 @@ public class Modules implements Iterable { System.out.printf(" Ref: %s%n",module.getFilesystemRef()); } + for (String description : module.getDescription()) + { + System.out.printf(" : %s%n",description); + } for (String parent : module.getDepends()) { System.out.printf(" Depend: %s%n",parent); diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-forwarded.mod b/jetty-unixsocket/src/main/config/modules/unixsocket-forwarded.mod index a1c73914c16..3008ac45e5c 100644 --- a/jetty-unixsocket/src/main/config/modules/unixsocket-forwarded.mod +++ b/jetty-unixsocket/src/main/config/modules/unixsocket-forwarded.mod @@ -1,10 +1,7 @@ -# -# Unix Socket forwarded module -# -# This module adds the jetty-unixsocket-forwarded.xml to the configuration -# and is for use with the unixsocket-http module when the proxy is operating -# in HTTP mode and adding forwarded-for style headers -# +[description] +Adds a forwarded request customizer to the HTTP configuration used +by the Unix Domain Socket connector, for use when behind a proxy operating +in HTTP mode that adds forwarded-for style HTTP headers [depend] unixsocket-http diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-http.mod b/jetty-unixsocket/src/main/config/modules/unixsocket-http.mod index 06906476edd..4929795abbc 100644 --- a/jetty-unixsocket/src/main/config/modules/unixsocket-http.mod +++ b/jetty-unixsocket/src/main/config/modules/unixsocket-http.mod @@ -1,15 +1,8 @@ -# -# Unix Socket HTTP Module -# -# This module adds a HTTP connection factory to the Unix Socket connector. -# It should be used when the proxy is forwarding either HTTP or decrypted -# HTTPS traffic. -# -# If the proxy is decrypting SSL/TLS, then either the unixsocket-forwarded -# (for HTTP mode) or unixsocket-proxy-connection (for TCP mode) should be -# used to set the scheme and certificate information correctly. -# -# +[description] +Adds a HTTP connection factory to the Unix Domain Socket connector. +It should be used when a proxy is forwarding either HTTP or decrypted +HTTPS traffic to the connector and may be used with the +unix-socket-http2c modules to upgrade to HTTP/2. [depend] unixsocket diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-http2c.mod b/jetty-unixsocket/src/main/config/modules/unixsocket-http2c.mod index 69a6c94beb6..4755fe7e02c 100644 --- a/jetty-unixsocket/src/main/config/modules/unixsocket-http2c.mod +++ b/jetty-unixsocket/src/main/config/modules/unixsocket-http2c.mod @@ -1,11 +1,7 @@ -# -# Unix Socket HTTP2C Module -# -# This module adds a HTTP2C connetion factory to the Unix Socket -# Connector. It can be used when either the proxy received direct -# HTTP/2C (unecrypted) traffic; or the proxy is decrypting HTTP/2 -# traffic before forwarding it. -# +[description] +Adds a HTTP2C connetion factory to the Unix Domain Socket Connector +It can be used when either the proxy forwards direct +HTTP/2C (unecrypted) or decrypted HTTP/2 traffic. [depend] unixsocket-http diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-proxy-protocol.mod b/jetty-unixsocket/src/main/config/modules/unixsocket-proxy-protocol.mod index fbdce1ff32e..867231af44e 100644 --- a/jetty-unixsocket/src/main/config/modules/unixsocket-proxy-protocol.mod +++ b/jetty-unixsocket/src/main/config/modules/unixsocket-proxy-protocol.mod @@ -1,12 +1,11 @@ -# -# Unix Socket PROXY Protocol Module -# -# This module adds the proxy protocol connection factory to the -# unixsocket connector: -# http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt -# Both V1 and V2 versions of the protocol are supported and any -# SSL properties transported can be interpreted by the -# unixsocket-secure module to indicate secure HTTPS traffic. +[description] +Enables the proxy protocol on the Unix Domain Socket Connector +http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt +This allows information about the proxied connection to be +efficiently forwarded as the connection is accepted. +Both V1 and V2 versions of the protocol are supported and any +SSL properties may be interpreted by the unixsocket-secure +module to indicate secure HTTPS traffic. [depend] unixsocket diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket-secure.mod b/jetty-unixsocket/src/main/config/modules/unixsocket-secure.mod index 3dd5ee7398d..43344706038 100644 --- a/jetty-unixsocket/src/main/config/modules/unixsocket-secure.mod +++ b/jetty-unixsocket/src/main/config/modules/unixsocket-secure.mod @@ -1,13 +1,9 @@ -# -# Unix Socket Secure Module -# -# This module adds a secure request customizer to the -# Unix Socket Connector. This looks for SSL properties -# that may be transported by the unixsocket-proxy-protocol -# module, to indicate a HTTPS request. This is not required -# for HTTP/2 (which carries scheme) or if the unixsocket-forwarded -# module is used with a forwarded scheme -# +[description] +Enable a secure request customizer on the HTTP Configuration +used by the Unix Domain Socket Connector. +This looks for a secure scheme transported either by the +unixsocket-forwarded, unixsocket-proxy-protocol or in a +HTTP2 request. [depend] unixsocket-http diff --git a/jetty-unixsocket/src/main/config/modules/unixsocket.mod b/jetty-unixsocket/src/main/config/modules/unixsocket.mod index 78a39aeb7fb..bf76c3aa5b0 100644 --- a/jetty-unixsocket/src/main/config/modules/unixsocket.mod +++ b/jetty-unixsocket/src/main/config/modules/unixsocket.mod @@ -1,14 +1,12 @@ -# -# Jetty UnixSocket Connector -# -# This module enables a Unix Domain Socket connector that can receive -# requests from a local proxy and/or SSL offloader (eg haproxy) in either -# HTTP or TCP mode. Unix Domain Sockets are more efficient than -# localhost TCP/IP connections as they reduce data copies, avoid -# needless fragmentation and have better dispatch behaviours. -# -# When enabled with corresponding support modules, the connector can -# accept HTTP, HTTPS or HTTP2C traffic with the +[description] +Enables a Unix Domain Socket Connector that can receive +requests from a local proxy and/or SSL offloader (eg haproxy) in either +HTTP or TCP mode. Unix Domain Sockets are more efficient than +localhost TCP/IP connections as they reduce data copies, avoid +needless fragmentation and have better dispatch behaviours. + +When enabled with corresponding support modules, the connector can +accept HTTP, HTTPS or HTTP2C traffic. [depend] server