OPT_PROTOCOL,
OPT_PASSTOS,
OPT_VERSION,
+ OPT_SERVER,
};
#ifdef __sun__
#elif defined(OPENCONNECT_OPENSSL)
OPTION("openssl-ciphers", 1, OPT_CIPHERSUITES),
#endif
+ OPTION("server", 1, OPT_SERVER),
OPTION(NULL, 0, 0)
};
printf(" --cafile=FILE %s\n", _("Cert file for server verification"));
printf("\n%s:\n", _("Internet connectivity"));
+ printf(" --server=SERVER %s\n", _("Set VPN server"));
printf(" -P, --proxy=URL %s\n", _("Set proxy server"));
printf(" --proxy-auth=METHODS %s\n", _("Set proxy authentication methods"));
printf(" --no-proxy %s\n", _("Disable proxy"));
}
break;
+ case OPT_SERVER: /* --server */
+ autocomplete_special("HOSTNAME", comp_opt, prefixlen, NULL);
+ break;
+
case 'i': /* --interface */
/* FIXME: Enumerate available tun devices */
break;
vpninfo->ciphersuite_config = dup_config_arg();
break;
+ case OPT_SERVER:
+ if (openconnect_parse_url(vpninfo, config_arg))
+ exit(1);
+ break;
default:
usage();
}
if (gai_overrides)
openconnect_override_getaddrinfo(vpninfo, gai_override_cb);
- if (optind < argc - 1) {
+ if (optind < argc - (vpninfo->hostname ? 0 : 1)) {
fprintf(stderr, _("Too many arguments on command line\n"));
usage();
- } else if (optind > argc - 1) {
+ } else if (optind > argc - (vpninfo->hostname ? 0 : 1)) {
fprintf(stderr, _("No server specified\n"));
usage();
}
.OP \-\-version\-string string
.OP \-\-local-hostname string
.OP \-\-os string
-.B [https://]\fIserver\fB[:\fIport\fB][/\fIgroup\fB]
+.B [\-\-server] [https://]\fIhost\fB[:\fIport\fB][/\fIgroup\fB]
.YS
.SH DESCRIPTION
userspace, for example by a program which uses lwIP to provide SOCKS access
into the VPN.
.TP
+.B \-\-server=[https://]\fIHOST\fB[:\fIPORT\fB][/\fIGROUP\fB]
+Define the VPN server as a simple
+.I HOST
+or as an URL containing the
+. I HOST
+and optionally the
+.I PORT
+number and the login
+.I GROUP
+or realm.
+
+As an alternative, define the VPN server as non-option command line argument.
+.TP
.B \-u,\-\-user=NAME
Set login username to
.I NAME