Update #4 almost impossible to fix

Hey Guys,

it has been a while since my last update. It was a busy week an unfortunately not a good one for the proxy.

I managed to patch the certificate pinning out of the App to be able to read the SSL encrypted traffic and thought that from now on, it would be easy to get the proxy up and running again.

I was wrong. I was able to reverse engineer the new API but when it comes to play the actual stream I always got the already mentioned Forbidden response from the server. Until yesterday I was not sure what is the problem but then I discovered, that there is always a request on a port directly on the device.

Calling internal SSL Proxy

Calling internal SSL Proxy

What Vodafone is doing here is, they are proxying the stream through an internal SSL-Proxy. This is kind of a a VPN which secures the complete communication of the stream.

I am not able to see what happens inside of this secure connection.

There is a only slight chance that I am able to find some solutions in the source of the Android App, but it is very hard. Vodafone uses a SSL-Proxy package provided by Ineoquest and I am not able to disassemble this part of the code, because it is encrypted.

I am sorry but I think they found an very effective way from preventing us watching TV on other devices than the allowed ones.

Best regards,
André

Update #3 Progress on fixing the problem

This is just a very short Update to tell you that finally I found a solution to query the API of KabelDeutschland (Vodafone Kabel) again.

Postman Query Channel List

Postman Query Channel List

I found the reason why the API was not responding anymore.

There is still a problem getting the licensed channel-links. The request results in an error.

VLC error Channel Link

VLC error Channel Link

Hopefully I will find a solution for this soon.

Best regards,
André

Update #2 on the still broken KabelDeutschland (Vodafone Kabel) Proxy

Hey,
I try to keep you guys updated as often as I can.

Today i was able to take a look into the current version of the Vodafone Kabel TV App. I tried to find the part of the code where they check if someone is interfering with the communication of the app. And to be honest, Vodafone (KabelDeutschland) found a pretty efficient way to prevent me from reading the SSL-encrypted traffic.

The following code example out of the app shows, how they did it.

In the onCreate action of the splash-screen, they are checking if the provided SSL-pub-key fits to the one provided by the app itself. This prevents me from using a proxy with a self-signed certificate to decrypt the communication.

I have not completely given up on this, but it is getting harder and harder to find a way to fix the proxy.

In the source I am able to see what requests are made, but the payload of the request body will be generated with a couple of properties but also dynamically generated IDs. These IDs I was not able to re-generate by myself, yet.

It definitely will take longer than expected to get this up and running again.

Best regards,
André

Update on the still broken KabelDeutschland (Vodafone Kabel) Proxy

Hey Guys,

to give you a little update about the current state of my work, here is what I tried already.

First, I was not able to solve the problem. KabelDeutschland (Vodafone Kabel) changed something in their API and within their Apps.
Normally I would use the same strategy I did to start this project in the first place, reverse engineering.

Unfortunately KabelDeutschland(Vodafone Kabel) now scans on every startup of the App (Android and iOS) if something listens to the connection. I am not able to use burp as a proxy to read the HTTPS encrypted traffic by now. It always tells me that I am not connected to the internet.

Vodafone TV App Error

Vodafone TV App Error

I will have to find another way to get into the encrypted communication of the app, to find out what they changed within their API.

If anyone has an idea, I would love to hear it.

Beste regards,
André

KabelDeutschland Streaming Proxy broken at the moment

Hey Guys,

as some of you already noted, the Proxy is not working at the moment. KabelDeutschland changed something the way they deliver the streams.

Good news, the App on Android and iOS is still working, so I am able to reverse engineer what is going on.

I will keep you updated as soon as I know more.

Best regards,
André

Fixed CDN problem with KabelDeutschland streaming proxy

What’s new

As some of you already noted, there have been some issues with getting the channel-list from the KabelDeutschland API. They migrated to a new Content-Delivery-Network which does not support a get-header-Request anymore. This causes the proxy to generate invalid channel-links and your were unable to watch the streams.

This should be fixed by now. I committed the fix within the PHP and the GO version of the proxy and also compiled the binaries to a new version 0.1.3.

Please give me feedback if the problem is solved for you.

Binaries Download

Shared Folder at mega.co.nz (mirror at dropbox)

Sourcecode Repositories

PHP

https://github.com/edi-design/kd-streaming-proxy

GO

https://github.com/edi-design/kd-go

Code of the KabelDeutschland streaming proxy is available as open source

Why

A couple of times (stadt-bremerhaven.dedo-it-neat.com) I have been asked to open up the source code of my KabelDeuschland Streaming Proxy. There has been the PHP version available for quite some time on github (kd-streaming-proxy) but until now I was not able to open-source the version written in GO.

Now I got the time to clean up everything, wrote a lot of comments and put it on github for everyone to contribute.

https://github.com/edi-design/kd-go/

I hope there are a lot of developers out there using my proxy and are willing to help me with the further development.

About the code

