Coder Social home page Coder Social logo

feliscatus / switchyomega Goto Github PK

View Code? Open in Web Editor NEW
20.8K 20.8K 3.1K 2.12 MB

Manage and switch between multiple proxies quickly & easily.

License: GNU General Public License v3.0

CoffeeScript 76.73% JavaScript 5.72% HTML 0.77% CSS 1.46% Less 2.61% Pug 12.72%

switchyomega's People

Contributors

ardakilic avatar artemmolotov avatar asnowfix avatar beaulac avatar celeron533 avatar coeligena avatar comradekingu avatar dedesoft avatar feliscatus avatar filhocf avatar filiphavlin avatar githubuser78 avatar goudarz avatar luandevecchi avatar masoudrahmani avatar maxkorsov avatar nathanbnm avatar nijel avatar niklaskar avatar olloff avatar riccardofeletto avatar santossi avatar solokot avatar sr093906 avatar stefanb avatar still34 avatar suhr avatar utf8please avatar weblate avatar zhtw2013 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

switchyomega's Issues

希望不同类型的情景模式能分开来

就是在列表里面,不同类型的放在一起,而不是所有类型混在一起按字母排序

SwitchyOmega 2.1.4
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

SwitchyOmega 无法直接在 Chrome 使用

抱歉,我将chrome设定为英文,然后使用“导入正在开发的扩展”导入 SwitchyOmega,可惜一直提示我
chrome-extension://aannbjoedbppfoikblcihlhkaipdljkp/web/options/out/options.html
请问,如何消除?

切换规则等内容的WIKI

English Title: Wiki pages for conditions and patterns, etc.

有些英文已经写好了,但是还没有做中文的。另外也缺少教程和目录。
如果时间不够的话也许可以邀请其他人来帮忙做中文翻译?

检测未能加载的元素并提示快速加入规则

English Title: Detect elements that could not be loaded due to network issues on the page, and provide quick "Add New Rule" UI

开发工程量比较大,而且权限是否会太多?如果和扩展主程序关系不大考虑做成另一个扩展或者插件的形式。

支持 file:/// 地址的 PAC 情景模式

English title: Support PAC profiles with file:/// URL.

貌似这个比较复杂。首先单独使用PAC情景模式应该是没问题的,但是要嵌套的时候就会发现没法读/更新文件地址的URL,无法实现嵌套。应该要提示用户,这种只能单独用,无法设置为结果,并且也要从规则的下拉框里面去除。此外,单独使用PAC情景模式的时候,关闭临时规则功能。

This is quite complex to handle. First, PAC profiles with file:/// URLs can be applied without any problems. However, they cannot be used as result profiles because there would be no way to read the PAC content from a file URL. Users should be informed that this profile cannot be used as a result profile. Moreover, these kind of profiles should be removed from the result combo. Also, we should disable temp rules when these profiles are active.

与其他扩展通信,接受添加情景模式等请求

English title: Interact with other extensions via messaging and handle requests like adding profiles.

SwitchyOmega will conflict with Ad-removal extensions and other extensions that sets proxy configurations. The conflict is due to the model of Chrome settings and cannot be solved by SwitchyOmega alone.
A solution would be allowing other extensions to create and modify profiles in SwitchyOmega via extension-to-extension messaging. However, other extensions must modify their code to use this method instead of setting the proxy directly. Moreover, the profiles created by other extensions must be manually applied or configured in switch profiles before they become effective.
I think the use case can be simplified to each third-party extension owning exactly one profile. Each extension can create and modify their own profile as they like.

However, I don't have enough time to dive into complicated logic related to this issue. I think I should focus on options syncing instead of this issue for now.

现在主要是会和一些去广告之类的使用PAC的扩展、以及其他设置代理的扩展冲突,而这个冲突是Chrome设置模型所决定的,无法通过常规途径解决。
一个解决思路是: SwitchyOmega 可以接受扩展间通讯,允许其他扩展在 SwitchyOmega 中建立情景模式,而不是自行调用 Chrome API 设置。好处显而易见,但缺点是必须那些扩展更改代码来实现,而且添加了情景模式之后还要用户手动去使用,或者设置到自动切换里。

我觉得可以简化成一个第三方扩展只能设置一个情景模式(可以创建和修改),方便实现。

总之这个也不急,等有了配置同步再来做也行。

导入自己维护的一份规则列表后,自动代理无效

