update 2026-09-05 15:59:29

This commit is contained in:
action
2026-09-05 15:59:29 +08:00
parent 440cac507b
commit 2cd4730a13
2 changed files with 70 additions and 17 deletions
@@ -49,17 +49,24 @@ return view.extend({
s = m.section(form.TypedSection);
s.anonymous = true;
s.render = function() {
poll.add(function() {
return Promise.resolve().then(function() {
let view = document.getElementById('service_status');
view.innerHTML = renderStatus(data.isRunning, webport);
});
});
poll.add(function() {
return fs.stat('/var/run/filebrowser.pid').then(function(stat) {
let view = document.getElementById('service_status');
if (view) {
view.innerHTML = renderStatus(stat, webport);
}
}).catch(function() {
let view = document.getElementById('service_status');
if (view) {
view.innerHTML = renderStatus(null, webport);
}
});
});
return E('div', { class: 'cbi-section', id: 'status_bar' }, [
E('p', { id: 'service_status' }, _('Collecting data...'))
]);
}
return E('div', { class: 'cbi-section', id: 'status_bar' }, [
E('p', { id: 'service_status' }, _('Collecting data...'))
]);
};
s = m.section(form.NamedSection, 'config', 'filebrowser');
@@ -75,10 +82,6 @@ return view.extend({
o = s.option(form.Value, 'root_path', _('Root directory'));
o.default = '/';
o.rmempty = false;
o = s.option(form.Value, 'base_url', _('Base url'));
o.default = '/';
o.rmempty = false;
return m.render();
}
+53 -3
View File
@@ -37,12 +37,36 @@ endif
PKG_NAME:=pgyvpn
PKG_VERSION:=3.1.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=pgyvpnsvr
PKG_SOURCE_URL:=https://mirrors.oray.com/orayos/packages/$(PKG_NAME)/$(PKG_ARCH_PGYYPN)/$(PKG_VERSION)/bin
PKG_HASH:=skip
OPENSSL_COMPAT_VERSION:=1.1.1w
OPENSSL_COMPAT_SOURCE:=openssl-$(OPENSSL_COMPAT_VERSION).tar.gz
OPENSSL_COMPAT_HASH:=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8
OPENSSL_COMPAT_TARGET:=linux-generic32
ifeq ($(ARCH),arm)
OPENSSL_COMPAT_TARGET:=linux-armv4
endif
ifeq ($(ARCH),aarch64)
OPENSSL_COMPAT_TARGET:=linux-aarch64
endif
ifeq ($(ARCH),mips)
OPENSSL_COMPAT_TARGET:=linux-mips32
endif
ifeq ($(ARCH),mipsel)
OPENSSL_COMPAT_TARGET:=linux-mips32
endif
ifeq ($(ARCH),i386)
OPENSSL_COMPAT_TARGET:=linux-x86
endif
ifeq ($(ARCH),x86_64)
OPENSSL_COMPAT_TARGET:=linux-x86_64
endif
PKG_FLAGS:=nonshared
PKG_MAINTAINER:=Oray <developer@oray.com>
@@ -53,7 +77,7 @@ define Package/pgyvpn
CATEGORY:=Network
SUBMENU:=VPN
DEPENDS:=@(arm||aarch64||mips||mipsel||i386||x86_64) \
+iptables +libc +libopenssl +librt \
+iptables +libc +librt \
+libpthread +libstdcpp +kmod-tun
TITLE:=PuGongYing VPN, Fast networking
URL:=https://pgy.oray.com/
@@ -69,16 +93,39 @@ define Download/extra
URL:=$(PKG_SOURCE_URL)
HASH:=skip
endef
define Download/openssl-compat
FILE:=$(OPENSSL_COMPAT_SOURCE)
URL:=https://www.openssl.org/source/old/1.1.1
HASH:=$(OPENSSL_COMPAT_HASH)
endef
$(eval $(call Download,extra))
$(eval $(call Download,openssl-compat))
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(OPENSSL_COMPAT_SOURCE)
mv $(DL_DIR)/{pgyvpn_oraysl,pgyvpnsvr} $(PKG_BUILD_DIR)
chmod +x $(PKG_BUILD_DIR)/{pgyvpn_oraysl,pgyvpnsvr}
endef
define Build/Configure
( cd $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION) && \
CC="$(TARGET_CC)" \
./Configure $(OPENSSL_COMPAT_TARGET) \
--prefix=/usr \
--libdir=lib \
--cross-compile-prefix="$(TARGET_CROSS)" \
shared no-tests no-engine no-async no-comp no-asm \
$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
)
endef
define Build/Compile
true
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION) \
CC="$(TARGET_CC)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
build_libs
endef
define Package/pgyvpn/install
@@ -87,8 +134,11 @@ define Package/pgyvpn/install
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/share/pgyvpn
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/{pgyvpn_oraysl,pgyvpnsvr} $(1)/usr/sbin
$(INSTALL_DATA) $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION)/libssl.so.1.1 $(1)/usr/lib
$(INSTALL_DATA) $(PKG_BUILD_DIR)/openssl-$(OPENSSL_COMPAT_VERSION)/libcrypto.so.1.1 $(1)/usr/lib
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d
$(INSTALL_CONF) ./files/etc/config/* $(1)/etc/config
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/* $(1)/etc/hotplug.d/iface