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

YouTube iOS客户端无法播放视频及内存泄漏的问题 #1341

Closed
ShuoHuang opened this issue Oct 29, 2018 · 21 comments
Closed

YouTube iOS客户端无法播放视频及内存泄漏的问题 #1341

ShuoHuang opened this issue Oct 29, 2018 · 21 comments

Comments

@ShuoHuang
Copy link

ShuoHuang commented Oct 29, 2018

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    3.50.1

  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。

    用v2ray core编译了一个Frameworks,供给iOS的network extension调用,实现科学上网。

  3. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)

  1. inbound采用socks协议,打开YouTube iOS客户端,视频列表,个人信息等都能加载成功,但是点击播放后,无法播放视频,一直在缓冲,包括视频前的广告也无法播放,但是用浏览器打开同样的视频是没有任何问题的,流畅播放,另外inbound采用http协议,就没有这样的问题;

  2. 连接成功后,刷网页时,内存会缓慢增长,而在观看视频时,会出现内存飙升的情况,由于iOS对network extension的内存有15MB的限制,导致这个扩展进程被系统杀死,关于这个问题,经过我们自己的各种测试,例如修改本地策略的bufferSize为0或者其他一些尝试,都无法解决;

  1. 你期待看到的正确表现是怎样的?
  1. inbound采用socks协议时,YouTube iOS客户端能正常播放视频;

  2. 内存能正常释放

  1. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

使用的共享的服务器,没有配置

客户端配置:

{
  "log": {
    "loglevel": "warning"
  },
  "inbound": {
    "port": 1089,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "settings": {
      "auth": "noauth",
      "udp": true,
      "ip": "127.0.0.1"
    }
  },
  "outbound": {
    "protocol": "vmess",
    "settings": {
        "vnext": [
            {
                "address": "xx.xx.xx.xx",
                "port": 20066,
                "users": [
                    {
                        "id": "xxxxxxxxxxxxxxxxxxxxxxxx",
                        "level": 0,
                        "alterId": 32
                    }
                ]
            }
        ]
    },
    "tag": "direct"
  },
  "policy": {
    "levels": {
      "0": {
          "uplinkOnly": 0,
          "bufferSize": 0
      }
    }
  }
}
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

客户端错误日志:

  1. 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。

  2. 其它相关的配置文件(如 Nginx)和相关日志。

  3. 如果 V2Ray 无法启动,请附上 --test 输出。

  4. 如果 V2Ray 服务运行不正常,请附上 journal 日志。

@uimeet
Copy link

uimeet commented Oct 29, 2018

遇到同样的问题,我这边包括调整了arm64下默认的buffersize到1k(默认是16k),仍然无法解决这个问题。

@ameue
Copy link

ameue commented Oct 29, 2018

你好,我现在编译出了core.framework,但还不知道怎么在packetTunnel里面怎么使用,读取配置,启动服务,能否指点一二?
我使用gomobile bind --target=ios v2ray.com/core编译出来的core.framework
但gomobile bind --target=ios v2ray.com/ext v2ray/discussion#41 (comment) 会出现这个,这个是否正常呢?

@uimeet
Copy link

uimeet commented Oct 30, 2018

@fatchou 在PacketTunnel启动服务器就行了。

@ameue
Copy link

ameue commented Oct 30, 2018

@fatchou 在PacketTunnel启动服务器就行了。

是用framework里哪个方法启动呢?我用CoreStartInstance("protobuf", data, &error)这个无法正确使用,data是config.json,这样启动总是报错,是配置文件不对吗?这个的data应该是什么呢?这里应该如何正确设置呢?,我给你Gmail发了邮件,咱们可否用gmail联系?

我尝试
CoreConfig *coreConfig = [[CoreConfig alloc] init];
BOOL result = [coreConfig xxX_Unmarshal:data error:&coreError];//data是config.json转成NSData
result=NO,总是报错(Error Domain=go Code=1 "unexpected EOF" UserInfo={NSLocalizedDescription=unexpected EOF}),你是怎么转的?
CoreInstance *coreInstance = CoreNew(coreConfig, &coreError);
[coreInstance start:&coreError];

@VictoriaRaymond
Copy link
Member

Golang 的问题。golang/go#21489