网址通配符格式,存在OneDrive里,之前用Proxy SwitchySharp时一切正常。更换Omega,下载规则列表,自动代理模式始终无效。难道必须切换规则里一个一个添加?!

SwitchyOmega 2.1.12
Chrome 38.0.2125.104
Windows 8.1 Pro x64

支持竖线分隔多个通配符匹配规则

English Title: Allow multiple wildcard patterns (seperated by | vertical bar) in one single wildcard condition

现在的架构支持这个会不会比较难?总之先看看怎么做吧……

增加切换条件相关说明

English title: Describe condition types.

切换条件的类型一下子增加了很多,大家未免会有些头晕。我觉得最好在选项界面简单介绍下各个条件类型,用一句话就好。

Many people could get confused by so many switch conditions. I think it's better to explain them using one sentence each in the options page.

Rule list result profiles

我想問下我建立呢個GFWList,下面的Rule list result profiles
Match profile
Default profile
這個2個分別有什麼作用
謝謝

导入导出无法覆盖代理名称问题

将一个代理配置命名为“123 ”保存并导出为备份配置。

将“123”修改为“456”并保存配置

重新导入刚刚备份的“123”的备份。发现名称依旧为“456”,并不能还原到“123”,但配置的代理信息是还原了的。

小bug,不影响使用,但影响切换判断

SwitchyOmega 2.1.2
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

类似 gfwlist2pac 的 PAC 生成优化?

大致原理是通过判断域名是否在集合中来实现优化。

参考: https://github.com/clowwindy/gfwlist2pac

要整合到本项目中,必须解决以下问题:

  1. 原项目是 Python 实现,需要翻译成 JS.
  2. 不严格符合 AutoProxy rule list 语义,比如AutoProxy里的关键字规则其实是应用到整个URL的,更像是一个子字符串规则而非域名规则。
  3. 用集合的话规则全部都无顺序化了,可能会引发一些其他的问题。
  4. 根据 2, 3 来看,只有速度快了是不行的……粗略看下来,gfwlist2pac生成的PAC,所匹配的是原来的一个子集……肯定会有人来抱怨以前能上的某些网站不能上了啊……
  5. 好像也只对于 GFW List 这种特别长的有明显作用了,对于小的规则列表和自动切换,则没有明显优化。

所以……暂时来看的话,工作重点应该放在别的方面。

无法使用APJP代理,出现大量乱码

情景模式中,如果使用APJP代理(goagent的一种替代品,java写的),在APJP的log窗口中,
原本
HTTPS_REQUEST/GET_RESPONSE_MESSAGE: REQUEST: GET
后面应该是一串网络地址,全都变成乱码。使用SwitchySharp正常,无乱码现象。

下面是对比的截图:

  1. 乱码的截图:
    2014-10-25 8-48-23
  2. 无乱码的截图:
    (图中,正在通过APJP访问github.com/FelisCatus/SwitchyOmega/issues这个页面。使用的是SwitchySharp扩展)
    2014-10-25 8-50-55

附录:
APJP的项目主页:https://code.google.com/p/apjp/
APJP的中文wiki:https://code.google.com/p/apjp/w/list

SwitchyOmega 2.1.14
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

Switch Profile

Rulelist Profile (AutoProxy Compatible)设置了 可以正常使用 Switch Profile也设置了
并把default设置为Rulelist Profile 切换到Switch profile.但是不能正常使用,所有的网站打不开了
我的理解是 默认是用Rulelist在Switch Profile里的又才用相应的规则。但是好像只是Switch Profile里的是启用的,default里的没用,即使在default里设置direct也没用
还有整个个扩展的反应很慢在设置时 打开设置页面这些

右键菜单添加规则或切换情景模式

English Title: Change settings from the context menu

理论上没有什么问题,不过做起来稍微有点麻烦就是了。另外会不会有人讨厌这种功能?也许应该加一个选项?

但至于快捷键之类的,需要在页面插入脚本,确实有点过分了。可能造成不少冲突,而且在不同页面行为会很不一致(如新标签页)。所以最多只能做右键菜单。

初始设置向导/情景模式创建向导

English title: Setup wizard/Profile creating wizard

