mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-01-10 07:11:14 +00:00
Allow customisation of tor port
This commit is contained in:
@@ -51,11 +51,11 @@ 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 || constants.tor.port == null) {
|
||||
// @ts-ignore
|
||||
tor = new granax()
|
||||
} else {
|
||||
tor = new granax.TorController(connect(9051), {authOnConnect: false})
|
||||
tor = new granax.TorController(connect(constants.tor.port), {authOnConnect: false})
|
||||
tor.authenticate(`"${constants.tor.password}"`, err => {
|
||||
if (err) console.log("Tor auth error:", err)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user