Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support proxy autoconfiguration
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Apr 29, 2009
1 parent da3f2a2 commit 4cf7198
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cstp.c
Expand Up @@ -78,6 +78,8 @@ static int start_cstp_connection(struct openconnect_info *vpninfo)
/* Clear old options which will be overwritten */
vpninfo->vpn_addr = vpninfo->vpn_netmask = NULL;
vpninfo->cstp_options = vpninfo->dtls_options = NULL;
vpninfo->vpn_domain = vpninfo->vpn_proxy_pac = NULL;

for (i=0; i<3; i++)
vpninfo->vpn_dns[i] = vpninfo->vpn_nbns[i] = NULL;

Expand Down Expand Up @@ -233,6 +235,8 @@ static int start_cstp_connection(struct openconnect_info *vpninfo)
}
} else if (!strcmp(buf + 7, "Default-Domain")) {
vpninfo->vpn_domain = new_option->value;
} else if (!strcmp(buf + 7, "MSIE-Proxy-PAC-URL")) {
vpninfo->vpn_proxy_pac = new_option->value;
} else if (!strcmp(buf + 7, "Split-Include")) {
struct split_include *inc = malloc(sizeof(*inc));
if (!inc)
Expand Down
1 change: 1 addition & 0 deletions openconnect.h
Expand Up @@ -185,6 +185,7 @@ struct openconnect_info {
const char *vpn_dns[3];
const char *vpn_nbns[3];
const char *vpn_domain;
const char *vpn_proxy_pac;
struct split_include *split_includes;
struct split_include *split_excludes;

Expand Down
3 changes: 3 additions & 0 deletions tun.c
Expand Up @@ -185,6 +185,9 @@ static void set_script_env(struct openconnect_info *vpninfo)
setenv("CISCO_DEF_DOMAIN", vpninfo->vpn_domain, 1);
else unsetenv ("CISCO_DEF_DOMAIN");

if (vpninfo->vpn_proxy_pac)
setenv("CISCO_PROXY_PAC", vpninfo->vpn_proxy_pac, 1);

if (vpninfo->split_includes) {
struct split_include *this = vpninfo->split_includes;
int nr_split_includes = 0;
Expand Down

0 comments on commit 4cf7198

Please sign in to comment.