让我们继续上次的话题。本来早应该发出来的,但A.shun在折腾的过程中有了一些新想法加了进去。
这次为看不懂的或者懒得折腾的同学,提供现成的菜单和按钮,本文实际上是前面两篇文章介绍的技巧合集。
以此作为《轻松用代理:Opera代理设置》的终章。
简单来说,就是添加代理菜单,来方便我们使用Opera代理服务器设置:快速切换代理状态&端口、快速启动和关闭代理工具、在多个PAC文件之间快速切换、添加例外等等。
另外,提供3个按钮来呼出菜单,并能够显示各种状态。
用起来和autoproxy和Proxy Switchy各有千秋,但是不消耗资源。这就是DIY的魅力。
本文纯粹是总结心得,不提供任何相关工具和网址,评论的同学们也请注意别出现关键词。
就不说太多了,看图片,可以点击放大。
添加代理菜单
在你的
菜单配置文件最后添加下面几段代码:
菜单1:
[Quick Proxy Menu]
Item, "开启 » AutoProxy"=Show preferences, ,, , Resume transfer & Show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Check item & Ok & Delay, 10 & Cancel
Item, "禁用 » AutoProxy"=show preferences ,,,,Stop transfer& show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Uncheck item & Ok & Delay, 10 & Cancel
Submenu, "切换 » AutoProxy", Pac Menu="Show popup menu,,,, "Restart transfer""
Item, "--Fuck » G.F.W--"=Show popup menu
Item, "[召唤 » Fgate ]"=Execute program,"fg的路径或快捷方式",,,"fg"
Item, "[召唤 » FreeU ]"=Execute program,"fu的路径或快捷方式",,,"fu"
Item, "[召唤 » wujie ]"=Execute program,"wj的路径或快捷方式",,,"u"
Item, "[召唤 » GApp ]"=Execute program,"gapp的路径或快捷方式",,,"gap"
Item, "[召唤 » GTunnel]"=Execute program,"gt的路径或快捷方式",,,"gt"
Item, "[召唤 » Puff ]"=Execute program,"puff的路径或快捷方式",,,"puff"
Item, "[召唤 » SSH-D ]"=Execute program,"myentunnel的路径或快捷方式" ,,,"p" & Execute program,"Privoxy/Polipo的快捷方式或启动脚本"
Item, "[召唤 » Tor ]"=Execute program,"tor的路径或快捷方式",,,"tor"
BreakItem
Item, "Setting » Proxy"="External action,,,,Menu Tools | show preferences & show proxy servers"
Item, "Close » All Proxy"=execute program,"cmd.exe","/c taskkill /im 前缀名* /f /t",,"Stop" & Disable proxy servers
Item, "Add To Exceptions"=External action,,,,Add widget | Go to page, "javascript:prompt('', location.hostname)" & Delay, 10 & Copy & Cancel & Disable proxy servers & Show preferences & Show proxy servers & Delay, 10 & Check item & Focus next widget & Focus next widget & Focus next widget & Check item & Focus next widget & Focus next widget & Focus next widget & Focus next widget & Focus next widget & Focus next widget & Focus next widget & Focus next widget & Check item & Focus next widget & Go to end & Insert, "," & Paste & Ok & Delay, 10 & Cancel
Item, "Open In Web Proxy"="Go to page, "http://tor-proxy.net/proxy/express/browse.php?u=%u",,,"Forward mail""
Item, "--Switch » Port--"=Show popup menu
Item, "[ Fg/fu ] » 8580"="External action,,,,Panel Collapse Right | disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8580" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8580" & ok & delay,10 & cancel"
Item, "[ Wujie ] » 9666"="External action,,,,Panel Collapse Right | disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"9666" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"9666" & ok & delay,10 & cancel"
Item, "[ GApp ] » 8000"="External action,,,,Panel Collapse Right | disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8000" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8000" & ok & delay,10 & cancel"
Item, "[GTunnel] » 8081"="External action,,,,Panel Collapse Right | disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8081" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8081" & ok & delay,10 & cancel"
Item, "[ Puff ] » 1984"="External action,,,,Panel Collapse Right | disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"1984" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"1984" & ok & delay,10 & cancel"
Item, "[Tor/SSH] » 8118"="External action,,,,Panel Collapse Right | disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8118" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8118" & ok & delay,10 & cancel"
Item, "Clipboard IP Port"="External action,,,,Mail Attachment | go to page, "opera:config#proxy|httpserver" & delay, 1000 & select all & paste & focus next widget & focus next widget & paste & focus address field & insert, "opera:config#proxy" & go & focus previous widget & focus previous widget & click button & delay, 10 & ok & delay,1 &close page"菜单2:
[Pac Menu] Item, "[9666 » Wujie ]"=disable proxy servers,,,,"u" & Show preferences& Show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Check item & Focus next widget & Insert,"http://autoproxy2pac.appspot.com/pac/wu-jie" & focus next widget & Ok & Delay, 10 & Cancel Item, "[8580 » Fg/Fu ]"=disable proxy servers ,,,,"fg" & Show preferences& Show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Check item & Focus next widget & Insert,"http://autoproxy2pac.appspot.com/pac/free-gate" & focus next widget & Ok & Delay, 10 & Cancel Item, "[8000 » Gapp ]"=disable proxy servers ,,,,"gap" & Show preferences& Show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Check item & Focus next widget & Insert,"http://autoproxy2pac.appspot.com/pac/gappproxy" & focus next widget & Ok & Delay, 10 & Cancel Item, "[1984 » Puff ]"=disable proxy servers ,,,,"puff" &Show preferences& Show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Check item & Focus next widget & Insert,"http://autoproxy2pac.appspot.com/pac/puff" & focus next widget & Ok & Delay, 10 & Cancel Item, "[8081 » GTunnel]"=disable proxy servers ,,,,"gt" & Show preferences & Show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Check item & Focus next widget & Insert,"http://autoproxy2pac.appspot.com/pac/proxy/127.0.0.1/8081" & focus next widget & Ok & Delay, 10 & Cancel Item, "[8118 » SSH/Tor]"=disable proxy servers ,,,,"p" & Show preferences& Show proxy servers & Focus previous widget & Focus previous widget & Focus previous widget & Focus previous widget & Check item & Focus next widget & Insert,"http://autoproxy2pac.appspot.com/pac/privoxy" & focus next widget & Ok & Delay, 10 & Cancel
菜单3:
[Quick Proxy Patch] Item, "[wujie » 9666]"="External action,,,,"u" | Execute program,"wj的路径或快捷方式" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"9666" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"9666" & ok & delay,10 & cancel" Item, "[Fgate » 8580]"="External action,,,,"fg" | Execute program,"fg的路径或快捷方式" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8580" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8580" & ok & delay,10 & cancel" Item, "[FreeU » 8580]"="External action,,,,"fu" | Execute program,"fu的路径或快捷方式" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8580" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8580" & ok & delay,10 & cancel" Item, "[GApp » 8000]"="External action,,,,"gap" | Execute program,"Gapp的路径或快捷方式" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8000" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8000" & ok & delay,10 & cancel" Item, "[GTunnel» 8081]"="External action,,,,"gt" | Execute program,"Gtunnel的路径或快捷方式" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8081" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8081" & ok & delay,10 & cancel" Item, "[Puff » 1984]"="External action,,,,"puff" | Execute program,"puff的路径或快捷方式" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"1984" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"1984" & ok & delay,10 & cancel" Item, "[SSH-D » 8118]"="External action,,,,"p" | Execute program,"myentunnel的路径或快捷方式" & Execute program,"Privoxy/Polipo的快捷方式或启动脚本" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8118" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8118" & ok & delay,10 & cancel" Item, "[Tor » 8118]"="External action,,,,"tor" | Execute program,"Tor的路径或快捷方式" & Execute program,"Privoxy/Polipo的快捷方式或启动脚本"" & delay,20 & disable proxy servers & show preferences & show proxy servers & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8118" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"8118" & ok & delay,10 & cancel"
代理菜单说明
- 根据你计算机的实际情况,修改代码中所有的“xxx的路径或快捷方式”。
- 为了符合更多人的习惯,条目比较多,当然这样看起来更加壮观了,嘿。不需要的条目可以注释掉(在前面加分号)或者删掉该行。
- 菜单1部分参考了jude同学的《一个Opera的高级代理菜单》,包括从剪贴板复制代理和添加到例外等,感谢。
- pac(自动代理脚本)是好东西,但写起来比较麻烦。因此提供现成的切换菜单(菜单2)。调用的是autoproxy2pac的pac文件,那是根据gfwlist转换过来的,包含的网址非常详细,并不断更新,对懒人来说是好物。
- 你也可以将菜单里面的pac文件url路径改成本地路径。Opera的本地路径加不加file://都是有效的。
- 要使用Close All Proxy,必须为每个代理工具的程序名添加前缀,并修改该条目与之对应。
- 完美主义者的提示,修改菜单文字请注意保持对齐,尽可能让每行都有英文字母,不然xp下会在后面显示(快捷键),很囧的说。
注意事项
- 修改菜单时,要注意保存为UTF-8格式,否则会乱码。
- 在保存menu 、skin之前,要先关闭Opera。
- 如果提示“此扩展名未注册应用程序”,那么请检查外部程序路径。
修改皮肤,给Opera代理菜单添加图标
下载这个图标包(6.7kb),把解压后的proxy文件夹放到你
当前使用的皮肤里面。
并编辑skin.ini,在最后面添加:
;proxy u=proxy/u.png fg=proxy/fg.png tor=proxy/tor.png puff=proxy/puff.png gt=proxy/gt.png gap=proxy/gap.png fu=proxy/fu.png p=proxy/p.png
当然,如果你经常换皮肤,那么建议你修改opera/skin里的standard_skin.zip。
添加代理切换按钮
代理状态切换呼出菜单按钮
点击按钮在启用和禁用代理两种状态进行切换。
平时都不用关pac的,不过根据Pac写法的不同,在切换浏览器代理端口的时候可能会出现问题,因此点击按钮启用代理的同时会禁用pac。
点击旁边的小箭头则是呼出快速代理菜单(菜单1)。
PAC状态显示切换按钮
本来此按钮只是用来看的。
但如上面所说了,切换代理时禁用pac,那么之后我们又要启动它。
所以修改了下,在pac禁用状态下,点击是禁用op代理并启用pac,不会造成停顿。
想禁用pac就点击之前那个按钮吧。
显示当前端口状态的按钮
Set preference,的方式在打开标签多的情况下要卡,因此切换代理都用了对话框组合命令。但这样也就无法用单选框作为图标,就不知道当前的代理端口。
所以写了这个按钮,根据http代理端口显示对图标。能正确显示9666、8580、8000、8118、1984、8081这几个,其他的一律显示问号。
这本来也只是用来看的。但为了避免在误按时的响应问题,所以写了个和主菜单不同的组合菜单(菜单3),有时候能代理一定的方便。
PS
前天出的Opera10.5 Pre-alpha 3222尽管版本号很2,但感觉相当不错,看来可以作为日常使用了。
» 转载请注明来源:A.shun's Blog » 《轻松用代理:打造豪华Opera代理菜单》
» 本文链接地址:http://www.a-shun.com/archives/21337.html

