Skip to content

[Feature] 小米路由器BE6500无法使用Tproxy模式的解决方法 #1279

@hsj1992

Description

@hsj1992

Verify steps

  • 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • 我已经使用公测版本测试过,问题依旧存在 I have tested using the test mod, and the issue still exists.
  • 我已经仔细看过 常见问题 并无法自行解决问题

Description

  • 情况:

    小米路由器BE6500使用ShellCrash,选择Tproxy模式然后重启启用的时候,显示说“当前设备内核可能缺少kmod_ipt_tproxy模块支持,已放弃启动相关规则!”实际启动后没有效果,代理节点不生效,连接里看不到有活跃连接。

  • 检查:
    BE6500属性,

OpenWrt 18.06-SNAPSHOT
iptables v1.6.2
libxtables.so.12
架构 arm_cortex-a7_neon-vfpv4

经过命令检查后发现内核侧 TPROXY 其实是有的,xt_TPROXY、xt_socket、nf_tproxy_ipv4/ipv6 都已加载;但是用户态 iptables 扩展库缺失,libxt_TPROXY.solibxt_socket.so 没有,这可能是根本原因。

然后修改fw_iptables.sh,命令为:

sed -i '2i export XTABLES_LIBDIR=/data/ShellCrash/xtlib' \
  /data/ShellCrash/starts/fw_iptables.sh

接着正常设置Tproxy模式然后重启服务后,代理工作正常,连接里也看得到Tproxy|TCP和Tproxy|UDP等各个活跃连接了。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions