nekoray icon indicating copy to clipboard operation
nekoray copied to clipboard

BUG: TUN mode doesn't work (device not open)

Open nimbold opened this issue 8 months ago • 6 comments

Describe the problem

OS: CachyOS (Arch based)
DE: KDE 6.1.1

When I try to enable TUN mode (either internal TUN or normal TUN) it doesn't enable the TUN mode and it keeps repeating. When I run nekoray through terminal, I can see the logs and I could see the problem. I'll attach logs below. Expected behavior: TUN mode enables Actual behavior: TUN mode doesn't enable

How to reproduce

  1. Open Nekoray
  2. Select a server
  3. Click TUN to enable system-wide VPN
  4. Nothing happens

Provide helpful screenshots, videos, text descriptions, subscription links, etc.

log

❯ nekoray
Found exec "getcap" at "/usr/bin/getcap"
QIODevice::write (QFile, "sing-box-vpn.json"): device not open
QIODevice::write (QFile, "vpn-run-root.sh"): device not open
QIODevice::write (QFile, "groups/nekobox.json"): device not open
+ '[' 0 -ne 0 ']'
++ uname
+ '[' Linux == Darwin ']'
+ '[' -z 514 ']'
+ command -v pkill
++ dirname /usr/lib/nekoray/config/vpn-run-root.sh
+ BASEDIR=/usr/lib/nekoray/config
+ cd /usr/lib/nekoray/config
+ '[' '' '!=' stop ']'
+ start
+ '[' -z ']'
+ pre_start_linux
+ ip rule add pref 8999 fwmark 514 table main
+ ip -6 rule add pref 8999 fwmark 514 table main
+ iptables -I INPUT -s 172.19.0.2 -d 172.19.0.1 -p tcp -j ACCEPT
+ ip6tables -I INPUT -s fdfe:dcba:9876::2 -d fdfe:dcba:9876::1 -p tcp -j ACCEPT
+ /usr/lib/nekoray/nekobox_core run -c /usr/lib/nekoray/config/sing-box-vpn.json --protect-listen-path /usr/lib/nekoray/config/protect --protect-fwmark 514
sing-box: 1.9.3-neko-1 NekoBox: N/A

Error: unknown flag: --protect-listen-path
Usage:
  sing-box run [flags]

Flags:
  -h, --help   help for run

Global Flags:
  -c, --config stringArray             set configuration file path
  -C, --config-directory stringArray   set configuration directory path
  -D, --directory string               set working directory
      --disable-color                  disable color output

FATAL[0000] unknown flag: --protect-listen-path
+ true
+ stop
+ '[' -z ']'
+ iptables -D INPUT -s 172.19.0.2 -d 172.19.0.1 -p tcp -j ACCEPT
+ ip6tables -D INPUT -s fdfe:dcba:9876::2 -d fdfe:dcba:9876::1 -p tcp -j ACCEPT
+ ip rule del fwmark 514
+ ip -6 rule del fwmark 514
QIODevice::write (QFile, "groups/nekobox.json"): device not open
QIODevice::write (QFile, "sing-box-vpn.json"): device not open
QIODevice::write (QFile, "vpn-run-root.sh"): device not open
QIODevice::write (QFile, "groups/nekobox.json"): device not open
+ '[' 0 -ne 0 ']'
++ uname
+ '[' Linux == Darwin ']'
+ '[' -z 514 ']'
+ command -v pkill
++ dirname /usr/lib/nekoray/config/vpn-run-root.sh
+ BASEDIR=/usr/lib/nekoray/config
+ cd /usr/lib/nekoray/config
+ '[' '' '!=' stop ']'
+ start
+ '[' -z ']'
+ pre_start_linux
+ ip rule add pref 8999 fwmark 514 table main
+ ip -6 rule add pref 8999 fwmark 514 table main
+ iptables -I INPUT -s 172.19.0.2 -d 172.19.0.1 -p tcp -j ACCEPT
+ ip6tables -I INPUT -s fdfe:dcba:9876::2 -d fdfe:dcba:9876::1 -p tcp -j ACCEPT
+ /usr/lib/nekoray/nekobox_core run -c /usr/lib/nekoray/config/sing-box-vpn.json --protect-listen-path /usr/lib/nekoray/config/protect --protect-fwmark 514
sing-box: 1.9.3-neko-1 NekoBox: N/A

Error: unknown flag: --protect-listen-path
Usage:
  sing-box run [flags]

Flags:
  -h, --help   help for run

Global Flags:
  -c, --config stringArray             set configuration file path
  -C, --config-directory stringArray   set configuration directory path
  -D, --directory string               set working directory
      --disable-color                  disable color output

FATAL[0000] unknown flag: --protect-listen-path
+ true
+ stop
+ '[' -z ']'
+ iptables -D INPUT -s 172.19.0.2 -d 172.19.0.1 -p tcp -j ACCEPT
+ ip6tables -D INPUT -s fdfe:dcba:9876::2 -d fdfe:dcba:9876::1 -p tcp -j ACCEPT
+ ip rule del fwmark 514
+ ip -6 rule del fwmark 514
QIODevice::write (QFile, "groups/nekobox.json"): device not open

nimbold avatar Jul 02 '24 13:07 nimbold