This is a script written in bash that lets you automatically connect and refresh connections to Vodafone Hotspots in Italy (although it should work for other countries too with few changes to the url and the parameters which i didn't bother to do since i haven't had the need to use this abroad). If your internet provider is Vodafone and you use their provided Vodafone Station you can enable a setting in the router which allows for your unused bandwidth to be shared with other people who are Vodafone customers through a secondary wireless interface that broadcasts a standard SSID "Vodafone-WiFi". The prerequisites to use this are:
- Being a Vodafone subscriber (you need to register for a Vodafone community account on their website to get your credentials) or have some friend give you their credentials.
- Having activated the option on the Vodafone Station to share your bandwidth (or have your friend who gave you their credentials do it).
- Access to a unix system with bash and wget
Then you just need to set the parameters in the script (username and password must be url encoded, you can use any tool you like or use this website. This was written on Arch linux and tested on Arch, Ubuntu 18.06.x and Openwrt 18.06.x to 19.07.5.
Note: if you want a completely automated connection manager based on this (like running it on the router) you need to setup the proper scripts at boot (in openwrt for example you could place a script in /etc/hotplug.d/net/99-something where you run the script when your desired interface goes up) and setup a cron job every 5 minutes (which is the lease time the Vodafone Station gives every dhcp client).