1 Star 0 Fork 1

forsrc / Java-Websockify

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

Java WebSockify

This repository contains a basic Websockify server implementation written using Netty. It's designed to work with the websockify client found at https://github.com/kanaka/websockify. I specifically am using it as a server to run noVNC client.

Compiling and Running

This project uses [Maven] (http://maven.apache.org/) for building. Clone the repo, then compile the project from the command line with:

mvn compile

You can run the code from the command line with:

mvn exec:java -Dexec.mainClass="com.netiq.websockify.Websockify" -Dexec.args="<port> <target host> <target port>"

where you replace <port> with the port number you want websockify to listen on and <target host> and <target port> with the host and port that you want to websockify to proxy to. For example:

mvn exec:java -Dexec.mainClass="com.netiq.websockify.Websockify" -Dexec.args="10900 localhost 5900"

Using SSL Encryption

Websockify can encrypt the websocket side of the traffic. To use SSL encryption you first need a keystore for your server key. To create a self signed key run this on the command line:

keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048

When it asks "What is your first and last name?" give it the host name that you will be using, for example localhost.

Run Websockify with encrypt as your 4th parameter, and specifying the keystore and password as JVM args, for example:

mvn exec:java -Dexec.mainClass="com.netiq.websockify.Websockify" -Dexec.args="10900 localhost 5900 encrypt" -Dkeystore.file.path=keystore.jks -Dkeystore.file.password=password

License

Everything found in this repo is licensed under an MIT license. See the LICENSE file for specifics.

Copyright (c) 2012 NetIQ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

No description expand collapse
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/forsrc/Java-Websockify.git
git@gitee.com:forsrc/Java-Websockify.git
forsrc
Java-Websockify
Java-Websockify
master

Search

53164aa7 5694891 3bd8fe86 5694891