Add alternative method to fetch user

This commit is contained in:
Cadence Fish
2020-02-03 02:24:14 +13:00
parent 96fa4758c0
commit 272f4b6e3b
10 changed files with 191 additions and 65 deletions

View File

@@ -44,12 +44,12 @@ module.exports = new Promise(resolve => {
/** @type {import("@deadcanaries/granax/lib/controller")} */
// @ts-ignore
let tor
if (constants.tor_password == null) {
if (constants.tor.password == null) {
// @ts-ignore
tor = new granax()
} else {
tor = new granax.TorController(connect(9051), {authOnConnect: false})
tor.authenticate(`"${constants.tor_password}"`, err => {
tor.authenticate(`"${constants.tor.password}"`, err => {
if (err) console.log("Tor auth error:", err)
})
}