Code Monkey home page Code Monkey logo

host-switch-plus's People

Contributors

riant 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

host-switch-plus's Issues

一些疑问与建议

疑问:

  1. note 是用来干嘛的?备注?

建议:

  1. 删除内置的 prod dev test 这三个 tag
    理由:用户会自己去建自己的 tag 名的...像我不需要生产环境和测试环境的 hosts,但是 prod 和 test 这两个 tag 又删不掉,各种蛋疼
  2. 优化下 tag 的写法
    理由:我开发环境的 hosts 有几十个,然后开发环境还分数个,而且还经常变动,批量切换功能需要根据 tag 来,而 tag 编辑起来又贼不方便 需要每行都去改,建议采用 Google Chrome App "HostAdmin App" 的写法,简化编译 tag 的费力程度。
    附: HostAdmin Grouping 的写法约定地址 https://github.com/tg123/chrome-hostadmin/blob/master/README.markdown(在这个地址里搜 Grouping 就看到了)

附:感谢作者的辛勤开发~~~工具的确好用~~~

无法一键取消tag下的重复的 域名

例如,我在dev下配置了3个域名,其中有两个域名相同,点击 dev 的时候,没有任何变化。
1.1.1.1 a.abc.com
2.2.2.2 a.abc.com
3.3.3.3 b.abc.com

如果激活了 3.3.3.3 b.abc.com, 再次点击 dev 的时候,没有任何变化,无法关闭 3.3.3.3 b.abc.com,只能点击 3.3.3.3 b.abc.com 。

不支持https

配置好的host switch plus,在http模式下工作正常,换成https就不起作用了。
console里还是会输出目标IP,但那是DNS服务器解析出来的。

I cannot get this extension to work

I've never been able to get this to work. I've tried disabling all other extensions. I've tried both 'System' and 'Direct'. I've restarted Chrome.

I'm on Chrome Version 54.0.2840.59 (64-bit) on MAC OS X El Capitan 10.11.6

可以增加导出备份和排序的功能吗?

如果能云备份就更好了,另外hosts文件还是有他的用处的,如果本插件可以把hosts文件导进去,但是并不在控制面板里面直接显示就完美了,即常用切换在切换面板显示,不常用的就在另外一个面板显示。还有,如果能和ping.chinaz.com结合起来,自动选取最优ip的话就可以当作收费插件出售了。

这个扩展改掉了请求的头信息?

使用插件获取到的REQUEST_URI是包含了域名部分的,导致一些项目不能正常运行,比如设置www.example.com到本地后,得到的REQUEST_URIhttp://www.example.com,改本地host的是/,为何要这样做?这样不就跟改本地host文件不同了吗

这是什么问题?

1111

如图,配置了10.125.42.41 averyhuang.oa.com 如果这个host配置配到hosts文件是没问题的,走host switch plus就会报这个错误。10.125.42.41:80是一个apache,只转发请求,会转发到10.125.42.41:8888上 也是一台apache

两个问题,麻烦看下

1、已经有人提到的,如果当前域名,我在插件上设置了指向的ip,把ip显示出来
2、之前用的switchySharp,优先级貌似地域本插件;但是升级使用switchyOmega后,优先级变了。建议把优先级拿回来,毕竟修改host,是人主观所为,更需要被支持。

插件非常棒,感谢作者!

【请教】请问修改host是怎么实现的?

打算写一个chrome插件,需要用到切换域名所对应的远程ip地址。

找到作者的这个插件,看了下源码,没太明白作者怎么实现强制设置远程ip的。

background.js里的代码我打断点后根本不会触发。。

var enableHosts = [];

chrome.webRequest.onCompleted.addListener(function (details) {
    //data[details.tabId] = details.ip;
    setTimeout(function(){
        details.req = 'showip';
        details.hosts = enableHosts;
        chrome.tabs.sendRequest(details.tabId, details, function (response) {
            // console.log('res:', response);
        });
    },1000);
}, {
    urls: [ 'http://*/*', 'https://*/*' ],
    types: [ 'main_frame' ]
});

chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
    enableHosts = request;
});

求教>.<

添加批量数据,会造成内存耗尽

严重问题:一次添加几千行hosts记录,在task manager看到内存逐渐升高,最后耗尽了机器的内存(chromebook)。
暂时不知道该是否能工作正常,毕竟无法添加需要的所有项。

瑕疵:另外 有注释#和空行会被停止解析,需要用shell重新整理才能batch导入。

望能支持 端口号后项目名的映射

实际开发中往往是 (ip+端口号+项目名)对应 一个域名,希望本插件能支持添加项目名的映射,从而不需要nginx代理配置(前端人员一般不用这个,虽然用fiddler等工具也能解决,但麻烦)

与SwitchyOmega冲突

你们的不冲突么?每次我启动Host Switch Plus 后 SwitchyOmega就不能用了,什么情况?要怎么配置才行么?

关于charles

用了这个插件后,charles抓不到包,应该怎么设置可以解决?

Does not appear to work with HTTPS/SSL traffic

The plugin does not appear to work with HTTPS/SSL traffic. I have a sever with SSL configured, but if I switch from HTTP to HTTPS it is unable to perform a DNS lookup for a host record. Any suggests or fixes?

大小写敏感

如果配置host表时使用的是小写,地址栏里域名部分字母大写了,host switch plus会先把域名转换成小写,然后还是拦截失败,会使用DNS解析的真实IP

但console里输出的hostname是正确的

我配置的是*.xxx.com。没有试过不使用通配符是不是也存在这个问题

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.