/ troubleshooting

SSR Global Mode Not Working with Chrome

The Story

I was configuring nintendo switch to use the SSR Proxy I bought recently. Such a simple task caused me 2 hours.. Life is hard.

The Problem

When using ShadowsocksX-NG-R8, you might encounter this problem:

  • Under Global / WhiteList Mode, your Chrome can't visit any site,
    • But Safari works perfectly fine;
    • Chrome seems can only work uner PAC mode;
  • And Chrome is in the latest version.
    • And you're sure there's no other Chrome extensions about proxy is enabled;

The Solution


  1. Uncheck "Follow Global Mode" in HTTP Proxy Preference
  2. Switch to anyother mode then switch back to global mode



  • Modify SSR's HTTP Proxy Listen Address to '' or 'localhost'


  • Modify the System Web Proxy Server to match your outbound IP
    • But it will be overwritten back to default when switching mode


The Reason

HTTP Proxy Listening on IP Can't Accept Localhost Requests

assume your local IP is

According to System settings, Chrome believes HTTP Proxy is listening on, so it tries to relay all the requests to

But your HTTP Proxy is actually listening on, it's a different interface than localhost/, so it can't accept request made to localhost/

That's why Chrome can't use the SS server and was completely blocked under Global mode.

Chrome and Safari

Probably because Chrome and Safari use different priority orders while looking for available system proxies

Safari looks for Socks Proxy first while Chrome looks for HTTP Proxy settings, once Chrome found HTTP Proxy settings is available it won't try socks proxy.

Root Cause

The problem might be in ShadowsocksX-NG, I guess it uses the default http listen address '' rather than the user-filled value when switch to global mod (and when enabled 'FollowGlobal')

I've also open an issue to help people out there.

Code Proof

ShadowsocksX-NG/ShadowsocksX-NG/ProxyConfHelper.m, L155-L176

(void)enableGlobalProxy {
    NSString* socks5ListenAddress = [[NSUserDefaults standardUserDefaults]stringForKey:@"LocalSocks5.ListenAddress"];
    NSUInteger port = [[NSUserDefaults standardUserDefaults]integerForKey:@"LocalSocks5.ListenPort"];
    NSMutableArray* args = [@[@"--mode", @"global", @"--port"
                              , [NSString stringWithFormat:@"%lu", (unsigned long)port],@"--socks-listen-address",socks5ListenAddress]mutableCopy];
    // Known issue #106 https://github.com/shadowsocks/ShadowsocksX-NG/issues/106
    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"LocalHTTPOn"] && [[NSUserDefaults standardUserDefaults] boolForKey:@"LocalHTTP.FollowGlobal"]) {
        NSUInteger privoxyPort = [[NSUserDefaults standardUserDefaults]integerForKey:@"LocalHTTP.ListenPort"];
        NSString* privoxyListenAddress = [[NSUserDefaults standardUserDefaults]stringForKey:@"LocalHTTP.ListenAddress"];
        [args addObject:@"--privoxy-port"];
        [args addObject:[NSString stringWithFormat:@"%lu", (unsigned long)privoxyPort]];
        [args addObject:@"--privoxy-listen-address"];
        [args addObject:privoxyListenAddress];
    [self addArguments4ManualSpecifyNetworkServices:args];
    [self addArguments4ManualSpecifyProxyExceptions:args];
    [self callHelper:args];
    [self stopPACServer];
SSR Global Mode Not Working with Chrome
Share this