Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/balena-os/wifi-connect
Easy WiFi setup for Linux devices from your mobile phone or laptop
WiFi Connect is a utility for dynamically setting the WiFi configuration on a Linux device via a captive portal. WiFi credentials are specified by connecting with a mobile phone or laptop to the access point that WiFi Connect creates.
Download | How it works | Installation | Support | Roadmap
WiFi Connect interacts with NetworkManager, which should be the active network manager on the device's host OS.
WiFi Connect detects available WiFi networks and opens an access point with a captive portal. Connecting to this access point with a mobile phone or laptop allows new WiFi credentials to be configured.
Connect to the opened access point on the device from your mobile phone or laptop. The access point SSID is, by default, WiFi Connect
. It can be changed by setting the --portal-ssid
command line argument or the PORTAL_SSID
environment variable (see this guide for how to manage environment variables when running on top of balenaOS). By default, the network is unprotected, but a WPA2 passphrase can be added by setting the --portal-passphrase
command line argument or the PORTAL_PASSPHRASE
environment variable.
After connecting to the access point from a mobile phone, it will detect the captive portal and open its web page. Opening any web page will redirect to the captive portal as well.
The captive portal provides the option to select a WiFi SSID from a list with detected WiFi networks and enter a passphrase for the desired network.
When the network credentials have been entered, WiFi Connect will disable the access point and try to connect to the network. If the connection fails, it will enable the access point for another attempt. If it succeeds, the configuration will be saved by NetworkManager.
For a complete list of command line arguments and environment variables check out our command line arguments guide.
The full application flow is illustrated in the state flow diagram.
WiFi Connect is designed to work on systems like Raspbian or Debian, or run in a docker container on top of balenaOS.
WiFi Connect depends on NetworkManager, but by default Raspbian Stretch uses dhcpcd as a network manager. The provided installation shell script disables dhcpcd, installs NetworkManager as the active network manager and downloads and installs WiFi Connect.
Run the following in your terminal, then follow the onscreen instructions:
bash <(curl -L https://github.com/balena-io/wifi-connect/raw/master/scripts/raspbian-install.sh)
WiFi Connect can be integrated with a balena.io application. (New to balena.io? Check out the Getting Started Guide.) This integration is accomplished through the use of two shared files:
To use WiFi Connect on a multicontainer app you need to:
Your docker-compose.yml
file should look like this:
version: "2.1"
services:
wifi-connect:
build: ./wifi-connect
network_mode: "host"
labels:
io.balena.features.dbus: '1'
cap_add:
- NET_ADMIN
environment:
DBUS_SYSTEM_BUS_ADDRESS: "unix:path=/host/run/dbus/system_bus_socket"
...
WiFi Connect has been successfully tested using the following WiFi dongles:
Dongle | Chip |
---|---|
TP-LINK TL-WN722N | Atheros AR9271 |
ModMyPi | Ralink RT3070 |
ThePiHut | Ralink RT5370 |
It has also been successfully tested with the onboard WiFi on a Raspberry Pi 3.
Given these results, it is probable that most dongles with Atheros or Ralink chipsets will work.
The following dongles are known not to work (as the driver is not friendly with access point mode or NetworkManager):
Dongles with similar chipsets will probably not work.
WiFi Connect is expected to work with all balena.io supported boards as long as they have the compatible dongles.
If you're having any problem, please raise an issue on GitHub or contact us, and the balena.io team will be happy to help.
WiFi Connect is free software, and may be redistributed under the terms specified in the license.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.