The code is completely written in GO. It should be able to compile with any version above 1.3, but to be able to generate the cross-platform binaries you need version 1.5 of GO.

Dependencies

It only has one dependency to the gorilla mux router. You can install it by entering the following command.

Build the source

To build the source for various platforms, simply run the build-script provided under scripts/build.sh.
It relies on a proper configured go-environment with GOPATH and GOROOT set up.

By now, I only tested the build process on OS X but it should not be a problem to run the commands on Linux.

Configuration

Place a config.json next to the binary and fill it with the following content, including your KabelDeutschland credentials.

Run the binary

The easiest way, is to run the binary without any params. It searches automatically for the config.json next to the binary.

 

 

PowerPC 64bit version of the KabelDeutschland streaming proxy

What’s new

Since golang updated their compiler to version 1.5 a couple of weeks ago, I am now able to use their new cross-compile toolchain to provide you some more binaries. By now there are two new, PPC64 and PPC64le. Both of them are, as the name says, for the PowerPC architecture with a 64bit bus system. The second one is directly compiled for the low-energy profiled CPUs. This build can be used on the Synology DS213+ for example.

Below you can see the full list of all supported platforms.

Download

Shared Folder at mega.co.nz (mirror at dropbox)

Usage

 

 

Take the binary that fits to your environment and run it.

 

Version 0.1.2 of the KabelDeutschland streaming proxy

What’s new

This time, it is only a small update. I just added some improvements a couple of the users asked for. The most notable new feature is the ability to skip the certificate check. User Michael had the problem that his QNAP (TS-210) has no root certificates installed. This ended him up with an error message and prevented him from using the proxy.

I added a start-up trigger to disable the CA-Check. It is called -no-check-certificate.

 

Download

Shared Folder at mega.co.nz (mirror at dropbox)

Usage

To see a list of all triggers the proxy supports simply add -h.

If you want to see, if the disabling of the certificate check works, add -v -no-check-certificate. This disables the check and enables verbose mode to see a lot more informations.

 

Updated KabelDeutschland streaming proxy

What’s new

The last time, I released my KabelDeutschland streaming proxy as a result of the reverse-engineering of the KabelDeutschland API. There have been a few minor issues, mainly in using the proxy together with some other tools like Kodi / XBMC or some stream-recorder based on ffmpeg.

Today i’d like to announce a new version of the KabelDeutschland streaming proxy that solves these issues. We are now able to use it together with the media-center software.

The playlist-handling has been fully rewritten to avoid the multiple redirects during playback. This was the main problem why ffmpeg could not read the playlist and its streams and prevented the media-center from playing the channels.

You can now select the quality of the stream by adding this param to the call. There are 3 options available, low | medium | high. Load your desired quality by opening http://[ip-address]/medium. If there was no quality-selector given, it will return the medium streams. There is still the debug option available by adding /txt at the end of the url after the quality identifier http://[ip-address]/medium/txt.

Below you will find the binaries for all supported architectures but there was also an update at the PHP version of this tool. This update can be grabbed from github.

Download

Shared Folder at mega.co.nz (mirror at dropbox)

Use cases

The last time i mentioned that i was trying to get the proxy running in conclusion with Kodi / XBMC and some other useful tools. Here is a short description of how to get these tools to work with the KabelDeutschland streaming proxy.

Kodi / XBMC

To watch live TV using this proxy in Kodi or XBMC, you have to enable an add-on called PVR IPTV Simple Client. This can be found under the PVR-Clients section in the add-ons category. After enabling it, there needs to be one configuration to be set-up, the Url of the playlist has to be added as seen on the screens. Also the checkbox cache m3u at local storage has to be unchecked so it reloads the playlist every time Kodi starts. After enabling and configuring the add-on, the last step is to enable Live-TV at the Kodi settings by checking the box under Settings -> Live TV.

Now you should see an option at the main menu named TV. Select the channel sub-option and enjoy the program.

The first time, the loading of the channel-list could take up to one minute, so please be patient.

Tvstreamrecord

I crashed into this tool (http://pavion.github.io/tvstreamrecord/) by looking for some new stuff for my Synology DS215j. It has a prebuilt package so i decided to give it a try and installed it. I imported the generated playlist but unfortunately i was not able to record the stream. As i described in my introduction, the problem was ffmpeg that could not handle redirects in playlists but with the new version of the KabelDeutschland streaming proxy it was easy to get the recorder running. Nevertheless there are some tweaks you have to do before it works.

As a step by step introduction we will start by adding the playlist. Open http://[Synology]:8030, click on the Channels-tab and click the Import button. Select your generated playlist. After the upload, you will see a list of all channels. You can now grab the EPG information at one of the two EPG tabs. Now we have to change the configuration. Switch over to Config -> FFMPEG support and add http to the list of stream-type. Hit submit-changes.

Now the last step is to change the path for your recordings under the General tab.

Thats it, you are now able to create a scheduled record.