@ShuoHuang
Copy link
Author

Golang 的问题。golang/go#21489

第1个问题,inbound采用socks时,YouTube iOS客户端 无法播放视频的问题,你知道是怎么回事吗?

@ameue
Copy link

ameue commented Oct 31, 2018

Golang 的问题。golang/go#21489

第1个问题,inbound采用socks时,YouTube iOS客户端 无法播放视频的问题,你知道是怎么回事吗?
请问,怎么在PacketTunnel启动服务啊?

@ShuoHuang
Copy link
Author

Golang 的问题。golang/go#21489

第1个问题,inbound采用socks时,YouTube iOS客户端 无法播放视频的问题,你知道是怎么回事吗?
请问,怎么在PacketTunnel启动服务啊?

你编译的Frameworks需要抛出启动接口,
然后配置好NEPacketTunnelNetworkSettings,调用setTunnelNetworkSettings()方法就可以启动了,
另外用非http的inbound协议的话,NEProxySettings中设置autoProxyConfigurationEnabled为true,设置好pac就可以了

@VictoriaRaymond
Copy link
Member

@ShuoHuang 有可能是 DNS 的问题,你可以开启 sniffing 试试看

@ameue
Copy link

ameue commented Nov 9, 2018

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

@ShuoHuang
Copy link
Author

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

应该是可以的,只是我们测试发现YouTube没法播放视频的问题,改为用tun2socks的方式了,你可以试试

@imfaker
Copy link

imfaker commented Aug 26, 2019

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

请问这个 问题你解决了么 ? 还有启动方法是暴露哪个么

@ameue
Copy link

ameue commented Aug 28, 2019

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

请问这个 问题你解决了么 ? 还有启动方法是暴露哪个么

放弃了

@imfaker
Copy link

imfaker commented Aug 28, 2019

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

请问这个 问题你解决了么 ? 还有启动方法是暴露哪个么

放弃了

能求教下你 http下时如何配置的么 ? 调了天了 还没调通 ,要崩溃了 。 能帮忙 给下 packettunnel里你是怎么配置的么

@ameue
Copy link

ameue commented Aug 29, 2019

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

请问这个 问题你解决了么 ? 还有启动方法是暴露哪个么

放弃了

能求教下你 http下时如何配置的么 ? 调了天了 还没调通 ,要崩溃了 。 能帮忙 给下 packettunnel里你是怎么配置的么

如果你会go,可以尝试优化下运行内存,Kitsunebi这个APP优化的很好,据说这个APP就是用的v2ray来支持的PacektTunnel,如果不会,最后还是放弃吧,15M的运行内存限制是被系统卡死了的。

@imfaker
Copy link

imfaker commented Aug 29, 2019

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

请问这个 问题你解决了么 ? 还有启动方法是暴露哪个么

放弃了

能求教下你 http下时如何配置的么 ? 调了天了 还没调通 ,要崩溃了 。 能帮忙 给下 packettunnel里你是怎么配置的么

如果你会go,可以尝试优化下运行内存,Kitsunebi这个APP优化的很好,据说这个APP就是用的v2ray来支持的PacektTunnel,如果不会,最后还是放弃吧,15M的运行内存限制是被系统卡死了的。

我们现在正在做的就是 去 优化go的内存 ,在弄。但是 ,现在就卡在 packet tunnel 这端,无法继续下去,而且也找不到原因,packet tunnel里 总共也没多少行代码 ,但就是调试不通,好几天找不出问题所在,然后之前别人是可以的,然后我真的就很无语,extension 里和 v2ray-core 又很难调试。 所以就想请教下 ,您之前http的inbounds是如何调通的, 如果能有packettunnel的 代码 ,真的不胜感激。570499253@qq.com 。 这是我的邮箱和 qq,如果能够 帮忙的话,真的非常感激 。

@wfkbyni
Copy link

wfkbyni commented Nov 4, 2019

使用Tun2socks.framework、vmess协议,youtube没有问题,能正常播放,只是在看某些网页的时候,vpn会很不稳定,会断掉链接,这个怎么处理呢?

@giftedunicorn
Copy link

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

请问这个 问题你解决了么 ? 还有启动方法是暴露哪个么

