support https and wss scheme

This commit is contained in:
MaysWind 2016-06-04 15:41:36 +08:00
parent 0c9dbbf9e2
commit 0bdfec10e4
4 changed files with 11 additions and 1 deletions

View file

@ -88,6 +88,10 @@
"Minutes": "分", "Minutes": "分",
"Seconds": "秒", "Seconds": "秒",
"Milliseconds": "毫秒", "Milliseconds": "毫秒",
"Http": "Http",
"Https": "Https",
"WebSocket": "WebSocket",
"WebSocket (Security)": "WebSocket (安全)",
"Disabled": "禁用", "Disabled": "禁用",
"Changes to the settings take effect after refreshing page.": "设置将在页面刷新后生效.", "Changes to the settings take effect after refreshing page.": "设置将在页面刷新后生效.",
"Type is illegal!": "类型错误!", "Type is illegal!": "类型错误!",

View file

@ -92,6 +92,10 @@
'Minutes': 'Minutes', 'Minutes': 'Minutes',
'Seconds': 'Seconds', 'Seconds': 'Seconds',
'Milliseconds': 'Milliseconds', 'Milliseconds': 'Milliseconds',
'Http': 'Http',
'Https': 'Https',
'WebSocket': 'WebSocket',
'WebSocket (Security)': 'WebSocket (Security)',
'Disabled': 'Disabled', 'Disabled': 'Disabled',
'Changes to the settings take effect after refreshing page.': 'Changes to the settings take effect after refreshing page.', 'Changes to the settings take effect after refreshing page.': 'Changes to the settings take effect after refreshing page.',
'Type is illegal!': 'Type is illegal!', 'Type is illegal!': 'Type is illegal!',

View file

@ -38,7 +38,7 @@
context.requestBody.params = finalParams; context.requestBody.params = finalParams;
} }
if (protocol == 'ws') { if (protocol == 'ws' || protocol == 'wss') {
return aria2WebSocketRpcService.request(context); return aria2WebSocketRpcService.request(context);
} else { } else {
return aria2HttpRpcService.request(context); return aria2HttpRpcService.request(context);

View file

@ -42,7 +42,9 @@
<div class="setting-value col-sm-8"> <div class="setting-value col-sm-8">
<select class="form-control" style="width: 100%;" ng-model="settings.protocol" ng-change="settingService.setProtocol(settings.protocol)"> <select class="form-control" style="width: 100%;" ng-model="settings.protocol" ng-change="settingService.setProtocol(settings.protocol)">
<option value="http" translate>Http</option> <option value="http" translate>Http</option>
<option value="https" translate>Https</option>
<option value="ws" translate>WebSocket</option> <option value="ws" translate>WebSocket</option>
<option value="wss" translate>WebSocket (Security)</option>
</select> </select>
</div> </div>
</div> </div>