diff --git a/brook/Makefile b/brook/Makefile index d7946c8..8994f54 100644 --- a/brook/Makefile +++ b/brook/Makefile @@ -1,21 +1,18 @@ +# SPDX-License-Identifier: GPL-3.0-only # -# Copyright (C) 2021 ImmortalWrt -# -# -# This is free software, licensed under the GNU General Public License v3. -# +# Copyright (C) 2021 ImmortalWrt.org include $(TOPDIR)/rules.mk PKG_NAME:=brook PKG_VERSION:=20210701 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/txthinking/brook/tar.gz/v$(PKG_VERSION)? PKG_HASH:=92c2253349af05ea5aa7a45cddd39ca638c732b2ffdb5066a5f03d2df40cb0b5 -PKG_MAINTAINER:=CN_SZTL +PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=LICENSE @@ -35,17 +32,17 @@ include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk define Package/brook - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=A cross-platform proxy software - DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle - URL:=https://github.com/txthinking/brook + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=A cross-platform proxy software + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle + URL:=https://github.com/txthinking/brook endef define Package/brook/description - Brook is a cross-platform strong encryption and not detectable proxy. - Zero-Configuration. + Brook is a cross-platform strong encryption and not detectable proxy. + Zero-Configuration. endef define Package/brook/config diff --git a/chinadns-ng/Makefile b/chinadns-ng/Makefile index 4f3564e..b4dfc05 100644 --- a/chinadns-ng/Makefile +++ b/chinadns-ng/Makefile @@ -1,41 +1,40 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2021 ImmortalWrt.org + include $(TOPDIR)/rules.mk PKG_NAME:=chinadns-ng PKG_VERSION:=1.0-beta.25 -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELESE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/zfl9/chinadns-ng.git -PKG_MIRROR_HASH:=3b66fc0888d9488e3b8e39df3016d51fae1b43325d292381e94aa3c7d2318282 +PKG_SOURCE_DATE:=2021-05-08 PKG_SOURCE_VERSION:=14cc6348d67b09cae37d9bce554c89c2c0e0b265 - -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_MIRROR_HASH:=3b66fc0888d9488e3b8e39df3016d51fae1b43325d292381e94aa3c7d2318282 PKG_LICENSE:=AGPL-3.0-only PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=pexcn +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk define Package/chinadns-ng - SECTION:=net - CATEGORY:=Network - TITLE:=ChinaDNS next generation, refactoring with epoll and ipset - URL:=https://github.com/zfl9/chinadns-ng - DEPENDS:=+ipset -endef - -define Package/chinadns-ng/description -ChinaDNS next generation, refactoring with epoll and ipset. -endef - -define Package/chinadns-ng/conffiles + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=ChinaDNS next generation, refactoring with epoll and ipset. + URL:=https://github.com/zfl9/chinadns-ng + DEPENDS:=+ipset endef define Package/chinadns-ng/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/chinadns-ng $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/chinadns-ng $(1)/usr/bin endef $(eval $(call BuildPackage,chinadns-ng)) diff --git a/dns2socks/Makefile b/dns2socks/Makefile index 051b693..47662fa 100644 --- a/dns2socks/Makefile +++ b/dns2socks/Makefile @@ -1,46 +1,38 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2021 ImmortalWrt.org + include $(TOPDIR)/rules.mk PKG_NAME:=dns2socks PKG_VERSION:=2.1 -PKG_RELEASE:=20200218 +PKG_RELEASE:=2 PKG_SOURCE:=SourceCode.zip -PKG_SOURCE_SUBDIR:=DNS2SOCKS PKG_SOURCE_URL:=@SF/dns2socks -PKG_MD5SUM:=ec82de936ad004cc940502cd2a1bff5b +PKG_SOURCE_DATE:=2020-02-18 +PKG_HASH:=406b5003523577d39da66767adfe54f7af9b701374363729386f32f6a3a995f4 PKG_MAINTAINER:=ghostmaker PKG_LICENSE:=BSD-3-Clause - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 -PKG_BUILD_PARALLEL:=1 +PKG_LICENSE_FILE:=LICENSE include $(INCLUDE_DIR)/package.mk -define Package/dns2socks/Default +UNZIP_CMD:=unzip -q -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE) + +define Package/dns2socks SECTION:=net CATEGORY:=Network SUBMENU:=IP Addresses and Names - TITLE:=The utility to resolve DNS requests via a SOCKS5 tunnel. + TITLE:=DNS to SOCKS or HTTP proxy URL:=http://dns2socks.sourceforge.net/ - MAINTAINER:=ghostmaker DEPENDS:=+libpthread endef -define Package/dns2socks - $(call Package/dns2socks/Default) -endef - define Package/dns2socks/description - This is a utility to resolve DNS requests via a SOCKS5 tunnel and caches the answers. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - unzip $(DL_DIR)/$(PKG_SOURCE) -d $(PKG_BUILD_DIR) + This is a command line utility to resolve DNS requests via + a SOCKS tunnel like Tor or a HTTP proxy. endef define Build/Compile @@ -48,19 +40,14 @@ define Build/Compile $(TARGET_CFLAGS) \ $(TARGET_CPPFLAGS) \ $(FPIC) \ - -o $(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/$(PKG_NAME) \ - $(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/DNS2SOCKS.c \ + -o $(PKG_BUILD_DIR)/DNS2SOCKS/dns2socks \ + $(PKG_BUILD_DIR)/DNS2SOCKS/DNS2SOCKS.c \ $(TARGET_LDFLAGS) -pthread endef -define Build/Install -endef - define Package/dns2socks/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/$(PKG_NAME) $(1)/usr/bin/dns2socks + $(INSTALL_BIN) $(PKG_BUILD_DIR)/DNS2SOCKS/dns2socks $(1)/usr/bin/dns2socks endef -#$(shell $(RM) $(DL_DIR)/$(PKG_SOURCE)) - $(eval $(call BuildPackage,dns2socks)) diff --git a/ipt2socks/Makefile b/ipt2socks/Makefile index de36d07..75ee856 100644 --- a/ipt2socks/Makefile +++ b/ipt2socks/Makefile @@ -1,40 +1,43 @@ +# SPDX-License-Identifier: GPL-3.0-only # -# Copyright (C) 2014 OpenWrt-dist -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2021 ImmortalWrt.org include $(TOPDIR)/rules.mk PKG_NAME:=ipt2socks PKG_VERSION:=1.1.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/zfl9/ipt2socks.git -PKG_MIRROR_HASH:=914465049c065c9fd21a6eabb96418acf134f2b6f0a1b861d5987ae0d10da83a -PKG_SOURCE_VERSION:=384dab4bae5ed9402e07ec1950e502c05812bc26 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/zfl9/ipt2socks/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=73a2498dc95934c225d358707e7f7d060b5ce81aa45260ada09cbd15207d27d1 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +PKG_LICENSE:=AGPL-3.0 +PKG_LICENSE_FILE:=LICENSE include $(INCLUDE_DIR)/package.mk define Package/ipt2socks - SECTION:=net - CATEGORY:=Network - TITLE:=Utility for converting iptables (REDIRECT/TPROXY) to SOCKS5 - URL:=https://github.com/zfl9/ipt2socks + SECTION:=net + CATEGORY:=Network + TITLE:=Convert iptables to socks5 + URL:=https://github.com/zfl9/ipt2socks + DEPENDS:=+libpthread +libuv endef define Package/ipt2socks/description -Utility for converting iptables (REDIRECT/TPROXY) to SOCKS5. + Utility for converting iptables (redirect/tproxy) to socks5. endef +TARGET_CFLAGS += $(FPIC) -flto +TARGET_LDFLAGS += -flto + define Package/ipt2socks/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ipt2socks $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/ipt2socks $(1)/usr/bin endef $(eval $(call BuildPackage,ipt2socks)) diff --git a/kcptun/Makefile b/kcptun/Makefile index 113b8dd..af5024c 100644 --- a/kcptun/Makefile +++ b/kcptun/Makefile @@ -1,23 +1,17 @@ -# -# Copyright (C) 2019 Xingwang Liao -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - include $(TOPDIR)/rules.mk PKG_NAME:=kcptun -PKG_VERSION:=20210624 -PKG_RELEASE:=1 +PKG_VERSION:=20210922 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/xtaci/kcptun/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=3f39eb2e6ee597751888b710afc83147b429c232591e91bc97565b32895f33a8 +PKG_SOURCE_URL:=https://codeload.github.com/xtaci/kcptun/tar.gz/v${PKG_VERSION}? +PKG_SOURCE_DATE:=2021-09-22 +PKG_HASH:=f6a08f0fe75fa85d15f9c0c28182c69a5ad909229b4c230a8cbe38f91ba2d038 +PKG_MAINTAINER:=Dengfeng Liu , Chao Liu PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE.md -PKG_MAINTAINER:=Xingwang Liao PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 @@ -25,39 +19,56 @@ PKG_USE_MIPS16:=0 GO_PKG:=github.com/xtaci/kcptun -GO_PKG_LDFLAGS:=-s -w -X 'main.VERSION=$(PKG_VERSION)-$(PKG_RELEASE) for OpenWrt' - -# Can't use GO_PKG_LDFLAGS_X to define X args with space +GO_PKG_LDFLAGS_X:=main.VERSION=$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk +define Package/kcptun-config + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Kcptun Config Scripts + URL:=https://github.com/xtaci/kcptun + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/kcptun-config/conffiles +/etc/config/kcptun +endef + +define Package/kcptun-config/install + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./files/kcptun.config $(1)/etc/config/kcptun + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/kcptun.init $(1)/etc/init.d/kcptun +endef + define Package/kcptun/Default define Package/kcptun-$(1) SECTION:=net CATEGORY:=Network SUBMENU:=Web Servers/Proxies - DEPENDS:=$$(GO_ARCH_DEPENDS) - TITLE:=Simple UDP Tunnel Based On KCP ($1) + TITLE:=KCP-based Secure Tunnel $(1) URL:=https://github.com/xtaci/kcptun + DEPENDS:=+kcptun-config endef define Package/kcptun-$(1)/description - A Stable & Secure Tunnel Based On KCP with N:M Multiplexing. - - This package contains the kcptun $(1). + kcptun is a Stable & Secure Tunnel Based On KCP with N:M Multiplexing. +This package only contains kcptun $(1). endef define Package/kcptun-$(1)/install - $$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR)) + $$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR)) - $$(INSTALL_DIR) $$(1)/usr/bin - $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/kcptun-$(1) + $$(INSTALL_DIR) $$(1)/usr/bin + $$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/kcptun-$(1) endef endef -KCPTUN_COMPONENTS:=client server - +$(eval $(call BuildPackage,kcptun-config)) +KCPTUN_COMPONENTS:=server client $(foreach component,$(KCPTUN_COMPONENTS), \ $(eval $(call Package/kcptun/Default,$(component))) \ $(eval $(call GoBinPackage,kcptun-$(component))) \ diff --git a/kcptun/files/kcptun.config b/kcptun/files/kcptun.config new file mode 100644 index 0000000..06000b4 --- /dev/null +++ b/kcptun/files/kcptun.config @@ -0,0 +1,43 @@ +config server + option disabled 1 + option listen 29900 + option target '127.0.0.1' + option target_port 12948 + option crypt 'aes' + option key 'secret' + option mode 'fast' + option datashard 10 + option parityshard 3 + option dscp 46 + option nocomp 1 + option snmplog '/var/log/snmp.log' + option snmpperiod 60 + option pprof 1 + option quiet 1 + option syslog 1 + option user nobody + +config client + option disabled 1 + option bind_address '0.0.0.0' + option local_port 12948 + option server 'vps' + option server_port 29900 + option crypt 'aes' + option key 'secret' + option mode 'fast' + option conn 1 + option autoexpire 0 + option scavengettl 600 + option mtu 1350 + option sndwnd 128 + option rcvwnd 512 + option nocomp 1 + option sockbuf 4194304 + option smuxver 1 + option smuxbuf 4194304 + option streambuf 2097152 + option keepalive 10 + option quiet 1 + option gogc 20 + option user nobody diff --git a/kcptun/files/kcptun.init b/kcptun/files/kcptun.init new file mode 100755 index 0000000..b22f850 --- /dev/null +++ b/kcptun/files/kcptun.init @@ -0,0 +1,174 @@ +#!/bin/sh /etc/rc.common +# +# Copyright (C) 2019 Chao Liu +# +# This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. +# + +USE_PROCD=1 +START=99 + +confdir=/var/etc/kcptun +bindir=/usr/bin + +mkjson_server_conf() { + [ "$disabled" = 0 ] || return 1 + [ -n "$listen" ] || return 1 + [ -n "$target" ] || return 1 + [ -n "$target_port" ] || return 1 + json_add_string listen ":$listen" + json_add_string target "$target:$target_port" + json_add_boolean pprof "$pprof" +} + +mkjson_client_conf() { + [ "$disabled" = 0 ] || return 1 + [ -n "$local_port" ] || return 1 + [ -n "$server" ] || return 1 + [ -n "$server_port" ] || return 1 + json_add_string localaddr "$bind_address:$local_port" + json_add_string remoteaddr "$server:$server_port" + [ -z "$conn" ] || json_add_int conn "$conn" + [ -z "$autoexpire" ] || json_add_int autoexpire "$autoexpire" + [ -z "$scavengettl" ] || json_add_int scavengettl "$scavengettl" +} + +kcptun() { + local cfg="$1" + local cfgtype="$2" + local bin="$bindir/kcptun-$cfgtype" + local confjson="$confdir/$cfgtype.$cfg.json" + + [ -x "$bin" ] || return + eval "$("validate_${cfgtype}_section" "$cfg" validate_mklocal)" + "validate_${cfgtype}_section" "$cfg" || return + [ "$disabled" = 0 ] || return + + json_init + mkjson_${cfgtype}_conf || return + [ -z "$crypt" ] || json_add_string crypt "$crypt" + [ -z "$key" ] || json_add_string key "$key" + [ -z "$mode" ] || json_add_string mode "$mode" + [ -z "$mtu" ] || json_add_int mtu "$mtu" + [ -z "$sndwnd" ] || json_add_int sndwnd "$sndwnd" + [ -z "$rcvwnd" ] || json_add_int rcvwnd "$rcvwnd" + [ -z "$datashard" ] || json_add_int datashard "$datashard" + [ -z "$parityshard" ] || json_add_int parityshard "$parityshard" + [ -z "$dscp" ] || json_add_int dscp "$dscp" + json_add_boolean nocomp "$nocomp" + [ -z "$sockbuf" ] || json_add_int sockbuf "$sockbuf" + [ -z "$smuxver" ] || json_add_int smuxver "$smuxver" + [ -z "$smuxbuf" ] || json_add_int smuxbuf "$smuxbuf" + [ -z "$streambuf" ] || json_add_int streambuf "$streambuf" + [ -z "$keepalive" ] || json_add_int keepalive "$keepalive" + [ -z "$snmplog" ] || json_add_string snmplog "$snmplog" + [ -z "$snmpperiod" ] || json_add_int snmpperiod "$snmpperiod" + json_add_boolean quiet "$quiet" + json_dump -i > "$confjson" + + procd_open_instance "$cfgtype.$cfg" + procd_set_param command "$bin" -c "$confjson" + [ -z "$gogc" ] || procd_set_param env GOGC="$gogc" + [ -z "$syslog" ] || procd_set_param stderr 1 + [ -z "$user" ] || procd_set_param user "$user" + procd_set_param file "$confjson" + procd_set_param respawn + procd_close_instance +} + +start_service() { + local cfgtype + + mkdir -p "$confdir" + config_load kcptun + for cfgtype in server client; do + config_foreach kcptun "$cfgtype" "$cfgtype" + done +} + +stop_service() { + rm -rf "$confdir" +} + +service_triggers() { + procd_add_reload_interface_trigger wan + procd_add_reload_trigger kcptun + procd_open_validate + validate_server_section + validate_client_section + procd_close_validate +} + +validate_mklocal() { + local tuple opts + + shift 2 + for tuple in "$@"; do + opts="${tuple%%:*} $opts" + done + [ -z "$opts" ] || echo "local $opts" +} + +validate() { + uci_validate_section kcptun "$@" +} + +validate_common_options() { + local cfgtype="$1"; shift + local cfg="$1"; shift + local func="$1"; shift + local crypt_methods='"aes", "aes-128", "aes-192", "salsa20", "blowfish", "twofish", "cast5", "3des", "tea", "xtea", "xor", "sm4", "none"' + local mode_profiles='"fast3", "fast2", "fast", "normal", "manual"' + + "${func:-validate}" "$cfgtype" "$cfg" "$@" \ + 'disabled:bool:0' \ + 'key:string' \ + "crypt:or($crypt_methods)" \ + "mode:or($mode_profiles)" \ + 'mtu:uinteger' \ + 'sndwnd:uinteger' \ + 'rcvwnd:uinteger' \ + 'datashard:uinteger' \ + 'parityshard:uinteger' \ + 'dscp:uinteger' \ + 'nocomp:bool' \ + 'sockbuf:uinteger' \ + 'smuxver:uinteger' \ + 'smuxbuf:uinteger' \ + 'streambuf:uinteger' \ + 'keepalive:uinteger' \ + 'snmplog:string' \ + 'snmpperiod:uinteger' \ + 'quiet:bool' \ + 'gogc:uinteger' \ + 'syslog:bool:1' \ + 'user:string:nobody' +} + +validate_server_options() { + validate_common_options server "$@" \ + 'listen:port' \ + 'target:host' \ + 'target_port:port' \ + 'pprof:bool' +} + +validate_client_options() { + validate_common_options client "$@" \ + 'bind_address:ipaddr' \ + 'local_port:port' \ + 'server:host' \ + 'server_port:port' \ + 'conn:uinteger' \ + 'autoexpire:uinteger' \ + 'scavengettl:uinteger' +} + +validate_server_section() { + validate_server_options "$1" "$2" +} + +validate_client_section() { + validate_client_options "$1" "$2" +} diff --git a/microsocks/Makefile b/microsocks/Makefile index fb989cf..a59fd2a 100644 --- a/microsocks/Makefile +++ b/microsocks/Makefile @@ -1,37 +1,43 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2021 ImmortalWrt.org + include $(TOPDIR)/rules.mk PKG_NAME:=microsocks PKG_VERSION:=1.0.2 PKG_RELEASE:=2 -PKG_MAINTAINER:=lean -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/microsocks/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=5ece77c283e71f73b9530da46302fdb4f72a0ae139aa734c07fe532407a6211a -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/rofl0r/microsocks.git -PKG_MIRROR_HASH:=eac924eee68679e808b107332d5ca35c2cd4b8e87206b78cf699f2157755c8b0 -PKG_SOURCE_VERSION:=ef6f8e3329736418cade06da9f16c308f7bcd433 +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=lean PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/microsocks - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=microsocks for OpenWRT - DEPENDS:= + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Tiny, portable SOCKS5 server + URL:=https://github.com/rofl0r/microsocks + DEPENDS:=+libpthread endef define Package/microsocks/description - microsocks is a Tiny Proxy in C. + A SOCKS5 service that you can run on your remote boxes to tunnel connections + through them, if for some reason SSH doesn't cut it for you. endef define Package/microsocks/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/microsocks $(1)/usr/bin/microsocks + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/microsocks $(1)/usr/bin/microsocks endef $(eval $(call BuildPackage,microsocks)) diff --git a/pdnsd-alt/Makefile b/pdnsd-alt/Makefile index 1fb15f0..f6b1765 100644 --- a/pdnsd-alt/Makefile +++ b/pdnsd-alt/Makefile @@ -1,26 +1,30 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2021 ImmortalWrt.org + include $(TOPDIR)/rules.mk PKG_NAME:=pdnsd PKG_VERSION:=1.2.9b-par -PKG_RELEASE=$(PKG_SOURCE_VERSION) +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/shadowsocks/pdnsd.git -PKG_MIRROR_HASH:=c4093a2a21cc44228f4fad536c3303e5d263f400b5ca6ec04fe17bb705f5b92e -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_DATE:=2012-04-26 PKG_SOURCE_VERSION:=a8e46ccba7b0fa2230d6c42ab6dcd92926f6c21d -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -# PKG_MIRROR_MD5SUM:= -# CMAKE_INSTALL:=1 +PKG_MIRROR_HASH:=e3e9c56cf91b12d8db73def2c247be2f726a052bed012f7a1e48946375f8e478 + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/pdnsd-alt SECTION:=net CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - DEPENDS:=+libpthread + SUBMENU:=IP Addresses and Names TITLE:=Proxy DNS Server + DEPENDS:=+libpthread endef define Package/pdnsd-alt/description @@ -34,23 +38,20 @@ define Package/pdnsd-alt/description endef TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -#TARGET_CFLAGS += -ggdb3 - -CMAKE_OPTIONS += -DDEBUG=1 CONFIGURE_ARGS += \ - --with-cachedir=/var/pdnsd \ - --with-target=Linux + --with-cachedir=/var/pdnsd \ + --with-target=Linux define Package/pdnsd-alt/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pdnsd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pdnsd-ctl/pdnsd-ctl $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pdnsd $(1)/usr/sbin/pdnsd + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pdnsd-ctl $(1)/usr/sbin/pdnsd-ctl + + #$(INSTALL_DIR) $(1)/etc + #$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/pdnsd.conf.sample $(1)/etc/pdnsd.conf #$(INSTALL_DIR) $(1)/etc/init.d #$(INSTALL_BIN) ./files/pdnsd.init $(1)/etc/init.d/pdnsd - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/pdnsd.conf $(1)/etc/ endef $(eval $(call BuildPackage,pdnsd-alt)) diff --git a/simple-obfs/Makefile b/simple-obfs/Makefile index 8045812..d682beb 100644 --- a/simple-obfs/Makefile +++ b/simple-obfs/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=simple-obfs PKG_VERSION:=0.0.5 -PKG_RELEASE:=4 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/shadowsocks/simple-obfs.git diff --git a/ssocks/Makefile b/ssocks/Makefile index 535bb3d..2de3b0b 100644 --- a/ssocks/Makefile +++ b/ssocks/Makefile @@ -1,52 +1,77 @@ -# Copyright (C) 2020 xiaorouji +# +# Copyright (C) 2017-2018 Jian Chang +# +# Copyright (C) 2021 ImmortalWrt +# # # This is free software, licensed under the GNU General Public License v3. +# See /LICENSE for more information. # include $(TOPDIR)/rules.mk PKG_NAME:=ssocks PKG_VERSION:=0.0.14 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/tostercx/ssocks.git -PKG_MIRROR_HASH:=0ce65cb7aaea78c97bba9d62af3b40ed0d422938f67cb44a24d522608cfd097c +PKG_SOURCE_DATE:=2020-07-09 PKG_SOURCE_VERSION:=c2024789c1ee076d171fd6061d7c133302216ea7 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_MIRROR_HASH:=3654e9f1fb54646e1e89c19e7aa3e105b84b2e20b5b634662c21c66691d1d22e + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Tianling Shen + +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -CMAKE_INSTALL:=1 - -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - TITLE:=sSocks Relay - URL:=https://github.com/tostercx/ssocks - DEPENDS:=+libopenssl +define Package/ssocks/template + SECTION:=net + CATEGORY:=Network + TITLE:=sSocks + URL:=https://github.com/tostercx/ssocks + DEPENDS:=+libopenssl endef -define Package/$(PKG_NAME)/description -sSocks is a package which contains: a socks5 server implements RFC 1928 (SOCKS V5) and RFC 1929 (Authentication for SOCKS V5), a reverse socks server and client, a netcat like tool and a socks5 relay. +define Package/ssocks + $(call Package/ssocks/template) + TITLE+= Relay endef -define Package/$(PKG_NAME)d - $(call Package/$(PKG_NAME)) - TITLE:=sSocks Server +define Package/ssocksd + $(call Package/ssocks/template) + TITLE+= Server endef -Package/$(PKG_NAME)d/description = $(Package/$(PKG_NAME)/description) +define Package/ssocks/description/template + sSocks is a package which contains: a socks5 server implements RFC 1928 (SOCKS V5) and + RFC 1929 (Authentication for SOCKS V5), a reverse socks server and client, a netcat like tool + and a socks5 relay. +endef -define Package/$(PKG_NAME)/install +Package/ssocks/description = $(Package/ssocks/description/template) +Package/ssocksd/description = $(Package/ssocks/description/template) + +define Build/Install + true +endef + +define Package/ssocks/install/template $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)$(2) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2) $(1)/usr/bin/ endef -define Package/$(PKG_NAME)d/install - $(call Package/$(PKG_NAME)/install,$(1),d) +define Package/ssocks/install + $(call Package/ssocks/install/template,$(1),ssocks) endef -$(eval $(call BuildPackage,$(PKG_NAME))) -$(eval $(call BuildPackage,$(PKG_NAME)d)) \ No newline at end of file +define Package/ssocksd/install + $(call Package/ssocks/install/template,$(1),ssocksd) +endef + +$(eval $(call BuildPackage,ssocks)) +$(eval $(call BuildPackage,ssocksd)) diff --git a/trojan-go/Makefile b/trojan-go/Makefile index 2b6215a..248dd91 100644 --- a/trojan-go/Makefile +++ b/trojan-go/Makefile @@ -1,7 +1,6 @@ -# Copyright (C) 2020 Lienol -# -# This is free software, licensed under the GNU General Public License v3. +# SPDX-License-Identifier: GPL-3.0-only # +# Copyright (C) 2021 ImmortalWrt.org include $(TOPDIR)/rules.mk @@ -13,6 +12,10 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/p4gefau1t/trojan-go/tar.gz/v$(PKG_VERSION)? PKG_HASH:=925f02647dda944813f1eab0b71eac98b83eb5964ef5a6f63e89bc7eb4486c1f +PKG_LICENSE:=GPL-3.0-only +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Tianling Shen + PKG_CONFIG_DEPENDS:= \ CONFIG_TROJAN_GO_COMPRESS_GOPROXY \ CONFIG_TROJAN_GO_COMPRESS_UPX @@ -24,29 +27,30 @@ PKG_USE_MIPS16:=0 GO_PKG:=github.com/p4gefau1t/trojan-go GO_PKG_BUILD_PKG:=$$(GO_PKG) -GO_PKG_TAGS:=full GO_PKG_LDFLAGS:=-s -w GO_PKG_LDFLAGS_X:= \ $(GO_PKG)/constant.Version=$(PKG_VERSION) \ $(GO_PKG)/constant.Commit=v$(PKG_VERSION) +GO_PKG_TAGS:=full include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - DEPENDS:=$$(GO_ARCH_DEPENDS) - TITLE:=An unidentifiable mechanism that helps you bypass GFW. It's compatible with original trojan with experimental features. - URL:=https://github.com/p4gefau1t/trojan-go +define Package/trojan-go + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=A Trojan proxy written in Go + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle + URL:=https://p4gefau1t.github.io/trojan-go/ endef -define Package/$(PKG_NAME)/config - -menu "Configuration" - depends on PACKAGE_$(PKG_NAME) +define Package/trojan-go/description + Trojan features multiple protocols over TLS to avoid both + active/passive detections and ISP QoS limitations. +endef +define Package/trojan-go/config config TROJAN_GO_COMPRESS_GOPROXY bool "Compiling with GOPROXY proxy" default n @@ -55,22 +59,19 @@ config TROJAN_GO_COMPRESS_UPX bool "Compress executable files with UPX" depends on !mips64 default n - -endmenu - endef ifeq ($(CONFIG_TROJAN_GO_COMPRESS_GOPROXY),y) -export GO111MODULE=on -export GOPROXY=https://goproxy.io + export GO111MODULE=on + export GOPROXY=https://goproxy.baidu.com endif define Build/Compile $(call GoPackage/Build/Compile) ifeq ($(CONFIG_TROJAN_GO_COMPRESS_UPX),y) - $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/$(PKG_NAME) + $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/trojan-go endif endef -$(eval $(call GoBinPackage,$(PKG_NAME))) -$(eval $(call BuildPackage,$(PKG_NAME))) +$(eval $(call GoBinPackage,trojan-go)) +$(eval $(call BuildPackage,trojan-go))