always also check localhost to see if it matches routerconsole too
This commit is contained in:
@@ -40,6 +40,13 @@ function routerHost(url) {
|
||||
//console.log("(hostcheck) router console found on configured ports");
|
||||
return pathcheck(path);
|
||||
}
|
||||
if (hostname === "localhost" + ":" + control_port) {
|
||||
//console.log("(hostcheck) router console found on configured ports");
|
||||
return pathcheck(path);
|
||||
}
|
||||
if (hostname === "127.0.0.1" + ":" + control_port) {
|
||||
return pathcheck(path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
7
host.js
7
host.js
@@ -100,6 +100,13 @@ function routerHost(url) {
|
||||
//console.log("(hostcheck) router console found on configured ports");
|
||||
return pathcheck(path);
|
||||
}
|
||||
if (hostname === "localhost" + ":" + control_port) {
|
||||
//console.log("(hostcheck) router console found on configured ports");
|
||||
return pathcheck(path);
|
||||
}
|
||||
if (hostname === "127.0.0.1" + ":" + control_port) {
|
||||
return pathcheck(path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ function authenticate(
|
||||
password = "transmission",
|
||||
control_host = "127.0.0.1",
|
||||
control_port = "7657",
|
||||
control_path = "jsonrpc"
|
||||
control_path = "transmission/rpc"
|
||||
) {
|
||||
let store = browser.storage.local.get("rpc_pass");
|
||||
if (store != undefined) {
|
||||
@@ -71,7 +71,7 @@ async function GetToken(
|
||||
password,
|
||||
control_host = "127.0.0.1",
|
||||
control_port = "7657",
|
||||
control_path = "jsonrpc"
|
||||
control_path = "transmission/rpc"
|
||||
) {
|
||||
let me = authenticate(password);
|
||||
return await me.then(gettoken);
|
||||
|
||||
Reference in New Issue
Block a user