ShadowsocksX-NG icon indicating copy to clipboard operation
ShadowsocksX-NG copied to clipboard

ShadowsocksX-NG not work on Firefox with Global mode

Open seudut opened this issue 9 years ago • 14 comments

System and Shadowsocksx-NG version:

  • macOS 10.12.3 (16D30)
  • Shadowsocksx-NG Version 1.5.0 (5)

Expected behavior: Turn Shadowsocks on with Global mode should be able to access google.com, but it can indeed be accessed in Safari, but not in Firefox. Firefox is showing "Connecting to www.google.com..."

While, if with Proxy Auto Configure Mode, both Firefox an Safari can work well.

Actual behavior:

Not sure why Firefox works differently as Safari with Global mode

How often does this happen?

reproduced on my mac

ss-local.log Here is the ss-local.log after I have enabled verbose mode. Please note both Firefox and safari were working and. The Firefox was connection google.

 2017-04-16 21:55:32 INFO: initializing ciphers... aes-256-cfb
 2017-04-16 21:55:32 INFO: listening at 127.0.0.1:1086
 2017-04-16 22:39:00 INFO: initializing ciphers... aes-256-cfb
 2017-04-16 22:39:00 INFO: listening at 127.0.0.1:1086
 2017-04-16 22:58:02 ERROR: connect: Network is down
 2017-04-16 22:58:02 ERROR: connect: Network is down
 2017-04-16 23:03:38 INFO: initializing ciphers... aes-256-cfb
 2017-04-16 23:03:38 INFO: listening at 127.0.0.1:1086
 2017-04-16 23:04:01 ERROR: getpeername: Invalid argument
 2017-04-16 23:04:04 ERROR: getpeername: Invalid argument
 2017-04-16 23:04:30 ERROR: getpeername: Invalid argument
 2017-04-16 23:04:31 ERROR: getpeername: Invalid argument
 2017-04-16 23:04:37 ERROR: getpeername: Invalid argument
 2017-04-16 23:04:55 INFO: initializing ciphers... aes-256-cfb
 2017-04-16 23:04:55 INFO: listening at 127.0.0.1:1086
 2017-04-16 23:04:59 ERROR: getpeername: Invalid argument
 2017-04-17 00:03:55 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-17 00:10:18 INFO: initializing ciphers... aes-256-cfb
 2017-04-17 00:10:18 INFO: listening at 127.0.0.1:1086
 2017-04-17 23:30:07 INFO: initializing ciphers... aes-256-cfb
 2017-04-17 23:30:07 INFO: listening at 127.0.0.1:1086
 2017-04-17 23:37:28 INFO: initializing ciphers... aes-256-cfb
 2017-04-17 23:37:28 INFO: listening at 127.0.0.1:1086
 2017-04-17 23:58:05 INFO: initializing ciphers... aes-256-cfb
 2017-04-17 23:58:05 INFO: listening at 127.0.0.1:1086
 2017-04-17 23:58:32 INFO: initializing ciphers... aes-256-cfb
 2017-04-17 23:58:32 INFO: listening at 127.0.0.1:1086
 2017-04-18 00:38:21 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-18 22:13:03 INFO: initializing ciphers... aes-256-cfb
 2017-04-18 22:13:03 INFO: listening at 127.0.0.1:1086
 2017-04-18 22:18:29 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-18 22:18:29 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-19 00:34:11 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-21 02:22:47 ERROR: connect: Network is unreachable
 2017-04-21 18:59:03 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-21 19:01:31 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-21 19:10:47 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-21 20:32:26 INFO: initializing ciphers... aes-256-cfb
 2017-04-21 20:32:26 INFO: listening at 127.0.0.1:1086
 2017-04-21 20:41:13 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-22 19:17:05 INFO: initializing ciphers... aes-256-cfb
 2017-04-22 19:17:05 INFO: listening at 127.0.0.1:1086
 2017-04-24 00:38:26 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 00:38:26 INFO: listening at 127.0.0.1:1086
 2017-04-24 00:39:24 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 00:39:24 INFO: listening at 127.0.0.1:1086
 2017-04-24 00:45:20 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 00:45:20 INFO: listening at 127.0.0.1:1086
 2017-04-24 00:45:53 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 00:45:53 INFO: listening at 127.0.0.1:1086
 2017-04-24 00:47:07 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 00:47:07 INFO: listening at 127.0.0.1:1086
 2017-04-24 00:49:20 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 00:49:20 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:29:44 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:29:44 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:30:04 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:30:04 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:31:23 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:31:23 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:32:19 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:32:19 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:33:02 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:33:02 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:33:49 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:33:49 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:34:06 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:34:06 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:35:18 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:35:18 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:37:13 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:37:13 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:37:56 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:37:56 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:40:43 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:40:43 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:41:14 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:41:14 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:42:51 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:42:51 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:45:59 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:45:59 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:47:37 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:47:37 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:49:23 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:49:23 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:51:37 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:51:37 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:57:37 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:57:37 INFO: listening at 127.0.0.1:1086
 2017-04-24 22:58:55 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 22:58:55 INFO: listening at 127.0.0.1:1086
 2017-04-24 23:25:03 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 23:25:03 INFO: listening at 127.0.0.1:1086
 2017-04-24 23:29:16 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 23:29:16 INFO: listening at 127.0.0.1:1086
 2017-04-24 23:32:52 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 23:32:52 INFO: listening at 127.0.0.1:1086
 2017-04-24 23:34:19 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-24 23:35:39 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 23:35:39 INFO: listening at 127.0.0.1:1086
 2017-04-24 23:46:07 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-24 23:58:11 ERROR: getpeername: Invalid argument
 2017-04-24 23:58:26 INFO: initializing ciphers... aes-256-cfb
 2017-04-24 23:58:26 INFO: listening at 127.0.0.1:1086
 2017-04-25 00:00:54 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-25 00:01:18 ERROR: remote_recv_cb_recv: Connection reset by peer
 2017-04-25 00:11:54 INFO: initializing ciphers... aes-256-cfb
 2017-04-25 00:11:54 INFO: listening at 127.0.0.1:1086
 2017-04-25 00:11:57 INFO: connect to live.github.com:443
 2017-04-25 00:11:59 INFO: closed gracefully
 2017-04-25 00:12:08 INFO: initializing ciphers... aes-256-cfb
 2017-04-25 00:12:08 INFO: listening at 127.0.0.1:1086
 2017-04-25 00:12:11 INFO: connect to guzzoni.apple.com:443
 2017-04-25 00:12:13 INFO: connect to live.github.com:443
 2017-04-25 00:12:16 INFO: connect to live.github.com:443
 2017-04-25 00:12:32 INFO: connect to live.github.com:443
 2017-04-25 00:13:13 INFO: connect to live.github.com:443
 2017-04-25 00:13:14 INFO: TCP connection timeout
 2017-04-25 00:13:18 INFO: TCP connection timeout
 2017-04-25 00:13:20 INFO: connect to live.github.com:443
 2017-04-25 00:13:23 INFO: connect to live.github.com:443
 2017-04-25 00:13:33 INFO: TCP connection timeout
 2017-04-25 00:13:46 INFO: connect to live.github.com:443
 2017-04-25 00:14:16 INFO: TCP connection timeout
 2017-04-25 00:14:22 INFO: TCP connection timeout
 2017-04-25 00:14:23 INFO: connect to play.google.com:443
 2017-04-25 00:14:24 INFO: TCP connection timeout
 2017-04-25 00:14:24 INFO: connect to live.github.com:443
 2017-04-25 00:14:34 INFO: connect to live.github.com:443
 2017-04-25 00:14:47 INFO: TCP connection timeout
 2017-04-25 00:15:24 INFO: TCP connection timeout
 2017-04-25 00:15:25 INFO: TCP connection timeout
 2017-04-25 00:15:28 INFO: connect to live.github.com:443
 2017-04-25 00:15:35 INFO: connect to live.github.com:443
 2017-04-25 00:15:35 INFO: TCP connection timeout
 2017-04-25 00:15:49 INFO: connect to live.github.com:443
 2017-04-25 00:16:10 INFO: connect to e.crashlytics.com:443
 2017-04-25 00:16:25 INFO: connect to live.github.com:443
 2017-04-25 00:16:36 INFO: TCP connection timeout
 2017-04-25 00:16:38 INFO: connect to live.github.com:443
 2017-04-25 00:16:49 INFO: TCP connection timeout
 2017-04-25 00:16:53 INFO: connect to live.github.com:443
 2017-04-25 00:17:27 INFO: TCP connection timeout
 2017-04-25 00:17:40 INFO: TCP connection timeout
 2017-04-25 00:17:43 INFO: connect to live.github.com:443
 2017-04-25 00:17:48 INFO: connect to live.github.com:443
 2017-04-25 00:17:54 INFO: TCP connection timeout
 2017-04-25 00:18:44 INFO: TCP connection timeout
 2017-04-25 00:18:49 INFO: TCP connection timeout
 2017-04-25 00:19:00 INFO: connect to live.github.com:443
 2017-04-25 00:19:29 INFO: connect to live.github.com:443
 2017-04-25 00:20:01 INFO: TCP connection timeout
 2017-04-25 00:20:04 INFO: connect to live.github.com:443
 2017-04-25 00:20:05 INFO: connect to live.github.com:443

seudut avatar Apr 24 '17 16:04 seudut

Same problem, did you find any solution so far?

yeusiukou avatar May 05 '17 11:05 yeusiukou

Not yet. I only enable proxy auto configure mode when using Firefox. But when I need to try global mode, I will switch to Safari instead.

seudut avatar May 05 '17 12:05 seudut

Set in firefox preference > advance > network > connect > 自动检测此网络的代理设置

qiuyuzhou avatar May 06 '17 02:05 qiuyuzhou

Thanks very much @qiuyuzhou , after setting to "Auto-detect proxy setting for this network", now Firefox can work with global mode.

seudut avatar May 06 '17 03:05 seudut

Sorry, I was wrong. I just double confirmed, after setting to "Auto-detect proxy setting for this network", Firefox could not access google homepage either with global mode or proxy auto configure mode. So, in my case, this setting cannot solve this issue.

seudut avatar May 06 '17 05:05 seudut

@qiuyuzhou Confirm the same thing. The problem hasn't been resolved.

yeusiukou avatar May 09 '17 04:05 yeusiukou

I have a new find. When I use a old version firefox (50.0). @qinyuhang 's solution ("Auto-detect proxy setting for this network") can work.

seudut avatar Sep 16 '17 12:09 seudut

I have been configuring it manually from whatever port the OS assigns (1086 in my case). It seems 'global mode' is not very global, most programs are not tunneled (for example, the Terminal).

