1. 04 Aug, 2011 1 commit
  2. 13 Jul, 2011 2 commits
  3. 26 Jun, 2011 2 commits
  4. 13 Jun, 2011 2 commits
  5. 24 Apr, 2011 3 commits
  6. 05 Feb, 2011 1 commit
  7. 31 Jan, 2011 1 commit
  8. 18 Jan, 2011 2 commits
  9. 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
  10. 07 Jan, 2011 1 commit
    • Joel Martin's avatar
      wsproxy.py: add web serving capability. · 96bc3d30
      Joel Martin authored
      - Added ability to respond to normal web requests. This is basically
        integrating web.py functionality into wsproxy. This is only in the
        python version and it is off by default when calling wsproxy. Turn
        it on with --web DIR where DIR is the web root directory.
      
      Next task is to clean up wsproxy.py. It's gotten unwieldy and it
      really no longer needs to be parallel to the C version.
      96bc3d30
  11. 04 Jan, 2011 1 commit
  12. 10 Nov, 2010 1 commit
  13. 28 Oct, 2010 1 commit
    • Joel Martin's avatar
      Issue #32, wsproxy README, update webkit bug info, · e5d60a8b
      Joel Martin authored
      - Add wsproxy README.md in utils/ directory.
      
      - Document how to build ssl module for python 2.5 and older in wsproxy
        README.
      
      - Update browsers.md to note revision that have the webkit Canvas
        rendering bug: WebKit build 66396 through 68867 (Chrome/Chromium
        build 57968 through 61278).
      e5d60a8b
  14. 24 Sep, 2010 2 commits
  15. 08 Sep, 2010 1 commit
  16. 02 Aug, 2010 1 commit
    • Joel Martin's avatar
      New API. Refactor Canvas and RFB objects. · 8db09746
      Joel Martin authored
      New API:
      
      To use the RFB object, you now must instantiate it (this allows more
      than one instance of it on the same page).
      
          rfb = new RFB(settings);
      
      The 'settings' variable is a namespace that contains initial default
      settings. These can also be set and read using 'rfb.set_FOO()' and
      'rfb.get_FOO()' where FOO is the setting name. The current settings
      are (and defaults) are:
          - target: the DOM Canvas element to use ('VNC_canvas').
          - encrypt: whether to encrypt the connection (false)
          - true_color: true_color or palette (true)
          - b64encode: base64 encode the WebSockets data (true)
          - local_cursor: use local cursor rendering (true if supported)
          - connectTimeout: milliseconds to wait for connect (2000)
          - updateState: callback when RFB state changes (none)
          - clipboardReceive: callback when clipboard data received (none)
      
      The parameters to the updateState callback have also changed. The
      function spec is now updateState(rfb, state, oldstate, msg):
          - rfb: the RFB object that this state change is for.
          - state: the new state
          - oldstate: the previous state
          - msg: a message associate with the state (not always set).
      
      The clipboardReceive spec is clipboardReceive(rfb, text):
          - rfb: the RFB object that this text is from.
          - text: the clipboard text received.
      
      Changes:
      
      - The RFB and Canvas namespaces are now more proper objects. Private
        implementation is no longer exposed and the public API has been made
        explicit. Also, instantiation allows more than one VNC connection
        on the same page (to complete this, DefaultControls will also need
        this same refactoring).
      
      - Added 'none' logging level.
      
      - Removed automatic stylesheet selection workaround in util.js and
        move it to defaultcontrols so that it doesn't interfere with
        intergration.
      
      - Also, some major JSLinting.
      
      - Fix input, canvas, and cursor tests to work with new model.
      8db09746
  17. 26 Jul, 2010 1 commit
  18. 23 Jul, 2010 3 commits
  19. 20 Jul, 2010 1 commit
    • Joel Martin's avatar
      Add Cursor pseudo-encoding support (disabled for now). · 2c2b492c
      Joel Martin authored
      To change the appearance of the cursor, we use the CSS cursor style
      and set the url to a data URI scheme. The image data sent via the
      cursor pseudo-encoding has to be encoded to a CUR format file before
      being used in the data URI.
      
      During Canvas initialization we try and set a simple cursor to see if
      the browser has support. Opera is missing support for data URI scheme
      in cursor URLs.
      
      Disabled for now until we have a better way of specifying settings
      overall (too many settings for control bar now).
      2c2b492c
  20. 16 Jul, 2010 3 commits
  21. 13 Jul, 2010 1 commit
  22. 09 Jul, 2010 4 commits
  23. 07 Jul, 2010 1 commit
  24. 06 Jul, 2010 1 commit
  25. 02 Jul, 2010 2 commits