How to Set Up the macOS System Proxy: Global, Bypass Mainland China, and No-Change Modes

Learn how v2rayN’s three system proxy options and routing presets affect your traffic, and which settings work best for everyday tasks and development on a Mac.

At a glance

The system proxy determines whether an app sends requests to v2rayN; the routing mode determines whether requests that reach it go direct or through a proxy node. For everyday browsing, start with “Set system proxy automatically” and a Bypass mainland China routing preset. You can configure a local proxy separately for development tools. This guide explains the three system proxy options, where to check them in macOS, how to test them in Terminal, and how to restore your settings when you’re done.

System Proxy vs. Global Routing: Two Separate Settings

v2rayN is a desktop client for managing subscriptions, nodes, and core settings. Importing a subscription and selecting a node prepares a proxy egress route, but it doesn’t mean every app will use it. A browser must first send requests to a local listening port before the core can apply routing rules.

The macOS system proxy is an entry-point setting: it adds a proxy server and port to a network service’s proxy configuration. Apps that follow system settings use these values to connect to the local proxy; apps with their own network stack or proxy settings, or ones configured to connect directly, may not. “Global” is a separate setting: it usually means requests that have reached the proxy core are routed through the selected node. It does not automatically take over the entire Mac.

SettingWhat it controlsWhat it does not guarantee
System proxyWhere apps that follow system settings send requestsIt does not guarantee that every process or UDP traffic is captured
Global routingRegular requests that reach the core use the proxy egress routeIt does not automatically reroute apps that are not connected to the proxy
Bypass mainland China routingWhether traffic goes direct or through a proxy, based on domain, IP, and other rulesIt does not guarantee that every service in mainland China will be identified correctly
TUN modeCaptures more IP traffic through a virtual network interfaceIt does not replace DNS, route exclusions, or permission settings

v2rayN’s Three System Proxy Options: Set, Clear, and Leave Unchanged

Check the system proxy option in the status bar at the bottom of v2rayN’s main window or in its tray menu. The location and wording can vary slightly between desktop builds. Common options are “Set system proxy automatically,” “Clear system proxy,” and “Do not change system proxy.” These options change system settings, not subscription data.

Set system proxy automatically

Recommended

The client adds the local proxy address to system settings. The core must be running, with a valid listening address and port. Choose an appropriate routing preset as well to determine which requests go direct and which use the proxy.

Best for: everyday browsing and desktop apps that follow system proxy settings

Clear system proxy

Removes system proxy settings managed by the client. This does not stop the local core or guarantee that tools with manually configured proxy addresses stop using the proxy. Any active TUN setup must be handled separately.

Best for: restoring a direct connection and troubleshooting connection issues after closing the client

Do not change system proxy

Leaves the system proxy as it is; it does not enable or clear it. If a local proxy address was already set, choosing this option won’t remove it. This is not the same as direct mode.

Best for: managed network configurations or configuring a proxy only for development tools

How to disable the system proxy: choose Clear, not Do not change

If you switch from Set system proxy automatically to Do not change while the system still points to a local port, apps may continue to use the proxy. To restore a direct connection, clear the proxy first, then check its actual status in macOS network settings.

A company network may already use an automatic proxy configuration script or a fixed proxy. Before making changes, note the original address, port, and enabled status. Clearing the client’s proxy settings won’t restore the configuration required by your company. On managed devices, follow your organization’s network requirements and avoid overwriting settings without checking first.

Global vs. Bypass Mainland China: Check the Rules, Not the Option Name

The Bypass mainland China preset typically routes local network traffic, some domains in mainland China, and IP addresses in mainland China through a direct connection. Other requests use the proxy. The exact behavior depends on the preset’s rules, their order, and the databases in use. Xray routing rules are generally checked in order, so a specific rule near the top can take precedence over a broader rule below it.

geosite:cn represents a collection of domains, while geoip:cn represents a collection of IP addresses. geoip:private is commonly used for private address ranges. These aren’t universal strings you can enter in any interface: graphical routing editors and native core JSON use different field formats, so follow the requirements of your current editor.

Settings for Two Common Workflows

Everyday Work and Web Browsing
  • Set the system proxy automatically.
  • Choose Bypass mainland China routing and check that local network traffic goes direct.
  • Test a work site and a site that requires a proxy separately.
  • If an internal site has issues, check the domain rules and company DNS first.
Development and Individual Commands
  • Clear any existing system proxy, then choose Do not change.
  • Specify the local proxy in the command arguments or tool settings.
  • Compare direct and proxied results for the same URL.
  • Don’t post terminal output containing subscription credentials in public channels.

First decide which apps need a proxy, then choose where their requests should go. This makes troubleshooting easier than changing the system proxy, routing, and TUN settings all at once.

