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

ipv6 问题 #49

Open
flyflas opened this issue Sep 13, 2023 · 3 comments
Open

ipv6 问题 #49

flyflas opened this issue Sep 13, 2023 · 3 comments

Comments

@flyflas
Copy link
Contributor

flyflas commented Sep 13, 2023

问题:
在安装box for magisk 之后。WiFi的ipv6变为了内网地址(fe开头)。在卸载box for magisk 之后,WiFi可以正常获得公网ipv6。配置文件已经开启ipv6。

配置:

# setting.ini
ipv6="true"
# clash meta 配置
ipv6: true

版本:
box for magisk: v1.3.0
clash meta: v1.15.1

@ATH733
Copy link

ATH733 commented Dec 28, 2023

遇到了相同的问题,使用流量时一切正常,使用WiFi时无法获取公网IPv6,在Magisk中关闭模块重启可以临时解决,但是只要打开模块之后不重启无法恢复

另外注意到
# setting.ini ipv6="true"
时可以获取子网IPv6,而
# setting.ini ipv6="false"
时连子网v6都获取不到了

@ATH733
Copy link

ATH733 commented Dec 28, 2023

暂时解决了,但是因为使用的服务商不提供ipv6访问所以没法验证修改这个的时候有没有把别的整坏
./scripts/box.iptables
注释掉如下部分

disable_ipv6() {
  sysctl -w net.ipv4.ip_forward=1
  # sysctl -w net.ipv6.conf.all.forwarding=0

  # sysctl -w net.ipv6.conf.all.accept_ra=0
  # sysctl -w net.ipv6.conf.wlan0.accept_ra=0
  # sysctl -w net.ipv6.conf.all.disable_ipv6=1
  # sysctl -w net.ipv6.conf.default.disable_ipv6=1
  # sysctl -w net.ipv6.conf.wlan0.disable_ipv6=1

  ip -6 rule add unreachable pref "${pref}"

} >> /dev/null 2>&1

ipv6_enable() {
  sysctl -w net.ipv4.ip_forward=1
  sysctl -w net.ipv6.conf.all.forwarding=1

  # sysctl -w net.ipv6.conf.all.accept_ra=1
  # 应该就是这两行accept_ra的问题,查了下资料好像应该=2
  # sysctl -w net.ipv6.conf.wlan0.accept_ra=1
  # sysctl -w net.ipv6.conf.all.disable_ipv6=0
  # sysctl -w net.ipv6.conf.default.disable_ipv6=0
  # sysctl -w net.ipv6.conf.wlan0.disable_ipv6=0

  # ip -6 rule del unreachable pref "${pref}"

} >> /dev/null 2>&1

@Christopher-Songs
Copy link

暂时解决了,但是因为使用的服务商不提供ipv6访问所以没法验证修改这个的时候有没有把别的整坏 ./scripts/box.iptables 注释掉如下部分

disable_ipv6() {
  sysctl -w net.ipv4.ip_forward=1
  # sysctl -w net.ipv6.conf.all.forwarding=0

  # sysctl -w net.ipv6.conf.all.accept_ra=0
  # sysctl -w net.ipv6.conf.wlan0.accept_ra=0
  # sysctl -w net.ipv6.conf.all.disable_ipv6=1
  # sysctl -w net.ipv6.conf.default.disable_ipv6=1
  # sysctl -w net.ipv6.conf.wlan0.disable_ipv6=1

  ip -6 rule add unreachable pref "${pref}"

} >> /dev/null 2>&1

ipv6_enable() {
  sysctl -w net.ipv4.ip_forward=1
  sysctl -w net.ipv6.conf.all.forwarding=1

  # sysctl -w net.ipv6.conf.all.accept_ra=1
  # 应该就是这两行accept_ra的问题,查了下资料好像应该=2
  # sysctl -w net.ipv6.conf.wlan0.accept_ra=1
  # sysctl -w net.ipv6.conf.all.disable_ipv6=0
  # sysctl -w net.ipv6.conf.default.disable_ipv6=0
  # sysctl -w net.ipv6.conf.wlan0.disable_ipv6=0

  # ip -6 rule del unreachable pref "${pref}"

} >> /dev/null 2>&1

用这种方式修改之后有问题,ipv6虽然可用了,但是貌似dns出现异常,需要代理的网站均提示此类错误 #144

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