This is a known issue for macs and there are programs to force apps through a tunnel.

csalg avatar Sep 22 '17 07:09 csalg

I think this is a Firefox problem instead of a SSX-NG one. Try to solve the problem "How to configure Firefox to use the system proxy" instead.

timothyqiu avatar Sep 22 '17 14:09 timothyqiu

@timothyqiu do you know what problem it is and how Firefox can fix this issue?

xeonchen avatar Dec 05 '17 08:12 xeonchen

Works perfectly in PAC mode, but when switched to global mode, things just stopped working. Although it's not a deal breaker it's frustrating to have this kind of problem. Firefox on ver 57 proxy set to system settings. Will like to know if anyone has a resolution. Cheers.

Minami-Kotori avatar Dec 26 '17 06:12 Minami-Kotori

Well, this appears to be a bug in Firefox 57+. It cannot handle OSX system SOCKS proxy correctly while system HTTP/HTTPS proxy work fine. According to my experience, Visual Studio Installer has a similar issue. The current work-around is to use a Firefox proxy addon to help switch between proxies quickly such as Switchy or FoxProxy.

js-shi avatar Dec 28 '17 05:12 js-shi

Set in firefox preference > advance > network > connect > AUTO

worked for me OS X HIGH SIERRA firefox 61

IvanTurgenev avatar Aug 03 '18 14:08 IvanTurgenev

It is not working for me. I have to set the "Manual proxy configuration". Here is my computer details.

OS: MacOS. Browser: Firefox version is 121.0 (64-bit) Shadowsocks-NG: v1.10.2 (1) download from github

  1. Get the SS client config from "~/Library/Application Support/ShadowsocksX-NG/privoxy.config". In the file, you should find the socks5 settings. My setting is "forward-socks5 / 127.0.0.1:1086"
  2. From the top left, next to the Apple Icon, click Firefox -> Settings...
  3. Type "proxy" at the top right input field. (Find in Settings)
  4. Press the "settings" button from the search results. (Network Settings)
  5. Choose "Manual proxy configuration"
  6. Set the "SOCKS Host" to "127.0.0.1", and the Post "1086" (This is my settings, your should find your IP and port from step 0)
  7. Choose "SOCKS v5"
  8. Tick "Proxy DNS when using SOCKS v5
  9. Press the "OK" button.

leocxy avatar Dec 28 '23 08:12 leocxy