Skip to main content

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.

Metadata

Release files for mac-internet-sharing 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mac-internet-sharing 0.2.0
File Size Uploaded Provenance Actions
mac_internet_sharing-0.2.0.tar.gz 15.1 kB Without provenance Details for mac_internet_sharing-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mac-internet-sharing 0.2.0
File Interpreter ABI Platform Actions
mac_internet_sharing-0.2.0-py3-none-any.whl Python 3 none any Details for mac_internet_sharing-0.2.0-py3-none-any.whl

Total release size: 30.0 kB

Release files / mac_internet_sharing-0.2.0.tar.gz

Download URL mac_internet_sharing-0.2.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
08592e388e020b3b4001c8a5d386ba49f68079b6979d789d36c7c231f5ea7fa3
BLAKE2b-256 checksum
How to use checksums
c4dddce1c76444c9d117cb2b436ae87359d59a1966d4aad1952bc111425dad81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / mac_internet_sharing-0.2.0-py3-none-any.whl

Download URL mac_internet_sharing-0.2.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8757e84d6f80aaf6fe7cec5d107d86038e3d89d097126a612a0581ea7c8017c5
BLAKE2b-256 checksum
How to use checksums
7468d6e4ccbe90b91b0c7be275d5e96f403aee6a7fcd7d0e8218a0a50e343781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for mac-internet-sharing 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page