Nice timing, we just expanded our tutorials around this! For this you should use new_circuit() and attach_stream() rather than NEWNYM. For an example of doing this see...
The tl;dr is that FTP and .onion do not go well together and never will, due to how the FTP protocol works. For more details, see below.
FTP goes a little like this:
Client connects to the "command" channel.
Client logs in to the "command" channel.
Client asks for some data over the "command" channel.
If you're using Active Mode:
Client opens up a ...
No, this is not possible. TOR works on higher layer than VPNs and is only able to substitute your TCP stack. It is not possible to relay raw IP packets via TOR, like you can do over VPNs.
I know this might sound very limiting (and it is), but there's some privacy advantages here. TOR is designed to limit possibilities of traffic analysis by reducing the ...
Tor does not use the same exit node for everything. The Tor Browser actually uses a security feature that makes sure it does not share the same circuits with any other program that uses the Tor client.
You're almost there, you're replacing socket.socket with socks.socket, so far so good.
However upon assignment of variable s, you're not properly instantiating the replacement class, and therefore later during the connect call, your code results in the unbound method type error.
In your original code, s gets assigned a class instance, and in your updated ...
This works for me:
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050, True)
s = socks.socksocket()
So, that's just initializing s differently, via s = socks.socksocket().
With socks, connect() also takes a hostname. This ...
You can use any programming language for a hidden service. The reason why most of the hidden services using PHP might be the same why many services in the web use PHP. ;)
Your hidden service basically needs to listen on some TCP port. This can be for instance a webserver. Your application takes the request from that webserver and does something with it. You ...
If you want to use event-based code (namely Twisted), there's https://github.com/habnabit/txsocksx for client-side stuff (i.e. socks proxy) and http://txtorcon.readthedocs.org/en/latest/ for speaking Tor's control protocol to Tor (and other things, like launching new Tor instances for hidden services, etc).
I think you're confused a little. The Tor cloud instance is not about surfing at all, and there's not too much to interact with for a Tor relay.
Exposing a Tor control port over the network is a bad idea, because the protocol is not secured and used only for local connections directly to it. To make use of it on your ec2 instance, install the controller ...
This already exists as ExitMap.
It's approach is to launch it's own copy of Tor which is configured not to automatically attach streams to existing circuits through use of the __LeaveStreamsUnattached option, then use stem to build custom circuits, one to each of the suitable exits and attach the streams to the circuits.
I'm not sure where you're getting ...
All certificates types are listed here, see section "A.1. List of certificate types"
 - Ed25519 signing key with an identity key
(see prop220 section 4.2)
 - TLS link certificate signed with ed25519 signing key
(see prop220 section 4.2)
** - Reserved for RSA identity cross-certification;
(see section 2.3 ...
The Tails firewall will prevent you from doing this. Only applications that have been explicitly whitelisted are allowed to communicate with the outside world. This is by design.
Have a read of the Network Filter page on the Tails site.
You'll have to whitelist your application/script to allow it to connect to a foreign IP address. To do this you'll need ...
Tor clients keep a pool of circuits and may use several circuits simultaneously for streams depending on factors such as exit policies, stream isolation, etc. So there is generally not a single "in-use" circuit. And it's not quite true that a circuit is used for only a max of 10 minutes. Generally a circuit is marked as "dirty" (unusable ...
Yes, you will then have two circuits, and it will take some time for the previous circuit to be automatically cleaned up. A Stem controller does have a close_circuit(id) function you can use to close a circuit manually.
You cannot use multiple circuits to send data over a single connection. You can only do something like this if the server supports sending ...
This looks like it should work fine, as long as you give it the right Control and SOCKS ports when you create the TorRequests instance, I.E.
request = TorRequest(proxy_port = 9150, ctrl_port=9151)
Since it's using stem and you can specify alternative ports, this should work fine using Tor Browser without requiring a stand-alone tor.exe for it to launch.
No ControlPort is specified in the torrc that your copy of Tor is trying to read.
ControlPort PORT|unix:path|auto [flags]
With the default of 0 meaning not to create one.
Instead either specify one in the place that tor.exe looks for it's torrc by default or use launch_tor_with_config instead.
from stem.process import ...
You need to query the client bootstrap status. It's done - as it's said in control protocol spec like this:
telnet 127.0.0.1 9051
Connected to 127.0.0.1.
Escape character is '^]'.
250-status/bootstrap-phase=NOTICE BOOTSTRAP PROGRESS=100 TAG=done SUMMARY="Done"
Why not take a look here at the official docs ? It explicitly says, that key can be provided on creation. Of course, if you've already created an ephemeral hidden service, then no key or other stuff can be fetched, because it's the very meaning of it's ephemerical nature. Create your RSA1024 key and use it, why not?
You need to figure out a way to ensure you are running Python 2.7 and try again.
Most likely you aren't using python 2.7 like you think you are.
Check python from command line by typing python --version.
Then to make sure login to Python command line by typing python and see what version it spits out in the welcome message and type exit() to exit.
There is a tutorial on retrieving the number of bytes a relay has written and read here (run the code after installing stem):
from stem.control import Controller
with Controller.from_port(port = 9051) as controller:
controller.authenticate() # provide the password here if you set one
bytes_read = controller.get_info("traffic/read")
bytes_written = ...
Has anybody had any success using Tor Browser with Marionette?
It was possible up to (at least) 52.3.0.
start the browser:
from marionette_driver.marionette import Marionette
client = Marionette('localhost', port=2828)
I have re-written the code, as it seems my code was just awful. I'm not sure what the problem was, however, here's the update for anyone trying to do the same:
assert str is not bytes
from lib_socks_proxy_2013_10_03 import monkey_patch as socks_proxy_monkey_patch
I replied on irc but maybe you had left...
If you're not getting an exception then what makes you think it isn't working? Tor limits the rate at which it accepts NEWNYMs to once every ten seconds, so if you're not finding that circuits are changing then that could be it.
Please don't cycle circuits too rapidly though. That puts strain on the network.
For client usage controller libraries like Stem and Txtorcon aren't necessary. Tor is a local socks proxy and any socket library (SocksiPy, PycURL, etc) will do the trick. See the tutorial for this...
Tutorial: To Russia With Love
The trick is making sure your application doesn't leak. DNS queries and other edge cases might still expose your real IP so ...