sh 使用https://github.com/clowwindy/gfwlist2pac生成自定义PAC的辅助脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 使用https://github.com/clowwindy/gfwlist2pac生成自定义PAC的辅助脚本相关的知识,希望对你有一定的参考价值。

Installation
- Place this script `autopac.sh` to: `$HOME/Dropbox/Apps/dev/pac`
- Place `user_rule.txt` to the same location
- Then use `crontab -e` to add a scheduling work like this:
  ```
  10 14 * * * nohup $HOME/Dropbox/Apps/dev/pac/autopac.sh
  ```

  which will schedule this script to run every day at 2:10pm
- You must install @clowwindy's gfwlist2pac first, using this command
  ```
  pip install gfwlist2pac
  ```

  or
  ```
  sudo easy_install gfwlist2pac
  ```

You now could configure your GoAgentX to use this custom PAC instead.
Now we could stop complaining that @ohdarling88 drops the gfwlist supports in his GoAgentX version2

Enjoy it.

Thanks to @ohdarling88, @clowwindy

More works need to do
- add user rule supports for multiple proxies
  (such as u2b should go through GAE instead of shadowsocks)
! clowwindy's buildin rules !
google.com
google.co.jp
google.co.hk
github.com
wikipedia.org

! rules for me !
t.co
fb.me
bit.ly
sourceforge.net
nytimes.com
jetbrains.com
intellij.net
wikipedia.org
wikimedia.org
tumblr.com
fqrouter.com
feedly.com
dropbox.com
mshcdn.com
bootply.com
feedsportal.com
twimg.com
#!/bin/bash

GFWLIST=https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
PROXY=127.0.0.1:7070

cd `dirname "${BASH_SOURCE[0]}"`
echo "Downloading gfwlist from $GFWLIST"
curl "$GFWLIST" --socks5-hostname "$PROXY" > /tmp/gfwlist.txt
/usr/local/bin/gfwlist2pac \
    --input /tmp/gfwlist.txt \
    --file proxy.pac \
    --proxy "SOCKS5 $PROXY; SOCKS $PROXY; DIRECT" \
    --user-rule user_rule.txt

rm -f /tmp/gfwlist.txt

以上是关于sh 使用https://github.com/clowwindy/gfwlist2pac生成自定义PAC的辅助脚本的主要内容,如果未能解决你的问题,请参考以下文章

微信支付宝xposed个人收款免签支付源码

如何在 Xamarin.Forms 中为轮播实现活动指示器?

如何将图像从 android 上传到 Cloudinary?

面试官:谈谈 Tomcat 架构及启动过程,我一脸懵逼。。

面试官:谈谈 Tomcat 架构及启动过程,我一脸懵逼。。

面试官:谈谈 Tomcat 架构及启动过程,我一脸懵逼。。