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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mac_internet_sharing-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 4378870907c0a27cc38e7726ec18207fa70ceb655c63153b8aabfc1cf68ec0f9
MD5 7f01c4eb8b0d6bd66c4b71fe2c1d16a2
BLAKE2b-256 0253e04aaa3d8702b5dae1f871408b51140f11f8520c44aacbb8e7762269c1d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mac_internet_sharing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86837ba4355bcb0ac38e932e1f08dc114f454843608fb4642e0600d62467c864
MD5 bd0af62a7e1bd644f7422440349b9d42
BLAKE2b-256 f87b9e83ebf38330b7b9e783cca1e0436a3dc56b1c4b87759ccd1fe50d654ba9

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