我还是希望能加入一些简单的类似向导的东西。首先是创建情景模式时:

  • 代理情景模式 => 可选择一些代理软件常见的服务器端口设置
  • 自动切换 => 创建后需要一点点简单的界面介绍,就像 SwitchySharp 那样大概
  • PAC => 可能需要提示是否直接使用某些 wpad 地址,比如 http://wpad/wpad.dat 之类的
  • 虚情景 => 可选择用虚情景取代某个情景模式,更方便迁移到虚情景

比原先只是多增加了一步,但做一些常见的设置可以快不少。

然后就是新用户的初始化向导了,我的计划是:

  1. 升级SwitchySharp设置。如果有那边的支持的话,应该可以直接提示是否导入。
  2. 根据需要的代理服务器创建代理情景模式。
  3. 可以选择一些常用场景,比如**大陆地区等。选择后可以导入些预先设置的情景。
  4. 简单介绍下自动切换之类的核心概念。

设置同步

English Title: Options Syncing

目前的设置数据结构已经考虑到了同步问题,那么是否可以简单地把 chrome.storage.local 改成 chrome.storage.sync 就能同步?

由于不同电脑不同配置不同也很有用,所以考虑做一个选项,默认关闭,开启后进行同步。

同步有频率和大小的限制如何处理?

建议加入类似AutoProxy的自定义规则分组功能,现在既不方便,还很混乱

现在SwitchyOmega有2个地方可以填写自定义规则。一个是自动切换规则,一个是情景模式白名单。

每个情景模式下,都有个白名单区域,如果我有50条白名单,等于是要在每个情景模式下,粘贴一遍。以后每增加一条,都要在所有情景模式下增加一遍。

如果我使用自动切换规则,当我有50条规则的时候,我更换情景模式就麻烦大了。50条规则都要换一遍。比如,goagent今天容易断线,我临时换SNOVA代理,回头再换回goagent。就要把50条规则的情景模式,全都改一遍。

为什么不像firefox的AutoProxy那样,给自定义规则分组呢?一组 切换规则,对应一个情景模式。(现在是每条规则,都对应一个情景模式)

这样既清晰,又方便,而且做到了功能设计的基本标准:完全穷尽不重复。

SwitchyOmega 2.1.12
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

Polymer

界面转向 Polymer ,使用新 Observable.

**大陆地区以及 GFW List 相关支持

Title: Extra support for users in China Mainland and the GFW List

