My system is connected to a college hostel LAN. Internet is provided through the Cyberoam system. Thus, there is a cap on the maximum transfer speed for internet. I had an idea since months to exploit virtual interfaces to get more out of it. For eg, parallel downloads all at the max transfer speed and browsing simultaneously without being affected by those downloads. I didn’t find any favourable ways to achieve this until last couple of days when I came across various pieces which I could put together to get it done.
The whole idea is to create a virtual ethernet interface (which is connected to the LAN) using
ip aliasing and route selected traffic through that interface in a simple way. We will be using a proxy server to bind connections to that ip alias as it is much more simpler to configure any application to use a particular proxy server than to set their outgoing interface.
Although I will considering only virtual interfaces in the tutorial, the same technique can be applied to actual multiple interfaces as well. Also, note that there are tons of ways one might want to configure the behaviour. This is another reason why I will be using a proxy server.
Project Link: shuffle.py
Couple of months ago, I got an Apple Ipod Shuffle 4g. Despite the presence of IPod syncing apps under Linux, my experience was annoying. Shuffle 4g changed compared to its predecessors regarding the database format and new features, so a lot of plugins and apps don’t work as expected. In this post, I will write about different ways to tackle this annoyance.
Basic Things to Know
Bah! why can’t Apple make straightforward stuffs! Anyway, here are things you should know in a nutshell. IPod’s internal software works on a defined structure in the mass storage of the IPod. The process of creating this structure may be referred to as initializing your device. For adding any content to your device, a simple copy is not enough, changes need to be made in the database (The iTunesSD file) as well.
If you want to know more about the database format, I highly encourage you to read it at http://web.archive.org/web/20131016014401/http://shuffle3db.wikispaces.com/iTunesSD3gen
Background Story (You may Skip it)
Downgrading packages is a thing i don’t often encounter while using Arch. If something breaks, i wait for it to get fixed and the update again. But this time, the case was different. Late night, after a kernel (or libnl, i don’t remember) upgrade, my hostapd stopped working, complaining about shared libraries. Shockingly, i discovered that my hostapd was still at 0.7 while the latest stable version was at 2.0!(Reason provided at end) So i did an pacman -Sc to remove older hostapd versions from cache, which didn’t change anything, then made some correct changes and upgraded hostapd to 2.0. New problems in hostapd popped up, about nl80211 being unable to set my wlan to master mode. Now ahead of me was option of spending the rest of night desperately debugging the problem or study for the exam coming morning. Hostapd not working is a more serious issue for me.
Earlier i had written a guide about setting up and running hostapd. To hone my python skills and make using and configuring hostapd simpler, i wrote a python client for hostapd. I also intend this project to serve as a base for a connectify-like GUI hostapd client, which i will start working on in a few days. This project is nearly complete, with proper logging system yet to implement and fix any unknown bugs.
Getting and Installing hostapd-python-script
Just paste this on your command line.
git clone https://github.com/nims11/hostapd-python-script.git
Read the README.textile file, it will get you well covered.
Help me improve it by reporting bugs, suggestions and pull requests. I have only tested it well enough under my Arch Linux installation with ath9k wifi driver, so reporting working/non-working environments will help a lot. I believe the sourcecode is simple enough to understand and i have documented most part of it. Will document the rest in few days as well.
Thank you 🙂