How can I use Browser to connect throught the repeater?

Should you have problems with the JavaViewer, here's the place to look for help or report issues.

How can I use Browser to connect throught the repeater?

Postby betoco » 2008-06-13 15:24

Hello all,

I need to connect using a browser (IE7 or Netscape) to the PCs in my network throught the vnc repeater that is installed in one of them.

I have a little network of 10 PCs all of them are using XP and vncserver and one of them is also using vnc repeater service.

Using vncviewer i can get acces to all of this PCs indicating the IP (or name) of each one and the proxy/repeater (xxxx.dyndns.org:5901).

I need to know is it is possible and how can use a Browser to get access.

Thanks
mcc
betoco
 
Posts: 7
Joined: 2008-04-15 13:41

Re: How can I use Browser to connect throught the repeater?

Postby redge » 2008-06-13 23:19

possible but not as proxy relay but only as repeater with ID
http://sc.uvnc.com/javaviewer/index.html

or

from command line
java -classpath VncViewer.jar VncViewer HOST ID:12345 PORT 0 REPEATERHOST uvnc.com REPEATERPORT 443 USESSL 1 TRUSTALL 1 ENCODING zlib
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
redge
Super-Mod
Super-Mod
 
Posts: 6815
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: How can I use Browser to connect throught the repeater?

Postby helpkey » 2008-10-29 21:08

Why doesn't this work?

On the command line:
java -classpath VncViewer.jar VncViewer REPEATERHOST 192.168.1.10 REPEATERPORT 5901 PASSWORD whateverpassword HOST 192.168.1.100 PORT 5900

The .10 machine is running the Repeater on 5901
The .100 machine is running UVNC Server on 5900

When I try this I get an error in the repeater log:

failed to resolve locally.
Unable to connect to destination host, errno=11004
or
Unable to connect to destination host, errno=0

There are no firewalls, routers or proxies invloved. All the machines are local in an effort to simplify and solve the problem.

Anyone please.........
:cry:
helpkey
 
Posts: 3
Joined: 2008-05-16 18:01

Re: How can I use Browser to connect throught the repeater?

Postby cheeks » 2010-01-02 17:47

helpkey

did you manage to get this working with the JavaViewer?

any help greatly appreciated
cheeks
 
Posts: 1
Joined: 2010-01-02 17:43

Re: How can I use Browser to connect throught the repeater?

Postby nxnlvz » 2010-05-12 00:43

The java files in the repository need a few changes to work correctly with a repeater. Obviously you can omit the console output code.

After the changes are made then use then build and run

javac *.java ;jar cf VncViewer.jar *.class

java -classpath VncViewer.jar VncViewer HOST {Internal Name} PORT {Internal Port} REPEATERHOST {Repeater External Host Name} REPEATERPORT {Repeater External Port}

example
java -classpath VncViewer.jar VncViewer HOST mycomputer PORT 5900 REPEATERHOST repeater.mydomain.com REPEATERPORT 5999






--- JV105Orig/VncViewer.java
+++ JV105/VncViewer.java
@@ -97,6 +97,8 @@
// Variables read from parameter values.
String host;
int port;
+ String repeaterHost;
+ int repeaterPort;
String passwordParam;
String encPasswordParam;
boolean showControls;
@@ -120,7 +122,7 @@
//

