1. 15 Apr, 2013 1 commit
  2. 15 Oct, 2012 1 commit
    • Joel Martin's avatar
      Change noVNC license to from LGPLv3 to MPL 2.0 · 1d728ace
      Joel Martin authored
      The MPL 2.0 license is a "file-level" copyleft license vs the
      "project-level" nature of the L/GPL. The intention of noVNC has
      always been that it should be easy to incorporate into existing
      projects and sites whether free/open or proprietary/commercial. The MPL
      2.0 is designed for this sort of combination project but still
      requires that any distributed modifications to noVNC source files must
      also be published under the same license.
      
      In addition, the MPL 2.0 allows the code to be used in L/GPL projects
      (the secondary license clause). This means that any projects that are
      already incorporating noVNC should not be impacted by this change and
      in fact it should clarify the licensing situation (the exact
      application of the L/GPL to web applications and interpreted code is
      somewhat ambiguous).
      
      The HTML, CSS, image and font files continue to be under more
      permissive licenses (see LICENSE.txt). The included websockify python
      code remains under a LGPLv3 license although the include/websock.js
      file from the websockify component is now under MPL 2.0 as well.
      
      Permission was received from other noVNC authors to make this change to their
      code license on the following dates:
      
          - Chris Gordon (UI): Jun 24, 2012
          - Antoine Mercadal (DOM,*util.js): Oct 10, 2012
          - William Lightning (UltraVNC repeater): Oct 10, 2012
          - Mike Tinglof (tight encoding): Oct 15, 2012
      1d728ace
  3. 12 Jan, 2011 1 commit
    • Joel Martin's avatar
      wsproxy, wstelnet: wrap command, WS telnet client. · f2538f33
      Joel Martin authored
      wswrapper:
      
          Getting the wswrapper.c LD_PRELOAD model working has turned out to
          involve too many dark corners of the glibc/POSIX file descriptor
          space. I realized that 95% of what I want can be accomplished by
          adding a "wrap command" mode to wsproxy.
      
          The code is still there for now, but consider it experimental at
          best. Minor fix to dup2 and add dup and dup3 logging.
      
      wsproxy Wrap Command:
      
          In wsproxy wrap command mode, a command line is specified instead
          of a target address and port. wsproxy then uses a much simpler
          LD_PRELOAD library, rebind.so, to move intercept any bind() system
          calls made by the program. If the bind() call is for the wsproxy
          listen port number then the real bind() system call is issued for
          an alternate (free high) port on loopback/localhost.  wsproxy then
          forwards from the listen address/port to the moved port.
      
          The --wrap-mode argument takes three options that determine the
          behavior of wsproxy when the wrapped command returns an exit code
          (exit or daemonizing): ignore, exit, respawn.
      
          For example, this runs vncserver on turns port 5901 into
          a WebSockets port (rebind.so must be built first):
      
              ./utils/wsproxy.py --wrap-mode=ignore 5901 -- vncserver :1
      
          The vncserver command backgrounds itself so the wrap mode is set
          to "ignore" so that wsproxy keeps running even after it receives
          an exit code from vncserver.
      
      wstelnet:
      
          To demonstrate the wrap command mode, I added WebSockets telnet
          client.
      
          For example, this runs telnetd (krb5-telnetd) on turns port 2023
          into a WebSockets port (using "respawn" mode since telnetd exits
          after each connection closes):
      
              sudo ./utils/wsproxy.py --wrap-mode=respawn 2023 -- telnetd -debug 2023
      
          Then the utils/wstelnet.html page can be used to connect to the
          telnetd server on port 2023. The telnet client includes VT100.js
          (from http://code.google.com/p/sshconsole) which handles the
          terminal emulation and rendering.
      
      rebind:
      
          The rebind LD_PRELOAD library is used by wsproxy in wrap command
          mode to intercept bind() system calls and move the port to
          a different port on loopback/localhost. The rebind.so library can
          be built by running make in the utils directory.
      
          The rebind library can be used separately from wsproxy by setting
          the REBIND_OLD_PORT and REBIND_NEW_PORT environment variables
          prior to executing a command. For example:
      
              export export REBIND_PORT_OLD="23"
              export export REBIND_PORT_NEW="65023"
              LD_PRELOAD=./rebind.so telnetd -debug 23
      
          Alternately, the rebind script does the same thing:
      
              rebind 23 65023 telnetd -debug 23
      
      Other changes/notes:
      
      - wsproxy no longer daemonizes by default. Remove -f/--foreground
        option and add -D/--deamon option.
      
      - When wsproxy is used to wrap a command in "respawn" mode, the
        command will not be respawn more often than 3 times within 10
        seconds.
      
      - Move getKeysym routine out of Canvas object so that it can be called
        directly.
      f2538f33