目前考虑过的支持如下:

  • 默认设置或者一键设置 GFW List 翻墙
  • 提交网址给 GFW List
  • 检测被墙网站(此问题不在此处理,请移步 #6

要不要做?会不会和扩展主题不符合?是否应该以另一个扩展或者插件的形式实现?

弹出菜单键盘导航

English title: Keyboard navigation in the popup menu.

现在的弹出菜单还不能用方向键或者 tab 键选择项目,不是很方便。之后可以试试看做这个,顺便加上默认快捷键,就相当于实现快捷键操作了。

For now, the popup menu items cannot be navigated using arrow keys or tab. We can add this feature later so that switching profiles without mouse would be possible.

情景模式列表更新不即时

在选项标签页对情景模式进行操作(包括添加、编辑、删除、从备份文件恢复)并保存更改后,需要切换一次代理才能实现在icon下拉菜单中的情景模式列表更新。

对于首次安装并添加情景模式的用户来说,需要在“系统代理”和“直接连接”之间切换一次才能显示之前添加的模式。

SwitchyOmega 2.1.1
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

删除自动切换模式时未删除关联切换列表

我添加了代理aa,并基于该代理添加了自动切换模式bb。删除bb后无法删除aa,显示"aa依旧被__ruleListOf_bb使用“。

另外,上述bb我展开了规则列表,如果我删除bb后新建同名自动切换模式(即“bb”),规则列表设置会默认展开。

SwitchyOmega 2.1.8
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36

代理失效时自动使用直接连接

English Title: Fall back to DIRECT connection if proxy fails?

是不是应该 PAC文件返回值结尾添加 DIRECT?另外代理脚本错误的情况呢?仔细考虑一下然后看一下是否应该设置选项……

GFW List 一些错误

GFW List 的一些规则不是支持得很好, 例如 规则里有 '.example.com'

那输入example.com不使用代理, 要输入 'www.example.com' 才使用代理。

规则前有点 “.”

2x 分辨率图标

Title: Extension icons for 2x resolution.

现在有的静态图标应该可以很容易做 2x 的。不过动态图标怎么办呢?
考虑用两个 canvas 分别画 19px 和 38px ?还是只用 38px 的然后缩放?或者检测当前是1x还是2x?

总之暂时不影响使用,有时间再改吧。

保留双下划线开头的名称,提示单下划线开头的名称

English title: Reserve profile names beginning with double underscore, and show prompt for profiles beginning with single underscore.

  1. 新建和改名时,以及保存外部情景模式时,禁止使用双下划线开头的名称。
  2. 新建和改名时,提示单下划线开头的名称会被隐藏。
  3. 升级时,如果名称以下划线开头,则在名称前增加字符p,来保证升级后不被隐藏。

PAC脚本编辑框未能自动保存

If it is left blank, the following scripts will be used directly instead.
上面这个功能没有实现。

bug再现:

  1. 添加一个pac profile,不输入PAC网址,直接在编辑框粘贴PAC文本。这种情况下无法访问任何网站。因为编辑框里的PAC内容没有被保存到Omega应用的PAC脚本中,Omega应用了一个空的PAC脚本。
    2,通过URL添加一个PAC地址并Download。种种情况下可以正常使用。但是我点击PAC的URL输入框最后的“X”,再一次编辑下载之PAC编辑框中的内容后,Omega还是依旧使用URL的PAC,本地编辑的PAC依旧没有被应用。

Add Condition 后 Condition Type 下拉框字体显示不出

换回 2.1.9 是好的,2.1.10 出现该问题
已经同样反馈到 Chrome Web Store

1

两台机器,同一网络皆有此问题

  • SwitchyOmega 2.1.10
    Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.13 Safari/537.36
  • SwitchyOmega 2.1.10
    Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36

Auto Config URL is not validated

The URL box does not complain about the lack of http:// or https:// part in the URL, and it silently ignores an incorrect URL without it (in SwitchySharp 1.10.2)

auto switch如何能添加GFWList的自动匹配?

似乎导入原来的配置里 使用 ://autoproxy-gfwlist.googlecode.com/ 这个网址通配符适配所有GFWList似乎是无效的了。

并且这个和GFWList也是重复的? 请教一下如何让自动切换这个配置能识别GFWList,因为有的网址不在GFWList里面只有通过这个模式手工添加

抱歉无法上传图片

可不可以给个 basic auth 的选项

English Title: Allow basic auth for proxies.

可不可以给个 basic auth 的选项?如果还没有的话。

现在的情况是,返回 401 错误后,chrome 会弹出对话框。不过,这可能成为 gfw 下一个监测特征。以后可能需要密码错误就返回 400,才能不被发现。

系统代理模式不可用

本机通过系统代理连接到互联网,IE可以正常访问,chrome通过SwitchyOmega插件无法访问。

SwitchyOmega 2.1.3
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2159.4 Safari/537.36

内存占用

这版内存占用没有2.1.4处理掉好;另外就是希望情景模式可以自定义显示/隐藏,不然自定义上几个显示就不方便了!!!

SwitchyOmega 2.1.5
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36

匹配网址包含非匹配脚本地址。

一个匹配要代理的域名''A_example.com'

A_example.com 的网页代理有一行代码

<script language="javascript" type="text/javascript" src="B_example.com/15008471.js"></script>

B_example.com 是不匹配代理的网址。
这时候B_example.com这个会走代理出去。

不知道能不能区分这个链接呢?

为什么会自动跳到外部情景模式

为什么会自动跳到外部情景模式,
我设置的是自动模式啊,用了会就自动跳到外部情景模式去了
是什么巧情况啊,已经好几次了

SwitchyOmega 2.1.11
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36

每次启动都要把Switch Profile改一下名才能正常使用

启动chrome后 使用情景模式Switch Profile 所有网站都不能打开
但是使用其他情景,如goagent 或者直连都可以打开网站
但是把Switch Profile改一个名就能正常使用,重新启动chrome后状况依旧,还是要改个名。

自动切换规则编辑页面加载速度过慢

English title: Rules editing tab loading too slowly

感觉自从用了那个 bootstrap-select 的下拉框以后,整个页面都非常非常卡……虽然说能显示情景模式的类型和颜色固然很好,但加载速度太慢了,用户体验也会很差。要怎么办呢?加一个选项?还是超过20条规则自动禁用?

是不是可以有其他的优化?比如点击时才加载什么的?或者自己实现下拉框来优化效率?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.