VeNCrypt and TLSVNC support (in pproxy and unix vncviewer). Help text tweaks -killstunnel, s_client fixes, No Encryption easier. Zeroconf/avahi support. tk font fixes. SSVNC_ULTRA_FTP_JAR finding SSVNC_PREDIGESTED_HANDSHAKE SSVNC_SKIP_RFB_PROTOCOL_VERSION, SSVNC_SET_SECURITY_TYPE, etc hacks.pull/1/head
parent
6fbba525a9
commit
41c7b74a88
File diff suppressed because it is too large
Load Diff
@ -1,124 +1,56 @@
|
||||
diff -Naur stunnel.orig/src/client.c stunnel/src/client.c
|
||||
--- stunnel.orig/src/client.c 2005-10-24 14:00:56.000000000 -0400
|
||||
+++ stunnel/src/client.c 2006-07-31 21:51:37.000000000 -0400
|
||||
@@ -126,6 +126,10 @@
|
||||
--- stunnel.orig/src/client.c 2008-03-27 04:35:27.000000000 -0400
|
||||
+++ stunnel/src/client.c 2008-11-19 21:40:00.000000000 -0500
|
||||
@@ -191,6 +191,7 @@
|
||||
enter_critical_section(CRIT_CLIENTS); /* for multi-cpu machines */
|
||||
s_log(LOG_DEBUG, "%s finished (%d left)", c->opt->servname,
|
||||
--num_clients);
|
||||
+ if (getenv("STUNNEL_ONCE")) {fprintf(stderr, "stunnel: exiting.\n"); exit(0);}
|
||||
leave_critical_section(CRIT_CLIENTS);
|
||||
+ if (num_clients <= 0 && options.maxconn > 0 && num_conn >= options.maxconn) {
|
||||
+ s_log(LOG_NOTICE, "client() finished: exceeded maxconn");
|
||||
+ exit(0);
|
||||
+ }
|
||||
#endif
|
||||
free(c);
|
||||
#ifdef DEBUG_STACK_SIZE
|
||||
}
|
||||
diff -Naur stunnel.orig/src/network.c stunnel/src/network.c
|
||||
--- stunnel.orig/src/network.c 2005-10-30 16:35:42.000000000 -0500
|
||||
+++ stunnel/src/network.c 2006-07-31 21:53:49.000000000 -0400
|
||||
@@ -329,6 +329,10 @@
|
||||
--- stunnel.orig/src/network.c 2008-03-27 05:28:16.000000000 -0400
|
||||
+++ stunnel/src/network.c 2008-11-19 21:39:41.000000000 -0500
|
||||
@@ -346,6 +346,7 @@
|
||||
/* no logging is possible in a signal handler */
|
||||
#ifdef USE_FORK
|
||||
num_clients--; /* one client less */
|
||||
+ if (num_clients <= 0 && options.maxconn > 0 && num_conn >= options.maxconn) {
|
||||
+ s_log(LOG_NOTICE, "sigchld_handler() finished: exceeded maxconn");
|
||||
+ exit(0);
|
||||
+ }
|
||||
--num_clients; /* one client less */
|
||||
+ if (getenv("STUNNEL_ONCE")) exit(0);
|
||||
#endif /* USE_FORK */
|
||||
}
|
||||
#else /* __sgi */
|
||||
@@ -375,6 +379,10 @@
|
||||
@@ -432,9 +433,11 @@
|
||||
#ifdef HAVE_WAIT_FOR_PID
|
||||
while((pid=wait_for_pid(-1, &status, WNOHANG))>0) {
|
||||
--num_clients; /* one client less */
|
||||
+ if (getenv("STUNNEL_ONCE")) exit(0);
|
||||
#else
|
||||
if((pid=wait(&status))>0) {
|
||||
num_clients--; /* one client less */
|
||||
--num_clients; /* one client less */
|
||||
+ if (getenv("STUNNEL_ONCE")) exit(0);
|
||||
#endif
|
||||
+ if (num_clients <= 0 && options.maxconn > 0 && num_conn >= options.maxconn) {
|
||||
+ s_log(LOG_NOTICE, "client_status() finished: exceeded maxconn");
|
||||
+ exit(0);
|
||||
+ }
|
||||
#ifdef WIFSIGNALED
|
||||
if(WIFSIGNALED(status)) {
|
||||
s_log(LOG_DEBUG, "Process %d terminated on signal %d (%d left)",
|
||||
diff -Naur stunnel.orig/src/options.c stunnel/src/options.c
|
||||
--- stunnel.orig/src/options.c 2005-10-20 03:12:07.000000000 -0400
|
||||
+++ stunnel/src/options.c 2006-07-31 22:49:57.000000000 -0400
|
||||
@@ -665,6 +665,24 @@
|
||||
--- stunnel.orig/src/options.c 2008-06-21 17:18:23.000000000 -0400
|
||||
+++ stunnel/src/options.c 2008-11-19 21:15:01.000000000 -0500
|
||||
@@ -465,6 +465,7 @@
|
||||
switch(cmd) {
|
||||
case CMD_INIT:
|
||||
options.option.syslog=1;
|
||||
+ if (getenv("STUNNEL_NO_SYSLOG")) options.option.syslog=0;
|
||||
break;
|
||||
}
|
||||
|
||||
+ /* maxconn */
|
||||
+ switch(cmd) {
|
||||
+ case CMD_INIT:
|
||||
+ options.maxconn=0;
|
||||
+ break;
|
||||
+ case CMD_EXEC:
|
||||
+ if(strcasecmp(opt, "maxconn"))
|
||||
+ break;
|
||||
+ options.maxconn=atoi(arg);
|
||||
+ return NULL; /* OK */
|
||||
+ case CMD_DEFAULT:
|
||||
+ log_raw("%-15s = 0", "maxconn");
|
||||
+ break;
|
||||
+ case CMD_HELP:
|
||||
+ log_raw("%-15s = maximum number of accepted connections", "maxconn");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
if(cmd==CMD_EXEC)
|
||||
return option_not_found;
|
||||
return NULL; /* OK */
|
||||
diff -Naur stunnel.orig/src/prototypes.h stunnel/src/prototypes.h
|
||||
--- stunnel.orig/src/prototypes.h 2005-10-27 05:41:28.000000000 -0400
|
||||
+++ stunnel/src/prototypes.h 2006-07-31 22:49:36.000000000 -0400
|
||||
@@ -44,6 +44,7 @@
|
||||
/**************************************** Prototypes for stunnel.c */
|
||||
|
||||
extern int num_clients;
|
||||
+extern int num_conn;
|
||||
|
||||
void main_initialize(char *, char *);
|
||||
void main_execute(void);
|
||||
@@ -113,6 +114,7 @@
|
||||
long session_timeout;
|
||||
int verify_level;
|
||||
int verify_use_only_my;
|
||||
+ int maxconn;
|
||||
long ssl_options;
|
||||
|
||||
/* some global data for stunnel.c */
|
||||
case CMD_EXEC:
|
||||
if(strcasecmp(opt, "syslog"))
|
||||
diff -Naur stunnel.orig/src/stunnel.c stunnel/src/stunnel.c
|
||||
--- stunnel.orig/src/stunnel.c 2005-11-02 15:18:42.000000000 -0500
|
||||
+++ stunnel/src/stunnel.c 2006-07-31 21:40:04.000000000 -0400
|
||||
@@ -53,6 +53,7 @@
|
||||
#endif
|
||||
|
||||
int num_clients=0; /* Current number of clients */
|
||||
+int num_conn=0; /* Total number of connections */
|
||||
|
||||
/* Functions */
|
||||
|
||||
@@ -138,6 +139,7 @@
|
||||
--- stunnel.orig/src/stunnel.c 2008-06-21 17:32:45.000000000 -0400
|
||||
+++ stunnel/src/stunnel.c 2008-11-19 21:14:28.000000000 -0500
|
||||
@@ -301,6 +301,7 @@
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
+ if (getenv("STUNNEL_MAX_CLIENTS")) max_clients = atoi(getenv("STUNNEL_MAX_CLIENTS"));
|
||||
}
|
||||
|
||||
num_clients=0;
|
||||
+ num_conn=0;
|
||||
|
||||
/* bind local ports */
|
||||
for(opt=local_options.next; opt; opt=opt->next) {
|
||||
@@ -222,6 +224,18 @@
|
||||
return; /* error */
|
||||
}
|
||||
}
|
||||
+ num_conn++;
|
||||
+fprintf(stderr, "num_conn: %d\n", num_conn);
|
||||
+ if (options.maxconn > 0 && num_conn > options.maxconn) {
|
||||
+ s_log(LOG_WARNING, "Connection rejected: exceeded maxconn (%d>%d)",
|
||||
+ num_conn, options.maxconn);
|
||||
+ closesocket(s);
|
||||
+ if (num_clients == 0) {
|
||||
+ s_log(LOG_WARNING, "Finished via maxconn.");
|
||||
+ exit(0);
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
s_ntop(from_address, &addr);
|
||||
s_log(LOG_DEBUG, "%s accepted FD=%d from %s",
|
||||
opt->servname, s, from_address);
|
||||
#if !defined (USE_WIN32) && !defined (__vms) && !defined(USE_OS2)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
# Copy this file to "/usr/shared/applications/ssvnc.desktop" then SSVNC will
|
||||
# appear in desktop menus (once they are updated; e.g. update-menus command).
|
||||
Name=SSL/SSH VNC Viewer
|
||||
Comment=SSVNC - access remote VNC desktops
|
||||
Exec=ssvnc -noenc
|
||||
Icon=computer
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupWMClass=Ssvnc.tcl
|
||||
Categories=Network;RemoteAccess;
|
Loading…
Reference in new issue