]> WPIA git - gigi.git/commitdiff
Added --port parameter
authorJanis Streib <janis@dogcraft.de>
Mon, 23 Jun 2014 21:38:10 +0000 (23:38 +0200)
committerJanis Streib <janis@dogcraft.de>
Mon, 23 Jun 2014 21:38:10 +0000 (23:38 +0200)
src/org/cacert/gigi/Launcher.java

index d94dbe6eb2e4bf2966ee6abe14d1fdcc681cf07c..12add4362de2d4c0c45ae7eb50f02f9bf1f799fd 100644 (file)
@@ -33,6 +33,13 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
 
 public class Launcher {
        public static void main(String[] args) throws Exception {
+               int port = 443;
+               for (int i = 0; i < args.length; i++) {
+                       if (args[i].equals("--port")) {
+                               port = Integer.parseInt(args[i + 1]);
+                       }
+                       i++;
+               }
                Server s = new Server();
                // === SSL HTTP Configuration ===
                HttpConfiguration https_config = new HttpConfiguration();
@@ -46,7 +53,7 @@ public class Launcher {
                                new SslConnectionFactory(generateSSLContextFactory(),
                                                "http/1.1"), new HttpConnectionFactory(https_config));
                connector.setHost("127.0.0.1");
-               connector.setPort(443);
+               connector.setPort(port);
                s.setConnectors(new Connector[]{connector});
 
                HandlerList hl = new HandlerList();