There's been a discussion here about how blocking uploads to people from your own country could help improve your security. So i thought i'd start a discussion here about how it might be implemented.

This concept could be applied to any filesharing program but i thought i'd start with an Azurues plugin. Not because i particularly like Azurues (i'm a uTorrent man myself) but because it's popular and it's open source and, erm, it supports plugins

I don't know anything about developing AZ plugins but i do know Java (although i'm better at C++).

So i'm gonna throw down some ideas here and see what people think before I do some research myself (i won't have time until the weekend).

Who to block?

It's been a while since i used AZ, but if i remember right it already tells you what country the other peers are from. So hopefully it's possible to use this feature to block specific countries. This raises a few questions:

1) Is this accessable from a plugin?
2) How does it determine what country the peer is from?
3) How reliable is it?

Another option is to use GeoIP (is this what AZ uses?) which claims 97% accuracy.

Impact on the network

What affect is blocking uploads to a whole country going to have to a swarm? Well if your in the USA your gonna be blocking a hell of a lot of people. But if the swarms big enough and has enough international peers to max your download then you won't notice a thing. Torrents with not many peers or a torrent that might be of interest to only one country could suffer quite heavily if every one did this.

Maybe it would be best to do this on per torrent basis, so if you want to allow uploads to fellow countrymen on a particular torrent you can (possible with a plugin?).

Abuse

What if someone decides to use this to block uploads to everyone? maybe it should only allow you to block one country? Any legit reason why someone would want to block more than one country?

Built in IP filter.

Azurues has a built in IP filter (i believe?) which could be utilised. Does this block connections in both directions? Do we want that? or just uploads? can it be made to block just uploads?

I'm sure there's more I need to consider but that's all i think of right now.

Anyone know of any AZ plugin developement tutorials or documentation?

Anyone already familiar with developing AZ plugins? I don't mind if you take this idea and code it youself, I'm sure i can find something else to do at the weekend other than learn how to make plugins

So, anyone have any thoughts on this? Thinks it's a good idea? Thinks it's a dumb idea? Let me know

As a bit of background on this, I quote from an edited previous posting below

If UK filesharers restrict their shares exclusively to those outside of the UK, then this would exclude investigation by BPI

Similarly, if US users did the same, they would exclude the RIAA (MediaSentry, Bay TSP, etc). Doubtless the RIAA would cotton on eventually, and they would start basing their detection offshore, but it would slow down their operations

Quote: 22. The copyright in a work is infringed by a person who, without the licence of the copyright owner, imports into the United Kingdom, otherwise than for his private and domestic use, an article which is, and which he knows or has reason to believe is, an infringing copy of the work.

Thus an imported copy (digital or otherwise) brought into the UK for such purposes seems to fall outside of the scope of UK copyright protection. Likewise, so would the subsequent re-export of such material.

(2) importation, for the private use of the importer and not for distribution, by any person with respect to no more than one copy or phonorecord of any one work at any one time, or by any person arriving from outside the United States with respect to copies or phonorecords forming part of such personâ€™s personal baggage;

After reading through the previous related thread and now this I'll be very interested as to how this develops. I'm not a programmer, know nothing about java, plugins or whatever but I'm great at giving support. So well done ukdnb for following on with this idea and hopefully it will bear some fruition. And a belated welcome to Slyck

1) If you are in a country (US, UK, etc) and you successfully block all IP/peers in that country from uploading from your client. Does this keep you safer technically? In other words are the current cases based on data collected from **AA bots inside the users perspective countries or outside?

2) Does this keep you safer legally? Are there any copyright loopholes that could provide an out? Or would it be viewed on a technical level that your client is still creating copies of data on your computer so it doesn't matter with whom you share?

I'm all for anything that can reduce your chances of getting of getting a letter someday.

"The government, which was designed for the people, has got into the hands of the bosses and their employers, the special interests. An invisible empire has been set up above the forms of democracy." - Woodrow Wilson

For the country location plugin that's already present, I think it does a WHOIS for each IP that wants to connect, via the whois databases such as ARIN and RIPE. These databases are free to use and easy to design plugins around.

Should be pretty damn easy to hack the plugins' sources to get it to do what you want to do without starting from scratch, since that aforementioned plugin already makes use of the APIs for the whois databases.

