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

[BUG] mac上Tun模式做透明网关,"局域网连接"功能无效 #84

Open
smilingpoplar opened this issue Jun 23, 2024 · 2 comments

Comments

@smilingpoplar
Copy link

问题描述 / Describe the bug

以前用ClashX Pro,开启TUN和局域网连接就能把mac作为透明网关,ClashX.Meta无法达成。
sysctl net.inet.ip.forwarding查看,输出net.inet.ip.forwarding: 0,说明ip转发功能未打开。
还需手动运行sudo sysctl -w net.inet.ip.forwarding=1

手动打开ip转发在mac重启后也失效,要在重启后也生效还需使用LaunchDaemon。
看下ClashX Pro,grep -r 'net.inet.ip.forwarding=1' /Applications/ClashX\ Pro.app,输出

grep: /Applications/ClashX Pro.app/Contents/Library/LaunchServices/com.west2online.ClashXPro.ProxyConfigHelper: binary file matches

grep -r 'net.inet.ip.forwarding=1' /Applications/ClashX\ Meta.app,输出为空。

复现步骤 / To Reproduce

在mac的ClashX.Meta打开TUN和局域网连接,将手机wifi的路由地址和DNS地址设为电脑ip,无法上网。

操作系统 / OS

MacOS 14.5

@eunrui
Copy link

eunrui commented Jun 23, 2024

遇到了同样的问题allow-lan没用

@smilingpoplar smilingpoplar changed the title [Bug] mac上打开"局域网连接"功能无效 [BUG] mac上Tun模式做透明网关,"局域网连接"功能无效 Jun 24, 2024
@tamia6
Copy link

tamia6 commented Aug 7, 2024

[TCP] dial DIRECT (match RuleSet/icloud) 127.0.0.1:52034(AddressBookSourceSync) --> p224-contacts.icloud.com:443 error: dns resolve failed: lookup p224-contacts.icloud.com on 192.168.2.1:53: no such host

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

3 participants