Skip to main content

Mac Internet Sharing Helper

Project description

Mac Internet Sharing

A Python CLI tool to manage internet sharing on macOS.

Installation

pipx install mac-internet-sharing

Usage

The tool provides several commands to manage internet sharing. Here are some common use cases:

Starting Internet Sharing

There are two methods to start internet sharing:

1. Manual Configuration (configure)

This method requires you to manually specify the primary network interface and one or more device UDIDs. It sets up internet sharing based on your initial configuration. Note that newly connected USB devices after the initial setup are not added automatically—you will need to re-run the command to update the configuration.

sudo misha configure -n <primary_interface> -u <udid> -u <udid> -s
  • <primary_interface>: Replace with your network interface name (e.g., "Ethernet Adapter (en6)").
  • -u <udid>: Optionally specify one or more device UDIDs.
  • -s: Automatically start sharing after configuration.

2. Automatic USB Detection (plug-n-share)

This method continuously monitors for new USB devices and automatically updates the sharing configuration when a new device is detected. It is ideal if you frequently plug in different devices and want your sharing setup to update in real time. You can also run it as a daemon.

sudo misha plug-n-share -n <primary_interface> -t <timeout>
  • <primary_interface> (optional): Specify the network service name. If not provided, the default network service is used.
  • -t <timeout>: Set the polling interval in seconds (default is 5 seconds).

Note: The manual configuration (configure) does not automatically detect newly connected devices after the initial setup. Use plug-n-share if you require automatic updates.

Toggling Internet Sharing

Manage the sharing state with the following commands:

  • Turn Sharing Off:

    sudo misha off
    
  • Turn Sharing On:

    sudo misha on
    

Contributing

Contributions, bug reports, and feature requests are welcome! Feel free to open issues or submit pull requests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mac_internet_sharing-0.1.3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mac_internet_sharing-0.1.3-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file mac_internet_sharing-0.1.3.tar.gz.

File metadata

  • Download URL: mac_internet_sharing-0.1.3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for mac_internet_sharing-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a143dddccd0cbda44adff4b9336f2ecbf57d1ae41b378a1cdf0a15fdfbb497d9
MD5 22fa8cddb563946ac2ce2ea21cd5f932
BLAKE2b-256 319ed4932a07f52aa3e23b7009bf025930da12136f4b86b67ad5720d2e8144bd

See more details on using hashes here.

File details

Details for the file mac_internet_sharing-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mac_internet_sharing-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d0d811ca85a84e9548bb62aeea275582735546d61030645991d1c38ce834cf
MD5 cabf0751d4fa43bb0fad635ed702895d
BLAKE2b-256 01d174a59f0e5194becd64231e924a1f939fefae2ce3875f2b35e8b8d57a997e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page