Commit Graph

24 Commits

Author SHA1 Message Date
Solly Ross 84586c0f17 Change copyright header (#1138)
* Change copyright header

This updates the copyright header to say "The noVNC Authors".  People
who previously had copyright listings are now under the AUTHORS file.
2018-10-09 12:15:35 +02:00
Solly Ross ee3493c060 Add a record flag to launch.sh
Add the `--record` flag to launch.js, for easy recording when testing.
2018-07-30 11:07:33 -04:00
Henry Vindin 9700e3592b Fixes #1075
Rather than trying to pick a utility, we should be able to just use bash to check if a port is available or not.

We can probably assume bash is available due to the shebang declaring it.
2018-07-01 15:37:34 +10:00
Samuel Mannehed 101ff12736 Update url's 2017-04-19 15:33:42 +02:00
Solly Ross 9dfbf44028 Merge pull request #603 from WardF/master
Added option for --ssl-only noVNC session to launch.sh
2016-09-16 17:16:43 -04:00
nunojusto 83d3e02fd9 Update launch.sh
Just a correction of port in use test algoritm.
This way we will not have problems when using port X and having some other service using zyX or any *X port
2016-08-16 22:10:14 +01:00
Joel Martin 15e733f533 Clarify that utils/launch.sh is MPL-2.0
Also, note in the top-level license file that the default noVNC
license for files that are not explicitly marked or mentioned in
the LICENSE.txt file are by default MPL-2.0 licensed.
2016-06-13 10:22:43 -05:00
Ward Fisher 27a1f6cb95 Tweaked message printed based on whether or not http is available. 2016-04-11 14:42:42 -06:00
Ward Fisher c77d9fcc4e Added an '--ssl-only' option to noVNC launch script. This will pass through to Websockify, allowing a user to specify that only ssl-secured connections will be allowed. 2016-04-11 14:32:14 -06:00
Sarrailh Rémi 54e835eeac Small typo in launch.sh 2015-11-23 13:08:05 +01:00
Solly Ross 2ace90e6d5 Follow symbolic links in launch.sh
Previously, in launch.sh, `$HERE` was the directory of `$0`.
However, if `$0` was actually a symlink, `$HERE` would be
wherever the symlink was, which could cause issues (for
example, the script wouldn't be able to local `$WEB` or
`$WEBSOCKIFY` properly).

Now, `$HERE` looks at whatever `$0` points at instead.

Closes #447.
2015-03-26 16:57:17 -04:00
Solly Ross 9db6a90677 Make sure websockify is cloned to the correct dir
When `utils/launch.sh` clones websockify, it can be cloned
into the incorrect directory, depending on how `utils/launch.sh`
is run.  This commit ensures that websockify is always cloned into
`utils/websockify`.
2015-02-17 17:54:21 -05:00
Solly Ross 6f5148648b Remove local copies of websockify
This commit removes local copies of websockify.
Instead `utils/launch.sh` performs the following logic:

If `utils/websockify` exists, use `utils/websockify/run` (if the latter
does not exist, or is not executable, fail, since this is probably a
mistake).

Otherwise, check to see if websockify is installed somewhere (try
`which websockify`).  If it is, use that.  Otherwise, clone
websockify from github, and tell git to ignore that directory.

Packaged versions of noVNC should simply list websockify as a
requirement.  The debian packaging has been updated to reflect
this.

Closes #433
2015-02-16 17:09:58 -05:00
Joel Martin 7c1cd93744 Remove references to wsproxy.
Also, update nova-novncproxy to import websockify instead of wsproxy.
2013-04-15 12:22:34 -05:00
Joel Martin 3516bdf3fa util/launch.sh: add --web option and try /usr/share/novnc 2012-11-01 11:35:35 -05:00
Marco Leogrande cf068be2d8 Fix grep pattern when searching for listening sockets
The current grep pattern matches also port numbers that match only
partially the given $PORT number; e.g., if $PORT is 6080, 60800 will
match as well.

While TCP listening sockets in the 60000-65535 range are rare, they
need to be handled as well. The problem is also present if the user
selects a shorter PORT value with the --listen command line argument.

By adding a space, the pattern is fixed.
2012-08-27 22:19:51 -07:00
Joel Martin c0c143a153 Version 0.1, debian packaging, license text.
noVNC version 0.1

Add debian packaging directory loosely based on
http://trac.zentyal.org/browser/trunk/extra/novnc/debian

Show web root directory on startup (pulled from websockify f1c8223).

Lintian fixups:
    - Some license text clarifications.
    - remove executable permission on utils/launch.sh and
      include/web-socket-js/web_socket.js
    - Add executable permission to utils/launch.sh
2011-07-14 15:57:01 -05:00
Sam Mussmann 19ed81fdff Fixed minor typo
s/to to/to/
2011-05-19 09:37:28 -07:00
Phil Phillips e9155818c8 Make scripts more compatible across OSes 2011-03-27 04:18:08 +08:00
Joel Martin f2538f337d wsproxy, wstelnet: wrap command, WS telnet client.
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.
2011-01-12 13:15:11 -06:00
Joel Martin 96bc3d3088 wsproxy.py: add web serving capability.
- 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.
2011-01-06 18:26:54 -06:00
Joel Martin 0f7f146f20 utils/launch.sh: find top web dir (with vnc.html). 2010-12-21 10:17:43 -06:00
Amir Malik b992f7c7dd use cd, dirname, and pwd to determine path instead of readlink (Mac fix) 2010-12-22 00:15:33 +08:00
Joel Martin b89c6db3a1 Launch script and reworked usage in README.md. 2010-07-15 20:18:39 -05:00