放弃了

能求教下你 http下时如何配置的么 ? 调了天了 还没调通 ,要崩溃了 。 能帮忙 给下 packettunnel里你是怎么配置的么

如果你会go,可以尝试优化下运行内存,Kitsunebi这个APP优化的很好,据说这个APP就是用的v2ray来支持的PacektTunnel,如果不会,最后还是放弃吧,15M的运行内存限制是被系统卡死了的。

我们现在正在做的就是 去 优化go的内存 ,在弄。但是 ,现在就卡在 packet tunnel 这端,无法继续下去,而且也找不到原因,packet tunnel里 总共也没多少行代码 ,但就是调试不通,好几天找不出问题所在,然后之前别人是可以的,然后我真的就很无语,extension 里和 v2ray-core 又很难调试。 所以就想请教下 ,您之前http的inbounds是如何调通的, 如果能有packettunnel的 代码 ,真的不胜感激。570499253@qq.com 。 这是我的邮箱和 qq,如果能够 帮忙的话,真的非常感激 。

https://github.com/xxf098/go-tun2socks-build
https://github.com/duanhai/Tun2socks-PacketTunnelDemo

@lil-hope
Copy link

@ShuoHuang inbound用http,autoProxyConfigurationEnabled为false,这样的全局模式可以。如果换成true,pac配置好,inbound用socks不行,会是什么原因?

请问这个 问题你解决了么 ? 还有启动方法是暴露哪个么

放弃了

能求教下你 http下时如何配置的么 ? 调了天了 还没调通 ,要崩溃了 。 能帮忙 给下 packettunnel里你是怎么配置的么

如果你会go,可以尝试优化下运行内存,Kitsunebi这个APP优化的很好,据说这个APP就是用的v2ray来支持的PacektTunnel,如果不会,最后还是放弃吧,15M的运行内存限制是被系统卡死了的。

我们现在正在做的就是 去 优化go的内存 ,在弄。但是 ,现在就卡在 packet tunnel 这端,无法继续下去,而且也找不到原因,packet tunnel里 总共也没多少行代码 ,但就是调试不通,好几天找不出问题所在,然后之前别人是可以的,然后我真的就很无语,extension 里和 v2ray-core 又很难调试。 所以就想请教下 ,您之前http的inbounds是如何调通的, 如果能有packettunnel的 代码 ,真的不胜感激。570499253@qq.com 。 这是我的邮箱和 qq,如果能够 帮忙的话,真的非常感激 。

https://github.com/xxf098/go-tun2socks-build
https://github.com/duanhai/Tun2socks-PacketTunnelDemo

服务器的协议是ws+tsl 试了很多方法还是连不上是怎么回事 可以邮箱联系吗 luckytyga@163.com

@elsadeny
Copy link

@ShuoHuang inbound uses http and autoProxyConfigurationEnabled is false. This global mode is fine. If it is changed to true, pac is configured properly, socks cannot be used for inbound, what is the reason?

Have you solved this problem? Which startup method is exposed?

give up

Can you ask me how to configure it under http? It has been adjusted for a long time and it is about to collapse. Can you help me with how you configure it in packettunnel?

If you can go, you can try to optimize the running memory. Kitsunebi is a very well optimized app. It is said that this app is PacektTunnel supported by v2ray. If not, give up at the end. The 15M running memory limit is caused by the system card. Dead.

What we are doing now is to optimize the memory of go. However, I am stuck at the end of the packet tunnel and cannot continue, and I can’t find the reason. There are not many lines of code in the packet tunnel, but I can’t find the problem for several days. Yes, then I am really speechless, and it is difficult to debug with v2ray-core in extension. So I would like to ask you how to adjust the http inbounds before. If you can have the code for packettunnel, I would really appreciate it. 570499253@qq.com . This is my mailbox and qq. I would really appreciate any help.

https://github.com/xxf098/go-tun2socks-build
https://github.com/duanhai/Tun2socks-PacketTunnelDemo

The server's protocol is ws+tsl. I tried many methods and still can't connect. What's the matter, can I contact you by email luckytyga@163.com

Did you managed to make the app work with ws+tsl please let me know

@imfaker
Copy link

imfaker commented Dec 2, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants