yichya / luci-app-xray

(Almost) full feature Xray client for OpenWrt
Mozilla Public License 2.0
600 stars 513 forks source link

Errors occurred while installing version 2.0.0 #298

Closed kilofox closed 1 year ago

kilofox commented 1 year ago

Environments:

It seems there occurred some errors while installing luci-app-xray-fw4_2.0.0-1_all.ipk.

The submenu of Xray (firewall4) appeared after installation. But it shows an RPCError on the page /cgi-bin/luci/admin/services/xray_fw4:

RPC call to uci/get failed with ubus code 6: 没有权限 at ClassConstructor.handleCallReply (http://192.168.1.1/luci-static/resources/rpc.js?v=git-23.119.80898-65ef406:15:3)

Here are the full installation logs:

Executing package manager

Installing luci-app-xray-fw4 (2.0.0-1) to root...
Installing kmod-nf-tproxy (5.10.161-1) to root...
Downloading https://downloads.openwrt.org/releases/22.03.3/targets/ramips/mt7621/packages/kmod-nf-tproxy_5.10.161-1_mipsel_24kc.ipk
Installing kmod-nft-tproxy (5.10.161-1) to root...
Downloading https://downloads.openwrt.org/releases/22.03.3/targets/ramips/mt7621/packages/kmod-nft-tproxy_5.10.161-1_mipsel_24kc.ipk
Configuring kmod-nf-tproxy.
Configuring kmod-nft-tproxy.
Configuring luci-app-xray-fw4.

Errors

xray[29214]: Generating Xray configuration files...
xray[29214]: Starting Xray from /usr/bin/xray
xray[29214]: Using procd_set_param limits nofile=8192 16384
xray[29214]: Setting dnsmasq and firewall for transparent proxy...
xray[29214]: # Generated dnsmasq configurations by luci-app-xray strict-order server=/#/127.0.0.1#5300 server=127.0.0.1#5300 server=127.0.0.1#5301 server=127.0.0.1#5302 server=127.0.0.1#5303
xray[29214]: Generating firewall4 rules...
xray[29214]: Triggering firewall4 restart...
[!] Section xray option 'reload' is not supported by fw4
[!] Section xray specifies unreachable path '/var/etc/xray.include', ignoring section
transparent-proxy-ipset[29471]: default gateway available at 172.xx.xx.xx

Could you give me some advice on how to resolve this issue?

yichya commented 1 year ago

Did you install this shared package at the same time?

image
kilofox commented 1 year ago

Yes, the shared package has been installed. The fw4 package depends on it.

yichya commented 1 year ago

Please check if this file exists and its content is same as following:

root@OpenWrt:/usr/share/rpcd/acl.d# cat luci-app-xray.json
{
    "luci-app-xray": {
        "description": "Grant access to xray configurations",
        "read": {
            "uci": [
                "xray_fw4"
            ]
        },
        "write": {
            "uci": [
                "xray_fw4"
            ]
        }
    }
}
kilofox commented 1 year ago

Yes, this file does exist. Files in this directory:

-rw-r--r--    1 root     root           411 Apr 30 05:47 luci-app-firewall.json
-rw-r--r--    1 root     root           774 Apr  3 20:08 luci-app-opkg.json
-rw-r--r--    1 root     root           276 Apr 17 15:41 luci-app-xray.json
-rw-r--r--    1 root     root           946 Apr 30 06:28 luci-base.json
-rw-r--r--    1 root     root          1870 Apr 29 04:44 luci-mod-network.json
-rw-r--r--    1 root     root          1073 Apr  3 19:46 luci-mod-status-index.json
-rw-r--r--    1 root     root          2064 Apr  3 19:46 luci-mod-status.json
-rw-r--r--    1 root     root          4441 Apr 29 05:53 luci-mod-system.json
-rw-r--r--    1 root     root           179 Jan  3 08:24 unauthenticated.json
yichya commented 1 year ago

That is weird. Could you find the actual failed ubus request with Chrome DevTools?

image

kilofox commented 1 year ago

Uh oh! The page /cgi-bin/luci/admin/services/xray_fw4 is normal now. It works. I didn't do any operation at all. The "Enable Transparent Proxy" option is checked, which may from the old version. Maybe this is the reason.

kilofox commented 1 year ago

fc7b0a6e86de947c63a0f9a13e6093ba I found some HTML errors.

yichya commented 1 year ago

I found some HTML errors.

That's a problem for LuCI, not this project and that field does not need any autofilling