├── .gitignore ├── README.md ├── Makefile ├── packages ├── mdig │ └── Makefile ├── ip2net │ └── Makefile ├── tpws │ └── Makefile └── nfqws │ └── Makefile └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # zapret-openwrt 2 | OpenWrt packages of https://github.com/bol-van/zapret 3 | 4 | What made: 5 | * Single command for *.IPK compile 6 | * Rewrite packages assembly makefiles 7 | 8 | TODO: 9 | * Make CI to publish *.ipk releases of Zapret files 10 | * Make custom packages feed(for auto update) 11 | * Add application configs template 12 | * Rewrite install_easy.sh autorun when installing 13 | * Integrate with UCI 14 | * Write an admin webinterface for luci 15 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ARCH ?= mipsel_24kc 2 | 3 | #Run OpenWrt SDK in it update packages and compile zapret 4 | compile: 5 | docker run --rm \ 6 | -v $(shell pwd)/bin/:/home/build/openwrt/bin \ 7 | -v $(shell pwd)/packages/:/home/build/openwrt/package/zapret \ 8 | openwrtorg/sdk:$(ARCH) bash -c "\ 9 | ./scripts/feeds update base packages && \ 10 | ./scripts/feeds install -a && \ 11 | make defconfig && \ 12 | make package/{tpws,nfqws,ip2net,mdig}/compile \ 13 | " 14 | 15 | sdk: 16 | docker run -it --rm \ 17 | -v $(shell pwd)/bin/:/home/build/openwrt/bin \ 18 | -v $(shell pwd)/packages/:/home/build/openwrt/package/zapret \ 19 | openwrtorg/sdk:$(ARCH) 20 | -------------------------------------------------------------------------------- /packages/mdig/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=mdig 4 | PKG_RELEASE:=1 5 | 6 | PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git 7 | PKG_SOURCE_PROTO:=git 8 | PKG_SOURCE_VERSION:=dccf672d8a9f4a0ba7e671eb1eadd52f9ce7b4d3 9 | MAKE_PATH:=mdig 10 | 11 | include $(INCLUDE_DIR)/package.mk 12 | 13 | define Package/mdig 14 | SECTION:=net 15 | CATEGORY:=Network 16 | TITLE:=mdig 17 | SUBMENU:=Zapret 18 | endef 19 | 20 | define Build/Prepare 21 | $(Build/Prepare/Default) 22 | rm $(PKG_BUILD_DIR)/$(MAKE_PATH)/mdig 23 | endef 24 | 25 | define Package/mdig/install 26 | $(INSTALL_DIR) $(1)/opt/zapret/mdig 27 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/mdig $(1)/opt/zapret/mdig 28 | endef 29 | 30 | $(eval $(call BuildPackage,mdig)) 31 | -------------------------------------------------------------------------------- /packages/ip2net/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=ip2net 4 | PKG_RELEASE:=1 5 | 6 | PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git 7 | PKG_SOURCE_PROTO:=git 8 | PKG_SOURCE_VERSION:=dccf672d8a9f4a0ba7e671eb1eadd52f9ce7b4d3 9 | MAKE_PATH:=ip2net 10 | 11 | include $(INCLUDE_DIR)/package.mk 12 | 13 | define Package/ip2net 14 | SECTION:=net 15 | CATEGORY:=Network 16 | TITLE:=ip2net 17 | SUBMENU:=Zapret 18 | endef 19 | 20 | define Build/Prepare 21 | $(Build/Prepare/Default) 22 | rm $(PKG_BUILD_DIR)/$(MAKE_PATH)/ip2net 23 | endef 24 | 25 | define Package/ip2net/install 26 | $(INSTALL_DIR) $(1)/opt/zapret/ip2net 27 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/ip2net $(1)/opt/zapret/ip2net 28 | endef 29 | 30 | $(eval $(call BuildPackage,ip2net)) 31 | -------------------------------------------------------------------------------- /packages/tpws/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=tpws 4 | PKG_RELEASE:=1 5 | 6 | PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git 7 | PKG_SOURCE_PROTO:=git 8 | PKG_SOURCE_VERSION:=dccf672d8a9f4a0ba7e671eb1eadd52f9ce7b4d3 9 | MAKE_PATH:=tpws 10 | 11 | include $(INCLUDE_DIR)/package.mk 12 | 13 | define Package/tpws 14 | SECTION:=net 15 | CATEGORY:=Network 16 | TITLE:=tpws 17 | SUBMENU:=Zapret 18 | DEPENDS:=+zlib +libcap 19 | endef 20 | 21 | define Build/Prepare 22 | $(Build/Prepare/Default) 23 | rm $(PKG_BUILD_DIR)/$(MAKE_PATH)/tpws 24 | endef 25 | 26 | define Package/tpws/install 27 | $(INSTALL_DIR) $(1)/opt/zapret/tpws 28 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/tpws $(1)/opt/zapret/tpws 29 | endef 30 | 31 | $(eval $(call BuildPackage,tpws)) 32 | -------------------------------------------------------------------------------- /packages/nfqws/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=nfqws 4 | PKG_RELEASE:=1 5 | 6 | PKG_SOURCE_URL:=https://github.com/bol-van/zapret.git 7 | PKG_SOURCE_PROTO:=git 8 | PKG_SOURCE_VERSION:=dccf672d8a9f4a0ba7e671eb1eadd52f9ce7b4d3 9 | MAKE_PATH:=nfq 10 | 11 | include $(INCLUDE_DIR)/package.mk 12 | 13 | define Package/nfqws 14 | SECTION:=net 15 | CATEGORY:=Network 16 | TITLE:=nfqws 17 | SUBMENU:=Zapret 18 | DEPENDS:=+libnetfilter-queue +libcap +zlib 19 | endef 20 | 21 | define Build/Prepare 22 | $(Build/Prepare/Default) 23 | rm $(PKG_BUILD_DIR)/$(MAKE_PATH)/nfqws 24 | endef 25 | 26 | define Package/nfqws/install 27 | $(INSTALL_DIR) $(1)/opt/zapret/nfq 28 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/nfqws $(1)/opt/zapret/nfq 29 | endef 30 | 31 | $(eval $(call BuildPackage,nfqws)) 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Andrey Kuznetsov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------