apernet / OpenGFW

OpenGFW is a flexible, easy-to-use, open source implementation of GFW (Great Firewall of China) on Linux
https://gfw.dev/
Mozilla Public License 2.0
9.31k stars 703 forks source link

有办法能让OpenGFW在RouterOS下运行吗? #141

Closed amilus668 closed 1 month ago

amilus668 commented 1 month ago

MikroTikPatch项目

不加规则可以正常输出提示

/flash/rw/disk # ./OpenGFW-linux-amd64 
Error: accepts 1 arg(s), received 0
Usage:
  OpenGFW [flags] rule_file

Flags:
  -c, --config string       config file
  -h, --help                help for OpenGFW
  -f, --log-format string   log format (default "console")
  -l, --log-level string    log level (default "info")
  -p, --pcap string         pcap file (optional)

加规则后运行报错

/flash/rw/disk # ./OpenGFW-linux-amd64 -c config.yaml rules.yaml 
2024-06-25T10:58:45Z    FATAL   failed to parse config  {"error": "invalid config: io: exec: \"iptables\": executable file not found in $PATH"}

看起来是RouterOS没有iptables程序

haruue commented 1 month ago

iptables 只是开始, OpenGFW 还需要 nfqueue 和 netlink , 我不认为被 RouterOS 高度魔改的 Linux 内核会支持这些。

amilus668 commented 1 month ago

了解,谢答🙏