]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
changed how stunnel is generated in hiera files. breaks compatibility with older...
authorelijah <elijah@riseup.net>
Fri, 20 Jun 2014 08:25:51 +0000 (01:25 -0700)
committerelijah <elijah@riseup.net>
Fri, 20 Jun 2014 08:25:51 +0000 (01:25 -0700)
lib/leap_cli/config/macros.rb
lib/leap_cli/version.rb

index 59453b0098ff1fbb096c236bc9fff2b8afa56a65..66f1318978b3ebd98e316b93af86402ab0b297e7 100644 (file)
@@ -271,6 +271,23 @@ module LeapCli; module Config
     ## STUNNEL
     ##
 
+    #
+    # About stunnel
+    # --------------------------
+    #
+    # The network looks like this:
+    #
+    #   From the client's perspective:
+    #
+    #   |------- stunnel client --------------|    |---------- stunnel server -----------------------|
+    #    consumer app -> localhost:accept_port  ->  connect:connect_port -> ??
+    #
+    #   From the server's perspective:
+    #
+    #   |------- stunnel client --------------|    |---------- stunnel server -----------------------|
+    #                                       ??  ->  *:accept_port -> localhost:connect_port -> service
+    #
+
     #
     # stunnel configuration for the client side.
     #
@@ -279,18 +296,12 @@ module LeapCli; module Config
     # +port+ is the real port of the ultimate service running on the servers
     # that the client wants to connect to.
     #
-    # About ths stunnel puppet names:
-    #
     # * accept_port is the port on localhost to which local clients
     #   can connect. it is auto generated serially.
+    #
     # * connect_port is the port on the stunnel server to connect to.
     #   it is auto generated from the +port+ argument.
     #
-    #  The network looks like this:
-    #
-    #  |------ stunnel client ---------------| |--------- stunnel server -----------------------|
-    #  consumer app -> localhost:accept_port -> server:connect_port -> server:port -> service app
-    #
     # generates an entry appropriate to be passed directly to
     # create_resources(stunnel::service, hiera('..'), defaults)
     #
@@ -307,7 +318,8 @@ module LeapCli; module Config
           result["#{node.name}_#{port}"] = Config::Object[
             'accept_port', @next_stunnel_port,
             'connect', node.domain.internal,
-            'connect_port', stunnel_port(port)
+            'connect_port', stunnel_port(port),
+            'original_port', port
           ]
           @next_stunnel_port += 1
         end
@@ -320,8 +332,14 @@ module LeapCli; module Config
     #
     # +port+ is the real port targeted service.
     #
+    # * `accept_port` is the publicly bound port
+    # * `connect_port` is the port that the local service is running on.
+    #
     def stunnel_server(port)
-      {"accept" => stunnel_port(port), "connect" => "127.0.0.1:#{port}"}
+      {
+        "accept_port" => stunnel_port(port),
+        "connect_port" => port
+      }
     end
 
     #
index df0f87a9327294a04df30223fd06f147e006acd1..f8a725b9d3a8978ac42ca43063497bfb98aad3b9 100644 (file)
@@ -1,7 +1,7 @@
 module LeapCli
   unless defined?(LeapCli::VERSION)
-    VERSION = '1.5.7'
-    COMPATIBLE_PLATFORM_VERSION = '0.5.2'..'1.99'
+    VERSION = '1.5.8'
+    COMPATIBLE_PLATFORM_VERSION = '0.5.3'..'1.99'
     SUMMARY = 'Command line interface to the LEAP platform'
     DESCRIPTION = 'The command "leap" can be used to manage a bevy of servers running the LEAP platform from the comfort of your own home.'
     LOAD_PATHS = ['lib', 'vendor/certificate_authority/lib', 'vendor/rsync_command/lib']