Set It Up on Your Mac: Check the Listening Port and System Settings

Download the v2rayN package for your chip from the download page, then import your subscription and update the groups using the setup guide. The ports below are examples for showing what to check, not defaults for every version. Use the listening configuration shown in your current client.

127.0.0.1
Example loopback address
10808
Local HTTP proxy port used in the examples below
443
Common HTTPS destination port, not a local listening port
  1. Check the node and core. Select a working node and check the logs for configuration errors or port conflicts. The node’s remote port and the local inbound port are different; don’t enter the node’s port 443 as the system proxy port.
  2. Check the local listener. In “Settings” → “Parameter settings,” check the local listening port and protocol. The section names may vary by build. The examples below assume 127.0.0.1:10808 accepts HTTP proxy requests. Adjust them if your port is different or supports SOCKS only.
  3. Enable the system proxy. Choose Set system proxy automatically, then select Bypass mainland China routing. For your first test, leave TUN off to reduce variables.
  4. Check macOS. Open “System Settings” → “Network” → your active network service → “Details” → “Proxies.” Check whether Web Proxy, Secure Web Proxy, or SOCKS Proxy is enabled, along with its server and port. Don’t rely on the client icon alone.
  5. Test each route. Open a work site in mainland China, a site that requires a proxy, and a local network address. Check the core logs to see which outbound route each request uses. Recheck after switching between Wi-Fi and Ethernet, since proxy settings are tied to network services.

Test from Terminal: Check System Settings, Proxy Connectivity, and the Destination Separately

Terminal apps don’t always read the macOS system proxy settings automatically. If a browser can open a site but curl can’t, that doesn’t necessarily mean the node is at fault. The commands below check system status, connect directly without a proxy, and connect through an explicitly specified proxy. They don’t change your network settings.

# Show the current system proxy configuration
scutil --proxy

# Ignore proxy environment variables and send a direct request to the same address
curl --noproxy '*' --connect-timeout 10 -I https://example.com

# Assume 10808 is a local proxy port that supports HTTP
curl --noproxy "" --proxy http://127.0.0.1:10808 --connect-timeout 10 -I https://example.com

# If this listening port supports SOCKS, test the SOCKS route separately
curl --noproxy "" --proxy socks5h://127.0.0.1:10808 --connect-timeout 10 -I https://example.com

example.com is a sample domain for demonstrating the syntax. When troubleshooting, replace it in both commands with the same address you want to check. Here, 10 is the connection timeout in seconds, not a speed test result. An HTTP error status may still mean the connection was established; check whether the response came from the destination service or the proxy.

socks5h sends the destination domain to the SOCKS proxy to resolve. That differs from resolving the domain locally in Terminal. This can help narrow down DNS issues, but one successful test doesn’t prove that every app resolves domains the same way.

FAQ: Stale Settings, Development Tools, and TUN

Why can’t I open any websites after closing v2rayN?

First check whether the system proxy still points to a local port that is no longer running. If you can reopen the client, clear the system proxy before closing it. If you can’t, go to “System Settings” → “Network” → your current service → “Details” → “Proxies” and check for entries left by the client. Restore any company proxy settings using the details you recorded earlier.

Why am I still using a proxy node after choosing Do not change system proxy?

This option only leaves the current settings as they are. Clear the system proxy first, then check the app’s own proxy address, terminal proxy environment variables, and TUN status. Existing connections may also keep using their original route; if needed, restart the app you’re testing and check again.

What if my browser works but my development tools don’t use the proxy?

Enter the local proxy address in the tool’s network settings, or test it first with the explicit curl options above. Don’t assume every command-line tool reads system settings or supports the same proxy environment variables.

Does enabling TUN mean I can ignore the system proxy?

TUN can capture more traffic from apps that don’t follow system proxy settings, but it still depends on interface routes, permissions, DNS, and exclusion rules. For initial troubleshooting, use just one connection method. Enable TUN only if you need to capture additional apps, then check that local network access and routes to proxy servers still work.

How do I troubleshoot a slow service in mainland China after enabling Bypass mainland China?

Record the full domain and the time the issue occurred. Check the logs to see whether it used a direct or proxy route, then compare it temporarily with Global. If the service is on your company network, check company DNS and explicit direct routes for internal addresses first. Verify where the service is hosted using DNS results and the actual connection IP.

Once things are working reliably, keep a repeatable troubleshooting order: check that the local listener works, system settings are correct, the app is connected, and the routing egress matches expectations. Subscription updates address changes to node details; the system proxy controls how apps connect; routing determines where requests go. Each has a separate role, so checking them layer by layer is more effective than repeatedly reinstalling the client.

Download v2rayNChoose a client for your platform