From 3f73b3bc6480c25c6d5dc1ee0af0817c3302903e Mon Sep 17 00:00:00 2001 From: N0YB Date: Thu, 6 Jun 2013 01:11:58 -0700 Subject: Add Proxy Type Option --- .../vpn_openvpn_export_shared.php | 45 +++++++++++++++------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'config/openvpn-client-export/vpn_openvpn_export_shared.php') diff --git a/config/openvpn-client-export/vpn_openvpn_export_shared.php b/config/openvpn-client-export/vpn_openvpn_export_shared.php index e20a8383..5de543ab 100644 --- a/config/openvpn-client-export/vpn_openvpn_export_shared.php +++ b/config/openvpn-client-export/vpn_openvpn_export_shared.php @@ -3,7 +3,7 @@ vpn_openvpn_export.php Copyright (C) 2008 Shrew Soft Inc. - Copyright (C) 2010 Ermal Luçi + Copyright (C) 2010 Ermal Luçi All rights reserved. Redistribution and use in source and binary forms, with or without @@ -98,6 +98,7 @@ if(($act == "skconf") || ($act == "skzipconf")) { $input_errors[] = "You need to specify a port for the proxy ip."; } else $proxy['port'] = $_GET['proxy_port']; + $proxy['proxy_type'] = $_GET['proxy_type']; $proxy['proxy_authtype'] = $_GET['proxy_authtype']; if ($_GET['proxy_authtype'] != "none") { if (empty($_GET['proxy_user'])) { @@ -193,6 +194,8 @@ function download_begin(act) { if (document.getElementById("useproxypass").value != 'none') useproxypass = 1; + var proxytype = document.getElementById("useproxytype").value; + var proxyauth = document.getElementById("useproxypass").value; var proxyuser = document.getElementById("proxyuser").value; var proxypass = document.getElementById("proxypass").value; @@ -215,15 +218,16 @@ function download_begin(act) { var dlurl; dlurl = "/vpn_openvpn_export_shared.php?act=" + act; - dlurl += "&srvid=" + servers[index][0]; - dlurl += "&useaddr=" + useaddr; + dlurl += "&srvid=" + servers[index][0]; + dlurl += "&useaddr=" + useaddr; if (useproxy) { - dlurl += "&proxy_addr=" + proxyaddr; - dlurl += "&proxy_port=" + proxyport; - dlurl += "&proxy_authtype=" + proxyauth; + dlurl += "&proxy_type=" + escape(proxytype); + dlurl += "&proxy_addr=" + proxyaddr; + dlurl += "&proxy_port=" + proxyport; + dlurl += "&proxy_authtype=" + proxyauth; if (useproxypass) { - dlurl += "&proxy_user=" + proxyuser; - dlurl += "&proxy_password=" + proxypass; + dlurl += "&proxy_user=" + proxyuser; + dlurl += "&proxy_password=" + proxypass; } } @@ -263,7 +267,7 @@ function useaddr_changed(obj) { function useproxy_changed(obj) { if ((obj.id == "useproxy" && obj.checked) || - $(obj.id + 'pass').value != 'none') { + $(obj.id + "useproxypass" && (obj.value != 'none'))) { $(obj.id + '_opts').show(); } else { $(obj.id + '_opts').hide(); @@ -324,7 +328,7 @@ function useproxy_changed(obj) {