Browse Source

- Added SOCKS5 proxy for http connections to Web UI too

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
447efc52d8
  1. 14
      src/webui/preferences_content.html

14
src/webui/preferences_content.html

@ -156,6 +156,7 @@
_(Type:) <select id ="http_proxy_type_select" onchange="updateHTTPProxySettings();"> _(Type:) <select id ="http_proxy_type_select" onchange="updateHTTPProxySettings();">
<option value="none">_((None))</option> <option value="none">_((None))</option>
<option value="http">_(HTTP)</option> <option value="http">_(HTTP)</option>
<option value="socks5">_(SOCKS5)</option>
</select>&nbsp;&nbsp;&nbsp;&nbsp; </select>&nbsp;&nbsp;&nbsp;&nbsp;
_(Host:) <input type="text" id="http_proxy_host_text" />&nbsp;&nbsp;&nbsp;&nbsp; _(Host:) <input type="text" id="http_proxy_host_text" />&nbsp;&nbsp;&nbsp;&nbsp;
_(Port:) <input type="text" id="http_proxy_port_value" style="width: 4em;"/><br/><br/> _(Port:) <input type="text" id="http_proxy_port_value" style="width: 4em;"/><br/><br/>
@ -368,6 +369,15 @@
} else { } else {
http_proxy_type = 1; http_proxy_type = 1;
} }
} else {
if(http_proxy_type_str == "socks5") {
if($defined($('http_proxy_auth_checkbox').get('checked')) && $('http_proxy_auth_checkbox').get('checked')) {
http_proxy_type = 4;
http_proxy_auth_enabled = 1;
} else {
http_proxy_type = 2;
}
}
} }
var http_proxy_ip = $('http_proxy_host_text').get('value'); var http_proxy_ip = $('http_proxy_host_text').get('value');
var http_proxy_port = $('http_proxy_port_value').get('value'); var http_proxy_port = $('http_proxy_port_value').get('value');
@ -820,6 +830,10 @@ loadPreferences = function() {
case 3: // HTTP_PW case 3: // HTTP_PW
$('http_proxy_type_select').set('value', 'http'); $('http_proxy_type_select').set('value', 'http');
break; break;
case 2: // SOCKS5
case 4: // SOCKS5_PW
$('http_proxy_type_select').set('value', 'socks5');
break;
default: // NONE default: // NONE
$('http_proxy_type_select').set('value', 'none'); $('http_proxy_type_select').set('value', 'none');
} }

Loading…
Cancel
Save