luci-app-ssr-plus: add anti-AD v4 rules by default
This commit is contained in:
parent
aa56a56191
commit
a01e7d7d80
@ -1,8 +1,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ssr-plus
|
||||
PKG_RELEASE:=142
|
||||
PKG_VERSION:=3
|
||||
PKG_RELEASE:=143
|
||||
PKG_VERSION:=1
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks
|
||||
@ -10,12 +13,12 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks
|
||||
default y if x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_Simple_obfs
|
||||
bool "Include Shadowsocks Simple-obfs Plugin"
|
||||
default y if x86_64
|
||||
bool "Include Shadowsocks Simple-obfs Plugin"
|
||||
default y if x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_plugin
|
||||
bool "Include Shadowsocks V2ray Plugin"
|
||||
default y if x86_64
|
||||
bool "Include Shadowsocks V2ray Plugin"
|
||||
default y if x86_64
|
||||
|
||||
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray
|
||||
bool "Include V2ray"
|
||||
@ -38,9 +41,13 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks
|
||||
default y
|
||||
endef
|
||||
|
||||
LUCI_TITLE:=SS/SSR/V2Ray/Trojan LuCI interface
|
||||
LUCI_PKGARCH:=all
|
||||
LUCI_DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +pdnsd-alt +wget +lua \
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=luci
|
||||
CATEGORY:=LuCI
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=SS/SSR/V2Ray/Trojan LuCI interface
|
||||
PKGARCH:=all
|
||||
DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsmasq-full +coreutils +coreutils-base64 +pdnsd-alt +wget +lua \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-redir \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Simple_obfs:simple-obfs \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_plugin:v2ray-plugin \
|
||||
@ -50,15 +57,64 @@ LUCI_DEPENDS:=+shadowsocksr-libev-alt +ipset +ip-full +iptables-mod-tproxy +dnsm
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:kcptun-client \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server \
|
||||
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks:srelay
|
||||
endef
|
||||
|
||||
define Package/luci-app-ssr-plus/conffiles
|
||||
/etc/ssr_ip
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/china_ssr.txt
|
||||
/etc/config/shadowsocksr
|
||||
/etc/config/white.list
|
||||
/etc/config/black.list
|
||||
/etc/dnsmasq.ssr/ad.conf
|
||||
/etc/dnsmasq.ssr/gfw_list.conf
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_DATA) ./root/etc/china_ssr.txt $(1)/etc/china_ssr.txt
|
||||
|
||||
define Package/luci-app-ssr-plus/postinst
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./root/etc/config/shadowsocksr $(1)/etc/config/shadowsocksr
|
||||
$(INSTALL_DATA) ./root/etc/config/*.list $(1)/etc/config/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/dnsmasq.oversea
|
||||
$(INSTALL_DATA) ./root/etc/dnsmasq.oversea/* $(1)/etc/dnsmasq.oversea/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/dnsmasq.ssr
|
||||
$(INSTALL_DATA) ./root/etc/dnsmasq.ssr/* $(1)/etc/dnsmasq.ssr/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./root/etc/init.d/* $(1)/etc/init.d/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./root/etc/uci-defaults/* $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) ./root/usr/bin/* $(1)/usr/bin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/shadowsocksr
|
||||
$(INSTALL_BIN) ./root/usr/share/shadowsocksr/*.sh $(1)/usr/share/shadowsocksr/
|
||||
$(INSTALL_DATA) ./root/usr/share/shadowsocksr/*.lua $(1)/usr/share/shadowsocksr/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
|
||||
$(INSTALL_DATA) ./luasrc/controller/*.lua $(1)/usr/lib/lua/luci/controller/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/shadowsocksr
|
||||
$(INSTALL_DATA) ./luasrc/model/cbi/shadowsocksr/*.lua $(1)/usr/lib/lua/luci/model/cbi/shadowsocksr/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/shadowsocksr
|
||||
$(INSTALL_DATA) ./luasrc/view/shadowsocksr/* $(1)/usr/lib/lua/luci/view/shadowsocksr/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
||||
po2lmo ./po/zh-cn/ssr-plus.po $(1)/usr/lib/lua/luci/i18n/ssr-plus.zh-cn.lmo
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
( . /etc/uci-defaults/luci-ssr-plus ) && rm -f /etc/uci-defaults/luci-ssr-plus
|
||||
@ -68,7 +124,7 @@ fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/luci-app-ssr-plus/prerm
|
||||
define Package/$(PKG_NAME)/prerm
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
/etc/init.d/shadowsocksr disable
|
||||
@ -77,4 +133,11 @@ fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
define Package/$(PKG_NAME)/postrm
|
||||
#!/bin/sh
|
||||
rm -rf /etc/china_ssr.txt /etc/dnsmasq.ssr /etc/dnsmasq.oversea /etc/config/shadowsocksr /etc/config/black.list \
|
||||
/etc/config/gfw.list /etc/config/white.list >/dev/null 2>&1
|
||||
exit 0
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@ -10,6 +10,8 @@ config global
|
||||
option switch_timeout '5'
|
||||
option switch_time '667'
|
||||
option switch_try_count '3'
|
||||
option adblock '0'
|
||||
option adblock_url 'https://gitee.com/privacy-protection-tools/anti-ad/raw/master/easylist.txt'
|
||||
|
||||
config socks5_proxy
|
||||
option socks '0'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user