Shadowsocksx-ng: How Can I edit the PAC url?

Created on 3 Aug 2017  ·  10Comments  ·  Source: shadowsocks/ShadowsocksX-NG

System and Shadowsocksx-NG version:

  • macOS 10.??.?? (16E????)
  • Shadowsocksx-NG 1.5.1(1)

Expected behavior:

I want a specific URL pass through the VPN server. Such as music.163.com.

Actual behavior:

I don't know how to edit the PAC file or something else. Please Help me and thank you so much.

Most helpful comment

The file located in ~/.ShadowsocksX-NG/gfwlist.js shows:

screenshot

and we can tell that if you want to use the full URL you need | instead of ||.

All 10 comments

You want to add a specific URL to the PAC, not to modify the PAC URL.

Go to Menu > Edit User Rules For PAC, and append your url to the text field. For example:

||music.163.com

This will make all requests to music.163.com to go through the proxy.

Refer to the content in the dialog for the full syntax reference.

But I have another problem, I add the url to User Rules, but I cannot surf Facebook now. I choose Proxy Auto configure Mode. I want to bypass the location block with the SS server in China. Thank you so much.

"||music.163.com",
Do not forget quotes and commas.

The PAC, gfwlist along with user specified list are all located in ~/.ShadowsocksX-NG. You could modify the configuration files manually.

You can also use this "reversed" list: https://github.com/gfwlist/tsilwfg/blob/master/tsilwfg.txt

When I accessed the config file manually, it just showed a bunch of jumbled numbers.

I'm also trying to add a few sites to the list (Like udacity and sensortower)

“||http://udacity.com”,
“||http://sensortower.com”,

Is this the correct format?

The file located in ~/.ShadowsocksX-NG/gfwlist.js shows:

screenshot

and we can tell that if you want to use the full URL you need | instead of ||.

I have fixed.
image

while you edit pac through GUI, DO NOT add quotes and comma, write rules line by line
for example in GUI you write:

||gtihub.com
||google.com

software will auto convert it, in the file ~/.ShadowsocksX-NG/gfwlist.js you will see

"||gtihub.com",
"||google.com",

at the top of rule

You want to add a specific URL to the PAC, not to modify the PAC URL.

Go to Menu > Edit User Rules For PAC, and append your url to the text field. For example:

||music.163.com

This will make all requests to music.163.com to go through the proxy.

Refer to the content in the dialog for the full syntax reference.

What if I do not want the requests to a URL in PAC to go through the proxy?
Do I need to delete a URL from PAC?

You want to add a specific URL to the PAC, not to modify the PAC URL.
Go to Menu > Edit User Rules For PAC, and append your url to the text field. For example:

||music.163.com

This will make all requests to music.163.com to go through the proxy.
Refer to the content in the dialog for the full syntax reference.

What if I do not want the requests to a URL in PAC to go through the proxy?
Do I need to delete a URL from PAC?

Prepend @@ before the address.

Was this page helpful?
0 / 5 - 0 ratings