Go to comments ↓ Home » 软件心得

更加方便的 Opera 代理按钮和菜单

opera注意:在 Opera 11 下部分命令可能失效,我近期将会改进
你也可以自己动手在命令之间加上延迟:& Delay,1

已经改进,见:Opera 自动代理解决方案和代理菜单

A.shun 这回对之前写过的 Opera 代理菜单和按钮进行较大的改进。
大大提高了实用性:占用地方小,不需要打开菜单就能显示当前代理端口,抛弃 Set preference 切换方式等。
这也是我写过的最长的按钮。。。代理设置作为条目较多的一项,用来练习按钮和菜单语法正好。

本文仅提供配置文件的修改方法,目的是为了探讨 Opera 按钮和菜单的技巧。仅供学习交流之用,不提供任何相关工具和网址。

这是对此功能的第二次改进了,建议订阅以获取后续更新内容。

预览和示意图

Opera 代理按钮和菜单

代理按钮和菜单的主要改进

  1. 硬生生的把之前的3个按钮揉成1个
    很暴力的说,之前三个按钮的确是说不过去,好吧,我忏悔。这下在释放了工具栏空间的同时,也解决了以前按钮多让新手困惑的问题。
  2. 在启用代理时,为多种常见端口添加了特定的图标
    以提高工具栏按钮风格的协调性。(默认可以显示10种状态,Pac+禁用+启用(7种端口+其他)
  3. 去掉了在线 Pac 文件的条目
    由于 Opera10.5x 的一个 bug (无法识别base64编码过的 Pac 文件),加上appspot.com本身处于半墙状态,autoproxy2pac还经常出现 Over Quota。在线 pac 并不实际。老版本的 Opera 可以访问前文获取这个菜单条目。还是自己写 Pac 吧,写得好一个就够了。
  4. 精简了菜单上的条目,条目顺序及其他细节微调
    去掉了如不常用的:使用剪贴板代理、关闭所有代理工具,需要的话从前面的文章复制代码加上去吧。也去掉了在线代理条目,因为这类服务很难存活久,而且自己添加并不困难。

获得 Opera 代理按钮+菜单

添加 Opera 代理状态显示和开关按钮

将下面按钮直接拖到除个人栏外的任何工具栏。如果你要见识下这个按钮的长度就直接点击添加 😎 。

Quick Proxy

单击启用/禁用代理,点击旁边的小箭头呼出快速代理菜单,显示多种代理状态(含对应端口)。

安装 Opera 快速切换代理菜单

在你的operaconfig菜单配置文件最后添加以下代码:

[Quick Proxy Menu]
Item, "开关 » Autoproxy"=New page,,,, "Extended Security" & Go to page, "opera:config"  & Delay, 1 & Go to page, "javascript:(function(){var as=opera.getPreference('Proxy','Use Automatic Proxy Configuration');if(as==0){var as=1}else{var as=0}opera.setPreference('Proxy','Use Automatic Proxy Configuration',as);window.close()})();"
Submenu, "切换 » AutoProxy", Pac Menu="Show popup menu,,,, "Restart transfer""
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, "[召唤 » Mr.Z   ]"=Execute program,"Mr.zhang的路径或快捷方式",,,"Panel Contacts"
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, "Add To Exceptions"=External action,,,,Add widget | edit site preferences & delay, 10 & copy & Cancel & delay,1 & 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, "---Fuck » GFW---"=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, "[ Mr.Z  ]  » 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,"2010" & focus next widget & check item & focus next widget & insert,"127.0.0.1" & focus next widget & insert,"2010" & 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 & cance
[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,"本地pac1路径,绝对或相对均可" & 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,"本地pac1路径,绝对或相对均可" & 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,"本地pac1路径,绝对或相对均可" & 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,"本地pac1路径,绝对或相对均可" & 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,"本地pac1路径,绝对或相对均可" & 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,"本地pac1路径,绝对或相对均可" & focus next widget & Ok & Delay, 10 & Cancel

不懂编辑配置文件的,请访问:Opera 中文 wiki

修改 Opera 皮肤,添加图标

下载这个图标包(13.6kb),把解压后的 proxy 文件夹放到你operaconfig当前使用的皮肤里面。
并编辑 skin.ini,在 [Image] 后面添加:

;Quick Proxy by A.shun
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
mrz=proxy/mrz.png
u_s=proxy/u_s.png
fg_s=proxy/fg_s.png
puff_s=proxy/puff_s.png
gt_s=proxy/gt_s.png
gap_s=proxy/gap_s.png
p_s=proxy/p_s.png
mrz_s=proxy/mrz_s.png

当然,如果你经常换皮肤,那么建议你修改 opera/skin 里的 standard_skin.zip。

注意事项

  • 根据你计算机的实际情况,修改代码中所有的“xxx的路径或快捷方式”。如果需要“运行工具并启用相应的代理设置”的,请点击链接查看,并自行修改。
  • 修改菜单时,要注意保存为 UTF-8格式,否则会乱码。在保存 menu 、skin 之前,要先关闭 Opera。
  • 如果提示“此扩展名未注册应用程序”,那么请检查外部程序路径。
  • 菜单条目比较多,这是为了照顾更多人的习惯,也是为了看起来更加壮观。实际上当然不用这么多。不需要的条目注释掉(在前面加分号)或者删掉该行即可。因此谢绝“太多了、花哨”之类评价。

» 转载请以超链接形式注明来源:A.shun Blog » 《更加方便的 Opera 代理按钮和菜单》
» 本文链接地址:http://shun.im/21366

» 本文采用 BY-NC-SA 协议进行授权。
» 建议通过 Rss( Feedly | Feedburner | Feedsky )方式及时获取更新。
  1. 终于遇到一个同样喜欢Opera的了,呵呵 😆

    Opera 11.61 Opera 11.61 GNU/Linux GNU/Linux
    #1
    @
  2. 支持一个。。。。

    Opera 12.01 Opera 12.01 GNU/Linux GNU/Linux
    #2
    @
Leave a Reply

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: