diff --git a/hysteria/Makefile b/hysteria/Makefile index adb472bca..cfd560d8b 100644 --- a/hysteria/Makefile +++ b/hysteria/Makefile @@ -45,7 +45,7 @@ endef define Package/hysteria/install $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) - $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmd $(1)/usr/bin/hysteria endef diff --git a/naiveproxy/Makefile b/naiveproxy/Makefile index 5a5e63b1e..fa0d08cbe 100644 --- a/naiveproxy/Makefile +++ b/naiveproxy/Makefile @@ -19,7 +19,6 @@ PKG_MAINTAINER:=Tianling Shen ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),) PKG_BUILD_DEPENDS+= ninja/host endif -NINJA ?= ninja PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 diff --git a/sagernet-core/Makefile b/sagernet-core/Makefile index ee200b9a6..7f1b2f059 100644 --- a/sagernet-core/Makefile +++ b/sagernet-core/Makefile @@ -45,14 +45,6 @@ define Package/sagernet-core CONFLICTS:=v2ray-core xray-core endef -define Package/sagernet-example - $(call Package/sagernet/template) - TITLE+= (example configs) - DEPENDS:=sagernet-core - CONFLICTS:=v2ray-example - PKGARCH:=all -endef - define Package/sagernet-extra $(call Package/sagernet/template) TITLE+= (extra resources) @@ -72,23 +64,12 @@ define Package/sagernet-core/description This is a v2ray-core fork for SagerNet. endef -define Package/sagernet-example/description - $(call Package/sagernet/description) - - This includes example configuration files for sagernet-core. -endef - define Package/sagernet-extra/description $(call Package/sagernet/description) This includes extra resources for sagernet-core. endef -define Package/sagernet-core/conffiles -/etc/config/v2ray -/etc/v2ray/ -endef - LIBCORE_NAME:=LibSagerNetCore LIBCORE_DATE:=2022-06-10 LIBCORE_VERSION:=9ef7ab1de7604ab959222d4de8ab6152a402e432 @@ -119,20 +100,6 @@ define Package/sagernet-core/install $(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/v2ray $(LN) v2ray $(1)/usr/bin/xray - - $(INSTALL_DIR) $(1)/etc/v2ray/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/config.json $(1)/etc/v2ray/ - - $(INSTALL_DIR) $(1)/etc/config/ - $(INSTALL_CONF) $(CURDIR)/files/v2ray.conf $(1)/etc/config/v2ray - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) $(CURDIR)/files/v2ray.init $(1)/etc/init.d/v2ray -endef - -define Package/sagernet-example/install - $(INSTALL_DIR) $(1)/etc/v2ray/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_socks_vmess.json $(1)/etc/v2ray/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_vmess_freedom.json $(1)/etc/v2ray/ endef define Package/sagernet-extra/install @@ -142,5 +109,4 @@ endef $(eval $(call Download,libcore)) $(eval $(call BuildPackage,sagernet-core)) -$(eval $(call BuildPackage,sagernet-example)) $(eval $(call BuildPackage,sagernet-extra)) diff --git a/sagernet-core/files/v2ray.conf b/sagernet-core/files/v2ray.conf deleted file mode 100644 index 6df1e10fd..000000000 --- a/sagernet-core/files/v2ray.conf +++ /dev/null @@ -1,11 +0,0 @@ - -config v2ray 'enabled' - option enabled '0' - -config v2ray 'config' - option confdir '/etc/v2ray' - list conffiles '/etc/v2ray/config.json' - option datadir '/usr/share/v2ray' - option format 'json' - option memconservative '1' - diff --git a/sagernet-core/files/v2ray.init b/sagernet-core/files/v2ray.init deleted file mode 100755 index e43f51183..000000000 --- a/sagernet-core/files/v2ray.init +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh /etc/rc.common - -USE_PROCD=1 -START=99 - -CONF="v2ray" -PROG="/usr/bin/v2ray" - -start_service() { - config_load "$CONF" - - local enabled - config_get_bool enabled "enabled" "enabled" "0" - [ "$enabled" -eq "0" ] && exit 1 - - local confdir - local conffiles - local datadir - local format - - config_get confdir "config" "confdir" - config_get conffiles "config" "conffiles" - config_get datadir "config" "datadir" "/usr/share/v2ray" - config_get format "config" "format" "json" - config_get_bool memconservative "config" "memconservative" "1" - - procd_open_instance "$CONF" - procd_set_param command "$PROG" run - [ -n "$confdir" ] && procd_append_param command -confdir "$confdir" - [ -n "$conffiles" ] && { - for i in $conffiles - do - procd_append_param command -config "$i" - done - } - [ -n "$format" ] && procd_append_param command -format "$format" - procd_set_param env v2ray.local.asset="$datadir" - [ "$memconservative" -eq "1" ] && procd_append_param env V2RAY_CONF_GEOLOADER="memconservative" - procd_set_param file $conffiles - - procd_set_param limits core="unlimited" - procd_set_param limits nofile="1000000 1000000" - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_set_param respawn - - procd_close_instance -} - -reload_service() { - stop - start -} - -service_triggers() { - procd_add_reload_trigger "$CONF" -} diff --git a/v2ray-plugin/Makefile b/v2ray-plugin/Makefile index 5be479e4d..ab2d85d32 100644 --- a/v2ray-plugin/Makefile +++ b/v2ray-plugin/Makefile @@ -17,37 +17,16 @@ PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=madeye -PKG_CONFIG_DEPENDS:= \ - CONFIG_V2RAY_PLUGIN_COMPRESS_GOPROXY \ - CONFIG_V2RAY_PLUGIN_COMPRESS_UPX - PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 GO_PKG:=github.com/shadowsocks/v2ray-plugin -GO_PKG_LDFLAGS:=-s -w GO_PKG_LDFLAGS_X:=main.VERSION=v$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk -define Package/v2ray-plugin/config -config V2RAY_PLUGIN_COMPRESS_GOPROXY - bool "Compiling with GOPROXY proxy" - default n - -config V2RAY_PLUGIN_COMPRESS_UPX - bool "Compress executable files with UPX" - depends on !mips64 - default n -endef - -ifeq ($(CONFIG_V2RAY_PLUGIN_COMPRESS_GOPROXY),y) - export GO111MODULE=on - export GOPROXY=https://goproxy.bj.bcebos.com -endif - define Package/v2ray-plugin SECTION:=net CATEGORY:=Network @@ -57,12 +36,5 @@ define Package/v2ray-plugin DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle endef -define Build/Compile - $(call GoPackage/Build/Compile) -ifeq ($(CONFIG_V2RAY_PLUGIN_COMPRESS_UPX),y) - $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin -endif -endef - $(eval $(call GoBinPackage,v2ray-plugin)) $(eval $(call BuildPackage,v2ray-plugin))