public void init() {
-
+ System.out.println("-- INIT --");
readParameters();

if (inSeparateFrame) {
@@ -404,8 +406,11 @@
//

void prologueDetectAuthProtocol() throws Exception {
-
- rfb = new RfbProto(host, port, this, null, 0); // Modif: troessner - sf@2007: not yet used
+ if (repeaterHost != null && repeaterPort > 0) {
+ rfb = new RfbProto(host, port, this, repeaterHost, repeaterPort); // Modif: troessner - sf@2007: not yet used
+ } else {
+ rfb = new RfbProto(host, port, this, null, 0); // Modif: troessner - sf@2007: not yet used
+ }

rfb.readVersionMsg();

@@ -430,8 +435,14 @@
//

boolean tryAuthenticate(String us, String pw) throws Exception {
+ if (repeaterHost != null && repeaterPort > 0) {
+ rfb = new RfbProto(host, port, this, repeaterHost, repeaterPort); // Modif: troessner - sf@2007: not yet used
+ } else {
+ rfb = new RfbProto(host, port, this, null, 0); // Modif: troessner - sf@2007: not yet used
+ }
+

- rfb = new RfbProto(host, port, this, null, 0); // Modif: troessner - sf@2007: not yet used
+ //rfb = new RfbProto(host, port, this, null, 0); // Modif: troessner - sf@2007: not yet used

rfb.readVersionMsg();

@@ -767,7 +778,9 @@
//

public void readParameters() {
+ System.out.println("In an Applet? : " + inAnApplet);
host = readParameter("HOST", !inAnApplet);
+ System.out.println("HOST PARAM : " + host);
if (host == null) {
host = getCodeBase().getHost();
if (host.equals("")) {
@@ -776,7 +789,22 @@
}

String str = readParameter("PORT", true);
+ System.out.println("PORT PARAM : " + str);
port = Integer.parseInt(str);
+
+ repeaterHost = readParameter("REPEATERHOST", !inAnApplet);
+ System.out.println("REPEATERHOST PARAM : " + repeaterHost);
+ if (repeaterHost == null) {
+ host = getCodeBase().getHost();
+ if (host.equals("")) {
+ fatalError("HOST parameter not specified");
+ }
+ }
+
+ String str2 = readParameter("REPEATERPORT", true);
+ System.out.println("REPEATERPORT PARAM : " + str2);
+ repeaterPort = Integer.parseInt(str2);
+

if (inAnApplet) {
str = readParameter("Open New Window", false);


--- JV105Orig/RfbProto.java
+++ JV105/RfbProto.java
@@ -205,11 +205,19 @@
//

RfbProto(String h, int p, VncViewer v, String repeaterHost, int repeaterPort) throws IOException {
+ System.out.println("--RfbProto Constructor--");
+ System.out.println("VncViewer: "+v);
+ System.out.println("HOST: "+h);
+ System.out.println("PORT: "+p);
+ System.out.println("REPEATERHOST: "+repeaterHost);
+ System.out.println("REPEATERPORT: "+repeaterPort);
+ System.out.println("--RfbProto Constructor--");
viewer = v;
host = h;
port = p;

if (repeaterHost != null) {
+ System.out.println("Using Repeater: " + repeaterHost +":"+repeaterPort);
sock = new Socket(repeaterHost, repeaterPort);
doRepeater(sock,host,port);
} else {
@@ -231,11 +239,13 @@

private void doRepeater(Socket sock, String host, int port) throws IOException {
// Read the RFB protocol version
+ System.out.println("Final System Name: " + host +":"+port);
final String buf2 = "";
sock.getOutputStream().write(buf2.getBytes());

DataInputStream is = new DataInputStream(sock.getInputStream());
String line = is.readLine();
+ System.out.println("RFB Protocol Version: " + line);

// Write the ID
//if (!id.startsWith("ID:"))
@@ -316,14 +326,18 @@
switch (authScheme) {

case ConnFailed :
+ System.out.println("Auth Scheme: FAILED");
int reasonLen = is.readInt();
byte[] reason = new byte[reasonLen];
is.readFully(reason);
throw new Exception(new String(reason));

case NoAuth :
+ System.out.println("Auth Scheme: NONE");
case VncAuth :
+ System.out.println("Auth Scheme: VNC");
case MsLogon:
+ System.out.println("Auth Scheme: MsLogon");
return authScheme;

default :

nxnlvz
8
8
 
Posts: 8
Joined: 2010-05-12 00:22

Re: How can I use Browser to connect throught the repeater?

Postby B » 2010-05-12 13:45

Thanks for sharing! I hope that works... this would be very valuable.
B
Super-Mod
Super-Mod
 
Posts: 2347
Joined: 2009-09-09 14:05

Re: How can I use Browser to connect throught the repeater?

Postby coldblooded1 » 2010-05-30 16:21

oo, thank you guys! this helped me a lot :) I had same problem.
coldblooded1
 
Posts: 1
Joined: 2010-05-30 16:18

Re: How can I use Browser to connect throught the repeater?

Postby dwl85 » 2013-08-01 11:57

Hello all,

Why doesn`t this work?

I have new VncViewer.jar i can connect to remote server using repeater from cmd but after i set password for my remote machine java viewer freezes and thats all until connection is reset.
I get info from server and repeater log that there was a connection made. Information from server log "1/8/2013 13:44 Invalid attempt from client xxxx.xxx.xxx.xxx".
Anyone have any idea why ?

Thanks dwl85.
dwl85
 
Posts: 1
Joined: 2013-07-30 10:29

Re: How can I use Browser to connect throught the repeater?

Postby wnvmu » 2017-05-14 01:48

Could someone sort me the JavaViewer.jar, because I'm trying to use it that way and it's not working.
"Java -classpath VncViewer.jar VncViewer HOST ID PORT 200 REPEATERHOST 192.168.0.200 REPEATERPORT 5901

192.168.0.200 >> Port of my server UltraVNC Repeater.

Error message:
"Accept () connection"
"ParseDisplay faile"

"I'm using google translator"
wnvmu
 
Posts: 1
Joined: 2017-05-13 04:51

Re: How can I use Browser to connect throught the repeater?

Postby p3rlphr33k » 2017-11-14 20:18

use NoVNC with websockify. This eliminates the java requirement which is helpful now that java support is being dropped by major browser developers.
p3rlphr33k
 
Posts: 4
Joined: 2017-11-14 03:43


Return to JavaViewer

Who is online

Users browsing this forum: No registered users and 3 guests