Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node本地运行,Windows可用,iOS不可用,小火箭连接超时[已解决] #1253

Closed
5 tasks done
EricYoung37 opened this issue Sep 23, 2023 · 5 comments
Closed
5 tasks done
Labels
bug Something isn't working

Comments

@EricYoung37
Copy link

EricYoung37 commented Sep 23, 2023

Bug 描述

在Windows上以node运行服务,这一年都是这样听歌的,真的很感谢这个项目的所有贡献者。最近打算试试看能不能帮助iOS端解除限制,但是遇到困难。折腾了一晚,也翻了新旧项目的Issues都没找到类似的Shadowrocket超时情况,决定还是求助。

Windows端:

  • 在Windows上安装了项目最新的证书(安装到了“受信任的根证书颁发机构证书存储”中,一年来是没安装的证书的,这次是为了iOS才安的)
  • 项目根目录中运行$node app.js -s -e https://music.163.com -p 8080:8081
  • Windows上网易云设置了使用HTTP代理配置为127.0.0.1:8080,可正常使用

iOS端:

  • 在iOS也安装了项目最新的证书,并信任了这个证书
  • 使用Shadowrocket添加服务器,连接类型HTTP,填了我电脑的公网IP(通过$curl ifcfg.me得到,与在网上直接查自己IP地址一致),端口8080与-p 8080:8081的第一个端口一致,保存好,测试连接Timeout,其实到这一步就可以确定iOS无法连接Windows运行的node服务,这个是我困扰的地方
  • (当然我还是按照教程走完,接下来复制了小火箭的default.conf文件为default_copy.conf,删去了含NetEase163126字段的规则以防止与教程添加的3条规则冲突,设置使用default_copy.conf
  • 打开网易云,显示“加载歌曲列表失败”,不管哪个界面都空白,这个是意料之中的,毕竟小火箭那边显示连接超时

尝试:
iOS端小火箭服务器配置的端口改为80,可连上Windows,于是在Windows使用$node app.js -s -e https://music.163.com -p 80:443。iOS的网易云仍然无法使用

参考:进阶配置iOS食用指南

预期行为

我认为当我在Windows端项目根目录中运行$node app.js -s -e https://music.163.com -p 8080:8081之后,iOS小火箭填写完协议HTTP,我Windows电脑的公网IP,端口8080,测试连接应该要ping通而不是显示超时。

实际行为

No response

复现步骤

No response

启动命令及环境变量

$node app.js -s -e https://music.163.com -p 8080:8081

日志内容

我想要日志内容,找遍了整个项目,只看到两处相关:

  • 一处./package.json里面有"start:dev": "cross-env LOG_LEVEL=debug node src/app.js -e https://music.163.com",这里已经是debug级的了,但运行时无日志产生
  • 一处./src/logger.js,在里面有一句level: process.env.LOG_LEVEL ?? 'info',把info改为debug但是没有任何日志产生
  • 尝试$node app.js -s -e https://music.163.com -p 8080:8081 >> app.log,无法启动服务,并得到输出是stdout is not a tty

网易云音乐歌曲链接

No response

网易云音乐版本号

Windows端2.9.5,iOS端为2.0.93,我认为不是网易云版本的问题,Shadowrocket都没办法连上服务

操作系统

iOS

其他信息

No response

问题排查

  • 我确认我使用的核心是由 UnblockNeteaseMusic 项目官方发行,不是其他任何 fork。
  • 我确认我已经升级到了最新的核心版本(推荐使用最新构建而不是 release)。
  • 我确认我已经启用了 HTTPS 端口。
  • 我确认我已经正确设置了 EndPoint。
  • 我确认我已经在对应的客户端正确安装了 CA 证书。
@EricYoung37 EricYoung37 added the bug Something isn't working label Sep 23, 2023
@EricYoung37 EricYoung37 changed the title noden本地运行,Windows可用,iOS不可用 noden本地运行,Windows可用,iOS不可用,小火箭连接超时 Sep 23, 2023
@1715173329
Copy link
Member

检查过防火墙方面的问题吗?或者 iOS 能否直接访问 http://<your_ip>:8080/proxy.pac

@EricYoung37 EricYoung37 changed the title noden本地运行,Windows可用,iOS不可用,小火箭连接超时 node本地运行,Windows可用,iOS不可用,小火箭连接超时 Sep 23, 2023
@EricYoung37
Copy link
Author

EricYoung37 commented Sep 23, 2023

感谢大佬回答!

iOS无法访问http://<my_ip>:8080/proxy.pac

不挂代理(小火箭)iOS网易云可以联网,能加载主界面歌单那些(不过我是海外IP所以不能听歌,这也是我最开始决定使用这个项目的原因)

试过Windows防火墙开8080端口,但是没用,小火箭那里还是Timeout
image
image

@1715173329
Copy link
Member

无法访问的话主要还是在防火墙侧的问题(UNM 默认会监听 0.0.0.0)
如果 Windows 不是直接拨号,则需要考虑路由器/防火墙规则的问题

@EricYoung37
Copy link
Author

好的,谢谢提点,我去看看路由器防火墙设置。

@EricYoung37
Copy link
Author

EricYoung37 commented Sep 23, 2023

无法访问的话主要还是在防火墙侧的问题(UNM 默认会监听 0.0.0.0) 如果 Windows 不是直接拨号,则需要考虑路由器/防火墙规则的问题

说对了!!

去路由器设置界面增加了目标设备(Windows)和8080端口转发的转发规则,小火箭ping通了!iOS可以连上Windows上运行的node服务,能看到终端上输出的日志

现在歌曲都能点击了,但几乎所有歌曲在iOS“获取歌曲信息失败”,我去Issues看看相关贴子看有没有解决方案。

@EricYoung37 EricYoung37 changed the title node本地运行,Windows可用,iOS不可用,小火箭连接超时 node本地运行,Windows可用,iOS不可用,小火箭连接超时[已解决] Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants