* [9front] vncv patch
[not found] <3496E2C20C950B6CFA9424F09804A810@9front.inri.net>
@ 2022-08-15 20:24 ` Emil Tomczyk
2022-08-15 21:15 ` ori
0 siblings, 1 reply; 2+ messages in thread
From: Emil Tomczyk @ 2022-08-15 20:24 UTC (permalink / raw)
To: 9front
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
Hey,
I wrote a small patch for vncv. This patch allows to specify port on the
remote vnc server. Also I've added/removed some tabs when they were
inconsistent and added -t (TLS) option to usage(). Although TLS
connection wasn't working for me.
Emru
[-- Attachment #2.1: Type: text/plain, Size: 297 bytes --]
from postmaster@9front:
The following attachment had content that we can't
prove to be harmless. To avoid possible automatic
execution, we changed the content headers.
The original header was:
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="vncv.c.patch"
[-- Attachment #2.2: vncv.c.patch.suspect --]
[-- Type: application/octet-stream, Size: 1360 bytes --]
diff f84cf1e60427675514fb056cc1723e45da01e043 uncommitted
--- a/sys/src/cmd/vnc/vncv.c
+++ b/sys/src/cmd/vnc/vncv.c
@@ -2,14 +2,15 @@
#include "vncv.h"
#include <libsec.h>
-char* charset = "utf-8";
-char* encodings = "copyrect hextile corre rre raw mousewarp desktopsize xdesktopsize";
+char* charset = "utf-8";
+char* encodings = "copyrect hextile corre rre raw mousewarp desktopsize xdesktopsize";
int bpp12;
int shared;
int verbose;
-Vnc* vnc;
+Vnc* vnc;
int mousefd;
int tls;
+int port = 0;
static int vncstart(Vnc*, int);
@@ -46,15 +47,17 @@
netmkvncaddr(char *server)
{
char *p, portstr[NETPATHLEN];
- int port;
/* leave execnet dial strings alone */
if(strncmp(server, "exec!", 5) == 0)
return server;
- port = 5900;
- if(tls)
- port = 35729;
+ if(!port)
+ if(tls)
+ port = 35729;
+ else
+ port = 5900;
+
if((p = strchr(server, ']')) == nil)
p = server;
if((p = strchr(p, ':')) != nil) {
@@ -74,7 +77,7 @@
void
usage(void)
{
- fprint(2, "usage: vncv [-e encodings] [-k keypattern] [-l charset] [-csv] host[:n]\n");
+ fprint(2, "usage: vncv [-e encodings] [-k keypattern] [-l charset] [-p port] [-cstv] host[:n]\n");
exits("usage");
}
@@ -107,6 +110,9 @@
break;
case 'l':
charset = EARGF(usage());
+ break;
+ case 'p':
+ port = atoi(EARGF(usage()));
break;
default:
usage();
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9front] vncv patch
2022-08-15 20:24 ` [9front] vncv patch Emil Tomczyk
@ 2022-08-15 21:15 ` ori
0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2022-08-15 21:15 UTC (permalink / raw)
To: 9front
Quoth Emil Tomczyk <emil.tomczyk@skni.umcs.pl>:
> I wrote a small patch for vncv. This patch allows to specify port on the
> remote vnc server.
this already works out of the box with dial strings,
using the same syntax as any other program doing a
network connection:
vncv tcp!sniffle!5901
> Although TLS connection wasn't working for me.
if it's broken, let's fix it before changing that.
my vnc servers aren't set up with tls, though, so
I don't have a setup to test. (Because VNC auth
is a joke, my VNC doesn't listen on the public
internet, but instead I tunnel in using sshnet)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-15 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3496E2C20C950B6CFA9424F09804A810@9front.inri.net>
2022-08-15 20:24 ` [9front] vncv patch Emil Tomczyk
2022-08-15 21:15 ` ori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).