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.1.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.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mac_internet_sharing-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e7b10a10ab7dfacdefca44b413f554da93ae5408ecb6d0116e8acbd44a21e110
MD5 45b6fe1f890aab14fa60bf9848e35ec9
BLAKE2b-256 70538d9b669e26bfe517b318a061e6189b3e1914966c4e7834cbb200b7c44b59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mac_internet_sharing-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bf0636d0b9683bbab895bc9291535758aed641c10a8c80a93b05c00b3a2b2e3
MD5 b73cc3ee713332820fa86cc2f025f141
BLAKE2b-256 f564ddef6768d1661ef431d375217c21e0323634aab38a6c957b740e34e59922

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