Quick Proxy
你搞的真够多的,这个翻墙文章给你带来不少流量了吧
@卢松松, 没呢。流量一直很少
毕竟op太小众了~
你这文章写的也够辛苦的。
太豪华了,不过也够累的
@socekin, 一劳永逸嘛~
很强大的文章
从这个2的版本开始,我的10.5就一直在崩溃。。。似乎是由于同步造成的,卸载删除重装也不好用,包括最新的3228
@软言软语, 我最近都是关掉了同步的,在家不需要。
试试3236.
@A.shun,
不知道为什么,我就是不喜欢同步,可能是因为在公司的时候有些人好新鲜喜欢用我用的浏览器吧,什么东东都有,同家一同步,我就要删除一大把的收藏
@yywr, 可以把同步的按钮藏起来,或者不记住密码。
翻吧~ 道高一尺魔高一丈, 不對, 牆高一尺梯高一丈, 也不對, 這梯子太高怎麼下來..
@willin, 哈哈,有备无患嘛
厉害,看你写了好几篇Opera的了,很有研究啊
为什么我不用Opera呢?
@左岸读书, op和FF都是很优秀的,只是不同调调,用得好都非常强悍
新年了,园子祝您新年快乐!
可惜我不喜欢用Opera
配图好强大
被一群代码打败了
路过学习了
我直接用一个VPN搞定,还是习惯了用FX呀。
@吻火, vpn和浏览器这是两码事。
open vpn虽然强大,但也有很多弊端。客户端要安装驱动或服务,不便携,而且免费的都很一般。
PPTP方式也需要修改网络设置。
而且并不是所有程序都需要代理的。
除了VPN,我啥也不想了。
@Jacse, 沿用给楼上的回答:vpn虽然强大,但也有很多弊端。客户端要安装驱动或服务,不便携,而且免费的都很一般。
PPTP方式也需要修改网络设置。
而且并不是所有程序都需要代理的。
@Snow, 新年快乐。
新年到,祝福到!
路大侠 祝福你:
新年快乐,
万事如意!
老胸 新年快乐
@章鱼,
@路大侠,
新年快乐
最近加班很忙?没有更新博文呢。。。
新年快乐啊!!!!!
@Snowyy, 是啊,年前总是忙的,新年快乐~
你好久没更新啦!!!!

新年快乐哦~~~~
@smigoo, 是啊,忙嘛,新年快乐!~
学习,感谢好文章
PS:opera10.5出beta2了,已经很稳定了~
点”Close » All Proxy”即“关闭所有代理”时不能关闭代理软件
@shingen2010
要使用Close All Proxy,必须为每个代理工具的程序名添加前缀,并修改该条目与之对应。
按你说的方法,点”Close » All Proxy”即“关闭所有代理”时终于可以关闭代理软件了,但IE代理可和没关闭代理软件时一样,仍在使用代理软件的代理,而手动关闭代理软件后,IE正常不使用代理软件的代理,请问怎样修改代码能点”Close » All Proxy”即“关闭所有代理”时可以实现和手动关闭代理软件一样的效果?
@shingen2010 这是由于相关工具自动设置ie代理,又不正常退出导致的。
很好解决。
在门的设置,勾选“不使用IE代理”和“程序启动是跳过代理”,然后手动正常退出一次即可。
在wj的设置中,勾选“不使用IE”,然后手动正常退出一次即可。
其他的同理。
果然是不折腾会死星人
很好很强大
wowwow~~~~~~~~
…这样也行啊