A blanket filter using azureus' ipfilter would be a bad idea IMO because you can't invoke the filter on a per-torrent basis, so you'll be creating a performance drain on torrents that don't need to be filtered, stuff like tv shows, games, and indie content. That really would be a critical usability requirement considering how much content is out there these days that isn't under the domain of RIAA/MPAA and hence not needed to be filtered on the basis of country.

Though I dunno how effective this really would be. Most people just roll over if they get sued, not because they're guilty but because they can't afford to fight it. This technique wouldn't stop the extortion because they don't need a solid case in order to file one of their lawsuits. And on top of that, consider the implications of a lawsuit-bot simply using a proxy from outside his country. Is that a loophole? I sure as hell don't know, but it seems like it might be.

Well I did some checking into mediasentry to see if I could find out what countries they were operating in. This quote I found troubling.

Gary Alen Millin President of mediasentry wrote:We have numerous data centres including in those places, plus in the UK, plus we use data centres in Asia from time to time depending on the needs of our clients plus other locations in the US

NOTE: I still haven't found anything on the MPAA yet which should be more of a concern to bittorrent users.

"The government, which was designed for the people, has got into the hands of the bosses and their employers, the special interests. An invisible empire has been set up above the forms of democracy." - Woodrow Wilson

Having said that, the export of material from the US isn't covered by US legislation - thus I suspect would only amount to an infringement in the country of destination. And it's ok to import into the UK for personal and private use.

And it seems the reciprocal applies from the UK to the US, so I don't see this as a major stumbling block.

tarp404 wrote:For the country location plugin that's already present, I think it does a WHOIS for each IP that wants to connect, via the whois databases such as ARIN and RIPE. These databases are free to use and easy to design plugins around.

This is a plugin? I thought it was something built in to AZ (being able to see what country the peers are from).I'd rather avoid a whois lookup as they tend to be slow and give much more information than needed, plus if the whois database is down for maintenance or something then it all falls down. An internal database would be faster and more reliable, if AZ doesn't have one then i'd rather use GeoIP. That's what DC++ uses and seems quite effective.

tarp404 wrote:A blanket filter using azureus' ipfilter would be a bad idea IMO because you can't invoke the filter on a per-torrent basis, so you'll be creating a performance drain on torrents that don't need to be filtered, stuff like tv shows, games, and indie content. That really would be a critical usability requirement considering how much content is out there these days that isn't under the domain of RIAA/MPAA and hence not needed to be filtered on the basis of country.

Yes, i'd agree with a blanket filter not being ideal. but if it's possible to hack it in some way to do what i need then it might save some time and effort. Per torrent would be the ideal solution.

Hmmmm just installed the plugin and it seems to work pretty good. I could kick and ban any users with my countries flag easy enough from my seeds. Although without extra code others would pop in.

1 question ukdnb, will this code you're adding block all dl/ul in a country or just ul?

"The government, which was designed for the people, has got into the hands of the bosses and their employers, the special interests. An invisible empire has been set up above the forms of democracy." - Woodrow Wilson

BasicTek wrote:1 question ukdnb, will this code you're adding block all dl/ul in a country or just ul?

Initially it will block both.
a) because I can't see an easy way to block only uploads
b) i'm not sure if i even want to do that, seems a bit selfish leeching from people whom your not prepared to upload to.

Dont think so Nick. Look at me for example. I rarely see anyone connect to me thats in my city, let alone my country, so it wouldnt be a big problem, as nobody would leeching off me.

But if you are in the US or UK, theres a big chance that lots of people from your country that connects to you. That means a big bunch of peers are blocking each other. People in the US can connect to a swarm that has 50 seeds, with 30 of them also from US. Thus, they would only be able to connect to 20 seeds, which is a big speed hit.

@ukdnb I've just reread your initial posting on impact to the network and it's made me think of the following.

-a choice to block downloads from a certain country (using the plugin) should be made available for individual torrents.
i.e - I'm downloading an episode and I'm blocking country A from providing me downloads but meanwhile a new linux distro iso is only receiving a meagre 2kb due to the connections from country A being blocked.

anyone know JAvA its be sweet if you made a plugin for azureus to do this i can do it manually in azureus aswell but automatically doing it would be cool or if you could right click on a torrent in my torrents view and click block all peers from my country would be really sweet this is a damn good idea