From cfb721b57da7361dcec48a54fff8b00705f81e1b Mon Sep 17 00:00:00 2001 From: hamza zia Date: Tue, 19 Mar 2013 22:03:34 +0100 Subject: [PATCH] added host name heuristics for selecting aria2 server --- js/services/rpc/rpc.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/services/rpc/rpc.js b/js/services/rpc/rpc.js index c124561..0d29788 100644 --- a/js/services/rpc/rpc.js +++ b/js/services/rpc/rpc.js @@ -14,6 +14,14 @@ function(syscall, time, alerts, utils, rootScope) { , timeout = null , forceNextUpdate = false; + if (window.location.protocol === "http:") { + configurations.unshift({ + host: window.location.hostname, + port: 6800, + encrypt: false + }); + } + var cookieConf = utils.getCookie('aria2conf'); if (cookieConf) configurations.unshift(cookieConf);