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

Apple设备 APNs推送通知 #31

Closed
yunxi993 opened this issue Mar 27, 2022 · 20 comments
Closed

Apple设备 APNs推送通知 #31

yunxi993 opened this issue Mar 27, 2022 · 20 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@yunxi993
Copy link
Contributor

IPv4与IPv6双栈的情况下,Apple会优先使用IPv4与APNs连接通信并推送App通知,我在防火墙把 17.57.144.0/22(别的地区不清楚、我所在的地区全都是此IP段内的IP) 整个IP段丢弃了,Apple就会使用IPv6推送App的通知,使用passwall、SSR插件相同的设置推送都是正常的.

现在相同的设置使用passwall2 就收不到通知,在节点日志里面可以看见 passwall2 仍然在使用 17.57.144.0/22 这个IP段内的IP与APNs通信连接.

怀疑是不是 passwall2 的DNS查询策略是 UseIPv4 优先、或者仅查询UseIPv4,导致防火墙里面已经丢弃了这个IP段、passwall2仍会查询IPv4.

@yunxi993
Copy link
Contributor Author

XTLS/Xray-core#774 (comment)
看到这个相关问题.

@xiaorouji xiaorouji added help wanted Extra attention is needed question Further information is requested labels Mar 28, 2022
@yunxi993
Copy link
Contributor Author

@xiaorouji 测试出来了,我把流量嗅探关闭推送就正常了.
image
可是下面注解说,使用分流必须开启嗅探,否则分流无效.
passwall的流量嗅探有开启.

还有passwall2的本地DNS查询是劫持53端口吗?

@mirthlesslk
Copy link

流量嗅探是有问题的,我和朋友联机,只要打开这个网络直接抽风了,关了什么事都没有

@yunxi993
Copy link
Contributor Author

流量嗅探是有问题的,我和朋友联机,只要打开这个网络直接抽风了,关了什么事都没有

确实很怪异,还发现如果关闭嗅探、观看YouTube如果可以正常播放至少转圈加载十圈以上、要么就一直转圈加载(无论分辨率是高是低)、twitch直播也慢,反之就和passwall一样、4K60FPS视频基本秒开.

@xiaorouji
Copy link
Owner

youtube的问题,可以尝试新建一个分流规则,把QUIC给黑洞了。

@mirthlesslk
Copy link

youtube的问题,可以尝试新建一个分流规则,把QUIC给黑洞了。

作者大大,能不能问一下分流选项里面黑洞实现的是什么功能,没有太理解这个选项的意思

@yunxi993
Copy link
Contributor Author

youtube的问题,可以尝试新建一个分流规则,把QUIC给黑洞了。

image
是这样吗?
日志:
Failed to start: main: failed to load config files: [/tmp/etc/passwall2/global.json] > infra/conf: invalid field rule > infra/conf: invalid port: true > json: cannot unmarshal bool into Go value of type uint32

@xiaorouji
Copy link
Owner

BUG,等我修复下

@xiaorouji
Copy link
Owner

更新最新源码试试,亲测屏蔽QUIC后youtu秒开

@yunxi993
Copy link
Contributor Author

yunxi993 commented Apr 1, 2022

更新最新源码试试,亲测屏蔽QUIC后youtu秒开

YouTube正常了
不过,又发现在 Direct 里面添加走直连的域名好像并没有生效,例如:
wallhaven.cc
image

88hd.tv
image

确定这俩网站是可以直连的.
重启passwall2、完全关闭浏览器并清除DNS缓存,仍然没有根据规则连接.

@xiaorouji
Copy link
Owner

domainStrategy用IPOnDemand
而且估计可能你把流量嗅探给关了导致

@yunxi993 yunxi993 changed the title Apple设备 APNs推送通知 (已解决)Apple设备 APNs推送通知 Apr 2, 2022
@yunxi993 yunxi993 closed this as completed Apr 2, 2022
@yunxi993 yunxi993 changed the title (已解决)Apple设备 APNs推送通知 Apple设备 APNs推送通知 Apr 2, 2022
@yunxi993 yunxi993 reopened this Apr 2, 2022
@yunxi993
Copy link
Contributor Author

yunxi993 commented Apr 2, 2022

youtube的问题,可以尝试新建一个分流规则,把QUIC给黑洞了。

作者大大,能不能问一下分流选项里面黑洞实现的是什么功能,没有太理解这个选项的意思

丢弃 屏蔽的意思.

@xiaorouji
Copy link
Owner

要代理IPv6要启用IPv6透明代理

@yunxi993
Copy link
Contributor Author

yunxi993 commented Apr 4, 2022

要代理IPv6要启用IPv6透明代理

image
一直有开启 IPv6透明代理

@yunxi993
Copy link
Contributor Author

yunxi993 commented Apr 4, 2022

可能不是passwall2的问题,使用v2rayA的routingA规则分流同样无法接收通知.

@xiaorouji
Copy link
Owner

试下把5223端口走直连或者高级设置里面的TCP不转发端口试试?

@xiaorouji
Copy link
Owner

我好不容易找到了一台IOS设备来做测试
courier.push.apple.com 加入到 不进行流量嗅探的域名列表 里面貌似是可以的

@xiaorouji
Copy link
Owner

Tproxy+TCP不转发端口原来有BUG,怪不得不行

@xiaorouji
Copy link
Owner

更新最新源码,用TCP不转发端口 5223,比较直接了。

@xiaorouji
Copy link
Owner

xiaorouji commented Apr 6, 2022

防火墙丢弃失效的原因大概是规则生成在passwall2后面了,前面已经被passwall2处理了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants