diff --git a/src/libguac/guacamole/protocol.h b/src/libguac/guacamole/protocol.h index d1a0420a..ff7746ff 100644 --- a/src/libguac/guacamole/protocol.h +++ b/src/libguac/guacamole/protocol.h @@ -38,6 +38,9 @@ #include #include +/* The protocol version */ +#define GUACAMOLE_PROTOCOL_VERSION "VERSION_1_1_0" + /* CONTROL INSTRUCTIONS */ /** diff --git a/src/libguac/protocol.c b/src/libguac/protocol.c index ee266e87..f58179f3 100644 --- a/src/libguac/protocol.c +++ b/src/libguac/protocol.c @@ -93,6 +93,11 @@ static int __guac_protocol_send_args(guac_socket* socket, const char** args) { int i; if (guac_socket_write_string(socket, "4.args")) return -1; + + // Send protocol version + if (guac_socket_write_string(socket, ",") + || __guac_socket_write_length_string(socket, GUACAMOLE_PROTOCOL_VERSION)) + return -1; for (i=0; args[i] != NULL; i++) { diff --git a/src/protocols/kubernetes/settings.c b/src/protocols/kubernetes/settings.c index 6e8ddd41..ce7f6977 100644 --- a/src/protocols/kubernetes/settings.c +++ b/src/protocols/kubernetes/settings.c @@ -25,14 +25,6 @@ /* Client plugin arguments */ const char* GUAC_KUBERNETES_CLIENT_ARGS[] = { - /** - * This first argument defines the protocol version in use so that the - * client knows how to handle talking to different versions of guacd. - * If this is omitted the client may choose not to enable certain - * features. - */ - "VERSION_1_1_0", - "hostname", "port", "namespace", diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index 9edcb746..f45b3a43 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -42,14 +42,6 @@ /* Client plugin arguments */ const char* GUAC_RDP_CLIENT_ARGS[] = { - /** - * This first argument defines the protocol version in use so that the - * client knows how to handle talking to different versions of guacd. - * If this is omitted the client may choose not to enable certain - * features. - */ - "VERSION_1_1_0", - "hostname", "port", "domain", diff --git a/src/protocols/ssh/settings.c b/src/protocols/ssh/settings.c index a404e8ca..b69ddd6c 100644 --- a/src/protocols/ssh/settings.c +++ b/src/protocols/ssh/settings.c @@ -30,14 +30,6 @@ /* Client plugin arguments */ const char* GUAC_SSH_CLIENT_ARGS[] = { - /** - * This first argument defines the protocol version in use so that the - * client knows how to handle talking to different versions of guacd. - * If this is omitted the client may choose not to enable certain - * features. - */ - "VERSION_1_1_0", - "hostname", "host-key", "port", diff --git a/src/protocols/telnet/settings.c b/src/protocols/telnet/settings.c index 4d2d4dd1..9d334df2 100644 --- a/src/protocols/telnet/settings.c +++ b/src/protocols/telnet/settings.c @@ -31,14 +31,6 @@ /* Client plugin arguments */ const char* GUAC_TELNET_CLIENT_ARGS[] = { - /** - * This first argument defines the protocol version in use so that the - * client knows how to handle talking to different versions of guacd. - * If this is omitted the client may choose not to enable certain - * features. - */ - "VERSION_1_1_0", - "hostname", "port", "username", diff --git a/src/protocols/vnc/settings.c b/src/protocols/vnc/settings.c index 941a2757..c39aa730 100644 --- a/src/protocols/vnc/settings.c +++ b/src/protocols/vnc/settings.c @@ -31,14 +31,6 @@ /* Client plugin arguments */ const char* GUAC_VNC_CLIENT_ARGS[] = { - /** - * This first argument defines the protocol version in use so that the - * client knows how to handle talking to different versions of guacd. - * If this is omitted the client may choose not to enable certain - * features. - */ - "VERSION_1_1_0", - "hostname", "port", "read-only",