Git Product home page Git Product logo

Comments (17)

zidongtuili avatar zidongtuili commented on August 27, 2024

更新:用unblock youke就可以不需要修改hosts直接用。关闭ublock以后就不行了,好像再用redirect也不行,不过不确定

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

hosts是因为 网易云在国外有DNS污染 导致 无法解析出正常的IP地址 无法播放
如果你不修改hosts 只装插件可以搞定的话 那是最好了
至于为什么不把hosts功能做进插件里 是因为 Chrome只支持一个插件拥有代理权限
如果我做了 就会和unblock youku之类的插件冲突

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

现在用unblock youku放一段时间会失效,过一段时间刷新网页会好。请问如果直接改hosts是不是不会这样不稳定?另外hosts在无root权限的linux下有没有什么方便的改法?

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

hosts是直接连接网易的官方服务器 肯定稳定 如果没权限的话 确实不好解决。。。
只能在路由或者别的地方操作

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

大神你回的真快,我都不好意思老问了。我用了原来那个插件,
https://chrome.google.com/webstore/detail/virtual-hosts/aiehidpclglccialeifedhajckcpedom
没有试过是不是可以和unblock youku并存,但是单独使用这个替换唯一的一个资源链接非常的方便。以前修改过一点点,把m0-m9全都换了,现在发现资源只有一个m10.所以就直接用这个替换了。
最后一个问题,就是只替换一个m10就足够了吗?至于p开头的图片我就算了

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

音乐只有 m10就够了 图片 不看也不影响你听

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

哈哈,我是怕那头发现有人在海外尝试错误的图片链接,然后就把这个封了。m10够了是因为播放器会自动尝试每个链接吗?换了ping acg的ip真的非常快

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

不是。。。播放器 应该一直都是用的m10 我还没见过用其他数字的。。。
背后的规律我就猜不出来了

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

好吧,我丢人了,哈哈。不过上次我改成的时候还是不断换的,而且失败了也不尝试别的链接

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

让你 ping的那个网址 是给网易提供CDN服务的供应商 你ping的IP地址 网易一定也能用

既然没问题了 就close掉了

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

抱歉我有强迫症,所以又脑洞了一下:既然ping的ip可以用,那网址应该直接可以用,所以用那个重新定向的插件直接用ws.acgvideo.com替换m10.music.126.net 。 好处就是不用担心这个ip会改变,而且每次都是返回最快的ip,其实在插件里集成一个重新定向功能,或许不会和unblock youku冲突。
估计大家还是喜欢直接dns,我不知道dns是不是也可以用网址来代替ip,起到替换的作用。就是左右两边都是域名,用一侧的替代另一侧。

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

想多了。。。服务器通过域名来区分服务的。。。 你这样替换根本无法工作

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

我不知道别的地方替换是不是不行,不过目前我用那个插件换了现在还是能用的。等我测试一天看一下是不是原来的设置还缓存着再看吧

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

替换网址的方法现在还能用。。。另外类似这样的地址也可以播放:
http://ws.acgvideo.com/20180310230619/3ece0352daa899b5b3dd96bd1a709fec/ymusic/8c93/b058/0206/4a98a17577e8f43cb174407c4327d5a3.mp3
所以我觉得替换地址是可行的,不知道大神集成一下一个替换功能是不是很便捷?或者我学习一下自己动手看看

能力有限,改了改那个重定向的代码:

(background.js) ...
	}, {urls: ['*://music.163.com/*']}, ['blocking', 'requestHeaders'])

	var settings = {
	    'domain': "m10.music.126.net",
	    'ip': "ws.acgvideo.com",
	    'enabled': true
	}, requestFilter = {urls: ["<all_urls>"]},
	    onBeforeRequestHandler = function(details) {
		if (settings.enabled && (details.url.indexOf(settings.domain) > -1)) {
		    return { redirectUrl: details.url.replace(settings.domain, settings.ip) };
		}
	    },
	    onBeforeSendHeadersHandler = function(details) {
		if (settings.enabled && (details.url.indexOf(settings.ip) > -1)) {
		    details.requestHeaders.push({ name: "Host", value: settings.domain });
		    return {requestHeaders: details.requestHeaders};
		}
	    };
	chrome.webRequest.onBeforeRequest.addListener(onBeforeRequestHandler,   {urls: ['*://'+settings.domain+'/*']}, ["blocking"]);
	chrome.webRequest.onBeforeSendHeaders.addListener(onBeforeSendHeadersHandler,{urls:['*://'+settings.ip+'/*']}, ["blocking", "requestHeaders"]);
...

manifast.js 里面加上"*://m10.music.126.net/","*://ws.acgvideo.com/"权限就搞定了,就可以单用这个插件了

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

替换网址只能保证你的网络环境下可以使用 不能保证别人的一定可以吧?

from neteasemusicworld.

zidongtuili avatar zidongtuili commented on August 27, 2024

哦其实我也不懂这个,确实不能保证。我试了一下图片的网址替换了是不行的。其实也就是想着你把代码加进去我就不用把离线文件拷到不同电脑,可以直接商店更新插件了 :)

from neteasemusicworld.

acgotaku avatar acgotaku commented on August 27, 2024

2333333 你可以自己fork 修改一份啊 都是开源的 也没几行代码

from neteasemusicworld.

Related Issues (8)

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.