Using Indy to get rid of “Region blocked” video on demand messages
Posted by in Miscellaneous, tags: DelphiThis article is in fact more ranting about these insane region codes that you know from DVD movies, and more “modern” from Video On Demand systems. I will show a few lines of Delphi code to make up a simple HTTP proxy that may help getting around this nonsense “Region is blocked” message I recently came across.
I have a Video On Demand subscription, that came for free with my
Internet plan at home. This subscription allows me to watch about 120
movies, TV series etc. via Internet. The system has a homepage,
where I can easily login, select the video and as long as my internet
connection is fast enough (at least 1MBit/s ), I can watch -
advertisement free.
So far so good. I’m traveling more or less frequently, and if the hotel
has a reasonable internet connection, then I won’t get bored in the
evening after a day of work. So where is a the problem?
Well, as long as I travel in Germany only, all is fine. Currently I’m
in the US though, and guess what? This won’t work from here. I have a
hi-speed cable connection, I can login, select a movie, but when it’s
about to start it just shows an error: “Region blocked”.
Great! This is obviously the same crap, thought out by the same insane
guys, who “invented” region codes for movie DVD’s. I didn’t take any of
my DVD’s with me, because even though I have paid for them, and legally
own them, I’m not allowed to watch them on US DVD players. Of course I
can watch them on my laptop, but heck, here I have a 42″ home theater
…
How sick must these guys have been, when they invented this stuff? Does
it prevent any piracy? No! It just makes users feel like idiots, when
you realize that you may not use your legally owned stuff …
However, this is a technical blog about Delphi and stuff
To overcome this Video On Demand problem, there is an easy solution:
Don’t connect your Web browser directly to the Internet, but configure
it to use a proxy server if you are in this “Region blocked” situation.
The idea is, that the Video On Demand system (VOD) will see
the IP address of your machine if connecting directly. If you are going
through a proxy server, then the VOD will see the IP address of the
proxy server.
How does that help? Well, try to find a server, which is in a region,
which is allowed for your VOD. In my case, I have a Web server, which
is hosted at a German server farm, so I’m going through that server.
How to install Proxy Server functionality to a server machine?
To use my Web server as proxy I had to install some piece of software,
which provides the HTTP proxy functionality. I googled a bit, and my
first hit was some software that hat dozens of files, a config file
with zillions of options. I did not even try that one. The second hit
was a single executable, but, well I couldn’t get it to work either. So
I got bored and fired up my Delphi.
Start a new VCL application, drop a TIdHTTPProxyServer component and a
TButton and attach the following lines of code:
procedure TFormMain.Button1Click(Sender: TObject);begin //Set port if going active if not IdHTTPProxyServer1.Active then begin IdHTTPProxyServer1.Bindings.clear; IdHTTPProxyServer1.DefaultPort := StrToInt(EditPort.Text); end; //De-/Activate IdHTTPProxyServer1.Active := not IdHTTPProxyServer1.Active; //Some feedback StatusBar1.Panels[0].Text := iif(IdHTTPProxyServer1.Active, 'Proxy active', 'Proxy inactive'); //Allow editing port only if proxy is inactive EditPort.ReadOnly := IdHTTPProxyServer1.Active;end;;
Download Source
Download Executable
Compiled, run on my server, configured IE and worked! Thats why I love
to be a developer
Watching videos now …





Entries (RSS)