Skip to content

Commit

Permalink
Add --protocol option
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed May 16, 2016
1 parent 489cb6c commit 67ba82a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main.c
Expand Up @@ -187,6 +187,7 @@ enum {
OPT_PROXY_AUTH,
OPT_HTTP_AUTH,
OPT_LOCAL_HOSTNAME,
OPT_PROTOCOL,
};

#ifdef __sun__
Expand Down Expand Up @@ -266,6 +267,7 @@ static const struct option long_options[] = {
OPTION("no-xmlpost", 0, OPT_NO_XMLPOST),
OPTION("dump-http-traffic", 0, OPT_DUMP_HTTP),
OPTION("no-system-trust", 0, OPT_NO_SYSTEM_TRUST),
OPTION("protocol", 1, OPT_PROTOCOL),
#ifdef OPENCONNECT_GNUTLS
OPTION("gnutls-debug", 1, OPT_GNUTLS_DEBUG),
#endif
Expand Down Expand Up @@ -1101,6 +1103,10 @@ int main(int argc, char **argv)
vpninfo->csd_wrapper = keep_config_arg();
break;
#endif /* !_WIN32 */
case OPT_PROTOCOL:
if (openconnect_set_protocol(vpninfo, config_arg))
exit(1);
break;
case OPT_JUNIPER:
fprintf(stderr, "WARNING: Juniper Network Connect support is experimental.\n");
fprintf(stderr, "It will probably be superseded by Junos Pulse support.\n");
Expand Down
12 changes: 12 additions & 0 deletions openconnect.8.in
Expand Up @@ -57,6 +57,7 @@ openconnect \- Connect to Cisco AnyConnect VPN
.OP \-\-no\-xmlpost
.OP \-\-non\-inter
.OP \-\-passwd\-on\-stdin
.OP \-\-protocol proto
.OP \-\-token\-mode mode
.OP \-\-token\-secret {secret\fR[\fI,counter\fR]|@\fIfile\fR}
.OP \-\-reconnect\-timeout
Expand Down Expand Up @@ -421,6 +422,17 @@ Do not expect user input; exit if it is required.
.TP
.B \-\-passwd\-on\-stdin
Read password from standard input
.TP
.B \-\-protocol=PROTO
Select VPN protocol
.I PROTO
to be used for the connection. Supported protocols are
.I anyconnect
for Cisco AnyConnect (the default), and
.I nc
for experimental support for Juniper Network Connect (also supported
by Junos Pulse servers).

.TP
.B \-\-token\-mode=MODE
Enable one-time password generation using the
Expand Down

0 comments on commit 67ba82a

Please sign in to comment.