InstaWifi : A Tool for Linux Developers, To Switch WiFi/proxy Instantly.

Padmaraj Kore
Coinmonks
Published in
2 min readJan 20, 2024

--

If you are a Linux user or most probably a developer, then most of time you face the requirement of switching WiFi network and proxy, this InstaWifi script might help you to switch between Multiple wifi and proxy in one click.

Prerequisites:

Before diving into the script, ensure that your Linux system supports Bash scripting. Script is tested on Ubuntu Linux operating system.

Step 1: Add the Script into your .bashrc file.

Open your terminal and execute the following command:

curl -sL https://bit.ly/3Hu13n7 | bash

It will add the Intswifi script into your .bashrc file

Step 2: Executing the Script.

exec bash

It will execute the bash file, and you are ready to use instawifi now.

Step 3: Adding WiFi Credentials

addwifi <WiFiName> <WiFiPassword> <AliasKeyword>

Replace <WiFiName>, <WiFiPassword>, and <AliasKeyword> with your WiFi details. The script will create an alias for connecting to this network. alias simply means the keyword you want to use to connect the saved WiFi network. e.g

#addwifi WiFiname Password alias
addwifi Bob21 'gh@hyu77' bo

Now you can use following command/alias/keyword to connect Bob21:

bo
#It will connect to Bob21 Wifi network.

Step 4: Connecting to LAN

To connect to LAN, use the following command:

lan

This command checks if a LAN cable is connected, disconnects WiFi if necessary, and establishes a connection to the LAN network.

Step 5: Enabling and Disabling Proxy

Use the following commands to manage proxy settings:

  • Enable Proxy:
proxy
  • Disable Proxy:
noproxy

Step 6: Checking Proxy Status

To check the current proxy status, use the following command:

sproxy

Step 7: Turning Off WiFi

If you want to turn off WiFi, use the following command:

wifioff

Step 8: Displaying Usage Instructions

For a quick reference to the available commands and features, use the following command:

wifiinfo

This command will display detailed instructions on adding WiFi credentials, connecting to LAN, managing proxies, and more.

--

--