-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tor Control Port: Error: connect ECONNREFUSED ::1:9051 #75
Comments
+1 |
@aghArdeshir @FaizKEverestek Hello You have most likely configured your tor control port incorrectly and/or edited the wrong torrc file -- please check the README in this section: https://github.com/talmobi/tor-request#optional-configuring-tor-enabling-the-controlport When tor starts it will tell you which torrc file it is using, please make sure it's the correct one. I've tested with |
My torrc file : SocksPort 127.0.0.1:9050 CLI output of tor running : yes it's using the correct file |
The code i'm trying to run : var tr = require("tor-request"); requestIP(); tr.TorControlPort.password = "password"; tr.setTorAddress("localhost", 9050); tr.newTorSession((err) => { function requestIP() { |
it works perfectly with the tr.request() |
@FaizKEverestek and what is the error you get? |
yep PS D:\Faiz\Backend\Test_puppeteer> node request.js Error: connect ECONNREFUSED ::1:9051 |
@FaizKEverestek try setting |
@FaizKEverestek and maybe try just using the port number 9051 in the torrc file instead of |
yep i did that first didnt work |
@FaizKEverestek another way to reset the tor session is by restarting the tor client (which is helpful to know) -- this doesn't look like an issue with |
@FaizKEverestek it seems like your tor ControlPort is running on |
i created my own solution which is working fine |
const net = require("net"); // Tor ControlPort configuration // Function to send commands to the Tor ControlPort
); client.on("data", (data) => { client.on("end", () => { client.on("error", (err) => { // Export the function as |
Faced with the same problem. Confirmed |
This library works perfect in case of using Tor, but for using Tor Control Port and to request a new torSession I get this error:
That being said, I tried it without and with setting a hashed password for the tor (according to README.md), and then I used
tr.TorControlPort.password = '<my_pass>'
to set the password.In both cases, I received the same error when I tried:
node version: 18.16.0
tor-request: 3.1.0
Tor version: 0.4.7.13.
The text was updated successfully, but these errors were encountered: