> For the complete documentation index, see [llms.txt](https://docs.ipdunar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipdunar.com/integrations/operating-systems/macos.md).

# macOS

System-wide proxy for any app honoring macOS network settings — Safari, Mail, App Store, most third-party apps.

## System Settings UI

1. **System Settings → Network → {active interface, e.g. Wi-Fi} → Details… → Proxies**.
2. Tick **Web Proxy (HTTP)** and **Secure Web Proxy (HTTPS)**.
3. For each:
   * Server: `gate.ipdunar.com` (or ISP IP), Port: `7777`
   * Tick **Proxy server requires password**, fill in username and password
4. **OK → Apply**.

\[screenshot: macOS Proxies pane]

See [Safari](https://docs.ipdunar.com/integrations/browsers/safari.md) for the same flow with screenshots.

## CLI tools

curl, wget, brew, npm, and most Unix tools read environment variables. Add to `~/.zshrc` or `~/.bash_profile`:

```bash
export HTTP_PROXY="http://ipdunar_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.ipdunar.com:7777"
export HTTPS_PROXY="$HTTP_PROXY"
export NO_PROXY="localhost,127.0.0.1,*.local"
```

Reload shell, then `curl https://ipv4.icanhazip.com` should report a ipdunar IP.

To set only for the current shell, omit the `export` from rc files and run them directly.

## `networksetup` (scripted)

```bash
# Turn on
sudo networksetup -setwebproxy "Wi-Fi" gate.ipdunar.com 7777 on \
     "ipdunar_s1a2b3c4d5e-type-res-region-us" "PASSWORD"
sudo networksetup -setsecurewebproxy "Wi-Fi" gate.ipdunar.com 7777 on \
     "ipdunar_s1a2b3c4d5e-type-res-region-us" "PASSWORD"

# Turn off
sudo networksetup -setwebproxystate "Wi-Fi" off
sudo networksetup -setsecurewebproxystate "Wi-Fi" off
```

Replace `Wi-Fi` with your active interface name (find it via `networksetup -listallnetworkservices`).

## Per-app vs system

GUI apps honor the System Settings proxy. CLI apps honor envvars. They're two systems — make sure both are configured for unified behavior.

## Verify

```bash
curl https://ipv4.icanhazip.com
```

## Common pitfalls

* **`.local` bypass** — macOS bypasses `.local` and link-local IPs by default. Useful for Bonjour but watch your bypass list.
* **`networksetup` requires sudo** to modify proxies on a shared system.
* **Big Sur+ requires you to "Apply" in System Settings** after editing — without it the change doesn't take effect.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ipdunar.com/integrations/operating-systems/macos.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
