mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
feat: support iptables-nft if iptables is not valid
This commit is contained in:
1 parent
2609c2f447
commit
6ec215a045
1 file changed
+4
@@ -56,6 +56,10 @@ func (c Setter) Run(stopAtError bool) error {
|
||||
if common.IsDocker() {
|
||||
commands = strings.ReplaceAll(commands, "iptables", "iptables-legacy")
|
||||
commands = strings.ReplaceAll(commands, "ip6tables", "ip6tables-legacy")
|
||||
} else if !cmds.IsCommandValid("iptables") &&
|
||||
cmds.IsCommandValid("iptables-nft") {
|
||||
commands = strings.ReplaceAll(commands, "iptables", "iptables-nft")
|
||||
commands = strings.ReplaceAll(commands, "ip6tables", "ip6tables-nft")
|
||||
}
|
||||
var errs []error
|
||||
if c.PreFunc != nil {
|
||||
|
||||
Reference in new issue
Block a user