2019-11-11 09:34:14 +08:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=luci-app-vssr
|
2021-05-12 21:41:42 +08:00
|
|
|
PKG_VERSION:=1.22-2
|
|
|
|
PKG_RELEASE:=20210512
|
2019-11-11 09:34:14 +08:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/$(PKG_NAME)/config
|
2020-12-06 22:32:56 +08:00
|
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Xray
|
|
|
|
bool "Include Xray"
|
2021-02-05 00:00:44 +08:00
|
|
|
default y if i386||x86_64||arm||aarch64
|
2020-12-04 18:06:35 +08:00
|
|
|
|
2020-02-10 22:46:26 +08:00
|
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Trojan
|
|
|
|
bool "Include Trojan"
|
2020-08-23 21:56:29 +08:00
|
|
|
default y if i386||x86_64||arm||aarch64
|
|
|
|
|
|
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun
|
|
|
|
bool "Include Kcptun"
|
|
|
|
default n
|
2020-02-10 22:46:26 +08:00
|
|
|
|
2021-05-12 21:41:42 +08:00
|
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_Xray_plugin
|
|
|
|
bool "Include Shadowsocks Xray Plugin"
|
|
|
|
default y if i386||x86_64||arm||aarch64
|
2021-05-16 00:38:03 +08:00
|
|
|
|
|
|
|
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server
|
|
|
|
bool "Include ShadowsocksR Libev Server"
|
|
|
|
default y if i386||x86_64||arm||aarch64
|
2019-11-11 09:34:14 +08:00
|
|
|
endef
|
|
|
|
|
2020-08-23 21:56:29 +08:00
|
|
|
PKG_CONFIG_DEPENDS:= \
|
2020-12-06 22:32:56 +08:00
|
|
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray \
|
2020-08-23 21:56:29 +08:00
|
|
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Trojan \
|
|
|
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \
|
2021-02-20 20:50:36 +08:00
|
|
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray_plugin \
|
2021-05-16 00:38:03 +08:00
|
|
|
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server
|
2020-08-23 21:56:29 +08:00
|
|
|
|
2019-11-11 09:34:14 +08:00
|
|
|
define Package/luci-app-vssr
|
|
|
|
SECTION:=luci
|
|
|
|
CATEGORY:=LuCI
|
|
|
|
SUBMENU:=3. Applications
|
2021-02-05 00:00:44 +08:00
|
|
|
TITLE:=A New SS/SSR/Xray/Trojan LuCI interface
|
2019-11-11 09:34:14 +08:00
|
|
|
PKGARCH:=all
|
2021-05-12 21:41:42 +08:00
|
|
|
DEPENDS:=+ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +bash +pdnsd-alt +wget-ssl +lua +luasocket +lua-maxminddb \
|
|
|
|
+shadowsocks-libev-ss-local +shadowsocks-libev-ss-redir +shadowsocksr-libev-ssr-local +shadowsocksr-libev-ssr-redir +shadowsocksr-libev-ssr-check +simple-obfs \
|
2021-02-04 01:42:49 +08:00
|
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Xray:xray-core \
|
2020-02-10 22:46:26 +08:00
|
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:trojan \
|
|
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:ipt2socks \
|
2020-08-23 21:56:29 +08:00
|
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:kcptun-client \
|
2021-02-20 20:50:36 +08:00
|
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_Xray_plugin:xray-plugin \
|
2021-05-21 21:33:38 +08:00
|
|
|
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server
|
2019-11-11 09:34:14 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
endef
|
|
|
|
|
2020-11-28 13:38:12 +08:00
|
|
|
define Package/luci-app-vssr/conffiles
|
|
|
|
/etc/vssr/
|
|
|
|
/etc/config/vssr
|
|
|
|
endef
|
|
|
|
|
2019-11-11 09:34:14 +08:00
|
|
|
define Package/luci-app-vssr/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
|
|
|
|
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
|
|
|
|
$(INSTALL_DIR) $(1)/
|
|
|
|
cp -pR ./root/* $(1)/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
|
|
|
po2lmo ./po/zh-cn/vssr.po $(1)/usr/lib/lua/luci/i18n/vssr.zh-cn.lmo
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/luci-app-vssr/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
|
|
( . /etc/uci-defaults/luci-vssr ) && rm -f /etc/uci-defaults/luci-vssr
|
2020-02-20 22:10:15 +08:00
|
|
|
rm -rf /tmp/luci-indexcache
|
|
|
|
rm -rf /tmp/luci-modulecache/*
|
2019-11-11 09:34:14 +08:00
|
|
|
chmod 755 /etc/init.d/vssr >/dev/null 2>&1
|
|
|
|
/etc/init.d/vssr enable >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/luci-app-vssr/prerm
|
|
|
|
#!/bin/sh
|
|
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
|
|
/etc/init.d/vssr disable
|
|
|
|
/etc/init.d/vssr stop
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,luci-app-vssr))
|