diff --git a/.github/build-ipk.sh b/.github/build-ipk.sh index 73527e6..71c3bd0 100755 --- a/.github/build-ipk.sh +++ b/.github/build-ipk.sh @@ -29,7 +29,10 @@ cp -fpR "$PKG_DIR/htdocs"/* "$TEMP_PKG_DIR/www/" cp -fpR "$PKG_DIR/root"/* "$TEMP_PKG_DIR/" echo -e "/etc/config/homeproxy" > "$TEMP_PKG_DIR/CONTROL/conffiles" -echo -e "/etc/homeproxy/certs/" > "$TEMP_PKG_DIR/lib/upgrade/keep.d/$PKG_NAME" +cat > "$TEMP_PKG_DIR/lib/upgrade/keep.d/$PKG_NAME" <<-EOF +/etc/homeproxy/certs/ +/etc/homeproxy/resources/ +EOF cat > "$TEMP_PKG_DIR/CONTROL/control" <<-EOF Package: $PKG_NAME diff --git a/Makefile b/Makefile index 8537e8f..1dd5db5 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ LUCI_DEPENDS:= \ define Package/luci-app-homeproxy/conffiles /etc/config/homeproxy /etc/homeproxy/certs/ +/etc/homeproxy/resources/ endef include $(TOPDIR)/feeds/luci/luci.mk diff --git a/htdocs/luci-static/resources/view/homeproxy/node.js b/htdocs/luci-static/resources/view/homeproxy/node.js index 9208d8c..e06c732 100644 --- a/htdocs/luci-static/resources/view/homeproxy/node.js +++ b/htdocs/luci-static/resources/view/homeproxy/node.js @@ -796,7 +796,7 @@ return view.extend({ so = ss.option(form.ListValue, 'packet_encoding', _('Packet encoding')); so.value('', _('none')); - so.value('packet', _('packet (v2ray-core v5+)')); + so.value('packetaddr', _('packet addr (v2ray-core v5+)')); so.value('xudp', _('Xudp (Xray-core)')); so.default = 'xudp'; so.depends('type', 'vless'); @@ -1076,7 +1076,7 @@ return view.extend({ o = s.taboption('subscription', form.ListValue, 'packet_encoding', _('Default packet encoding')); o.value('', _('none')); - o.value('packet', _('packet (v2ray-core v5+)')); + o.value('packetaddr', _('packet addr (v2ray-core v5+)')); o.value('xudp', _('Xudp (Xray-core)')); o.default = 'xudp'; diff --git a/root/etc/homeproxy/scripts/generate_sing-box.uc b/root/etc/homeproxy/scripts/generate_sing-box.uc index dde6706..b596d29 100755 --- a/root/etc/homeproxy/scripts/generate_sing-box.uc +++ b/root/etc/homeproxy/scripts/generate_sing-box.uc @@ -507,8 +507,11 @@ if (server_enabled === '1') transport: !isEmpty(cfg.transport) ? { type: cfg.transport, - host: cfg.http_host || cfg.ws_host, + host: cfg.http_host, path: cfg.http_path || cfg.ws_path, + headers: cfg.ws_host ? { + Host: cfg.ws_host + } : null, method: cfg.http_method, max_early_data: cfg.websocket_early_data, early_data_header_name: cfg.websocket_early_data_header,