Workflows Proxy

1. 准备工具:

  • Android Application: fqrouter
  • Mac Application: Alfred

2. 工具配置

2.1 为Alfred 安装上proxy插件

2.2 进入插件目录,双击Authenticate.app输入Mac的用户名密码(由于代理修改需要权限)

3. 使用

  1. fqrouter开启以后,会提示在同一局域网下,配置自动web代理为:http://xxx.xxx.xxx.xxx:2515即可实现翻墙
  2. 此时Mac端用Alfred输入对应的即可:

switch Tencent proxy and Home Proxy

1. Switch to the Tencent Proxy:

image

2. Switch to the DIY Home Proxy:

image

3. Close Automatic Proxy:

image

4. Show Automatic Proxy Status:

image

4. DIY

这个Alfred workflow我是根据我的个人需求定制的,如果需要调整的,可以在对应根目录下的proxy.py进行修改:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
__author__ = 'jacksgong'

import sys
import os
from workflow import Workflow, ICON_WEB, web

def main(wf):

params = wf.args[0]

# please replace the following value to your own proxy.pac url
echo_qq = 'http://xxx.xxx/proxy.pac'
echo_off = 'off'
echo_pre = 'networksetup -setautoproxyurl Wi-Fi '
echo_diy_pre = 'http://192.168.'
echo_diy_end = ':2516'

if params.startswith('q') :
wf.add_item(echo_qq,'switch to Tencent proxy',arg =echo_qq,uid=0,valid=True, icon = './qq-proxy.png')
elif params.startswith('o') :
wf.add_item(echo_off,'off wifi proxy',arg = echo_off, uid = 0, valid= True, icon = './off.png')
elif params.startswith('s') :
status = os.popen('networksetup -getautoproxyurl wi-fi').read()
statusList = status.splitlines()
ip = statusList[0]
enable = statusList[1]

wf.add_item(ip,enable, arg =('current status: '+ status),uid = 0)
else:
diy = echo_diy_pre + params + echo_diy_end
wf.add_item(diy,'switch to ' + diy + ' proxy', arg =diy, uid = 0, valid = True, icon = './others-proxy.png')


wf.send_feedback()

if __name__ == '__main__':
wf = Workflow()
sys.exit(wf.run(main))

5. 开源

GITHUB: https://github.com/Jacksgong/workflows-proxy



Workflows Proxy
https://blog.dreamtobe.cn/2014/12/08/Workflows-Proxy/
作者
Jacksgong
发布于
2014年12月8日
许可协议