特定の国またはノードを終了できますか?


69

NetflixをTor経由で動作させたいとしましょう。現在、Netflixがサポートする国からトラフィックが出るまで、「新しいID」を押し続けます。私はTorブリッジを使用してネットワークにアクセスします。

トラフィックがTorネットワークを出る国またはノードを選択する方法はありますか?

67

You can use ExitNodes in your torrc to set a country code, but it wouldn't be the best solution to your request. Streaming Netflix over Tor would be incredibly slow and actually have a fairly negative effect on the network just to let you watch a few extra TV shows.

Your best option would probably be to set up a VPN in the country of your choosing. This would give you the speed you need to watch properly and keep that bandwidth free for Tor users who actually need it for anonymity.

See this answer for a good breakdown of why this use of Tor isn't good practice.

To use an exit node from a particular country add the ISO country code in curly brackets. Eg. {us} for an exit in the United States.


20

The following excerpts from the Tor Project Manual should tell you everything you need to know:

ExitNodes node,node,…

A list of identity fingerprints, nicknames, country codes and address patterns of nodes to use as exit node---that is, a node that delivers traffic for you outside the Tor network.

Note that if you list too few nodes here, or if you exclude too many exit nodes with ExcludeExitNodes, you can degrade functionality. For example, if none of the exits you list allows traffic on port 80 or 443, you won’t be able to browse the web.

Note also that not every circuit is used to deliver traffic outside of the Tor network. It is normal to see non-exit circuits (such as those used to connect to hidden services, those that do directory fetches, those used for relay reachability self-tests, and so on) that end at a non-exit node. To keep a node from being used entirely, see ExcludeNodes and StrictNodes.

The ExcludeNodes option overrides this option: any node listed in both ExitNodes and ExcludeNodes is treated as excluded.

The .exit address notation, if enabled via AllowDotExit, overrides this option.

To use a country code in the ExitNodes line you specify its ISO country code in brackets. Eg. ExitNodes {us} to use exit nodes in the United States.

StrictNodes 0|1

If StrictNodes is set to 1, Tor will treat the ExcludeNodes option as a requirement to follow for all the circuits you generate, even if doing so will break functionality for you. If StrictNodes is set to 0, Tor will still try to avoid nodes in the ExcludeNodes list, but it will err on the side of avoiding unexpected errors. Specifically, StrictNodes 0 tells Tor that it is okay to use an excluded node when it is necessary to perform relay reachability self-tests, connect to a hidden service, provide a hidden service to a client, fulfill a .exit request, upload directory information, or download directory information. (Default: 0)


5

In addition to ExitNodes {us} and StrictNodes 1, you should also use DNSPort 5553, along with dnsmasq (this is a dns relay program) with --server=/geoblocked.url/127.0.0.1#5553

Then use Tor for ONLY the DNS lookups, since this is the only part that is actually geoblocked.


3

Yes: edit the file: ThisPC\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\torrc or wherever you put Tor.

at the end put: ExitNodes {GB}

Then the last node will always be in the United Kindom, or put any other country code to exit from another country eg: US.


-2

AFAIK this is not in the documentation and not in the answer above, so:

The country coude must be in capitals, so:

ExitNodes {NL}

With small letters "{nl}" the line was ignored.

With the following commands you can check that the setting is working:

torsocks curl ipinfo.io/
torsocks curl ipinfo.io/country

3

I find that lower case works fine and I also don't need to use StrictNodes. For example I simply add ExitNodes {jp} to my torrc to make the receiver always think the sender is from Japan.

FWIW here's a reference list to the country codes.


2

On Windows

  1. Right-click the Tor icon. It's a purple-and-green globe icon that you'll either find on your desktop or in the Start menu.
    If you haven't done so yet, first run Tor so that the appropriate folder is established. Otherwise, you won't be able to set a specific country.
  2. Click Open file location. You'll see this option near the top of the drop-down menu.
  3. Double-click the "TorBrowser" folder. Doing so will open it.
  4. Double-click the "Data" folder.
  5. Double-click the "Tor" folder.
  6. Double-click the "torrc" file. This will open the "Open with" window.
  7. Click Notepad, then click OK. Doing so will open the "torrc" file as a text document, allowing you to edit it.
  8. Locate the "ExitNodes" line. It should be near the bottom of the text on this page. You'll see something like "{us}" to the right of the "ExitNodes" phrase. If you don't see this line of text, copy ExitNodes {} StrictNodes 1 into the file.
  9. Change the value in the bracket to match your preferred country. You can view a comprehensive list of supported countries beneath the "List of country codes for Tor" heading here: http://www.b3rn3d.com/blog/2014/03/05/tor-country-codes/ For example, you would change "{us}" to "{ug}" to transfer your preferred country from the United States to Uganda.
  10. Click File. It's in the top-left corner of the Notepad window.
  11. Click Save As. You'll see this option near the top of the drop-down menu. Since Notepad saves documents as text files automatically, you must use the Save As option to save your updated country file as a Tor file.
  12. Click the "Save as type" box. By default, the box here will say "Text Documents (*.txt)". Clicking it will invoke a drop-down menu.
  13. Click All Files. It's in the drop-down menu. After doing so, you'll see a list of the "Tor" folder's contents appear in the Save As window.
  14. Click the "torrc" file. You'll find it in the Save As window. This will select "torrc" as the file to replace with your updated file.
  15. Click Save. It's at the bottom of the Save As window.
  16. Click Yes when prompted. This will replace the "torrc" file with your new one, thereby saving your country settings.
  17. Open Tor. Doing so will take a minute, since Tor will need to connect with your new country's servers. After it connects, your country settings will be active. You can double-check this by going to Google, clicking the onion icon in the top-left corner of the browser, and looking at the country name above the "Internet" value here.