package/lean: move to package feeds (#8872)

This commit is contained in:
AmadeusGhost 2022-02-14 00:25:55 +08:00 committed by GitHub
parent d8a93f2311
commit 8f6139bf16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
69 changed files with 0 additions and 13298 deletions

View File

@ -1,76 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=UnblockNeteaseMusic-Go
PKG_VERSION:=0.2.13
PKG_RELEASE:=5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cnsilvan/UnblockNeteaseMusic.git
PKG_SOURCE_VERSION:=2479ad75f8fbfe7cfdd7d86ebe330013dcb6a372
PKG_HASH:=72b28cc22bfdfb1810e50c307ce00cbc124d55a7d10fe7c510227dfe1efa76bc
PKG_MAINTAINER:=Silvan <cnsilvan@gmail.com>
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/cnsilvan/UnblockNeteaseMusic
GO_PKG_LDFLAGS:=-s -w
GO_PKG_LDFLAGS_X:= \
$(GO_PKG)/version.Version=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/$(PKG_NAME)/config
config $(PKG_NAME)_INCLUDE_GOPROXY
bool "Compiling with GOPROXY proxy"
default y
endef
ifeq ($(CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY),y)
export GO111MODULE=on
export GOPROXY=https://goproxy.io
#export GOPROXY=https://mirrors.aliyun.com/goproxy/
endif
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=Revive Netease Cloud Music (Golang)
DEPENDS:=$(GO_ARCH_DEPENDS)
URL:=https://github.com/cnsilvan/UnblockNeteaseMusic
SUBMENU:=NeteaseMusic
endef
define Package/$(PKG_NAME)/description
Revive Netease Cloud Music (Golang)
endef
define Build/Prepare
tar -zxvf $(DL_DIR)/$(PKG_SOURCE) -C $(BUILD_DIR)/$(PKG_NAME) --strip-components 1
endef
define Build/Configure
endef
define Build/Compile
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG))
$(call GoPackage/Build/Configure)
$(call GoPackage/Build/Compile)
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/UnblockNeteaseMusic $(1)/usr/bin/UnblockNeteaseMusic
$(INSTALL_DIR) $(1)/usr/share/UnblockNeteaseMusicGo
$(CP) ./files/* $(1)/usr/share/UnblockNeteaseMusicGo/
endef
$(eval $(call GoBinPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@ -1,14 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICIjCCAaigAwIBAgIUTc9HQDej5hLCQ74u436a5yE4MDcwCgYIKoZIzj0EAwMw
SDELMAkGA1UEBhMCQ04xJDAiBgNVBAMMG1VuYmxvY2tOZXRlYXNlTXVzaWMgUm9v
dCBDQTETMBEGA1UECgwKMTcxNTE3MzMyOTAeFw0yMTA0MzAwNzIzMDJaFw0yNjA0
MjkwNzIzMDJaMEgxCzAJBgNVBAYTAkNOMSQwIgYDVQQDDBtVbmJsb2NrTmV0ZWFz
ZU11c2ljIFJvb3QgQ0ExEzARBgNVBAoMCjE3MTUxNzMzMjkwdjAQBgcqhkjOPQIB
BgUrgQQAIgNiAASIyI7lYgGlq49qWtY1O2/XNDeowYf7W/Z+l7C14bphxAJ9jSDo
tLwbFPWy5VPENc0rB0/yeHA2z7LU67POL2gGgp+17y7scLkkBk3Q7wRMETrtP44Z
ITBstZ0wzVyyQEKjUzBRMB0GA1UdDgQWBBQ2F7+t8cPHJaWuCD8RHTSdLugKYzAf
BgNVHSMEGDAWgBQ2F7+t8cPHJaWuCD8RHTSdLugKYzAPBgNVHRMBAf8EBTADAQH/
MAoGCCqGSM49BAMDA2gAMGUCMQDqaRX2e01e0U+f0As/KUKDhmG5ElkK5CjYK9jk
kXLNGFXJLGta6CDvjtMLBPc20qkCMBvDs+JnJKVBEJNZVsRBBs+v2YxNU/u2aYJa
dMwXuFveSDWOS7mBeRztX/geEggiSw==
-----END CERTIFICATE-----

View File

@ -1,15 +0,0 @@
-----BEGIN CERTIFICATE-----
MIICRDCCAcqgAwIBAgIUeVqRrT2mHG5Mc8JD+ErphiAmlgkwCgYIKoZIzj0EAwMw
SDELMAkGA1UEBhMCQ04xJDAiBgNVBAMMG1VuYmxvY2tOZXRlYXNlTXVzaWMgUm9v
dCBDQTETMBEGA1UECgwKMTcxNTE3MzMyOTAeFw0yMTA0MzAwNzIzMDJaFw0yMjA0
MzAwNzIzMDJaMHsxCzAJBgNVBAYTAkNOMREwDwYDVQQHDAhIYW5nemhvdTEsMCoG
A1UECgwjTmV0RWFzZSAoSGFuZ3pob3UpIE5ldHdvcmsgQ28uLCBMdGQxETAPBgNV
BAsMCElUIERlcHQuMRgwFgYDVQQDDA8qLm11c2ljLjE2My5jb20wdjAQBgcqhkjO
PQIBBgUrgQQAIgNiAAQTPyU9RQ1pAFMLmozi+c4pEC1rrxAlPGwO9Em+qV+a5qLW
gQjjsJeabMqJ/UQ7hDtdKVxWuXiAjMiDcXwL63I71MZKPTAEKXdCmNQwb4kXvRUn
oOR4r7BMxEpGlf0CULWjQjBAMBMGA1UdJQQMMAoGCCsGAQUFBwMBMCkGA1UdEQQi
MCCCDW11c2ljLjE2My5jb22CDyoubXVzaWMuMTYzLmNvbTAKBggqhkjOPQQDAwNo
ADBlAjEAs5bdgnNP/DiK919RiWscC0kyuY0ugG1C8m8F2Yod4MI3oTyrkVcag21o
NSzm802uAjBoPuKEbjjFP4ics0BQdICiVd6WCVAsE69FnlmqRteAJqxvdKGpVLi+
Qi3arfomrrc=
-----END CERTIFICATE-----

View File

@ -1,9 +0,0 @@
-----BEGIN EC PARAMETERS-----
BgUrgQQAIg==
-----END EC PARAMETERS-----
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDBfW3twxGaQmMzP9p0/UU5EvHFVCbBw4piVFJ+pm/uFY6CKZkC5LGMa
Uc9vn/KiewGgBwYFK4EEACKhZANiAAQTPyU9RQ1pAFMLmozi+c4pEC1rrxAlPGwO
9Em+qV+a5qLWgQjjsJeabMqJ/UQ7hDtdKVxWuXiAjMiDcXwL63I71MZKPTAEKXdC
mNQwb4kXvRUnoOR4r7BMxEpGlf0CULU=
-----END EC PRIVATE KEY-----

View File

@ -1,52 +0,0 @@
# SPDX-Identifier-License: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=UnblockNeteaseMusic
PKG_BASE_VERSION:=0.27.0-rc.4
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/UnblockNeteaseMusic/server.git
PKG_SOURCE_DATE:=2021-12-21
PKG_SOURCE_VERSION:=54b7a60b07a85dea3b52a5d9f1ada456aba12609
PKG_MIRROR_HASH:=1865a01021ced0a57bcb1f0d63ef72b0e517771602ad7e4026d18222713a77ac
PKG_VERSION:=$(PKG_BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
PKG_LICENSE:=LGPL-3.0-only
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
define Package/UnblockNeteaseMusic
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE:=Revive Netease Cloud Music (NodeJS)
URL:=https://github.com/nondanee/UnblockNeteaseMusic
DEPENDS:=+node
PKGARCH:=all
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
xzcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
endef
define Build/Configure
echo -e $(PKG_BASE_VERSION) > $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/core_ver
echo -e $(PKG_SOURCE_VERSION) > $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/local_ver
endef
define Build/Compile
endef
define Package/UnblockNeteaseMusic/install
$(INSTALL_DIR) $(1)/usr/share/UnblockNeteaseMusic
$(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/* $(1)/usr/share/UnblockNeteaseMusic
endef
$(eval $(call BuildPackage,UnblockNeteaseMusic))

View File

@ -1,76 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=aliyundrive-webdav
PKG_VERSION:=1.2.3
PKG_RELEASE:=$(AUTORELEASE)
PKG_LICENSE:=MIT
PKG_MAINTAINER:=messense <messense@icloud.com>
PKG_LIBC:=musl
ifeq ($(ARCH),arm)
PKG_LIBC:=musleabi
ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
ifneq ($(filter $(ARM_CPU_FEATURES),vfp vfpv2),)
PKG_LIBC:=musleabihf
endif
endif
PKG_ARCH=$(ARCH)
ifeq ($(ARCH),i386)
PKG_ARCH:=i686
endif
PKG_SOURCE:=aliyundrive-webdav-v$(PKG_VERSION).$(PKG_ARCH)-unknown-linux-$(PKG_LIBC).tar.gz
PKG_SOURCE_URL:=https://github.com/messense/aliyundrive-webdav/releases/download/v$(PKG_VERSION)/
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/aliyundrive-webdav
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE:=WebDAV server for AliyunDrive
URL:=https://github.com/messense/aliyundrive-webdav
endef
define Package/aliyundrive-webdav/description
WebDAV server for AliyunDrive.
endef
define Package/aliyundrive-webdav/conffiles
/etc/config/aliyundrive-webdav
endef
define Download/sha256sum
FILE:=$(PKG_SOURCE).sha256
URL_FILE:=$(FILE)
URL:=$(PKG_SOURCE_URL)
HASH:=skip
endef
$(eval $(call Download,sha256sum))
define Build/Prepare
mv $(DL_DIR)/$(PKG_SOURCE).sha256 .
cp $(DL_DIR)/$(PKG_SOURCE) .
shasum -a 256 -c $(PKG_SOURCE).sha256
rm $(PKG_SOURCE).sha256 $(PKG_SOURCE)
tar -C $(PKG_BUILD_DIR)/ -zxf $(DL_DIR)/$(PKG_SOURCE)
endef
define Build/Compile
echo "aliyundrive-webdav using precompiled binary."
endef
define Package/aliyundrive-webdav/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aliyundrive-webdav $(1)/usr/bin/aliyundrive-webdav
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/aliyundrive-webdav.init $(1)/etc/init.d/aliyundrive-webdav
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/aliyundrive-webdav.config $(1)/etc/config/aliyundrive-webdav
endef
$(eval $(call BuildPackage,aliyundrive-webdav))

View File

@ -1,17 +0,0 @@
config server
option enable '0'
option debug '0'
option refresh_token ''
option host '0.0.0.0'
option port '8080'
option auth_user ''
option auth_password ''
option read_buffer_size '10485760'
option cache_size '1000'
option cache_ttl '600'
option root '/'
option no_trash '0'
option domain_id ''
option read_only '0'
option tls_cert ''
option tls_key ''

View File

@ -1,75 +0,0 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
STOP=15
NAME=aliyundrive-webdav
uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3}
}
start_service() {
local enable=$(uci_get_by_type server enable)
case "$enable" in
1|on|true|yes|enabled)
local refresh_token=$(uci_get_by_type server refresh_token)
local auth_user=$(uci_get_by_type server auth_user)
local auth_password=$(uci_get_by_type server auth_password)
local read_buf_size=$(uci_get_by_type server read_buffer_size 10485760)
local cache_size=$(uci_get_by_type server cache_size 1000)
local cache_ttl=$(uci_get_by_type server cache_ttl 600)
local host=$(uci_get_by_type server host 127.0.0.1)
local port=$(uci_get_by_type server port 8080)
local root=$(uci_get_by_type server root /)
local domain_id=$(uci_get_by_type server domain_id)
local tls_cert=$(uci_get_by_type server tls_cert)
local tls_key=$(uci_get_by_type server tls_key)
local extra_options="-I"
if [[ ! -z "$domain_id" ]]; then
extra_options="$extra_options --domain-id $domain_id"
else
case "$(uci_get_by_type server no_trash 0)" in
1|on|true|yes|enabled)
extra_options="$extra_options --no-trash"
;;
*) ;;
esac
case "$(uci_get_by_type server read_only 0)" in
1|on|true|yes|enabled)
extra_options="$extra_options --read-only"
;;
*) ;;
esac
fi
if [[ ! -z "$tls_cert" && ! -z "$tls_key" ]]; then
extra_options="$extra_options --tls-cert $tls_cert --tls-key $tls_key"
fi
procd_open_instance
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options --host $host --port $port --root $root -S $read_buf_size --cache-size $cache_size --cache-ttl $cache_ttl --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1"
procd_set_param pidfile /var/run/$NAME.pid
procd_set_param env REFRESH_TOKEN="$refresh_token"
[[ ! -z "$auth_user" ]] && procd_append_param env WEBDAV_AUTH_USER="$auth_user"
[[ ! -z "$auth_password" ]] && procd_append_param env WEBDAV_AUTH_PASSWORD="$auth_password"
case $(uci_get_by_type server debug) in
1|on|true|yes|enabled)
procd_append_param env RUST_LOG="aliyundrive_webdav=debug" ;;
*) ;;
esac
procd_close_instance ;;
*)
stop_service ;;
esac
}
service_triggers() {
procd_add_reload_trigger "aliyundrive-webdav"
}

View File

@ -1,110 +0,0 @@
#
# Copyright (C) 2007-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=aMule
PKG_VERSION:=2.3.2
PKG_RELEASE:=3
PKG_REV=4b87b20
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-r$(PKG_REV).tar.bz2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_URL:=https://github.com/amule-project/amule.git
PKG_MIRROR_HASH:=1575d31d68f9df881100c9e30f18fc7dec8493a8ae20787f41b6ef23604a78ff
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libgd libcryptopp
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/amule/config
config AMULE_CRYPTOPP_STATIC_LINKING
bool "Link libcryptopp statically"
default n
endef
define Package/amule
SUBMENU:=P2P
SECTION:=net
CATEGORY:=Network
TITLE:=A multi-platform eMule-like ed2k client
URL:=http://www.amule.org/
DEPENDS:=+libpng +libpthread +libncurses +libreadline +libwxbase +libupnp +libbfd \
$(ICONV_DEPENDS) $(INTL_DEPENDS) +!AMULE_CRYPTOPP_STATIC_LINKING:libcryptopp
endef
CONFIGURE_ARGS+= \
--disable-static \
--disable-rpath \
--with-gnu-ld \
--disable-ccache \
--disable-optimize \
--disable-profile \
--disable-monolithic \
--enable-amule-daemon \
--enable-amulecmd \
--enable-webserver \
--disable-amule-gui \
--disable-cas \
--disable-wxcas \
--disable-ed2k \
--disable-alc \
--disable-alcc \
--disable-fileview \
--disable-plasmamule \
--without-wxdebug \
--enable-dlp \
--enable-upnp \
--with-zlib="$(STAGING_DIR)/usr" \
--with-gdlib-prefix="$(STAGING_DIR)/usr" \
--with-libpng-prefix="$(STAGING_DIR)/usr" \
--with-wx-prefix="$(STAGING_DIR)/usr" \
--with-crypto-prefix="$(STAGING_DIR)/usr" \
--with-libiconv-prefix="$(ICONV_PREFIX)" \
--with-libintl-prefix="$(INTL_PREFIX)" \
--with-libupnp-prefix="$(STAGING_DIR)/usr" \
--without-x \
--disable-debug
TARGET_LDFLAGS += -liconv
define Build/Configure
cd $(PKG_BUILD_DIR) && sh ./autogen.sh
$(call Build/Configure/Default)
endef
ifeq ($(CONFIG_AMULE_CRYPTOPP_STATIC_LINKING),y)
SED_CMD:=sed
else
SED_CMD:=true
endif
define Build/Compile
$(SED_CMD) -i 's;^CRYPTOPP_LIBS.*;CRYPTOPP_LIBS \= "$(STAGING_DIR)/usr/lib/libcryptopp.a";g' \
$(PKG_BUILD_DIR)/src/Makefile
$(MAKE) -C $(PKG_BUILD_DIR) \
HOSTCC="$(HOSTCC)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all
endef
define Package/amule/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/usr/share/amule/webserver
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/amule{cmd,d} $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/webserver/src/amuleweb $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/src/webserver/default $(1)/usr/share/amule/webserver
endef
$(eval $(call BuildPackage,amule))

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +0,0 @@
diff -Naur a/m4/libupnp.m4 b/m4/libupnp.m4
--- a/m4/libupnp.m4 2016-10-06 19:01:54.000000000 +0800
+++ b/m4/libupnp.m4 2016-10-11 07:36:39.198318574 +0800
@@ -52,7 +52,6 @@
[export PKG_CONFIG_PATH=$withval/lib/pkgconfig])
dnl Check for libupnp >= MIN_LIBUPNP_VERSION
- AS_IF([test $cross_compiling = no], [
AC_MSG_CHECKING([for libupnp version >= MIN_LIBUPNP_VERSION])
AS_IF([test -n "$PKG_CONFIG"], [
AS_IF([$PKG_CONFIG libupnp --exists], [
@@ -79,11 +78,6 @@
])
AC_MSG_RESULT([$result$resultstr])
libupnp_error="libupnp >= MIN_LIBUPNP_VERSION not found$resultstr"
- ], [
-dnl Currently cross-compilation with libupnp is not supported.
- result=no
- libupnp_error="cross compiling"
- ])
dnl Execute the right action.
AS_IF([test ${result:-no} = yes], [$2], [$3])

View File

@ -1,78 +0,0 @@
diff --git a/src/amule.h b/src/amule.h
index f25702f..240c02d 100644
--- a/src/amule.h
+++ b/src/amule.h
@@ -553,6 +553,13 @@ class CamuleDaemonApp : public CamuleApp
int OnExit();
virtual int InitGui(bool geometry_enable, wxString &geometry_string);
+ // The GTK wxApps sets its file name conversion properly
+ // in wxApp::Initialize(), while wxAppConsole::Initialize()
+ // does not, leaving wxConvFile being set to wxConvLibc. File
+ // name conversion should be set otherwise amuled will abort to
+ // handle non-ASCII file names which monolithic amule can handle.
+ // This function are overrided to perform this.
+ virtual bool Initialize(int& argc_, wxChar **argv_);
#ifdef AMULED_APPTRAITS
struct sigaction m_oldSignalChildAction;
diff --git a/src/amuled.cpp b/src/amuled.cpp
index 486da59..86e1ff8 100644
--- a/src/amuled.cpp
+++ b/src/amuled.cpp
@@ -704,6 +704,41 @@ int CamuleDaemonApp::InitGui(bool ,wxString &)
return 0;
}
+bool CamuleDaemonApp::Initialize(int& argc_, wxChar **argv_)
+{
+ if ( !wxAppConsole::Initialize(argc_, argv_) ) {
+ return false;
+ }
+
+#ifdef __UNIX__
+ wxString encName;
+#if wxUSE_INTL
+ // if a non default locale is set,
+ // assume that the user wants his
+ // filenames in this locale too
+ encName = wxLocale::GetSystemEncodingName().Upper();
+
+ // But don't consider ASCII in this case.
+ if ( !encName.empty() ) {
+ if ( encName == wxT("US-ASCII") ) {
+ // This means US-ASCII when returned
+ // from GetEncodingFromName().
+ encName.clear();
+ }
+ }
+#endif // wxUSE_INTL
+
+ // in this case, UTF-8 is used by default.
+ if ( encName.empty() ) {
+ encName = wxT("UTF-8");
+ }
+
+ static wxConvBrokenFileNames fileconv(encName);
+ wxConvFileName = &fileconv;
+#endif // __UNIX__
+
+ return true;
+}
int CamuleDaemonApp::OnExit()
{
diff --git a/src/libs/common/Path.cpp b/src/libs/common/Path.cpp
index 28152a2..5efefd0 100644
--- a/src/libs/common/Path.cpp
+++ b/src/libs/common/Path.cpp
@@ -229,7 +229,8 @@ CPath::CPath(const wxString& filename)
}
wxCharBuffer fn = filename2char(filename);
- if (fn.data()) {
+ // add fn.length() for wx 3.x
+ if (fn.data()) {
// Filename is valid in the current locale. This means that
// it either originated from a (wx)system-call, or from a
// user with a properly setup system.

View File

@ -1,174 +0,0 @@
diff --git a/src/SearchList.cpp b/src/SearchList.cpp
index 32b28e9..342a18f 100644
--- a/src/SearchList.cpp
+++ b/src/SearchList.cpp
@@ -75,7 +75,7 @@ void ParsedSearchExpression(const CSearchExpr* pexpr)
int iOpNot = 0;
for (unsigned int i = 0; i < pexpr->m_aExpr.GetCount(); i++) {
- wxString str(pexpr->m_aExpr[i]);
+ const wxString& str = pexpr->m_aExpr[i];
if (str == SEARCHOPTOK_AND) {
iOpAnd++;
} else if (str == SEARCHOPTOK_OR) {
@@ -108,6 +108,25 @@ void ParsedSearchExpression(const CSearchExpr* pexpr)
// optimize search expression, if no OR nor NOT specified
if (iOpAnd > 0 && iOpOr == 0 && iOpNot == 0) {
+ // figure out if we can use a better keyword than the one the user selected
+ // for example most user will search like this "The oxymoronaccelerator 2", which would ask the node which indexes "the"
+ // This causes higher traffic for such nodes and makes them a viable target to attackers, while the kad result should be
+ // the same or even better if we ask the node which indexes the rare keyword "oxymoronaccelerator", so we try to rearrange
+ // keywords and generally assume that the longer keywords are rarer
+ if (/*thePrefs::GetRearrangeKadSearchKeywords() &&*/ !s_strCurKadKeyword.IsEmpty()) {
+ for (unsigned int i = 0; i < pexpr->m_aExpr.GetCount(); i++) {
+ if (pexpr->m_aExpr[i] != SEARCHOPTOK_AND) {
+ if (pexpr->m_aExpr[i] != s_strCurKadKeyword
+ && pexpr->m_aExpr[i].find_first_of(Kademlia::CSearchManager::GetInvalidKeywordChars()) == wxString::npos
+ && pexpr->m_aExpr[i].Find('"') != 0 // no quoted expressions as keyword
+ && pexpr->m_aExpr[i].length() >= 3
+ && s_strCurKadKeyword.length() < pexpr->m_aExpr[i].length())
+ {
+ s_strCurKadKeyword = pexpr->m_aExpr[i];
+ }
+ }
+ }
+ }
wxString strAndTerms;
for (unsigned int i = 0; i < pexpr->m_aExpr.GetCount(); i++) {
if (pexpr->m_aExpr[i] != SEARCHOPTOK_AND) {
@@ -285,7 +304,7 @@ void CSearchList::RemoveResults(long searchID)
}
-wxString CSearchList::StartNewSearch(uint32* searchID, SearchType type, const CSearchParams& params)
+wxString CSearchList::StartNewSearch(uint32* searchID, SearchType type, CSearchParams& params)
{
// Check that we can actually perform the specified desired search.
if ((type == KadSearch) && !Kademlia::CKademlia::IsRunning()) {
@@ -306,6 +325,16 @@ wxString CSearchList::StartNewSearch(uint32* searchID, SearchType type, const CS
m_resultType.Clear();
}
+ if (type == KadSearch) {
+ Kademlia::WordList words;
+ Kademlia::CSearchManager::GetWords(params.searchString, &words);
+ if (!words.empty()) {
+ params.strKeyword = words.front();
+ } else {
+ return _("No keyword for Kad search - aborting");
+ }
+ }
+
bool supports64bit = type == KadSearch ? true : theApp->serverconnect->GetCurrentServer() != NULL && (theApp->serverconnect->GetCurrentServer()->GetTCPFlags() & SRV_TCPFLG_LARGEFILES);
bool packetUsing64bit;
@@ -332,8 +361,7 @@ wxString CSearchList::StartNewSearch(uint32* searchID, SearchType type, const CS
// searchstring will get tokenized there
// The tab must be created with the Kad search ID, so searchID is updated.
- Kademlia::CSearch* search = Kademlia::CSearchManager::PrepareFindKeywords(
- params.searchString, data->GetLength(), data->GetRawBuffer(), *searchID);
+ Kademlia::CSearch* search = Kademlia::CSearchManager::PrepareFindKeywords(params.strKeyword, data->GetLength(), data->GetRawBuffer(), *searchID);
*searchID = search->GetSearchID();
m_currentSearch = *searchID;
@@ -632,7 +660,7 @@ void CSearchList::StopSearch(bool globalOnly)
}
-CSearchList::CMemFilePtr CSearchList::CreateSearchData(const CSearchParams& params, SearchType WXUNUSED(type), bool supports64bit, bool& packetUsing64bit)
+CSearchList::CMemFilePtr CSearchList::CreateSearchData(CSearchParams& params, SearchType type, bool supports64bit, bool& packetUsing64bit)
{
// Count the number of used parameters
unsigned int parametercount = 0;
@@ -659,14 +687,16 @@ CSearchList::CMemFilePtr CSearchList::CreateSearchData(const CSearchParams& para
_astrParserErrors.Empty();
_SearchExpr.m_aExpr.Empty();
+ s_strCurKadKeyword.Clear();
+ if (type == KadSearch) {
+ wxASSERT( !params.strKeyword.IsEmpty() );
+ s_strCurKadKeyword = params.strKeyword;
+ }
+
LexInit(params.searchString);
int iParseResult = yyparse();
LexFree();
-#ifdef __DEBUG__
- AddLogLineNS(CFormat(wxT("Search parsing result for \"%s\": %i"))
- % params.searchString % iParseResult);
-#endif
if (_astrParserErrors.GetCount() > 0) {
for (unsigned int i=0; i < _astrParserErrors.GetCount(); ++i) {
AddLogLineNS(CFormat(wxT("Error %u: %s\n")) % i % _astrParserErrors[i]);
@@ -681,21 +711,13 @@ CSearchList::CMemFilePtr CSearchList::CreateSearchData(const CSearchParams& para
return CMemFilePtr(NULL);
}
- #ifdef __DEBUG__
- wxString mes(wxT("Search expression:"));
- for (unsigned int i = 0; i < _SearchExpr.m_aExpr.GetCount(); i++) {
- mes << wxT(" ") << _SearchExpr.m_aExpr[i];
+ if (type == KadSearch && s_strCurKadKeyword != params.strKeyword) {
+ AddDebugLogLineN(logSearch, CFormat(wxT("Keyword was rearranged, using '%s' instead of '%s'")) % s_strCurKadKeyword % params.strKeyword);
+ params.strKeyword = s_strCurKadKeyword;
}
- AddLogLineNS(mes);
- AddLogLineNS(CFormat(wxT("Expression count: %i")) % _SearchExpr.m_aExpr.GetCount());
- #endif
parametercount += _SearchExpr.m_aExpr.GetCount();
- #ifdef __DEBUG__
- AddLogLineNS(CFormat(wxT("Parameters: %i")) % parametercount);
- #endif
-
/* Leave the unicode comment there, please... */
CSearchExprTarget target(data.get(), true /*I assume everyone is unicoded */ ? utf8strRaw : utf8strNone, supports64bit, packetUsing64bit);
diff --git a/src/SearchList.h b/src/SearchList.h
index 35b0fc6..6db7508 100644
--- a/src/SearchList.h
+++ b/src/SearchList.h
@@ -64,6 +64,8 @@ class CSearchList : public wxEvtHandler
//! The actual string to search for.
wxString searchString;
+ //! The keyword selected for Kad search
+ wxString strKeyword;
//! The type of files to search for (may be empty), one of ED2KFTSTR_*
wxString typeText;
//! The filename extension. May be empty.
@@ -90,7 +92,7 @@ class CSearchList : public wxEvtHandler
* @param params The search parameters, see CSearchParams.
* @return An empty string on success, otherwise an error-message.
*/
- wxString StartNewSearch(uint32* searchID, SearchType type, const CSearchParams& params);
+ wxString StartNewSearch(uint32* searchID, SearchType type, CSearchParams& params);
/** Stops the current search (global or Kad), if any is in progress. */
void StopSearch(bool globalOnly = false);
@@ -189,7 +191,7 @@ class CSearchList : public wxEvtHandler
typedef std::auto_ptr<CMemFile> CMemFilePtr;
/** Create a basic search-packet for the given search-type. */
- CMemFilePtr CreateSearchData(const CSearchParams& params, SearchType type, bool supports64bit, bool& packetUsing64bit);
+ CMemFilePtr CreateSearchData(CSearchParams& params, SearchType type, bool supports64bit, bool& packetUsing64bit);
//! Timer used for global search intervals.
diff --git a/src/kademlia/kademlia/SearchManager.cpp b/src/kademlia/kademlia/SearchManager.cpp
index e7f25d4..f9ee924 100644
--- a/src/kademlia/kademlia/SearchManager.cpp
+++ b/src/kademlia/kademlia/SearchManager.cpp
@@ -127,7 +127,7 @@ CSearch* CSearchManager::PrepareFindKeywords(const wxString& keyword, uint32_t s
wxString wstrKeyword = s->m_words.front();
- AddLogLineNS(CFormat(_("Keyword for search: %s")) % wstrKeyword);
+ AddDebugLogLineN(logSearch, CFormat(wxT("Keyword for search: %s")) % wstrKeyword);
// Kry - I just decided to assume everyone is unicoded
// GonoszTopi - seconded

View File

@ -1,365 +0,0 @@
diff -Naur a/m4/libupnp.m4 b/m4/libupnp.m4
--- a/m4/libupnp.m4 2016-10-06 18:49:44.000000000 +0800
+++ b/m4/libupnp.m4 2019-12-11 22:13:19.008225399 +0800
@@ -45,11 +45,16 @@
dnl Test for --with-libupnp-prefix
AC_ARG_WITH(
- [libupnp-prefix],
- [AS_HELP_STRING(
+ [libupnp-prefix],[
+ AS_HELP_STRING(
[--with-libupnp-prefix=PREFIX],
- [UPnP library location])],
- [export PKG_CONFIG_PATH=$withval/lib/pkgconfig])
+ [UPnP library location])],[
+ AS_IF([test -d "$withval/lib64/pkgconfig"],[
+ export PKG_CONFIG_PATH=$withval/lib64/pkgconfig
+ ],[
+ export PKG_CONFIG_PATH=$withval/lib/pkgconfig
+ ])
+ ])
dnl Check for libupnp >= MIN_LIBUPNP_VERSION
AS_IF([test $cross_compiling = no], [
diff -Naur a/src/UPnPBase.cpp b/src/UPnPBase.cpp
--- a/src/UPnPBase.cpp 2016-10-06 18:49:44.000000000 +0800
+++ b/src/UPnPBase.cpp 2019-12-11 22:15:04.536768532 +0800
@@ -1127,7 +1127,11 @@
// This function is static
+#if UPNP_VERSION >= 10800
+int CUPnPControlPoint::Callback(Upnp_EventType_e EventType, const void *Event, void * /*Cookie*/)
+#else
int CUPnPControlPoint::Callback(Upnp_EventType EventType, void *Event, void * /*Cookie*/)
+#endif
{
std::ostringstream msg;
std::ostringstream msg2;
@@ -1149,24 +1153,47 @@
msg2<< "UPNP_DISCOVERY_SEARCH_RESULT: ";
// UPnP Discovery
upnpDiscovery:
+#if UPNP_VERSION >= 10800
+ UpnpDiscovery *d_event = (UpnpDiscovery *)Event;
+#else
struct Upnp_Discovery *d_event = (struct Upnp_Discovery *)Event;
+#endif
IXML_Document *doc = NULL;
+#if UPNP_VERSION >= 10800
+ int errCode = UpnpDiscovery_get_ErrCode(d_event);
+ if (errCode != UPNP_E_SUCCESS) {
+ msg << UpnpGetErrorMessage(errCode) << ".";
+#else
int ret;
if (d_event->ErrCode != UPNP_E_SUCCESS) {
msg << UpnpGetErrorMessage(d_event->ErrCode) << ".";
+#endif
AddDebugLogLineC(logUPnP, msg);
}
// Get the XML tree device description in doc
+#if UPNP_VERSION >= 10800
+ const char *location = UpnpDiscovery_get_Location_cstr(d_event);
+ int ret = UpnpDownloadXmlDoc(location, &doc);
+#else
ret = UpnpDownloadXmlDoc(d_event->Location, &doc);
+#endif
if (ret != UPNP_E_SUCCESS) {
msg << "Error retrieving device description from " <<
+#if UPNP_VERSION >= 10800
+ location << ": " <<
+#else
d_event->Location << ": " <<
+#endif
UpnpGetErrorMessage(ret) <<
"(" << ret << ").";
AddDebugLogLineC(logUPnP, msg);
} else {
msg2 << "Retrieving device description from " <<
+#if UPNP_VERSION >= 10800
+ location << ".";
+#else
d_event->Location << ".";
+#endif
AddDebugLogLineN(logUPnP, msg2);
}
if (doc) {
@@ -1194,8 +1221,14 @@
AddDebugLogLineC(logUPnP, msg);
}
// Add the root device to our list
+#if UPNP_VERSION >= 10800
+ int expires = UpnpDiscovery_get_Expires(d_event);
+ upnpCP->AddRootDevice(rootDevice, urlBase,
+ location, expires);
+#else
upnpCP->AddRootDevice(rootDevice, urlBase,
d_event->Location, d_event->Expires);
+#endif
}
// Free the XML doc tree
IXML::Document::Free(doc);
@@ -1216,28 +1249,62 @@
case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE: {
//fprintf(stderr, "Callback: UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE\n");
// UPnP Device Removed
+#if UPNP_VERSION >= 10800
+ UpnpDiscovery *dab_event = (UpnpDiscovery *)Event;
+ int errCode = UpnpDiscovery_get_ErrCode(dab_event);
+ if (errCode != UPNP_E_SUCCESS) {
+#else
struct Upnp_Discovery *dab_event = (struct Upnp_Discovery *)Event;
if (dab_event->ErrCode != UPNP_E_SUCCESS) {
+#endif
msg << "error(UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE): " <<
+#if UPNP_VERSION >= 10800
+ UpnpGetErrorMessage(errCode) <<
+#else
UpnpGetErrorMessage(dab_event->ErrCode) <<
+#endif
".";
AddDebugLogLineC(logUPnP, msg);
}
+#if UPNP_VERSION >= 10800
+ std::string devType = UpnpDiscovery_get_DeviceType_cstr(dab_event);
+#else
std::string devType = dab_event->DeviceType;
+#endif
// Check for an InternetGatewayDevice and removes it from the list
+
std::transform(devType.begin(), devType.end(), devType.begin(), tolower);
+
if (stdStringIsEqualCI(devType, UPnP::Device::IGW)) {
+#if UPNP_VERSION >= 10800
+ const char *deviceID =
+ UpnpDiscovery_get_DeviceID_cstr(dab_event);
+ upnpCP->RemoveRootDevice(deviceID);
+#else
upnpCP->RemoveRootDevice(dab_event->DeviceId);
+#endif
}
break;
}
case UPNP_EVENT_RECEIVED: {
//fprintf(stderr, "Callback: UPNP_EVENT_RECEIVED\n");
// Event reveived
+#if UPNP_VERSION >= 10800
+ UpnpEvent *e_event = (UpnpEvent *)Event;
+ int eventKey = UpnpEvent_get_EventKey(e_event);
+ IXML_Document *changedVariables =
+ UpnpEvent_get_ChangedVariables(e_event);
+ const std::string sid = UpnpEvent_get_SID_cstr(e_event);
+#else
struct Upnp_Event *e_event = (struct Upnp_Event *)Event;
const std::string Sid = e_event->Sid;
+#endif
// Parses the event
+#if UPNP_VERSION >= 10800
+ upnpCP->OnEventReceived(sid, eventKey, changedVariables);
+#else
upnpCP->OnEventReceived(Sid, e_event->EventKey, e_event->ChangedVariables);
+#endif
break;
}
case UPNP_EVENT_SUBSCRIBE_COMPLETE:
@@ -1252,24 +1319,42 @@
//fprintf(stderr, "Callback: UPNP_EVENT_RENEWAL_COMPLETE\n");
msg << "error(UPNP_EVENT_RENEWAL_COMPLETE): ";
upnpEventRenewalComplete:
+#if UPNP_VERSION >= 10800
+ UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event;
+ int errCode = UpnpEventSubscribe_get_ErrCode(es_event);
+ if (errCode != UPNP_E_SUCCESS) {
+#else
struct Upnp_Event_Subscribe *es_event =
(struct Upnp_Event_Subscribe *)Event;
if (es_event->ErrCode != UPNP_E_SUCCESS) {
+#endif
msg << "Error in Event Subscribe Callback";
+#if UPNP_VERSION >= 10800
+ UPnP::ProcessErrorMessage(msg.str(), errCode, NULL, NULL);
+#else
UPnP::ProcessErrorMessage(
msg.str(), es_event->ErrCode, NULL, NULL);
+#endif
} else {
#if 0
+#if UPNP_VERSION >= 10800
+
+ const UpnpString *publisherUrl =
+ UpnpEventSubscribe_get_PublisherUrl(es_event);
+ const char *sid = UpnpEvent_get_SID_cstr(es_event);
+ int timeOut = UpnpEvent_get_TimeOut(es_event);
+ TvCtrlPointHandleSubscribeUpdate(
+ publisherUrl, sid, timeOut);
+#else
TvCtrlPointHandleSubscribeUpdate(
GET_UPNP_STRING(es_event->PublisherUrl),
es_event->Sid,
es_event->TimeOut );
#endif
+#endif
}
-
break;
}
-
case UPNP_EVENT_AUTORENEWAL_FAILED:
//fprintf(stderr, "Callback: UPNP_EVENT_AUTORENEWAL_FAILED\n");
msg << "error(UPNP_EVENT_AUTORENEWAL_FAILED): ";
@@ -1280,29 +1365,56 @@
msg << "error(UPNP_EVENT_SUBSCRIPTION_EXPIRED): ";
msg2 << "UPNP_EVENT_SUBSCRIPTION_EXPIRED: ";
upnpEventSubscriptionExpired:
+#if UPNP_VERSION >= 10800
+ UpnpEventSubscribe *es_event = (UpnpEventSubscribe *)Event;
+#else
struct Upnp_Event_Subscribe *es_event =
(struct Upnp_Event_Subscribe *)Event;
+#endif
Upnp_SID newSID;
memset(newSID, 0, sizeof(Upnp_SID));
int TimeOut = 1801;
+#if UPNP_VERSION >= 10800
+ const char *publisherUrl =
+ UpnpEventSubscribe_get_PublisherUrl_cstr(es_event);
+#endif
int ret = UpnpSubscribe(
upnpCP->m_UPnPClientHandle,
+#if UPNP_VERSION >= 10800
+ publisherUrl,
+#else
GET_UPNP_STRING(es_event->PublisherUrl),
+#endif
&TimeOut,
newSID);
if (ret != UPNP_E_SUCCESS) {
msg << "Error Subscribing to EventURL";
+#if UPNP_VERSION >= 10800
+ int errCode = UpnpEventSubscribe_get_ErrCode(es_event);
+#endif
UPnP::ProcessErrorMessage(
+#if UPNP_VERSION >= 10800
+ msg.str(), errCode, NULL, NULL);
+#else
msg.str(), es_event->ErrCode, NULL, NULL);
+#endif
} else {
ServiceMap::iterator it =
+#if UPNP_VERSION >= 10800
+ upnpCP->m_ServiceMap.find(publisherUrl);
+#else
upnpCP->m_ServiceMap.find(GET_UPNP_STRING(es_event->PublisherUrl));
+#endif
if (it != upnpCP->m_ServiceMap.end()) {
CUPnPService &service = *(it->second);
service.SetTimeout(TimeOut);
service.SetSID(newSID);
msg2 << "Re-subscribed to EventURL '" <<
+#if UPNP_VERSION >= 10800
+ publisherUrl <<
+#else
GET_UPNP_STRING(es_event->PublisherUrl) <<
+#endif
"' with SID == '" <<
newSID << "'.";
AddDebugLogLineC(logUPnP, msg2);
@@ -1321,17 +1433,34 @@
case UPNP_CONTROL_ACTION_COMPLETE: {
//fprintf(stderr, "Callback: UPNP_CONTROL_ACTION_COMPLETE\n");
// This is here if we choose to do this asynchronously
+#if UPNP_VERSION >= 10800
+ UpnpActionComplete *a_event = (UpnpActionComplete *)Event;
+ int errCode = UpnpActionComplete_get_ErrCode(a_event);
+ IXML_Document *actionResult =
+ UpnpActionComplete_get_ActionResult(a_event);
+ if (errCode != UPNP_E_SUCCESS) {
+#else
struct Upnp_Action_Complete *a_event =
(struct Upnp_Action_Complete *)Event;
if (a_event->ErrCode != UPNP_E_SUCCESS) {
+#endif
UPnP::ProcessErrorMessage(
"UpnpSendActionAsync",
+#if UPNP_VERSION >= 10800
+ errCode, NULL,
+ actionResult);
+#else
a_event->ErrCode, NULL,
a_event->ActionResult);
+#endif
} else {
// Check the response document
UPnP::ProcessActionResponse(
+#if UPNP_VERSION >= 10800
+ actionResult,
+#else
a_event->ActionResult,
+#endif
"<UpnpSendActionAsync>");
}
/* No need for any processing here, just print out results.
@@ -1342,22 +1471,43 @@
case UPNP_CONTROL_GET_VAR_COMPLETE: {
//fprintf(stderr, "Callback: UPNP_CONTROL_GET_VAR_COMPLETE\n");
msg << "error(UPNP_CONTROL_GET_VAR_COMPLETE): ";
+#if UPNP_VERSION >= 10800
+ UpnpStateVarComplete *sv_event = (UpnpStateVarComplete *)Event;
+ int errCode = UpnpStateVarComplete_get_ErrCode(sv_event);
+ if (errCode != UPNP_E_SUCCESS) {
+#else
struct Upnp_State_Var_Complete *sv_event =
(struct Upnp_State_Var_Complete *)Event;
if (sv_event->ErrCode != UPNP_E_SUCCESS) {
+#endif
msg << "m_UpnpGetServiceVarStatusAsync";
UPnP::ProcessErrorMessage(
+#if UPNP_VERSION >= 10800
+ msg.str(), errCode, NULL, NULL);
+#else
msg.str(), sv_event->ErrCode, NULL, NULL);
+#endif
} else {
#if 0
// Warning: The use of UpnpGetServiceVarStatus and
// UpnpGetServiceVarStatusAsync is deprecated by the
// UPnP forum.
+#if UPNP_VERSION >= 10800
+ const char *ctrlUrl =
+ UpnpStateVarComplete_get_CtrlUrl(sv_event);
+ const char *stateVarName =
+ UpnpStateVarComplete_get_StateVarName(sv_event);
+ const DOMString currentVal =
+ UpnpStateVarComplete_get_CurrentVal(sv_event);
+ TvCtrlPointHandleGetVar(
+ ctrlUrl, stateVarName, currentVal);
+#else
TvCtrlPointHandleGetVar(
sv_event->CtrlUrl,
sv_event->StateVarName,
sv_event->CurrentVal );
#endif
+#endif
}
break;
}
diff -Naur a/src/UPnPBase.h b/src/UPnPBase.h
--- a/src/UPnPBase.h 2016-10-06 18:49:44.000000000 +0800
+++ b/src/UPnPBase.h 2019-12-11 22:16:28.165063153 +0800
@@ -489,9 +489,15 @@
// Callback function
static int Callback(
+ #if UPNP_VERSION >= 10800
+ Upnp_EventType_e EventType,
+ const void *Event,
+ void *Cookie);
+ #else
Upnp_EventType EventType,
void* Event,
void* Cookie);
+ #endif
private:
void OnEventReceived(

View File

@ -1,19 +0,0 @@
--- a/src/libs/common/MuleDebug.cpp 2016-10-06 18:49:44.000000000 +0800
+++ b/src/libs/common/MuleDebug.cpp 2021-06-17 02:16:40.000000000 +0800
@@ -268,14 +268,14 @@
return;
}
- bfd_vma vma = bfd_get_section_vma(abfd, section);
+ bfd_vma vma = bfd_section_vma(section);
unsigned long address = (unsigned long)_address;
if (address < vma) {
return;
}
- bfd_size_type size = bfd_section_size(abfd, section);
+ bfd_size_type size = bfd_section_size(section);
if (address > (vma + size)) {
return;
}

View File

@ -1,16 +0,0 @@
diff --git a/src/UPnPBase.cpp b/src/UPnPBase.cpp
index 46ac7451e..dd244e5b0 100644
--- a/src/UPnPBase.cpp
+++ b/src/UPnPBase.cpp
@@ -828,9 +828,9 @@
int ret;
char *ipAddress = NULL;
unsigned short port = 0;
- ret = UpnpInit(ipAddress, udpPort);
+ ret = UpnpInit2(0, udpPort);
if (ret != UPNP_E_SUCCESS) {
- msg << "error(UpnpInit): Error code ";
+ msg << "error(UpnpInit2): Error code ";
goto error;
}
port = UpnpGetServerPort();

View File

@ -1,58 +0,0 @@
#
# Copyright (C) 2007-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=antileech
PKG_VERSION:=2.3.2
PKG_RELEASE:=1
#PKG_SOURCE:=antileech-2.3.1.tar.gz
#PKG_SOURCE_URL:=@SF/amule
#PKG_MD5SUM:=a892a1cc00d03e943e03434d182fe73e
PKG_BUILD_DEPENDS:=libgd
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/antileech
SUBMENU:=P2P
SECTION:=net
CATEGORY:=Network
TITLE:=AntiLeech for amule
URL:=http://www.amule.org/
DEPENDS:=+libc +amule +libwxbase
endef
TARGET_LDFLAGS += \
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Configure
sed -i "s:^AC_CHECK_PROG.WXCONFIG,.*::g" $(PKG_BUILD_DIR)/configure.ac
sed -i "s:wx-config --cppflags:$(STAGING_DIR)/usr/bin/wx-config --cppflags:g" $(PKG_BUILD_DIR)/configure.ac
cd $(PKG_BUILD_DIR) && sh ./autogen.sh
$(call Build/Configure/Default)
endef
define Build/Compile
$(MAKE) -k -C $(PKG_BUILD_DIR) \
HOSTCC="$(HOSTCC)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/antileech/install
$(INSTALL_DIR) $(1)/usr/share/amule
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/amule/libantiLeech.so $(1)/usr/share/amule
endef
$(eval $(call BuildPackage,antileech))

View File

@ -1,63 +0,0 @@
/**
* Author: Bill Lee<bill.lee.y@gmail.com>
* License: GNU GPL
*/
//---------------------
#ifndef CSTRING_WX_H
#define CSTRING_WX_H
//#include <wx/wx.h>
#include <wx/string.h>
class CString : public wxString{
public:
CString(){}
CString(wxChar c, size_t n=1): wxString(c, n){}
CString(const wxChar* str): wxString(str){}
CString(const wxString& str): wxString(str){}
CString(const CString& str): wxString(str){}
//---------------------
CString& operator=(const wxChar* str){
wxString::operator=(str);
return *this;
}
//operator*() from wxString;
size_t GetLength()const{ return Length(); }
wxChar GetAt(size_t nIndex)const{ return GetChar(nIndex); }
//IsEmpty() from wxString;
CString& TrimLeft(wxChar c){
size_t pos = find_first_not_of(c);
if(pos == 0)
return *this;
erase(0, pos);
return *this;
}
CString& TrimRight(wxChar c){
size_t pos = find_last_not_of(c) + 1;
if(pos == Length())
return *this;
erase(pos, Length() - pos);
return *this;
}
CString Trim(){
CString ret(*this);
ret.wxString::Trim(false); /* wxString::Trim(bool fromright = true) */
ret.wxString::Trim(true);
return ret;
}
//Find(wxChar) and Find(wxChar*) from wxString;
int Find(const CString& str)const{ return wxString::Find(str.c_str()); }
int ReverseFind(const wxChar c)const{ return wxString::Find(c, true); }
int ReverseFind(const wxChar* str)const{ return rfind(str); }
int ReverseFind(const CString& str)const{ return rfind(str); }
CString Right(size_t len)const{ return wxString::Right(len); }
CString Left(size_t len)const{ return wxString::Left(len); }
#if wxCHECK_VERSION(2, 9, 0)
CString Mid(size_t first, size_t count = wxString::npos)const{
#else
CString Mid(size_t first, size_t count = wxSTRING_MAXLEN)const{
#endif
return wxString::Mid(first, count);
}
};
#endif

View File

@ -1,28 +0,0 @@
/*
* =====================================================================================
*
* Filename: Interface.cpp
*
* Description: A part of aMule DLP
*
* Created: 2011-02-24 19:49
*
* Author: Bill Lee , bill.lee.y@gmail.com
*
* Copyright (c) 2011, Bill Lee
* License: GNU General Public License
*
* =====================================================================================
*/
/* ##### HEADER FILE INCLUDES ################################################### */
#include "antiLeech.h"
/* ##### FUNCTION DEFINITIONS - EXPORTED FUNCTIONS ############################ */
extern "C" IantiLeech* createAntiLeechInstant(){
return new CantiLeech;
}
extern "C" int destoryAntiLeechInstant(IantiLeech* ptr){
delete ptr;
return 0;
}

View File

@ -1,16 +0,0 @@
AUTOMAKE_OPTIONS = foreign
pkgdir = $(datadir)/amule
ACLOCAL_AMFLAGS = -I m4
pkg_LTLIBRARIES = libantiLeech.la
libantiLeech_la_CPPFLAGS = ${ANTILEECH_CPPFLAGS}
libantiLeech_la_LDFLAGS = ${ANTILEECH_LDFLAGS} -module -avoid-version --no-la-files
libantiLeech_la_SOURCES = \
antiLeech.h \
antiLeech_wx.h \
CString_wx.h \
antiLeech.cpp \
antiLeech_wx.cpp \
Interface.cpp

File diff suppressed because it is too large Load Diff

View File

@ -1,161 +0,0 @@
#ifndef ANTILEECH_H
#define ANTILEECH_H
#pragma once
#include "antiLeech_wx.h"
#include "CString_wx.h"
class IantiLeech
{
public:
virtual ~IantiLeech(){}; /* Bill Lee: Not be used currently */
//BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD,LPVOID);
virtual DWORD GetDLPVersion() = 0;
//old versions to keep compatible
/* //drop old version support
virtual LPCTSTR DLPCheckModstring(LPCTSTR modversion, LPCTSTR clientversion);
virtual LPCTSTR DLPCheckUsername(LPCTSTR username);
virtual LPCTSTR DLPCheckNameAndHash(CString username, CString& userhash);
*/
//new versions
virtual LPCTSTR DLPCheckModstring_Hard(LPCTSTR modversion, LPCTSTR clientversion) = 0;
virtual LPCTSTR DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion) = 0;
virtual LPCTSTR DLPCheckUsername_Hard(LPCTSTR username) = 0;
virtual LPCTSTR DLPCheckUsername_Soft(LPCTSTR username) = 0;
virtual LPCTSTR DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion) = 0;
virtual LPCTSTR DLPCheckMessageSpam(LPCTSTR messagetext) = 0;
virtual LPCTSTR DLPCheckUserhash(const PBYTE userhash) = 0;
virtual LPCTSTR DLPCheckHelloTag(UINT tagnumber) = 0;
virtual LPCTSTR DLPCheckInfoTag(UINT tagnumber) = 0;
//void TestFunc();
//Bill Lee: no need in interface abstract class
//private:
// static bool IsTypicalHex (const CString& addon);
};
//Bill Lee: never call delete on IantiLeech, use destoryAntiLeechInstat instead.
extern "C" IantiLeech* createAntiLeechInstant();
extern "C" int destoryAntiLeechInstant(IantiLeech*);
class CantiLeech: public IantiLeech
{
public:
//BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD,LPVOID);
virtual DWORD GetDLPVersion(){ return DLPVersion; }
//old versions to keep compatible
/* //drop old version support
virtual LPCTSTR DLPCheckModstring(LPCTSTR modversion, LPCTSTR clientversion);
virtual LPCTSTR DLPCheckUsername(LPCTSTR username);
virtual LPCTSTR DLPCheckNameAndHash(CString username, CString& userhash);
*/
//new versions
virtual LPCTSTR DLPCheckModstring_Hard(LPCTSTR modversion, LPCTSTR clientversion);
virtual LPCTSTR DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion);
virtual LPCTSTR DLPCheckUsername_Hard(LPCTSTR username);
virtual LPCTSTR DLPCheckUsername_Soft(LPCTSTR username);
virtual LPCTSTR DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion);
virtual LPCTSTR DLPCheckMessageSpam(LPCTSTR messagetext);
virtual LPCTSTR DLPCheckUserhash(const PBYTE userhash);
virtual LPCTSTR DLPCheckHelloTag(UINT tagnumber);
virtual LPCTSTR DLPCheckInfoTag(UINT tagnumber);
//void TestFunc();
private:
static const DWORD DLPVersion;
static bool IsTypicalHex (const CString& addon);
};
//<<< new tags from eMule 0.04x
#define CT_UNKNOWNx0 0x00 // Hybrid Horde protocol
#define CT_UNKNOWNx12 0x12 // http://www.haspepapa-welt.de (DodgeBoards)
#define CT_UNKNOWNx13 0x13 // http://www.haspepapa-welt.de (DodgeBoards)
#define CT_UNKNOWNx14 0x14 // http://www.haspepapa-welt.de (DodgeBoards)
#define CT_UNKNOWNx15 0x15 // http://www.haspepapa-welt.de (DodgeBoards) & DarkMule |eVorte|X|
#define CT_UNKNOWNx16 0x16 // http://www.haspepapa-welt.de (DodgeBoards)
#define CT_UNKNOWNx17 0x17 // http://www.haspepapa-welt.de (DodgeBoards)
#define CT_UNKNOWNx4D 0x4D // pimp my mule (00de)
#define CT_UNKNOWNxE6 0xE6 // http://www.haspepapa-welt.de
#define CT_UNKNOWNx22 0x22 // DarkMule |eVorte|X|
#define CT_UNKNOWNx5D 0x5D // md4
#define CT_UNKNOWNx63 0x63 // ?
#define CT_UNKNOWNx64 0x64 // ?
#define CT_UNKNOWNx69 0x69 // eMuleReactor //Xman don't use this, it's webcache!
#define CT_UNKNOWNx6B 0x6B // md4
#define CT_UNKNOWNx6C 0x6C // md4
#define CT_UNKNOWNx74 0x74 // md4
#define CT_UNKNOWNx76 0x76 // www.donkey2002.to
#define CT_UNKNOWNx79 0x79 // Bionic
#define CT_UNKNOWNx7A 0x7A // NewDarkMule
#define CT_UNKNOWNx83 0x83 // Fusspi
#define CT_UNKNOWNx87 0x87 // md4
#define CT_UNKNOWNx88 0x88 // DarkMule v6 |eVorte|X|
#define CT_UNKNOWNx8c 0x8c // eMule v0.27c [LSD7c]
#define CT_UNKNOWNx8d 0x8d // unknown Leecher - (client version:60)
#define CT_UNKNOWNx94 0x94 // 00.de community //Xman 20.08.05
#define CT_UNKNOWNx97 0x97 // Emulereactor Community Mod
#define CT_UNKNOWNx98 0x98 // Emulereactor Community Mod
#define CT_UNKNOWNx99 0x99 // eMule v0.26d [RAMMSTEIN 8b]
#define CT_UNKNOWNx9C 0x9C // Emulereactor Community Mod
#define CT_UNKNOWNxbb 0xbb // emule.de (client version:60)
#define CT_UNKNOWNxc4 0xc4 //MD5 Community from new bionic - hello
#define CT_UNKNOWNxC8 0xc8 // MD5 Community from new bionic - hello //Xman x4
#define CT_UNKNOWNxCA 0xCA // NewDarkMule
#define CT_UNKNOWNxCD 0xCD // www.donkey2002.to
#define CT_UNKNOWNxCE 0xCE // FRZ community //Xman 20.08.05
#define CT_UNKNOWNxCF 0xCF // FRZ community //Xman 20.08.05
#define CT_UNKNOWNxDA 0xDA // Emulereactor Community Mod
#define CT_UNKNOWNxEC 0xec // SpeedMule and clones //Xman x4
#define CT_UNKNOWNxF0 0xF0 // Emulereactor Community Mod
#define CT_UNKNOWNxF4 0xF4 // Emulereactor Community Mod
#define CT_UNKNOWNxD2 0xD2 // Chinese Leecher //SquallATF
//#define CT_UNKNOWNx85 0x85 // viper-israel.org and eChanblardNext //zz_fly, viper become good
#define CT_FRIENDSHARING 0x66 //eWombat [SNAFU]
#define CT_DARK 0x54 //eWombat [SNAFU]
#define FRIENDSHARING_ID 0x5F73F1A0 // Magic Key, DO NOT CHANGE!
// unknown eMule tags
#define ET_MOD_UNKNOWNx12 0x12 // http://www.haspepapa-welt.de
#define ET_MOD_UNKNOWNx13 0x13 // http://www.haspepapa-welt.de
#define ET_MOD_UNKNOWNx14 0x14 // http://www.haspepapa-welt.de
#define ET_MOD_UNKNOWNx17 0x17 // http://www.haspepapa-welt.de
#define ET_MOD_UNKNOWNx2F 0x2F // eMule v0.30 [OMEGA v.07 Heiko]
#define ET_MOD_UNKNOWNx30 0x30 // aMule 1.2.0
#define ET_MOD_UNKNOWNx36 0x36 // eMule v0.26
#define ET_MOD_UNKNOWNx3C 0x3C // enkeyDev.6 / LamerzChoice 9.9a
#define ET_MOD_UNKNOWNx41 0x41 // CrewMod (pre-release mod based on Plus) identification
#define ET_MOD_UNKNOWNx42 0x42 // CrewMod (pre-release mod based on Plus) key verification
#define ET_MOD_UNKNOWNx43 0x43 // CrewMod (pre-release mod based on Plus) version info
#define ET_MOD_UNKNOWNx50 0x50 // Bionic 0.20 Beta]
#define ET_MOD_UNKNOWNx59 0x59 // emule 0.40 / eMule v0.30 [LSD.12e]
#define ET_MOD_UNKNOWNx5B 0x5B // eMule v0.26
#define ET_MOD_UNKNOWNx60 0x60 // eMule v0.30a Hunter.6 + eMule v0.26
#define ET_MOD_UNKNOWNx64 0x64 // LSD.9dT / Athlazan(0.29c)Alpha.3
#define ET_MOD_UNKNOWNx76 0x76 // http://www.haspepapa-welt.de (DodgeBoards)
#define ET_MOD_UNKNOWNx84 0x84 // eChanblardv3.2
#define ET_MOD_UNKNOWNx85 0x85 // ?
#define ET_MOD_UNKNOWNx86 0x86 // ?
#define ET_MOD_UNKNOWNx93 0x93 // ?
#define ET_MOD_UNKNOWNxA6 0xA6 // eMule v0.26
#define ET_MOD_UNKNOWNxB1 0xB1 // Bionic 0.20 Beta]
#define ET_MOD_UNKNOWNxB4 0xB4 // Bionic 0.20 Beta]
#define ET_MOD_UNKNOWNxC8 0xC8 // Bionic 0.20 Beta]
#define ET_MOD_UNKNOWNxC9 0xC9 // Bionic 0.20 Beta]
#define ET_MOD_UNKNOWNxDA 0xDA // Rumata (rus)(Plus v1f) - leecher mod?
//>>> eWombat [SNAFU_V3]
#undef __declspec
#endif

View File

@ -1,25 +0,0 @@
//Author: greensea <gs@bbxy.net>
#include "antiLeech_wx.h" //Modified by Bill Lee.
//Bug fixed by Orzogc Lee
LPCTSTR StrStrI(LPCTSTR haystack, LPCTSTR needle){
//Bill Lee: allocate wchar array on the stack
wchar_t haystacki[512];
wchar_t needlei[512];
int i = 0;
do{
haystacki[i] = towlower(haystack[i]);
if(i == 511)
break;
}while(haystack[i++]); //As haystacki is allocated on the stack, it wans't set 0. So the NULL needs to be copy.
i = 0;
do{
needlei[i] = towlower(needle[i]);
if(i == 511)
break;
}while(needle[i++]);
const wchar_t* ret = wcsstr(haystacki, needlei);
if(ret != NULL)
ret = ret - haystacki + haystack;
return ret;
}

View File

@ -1,54 +0,0 @@
#ifndef ANTILEECH_WX_H
#define ANTILEECH_WX_H
#include <wx/defs.h>
#include <string.h>
#include <wctype.h> // for towlower()
#define LPCTSTR const wxChar*
#define BOOL bool
//#define _T(var) wxT(var) //defined in wxWidgets
#define DWORD wxUint32
#define UINT wxUint16
#define WINAPI
#define HINSTANCE
#define LPVOID void*
#define PBYTE unsigned char*
#define TCHAR wxChar
#define _TINT wxInt32
#define SSIZE_T ptrdiff_t
#define StrCmpI _tcsicmp
#define _tcsicmp _wcsicmp
#define _istdigit(var) iswdigit(var)
#define _istcntrl(var) iswcntrl(var)
#define _istpunct(var) iswpunct(var)
#define _istspace(var) iswspace(var)
#define _istxdigit(var) iswxdigit(var)
inline float _tstof(const wchar_t* str){
wchar_t** ptail = NULL;
return wcstof(str, ptail);
}
//This function is not used. by Orzogc Lee
//But I think there is no need to removing, linker will remove it.
/*
inline void tolowers(wxChar* str){
int i = 0;
do{
str[i] = towlower(str[i]);
}while(str[++i]);
}
*/
#define _tcsstr(haystack, needle) wcsstr(haystack, needle)
#define _tcslen(var) wcslen(var)
#define StrStr(a, b) wcsstr(a, b)
#define StrStrIW(a, b) StrStrI(a, b)
LPCTSTR StrStrI(LPCTSTR haystack, LPCTSTR needle);
//Bill Lee: I think inlining this function make no senses, because it is a very large operation.
#define _wcsicmp(a, b) wcscasecmp(a, b)
#define StrCmpIW(a, b) wcscasecmp(a, b)
#endif

View File

@ -1,8 +0,0 @@
mkdir -pv m4
libtoolize
aclocal
aclocal -I m4
automake --add-missing --copy
autoconf

View File

@ -1,44 +0,0 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# Copyright (C) 2011 Bill Lee <bill.lee.y@gmail.com>
# License: GNU GPL v3 or any later version released by Free Software Foundation
#AC_PREREQ([2.65])
AC_INIT([antiLeech], [44], [https://github.com/persmule/amule-dlp/issues])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([antiLeech.cpp])
#AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_MAKE_SET
AM_DISABLE_STATIC
AC_PROG_LIBTOOL
#Check for wx-config
AC_CHECK_PROG(WXCONFIG, [wx-config], [wx-config])
ANTILEECH_CPPFLAGS=$(wx-config --cppflags)
AC_SUBST(ANTILEECH_CPPFLAGS)
# Checks for libraries.
ANTILEECH_LDFLAGS=
AC_SUBST(ANTILEECH_LDFLAGS)
# Checks for header files.
AC_CHECK_HEADERS([string.h], [wx/string.h], [wx/defs.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -1,61 +0,0 @@
--- antiLeech.cpp.win 2016-02-15 19:31:18.748711749 +0800
+++ antiLeech.cpp 2016-02-15 20:49:25.691484626 +0800
@@ -17,8 +17,11 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#include <atlstr.h>
+#include "CString_wx.h"
#include "antiLeech.h"
+#define __declspec(var) CantiLeech::
+#define SPECIAL_DLP_VERSION
+#define ALL_VERYCD_MOD
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -51,7 +54,10 @@ LPCTSTR apszSnafuTag[]=
//,_T("[eChanblardNext]") //21 zz_fly
};
+const DWORD CantiLeech::DLPVersion = 4405;
+//deactivate M$WIN-specific codes
+#if 0
BOOL WINAPI DllMain (
HANDLE hModule,
DWORD dwFunction,
@@ -74,6 +80,7 @@ void __declspec(dllexport) TestFunc()
{
::MessageBox(NULL,_T("Inside the DLL!"),_T("Nix"),0);
}
+#endif
//old versions just to keep compatible
/* //drop old version support
@@ -285,7 +292,7 @@ LPCTSTR __declspec(dllexport) DLPCheckNa
*/
//end old version ------------------------------------------
-bool IsTypicalHex(CString& addon)
+bool CantiLeech::IsTypicalHex(const CString& addon)
{
if(addon.GetLength()>25 || addon.GetLength()<5)
return false;
@@ -1244,7 +1251,7 @@ LPCTSTR __declspec(dllexport) DLPCheckUs
return NULL;
}
-LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(CString username, CString& userhash, CString& modversion)
+LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(const CString& username, const CString& userhash, const CString& modversion)
{
if(username.IsEmpty() || userhash.IsEmpty())
return NULL;
@@ -1309,7 +1316,7 @@ LPCTSTR __declspec(dllexport) DLPCheckNa
//Check for aedit
//remark: a unmodded emule can't send a space at last sign
- if(modversion.IsEmpty() && username.Right(1)==32)
+ if(modversion.IsEmpty() && username.Right(1)==_T(" "))
return _T("AEdit");
//Check for Hex-Modstring

View File

@ -1,86 +0,0 @@
#
# Copyright (C) 2019 OpenWrt.org
#
# KFERMercer <KFER.Mercer@gmail.com>
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=baidupcs-web
PKG_VERSION:=3.7.4-nnew
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Erope/BaiduPCS-Go.git
PKG_SOURCE_VERSION:=cffd49d0709f9c7d3dd6ae5c9625f68bfd446166
PKG_MIRROR_HASH:=2cb9c9e27613cf4126234c969f1928e392108ad4f1580b3eac92339c42a2ab0a
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_CONFIG_DEPENDS:= \
CONFIG_BAIDUPCS_WEB_COMPRESS_GOPROXY \
CONFIG_BAIDUPCS_WEB_COMPRESS_UPX
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/Erope/BaiduPCS-Go
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/baidupcs-web
TITLE:=BaiduPCS-Web is a web controller for BaiduPCS-Go
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
URL:=https://github.com/Erope/BaiduPCS-Go
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
define Package/baidupcs-web/description
BaiduPCS-Web is a web controller for BaiduPCS-Go
endef
define Package/baidupcs-web/config
config BAIDUPCS_WEB_COMPRESS_GOPROXY
bool "Compiling with GOPROXY proxy"
default n
config BAIDUPCS_WEB_COMPRESS_UPX
bool "Compress executable files with UPX"
depends on !mips64
default n
endef
ifeq ($(CONFIG_BAIDUPCS_WEB_COMPRESS_GOPROXY),y)
export GO111MODULE=on
export GOPROXY=https://goproxy.baidu.com
endif
define Build/Compile
( \
GOOS=$$$$(go env GOOS) GOARCH=$$$$(go env GOARCH) go get -v github.com/GeertJohan/go.rice/rice/... ; \
cd $(PKG_BUILD_DIR)/internal/pcsweb ; \
"$$$$(go env GOPATH)/bin/rice" embed-go ; \
)
$(call GoPackage/Build/Compile)
ifeq ($(CONFIG_BAIDUPCS_WEB_COMPRESS_UPX),y)
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/BaiduPCS-Go
endif
endef
define Package/baidupcs-web/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/BaiduPCS-Go $(1)/usr/bin/baidupcs-web
endef
$(eval $(call GoBinPackage,baidupcs-web))
$(eval $(call BuildPackage,baidupcs-web))

View File

@ -1,53 +0,0 @@
# 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:=2
PKG_SOURCE:=SourceCode.zip
PKG_SOURCE_URL:=@SF/dns2socks
PKG_SOURCE_DATE:=2020-02-18
PKG_HASH:=406b5003523577d39da66767adfe54f7af9b701374363729386f32f6a3a995f4
PKG_MAINTAINER:=ghostmaker
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILE:=LICENSE
include $(INCLUDE_DIR)/package.mk
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:=DNS to SOCKS or HTTP proxy
URL:=http://dns2socks.sourceforge.net/
DEPENDS:=+libpthread
endef
define Package/dns2socks/description
This is a command line utility to resolve DNS requests via
a SOCKS tunnel like Tor or a HTTP proxy.
endef
define Build/Compile
$(TARGET_CC) \
$(TARGET_CFLAGS) \
$(TARGET_CPPFLAGS) \
$(FPIC) \
-o $(PKG_BUILD_DIR)/DNS2SOCKS/dns2socks \
$(PKG_BUILD_DIR)/DNS2SOCKS/DNS2SOCKS.c \
$(TARGET_LDFLAGS) -pthread
endef
define Package/dns2socks/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/DNS2SOCKS/dns2socks $(1)/usr/bin/dns2socks
endef
$(eval $(call BuildPackage,dns2socks))

View File

@ -1,61 +0,0 @@
#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsforwarder
PKG_VERSION:=6.1.15
PKG_RELEASE:=11
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/1715173329/dnsforwarder.git
PKG_SOURCE_DATE:=2018-06-26
PKG_SOURCE_VERSION:=587e61ae4d75dc976f538088b715a3c8ee26c144
PKG_MIRROR_HASH:=7c141040ae384d254d90b3c3ee502d87330c9fdcd201ff29a669336a27b176d4
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Dennis <openwrt@tossp.com>
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/dnsforwarder
SECTION:=net
CATEGORY:=Network
TITLE:=A simple DNS forwarder
URL:=https://github.com/holmium/dnsforwarder
DEPENDS:=+coreutils +coreutils-base64 +dnsmasq-full +libpthread +wget-ssl
endef
define Package/dnsforwarder/description
Forwarding queries to customized domains (and their subdomains) to specified servers
over a specified protocol (UDP or TCP). non-standard ports are supported.
endef
CONFIGURE_ARGS+= --enable-downloader=wget
define Package/dnsforwarder/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dnsforwarder $(1)/usr/bin/dnsforwarder
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) files/etc/config/dnsforwarder $(1)/etc/config/dnsforwarder
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) files/etc/init.d/dnsforwarder $(1)/etc/init.d/dnsforwarder
$(INSTALL_DIR) $(1)/etc/dnsforwarder
$(INSTALL_CONF) files/etc/dnsforwarder/gfw.txt $(1)/etc/dnsforwarder/gfw.txt
$(INSTALL_DIR) $(1)/usr/share/dnsforwarder
$(INSTALL_BIN) files/usr/share/dnsforwarder/gfwlist.sh $(1)/usr/share/dnsforwarder/gfwlist.sh
endef
$(eval $(call BuildPackage,dnsforwarder))

View File

@ -1,79 +0,0 @@
config arguments
option enabled '0'
option addr '127.0.0.1:5053'
config config
option cache 'true'
option cache_size '102400'
option cache_ignore 'false'
option gfw 'true'
list block_ip '74.125.127.102'
list block_ip '74.125.155.102'
list block_ip '74.125.39.102'
list block_ip '74.125.39.113'
list block_ip '209.85.229.138'
list block_ip '128.121.126.139'
list block_ip '159.106.121.75'
list block_ip '169.132.13.103'
list block_ip '192.67.198.6'
list block_ip '202.106.1.2'
list block_ip '202.181.7.85'
list block_ip '203.161.230.171'
list block_ip '203.98.7.65'
list block_ip '207.12.88.98'
list block_ip '208.56.31.43'
list block_ip '209.145.54.50'
list block_ip '209.220.30.174'
list block_ip '209.36.73.33'
list block_ip '211.94.66.147'
list block_ip '213.169.251.35'
list block_ip '216.221.188.182'
list block_ip '216.234.179.13'
list block_ip '243.185.187.39'
list block_ip '37.61.54.158'
list block_ip '4.36.66.178'
list block_ip '46.82.174.68'
list block_ip '59.24.3.173'
list block_ip '64.33.88.161'
list block_ip '64.33.99.47'
list block_ip '64.66.163.251'
list block_ip '65.104.202.252'
list block_ip '65.160.219.113'
list block_ip '66.45.252.237'
list block_ip '69.55.52.253'
list block_ip '72.14.205.104'
list block_ip '72.14.205.99'
list block_ip '78.16.49.15'
list block_ip '8.7.198.45'
list block_ip '93.46.8.89'
list block_ip '37.61.54.158'
list block_ip '243.185.187.39'
list block_ip '190.93.247.4'
list block_ip '190.93.246.4'
list block_ip '190.93.245.4'
list block_ip '190.93.244.4'
list block_ip '65.49.2.178'
list block_ip '189.163.17.5'
list block_ip '23.89.5.60'
list block_ip '49.2.123.56'
list block_ip '54.76.135.1'
list block_ip '77.4.7.92'
list block_ip '118.5.49.6'
list block_ip '159.24.3.173'
list block_ip '188.5.4.96'
list block_ip '197.4.4.12'
list block_ip '220.250.64.24'
list block_ip '243.185.187.30'
list block_ip '249.129.46.48'
list block_ip '253.157.14.165'
option block_ipv6 'false'
list cache_control 'tossp.com $orig'
list cache_control '* fixed 3600'
option log 'false'
list udp_group '9.9.9.9,119.29.29.29,223.5.5.5,114.114.114.114 * on'
option block_negative_resp 'true'
list udp_local '0.0.0.0:5053'
list udp_local '[::0]:5053'
option domain_statistic 'false'

File diff suppressed because it is too large Load Diff

View File

@ -1,260 +0,0 @@
#!/bin/sh /etc/rc.common
START=60
EXTRA_COMMANDS="makeconfig makegfwlist health"
CRON_FILE=/etc/crontabs/root
PID_PATH=/var/run/dnsforwarder
PID_FILE=${PID_PATH}/dns.pid
DNSFORWARDER_CONF=/tmp/dnsforwarder.conf
add_cron()
{
sed -i '/dnsforwarder/d' $CRON_FILE
echo '*/5 * * * * /etc/init.d/dnsforwarder health' >> $CRON_FILE
echo '0 1 * * 0 /etc/init.d/dnsforwarder makegfwlist' >> $CRON_FILE
crontab $CRON_FILE
}
del_cron()
{
sed -i '/dnsforwarder/d' $CRON_FILE
/etc/init.d/cron restart
}
fixturboacc(){
dns=$(uci get turboacc.config.dns_caching 2>/dev/null)
if [ $dns -eq 1 ]; then
uci set turboacc.config.dns_caching=0 && uci commit turboacc
/etc/init.d/turboacc restart
fi
}
makelist() {
[ -z "$2" ] && return
local i
local t="$1"; shift
for i in "$@"
do
echo "$t $i"
done
}
health(){
rm /var/log/dnsforwarder.log.* 2>/dev/null
local pid=$(cat ${PID_FILE} 2>/dev/null)
if [ -n "${pid}" -a -d /proc/$pid ]; then
echo "[health] process exists ${pid}"
else
echo "[health] Dnsforwarder is not running ${pid}"
start
fi
}
makegfwlist(){
local GFW_FILE='/etc/dnsforwarder/gfw.txt'
local GFW_TMP_FILE='/tmp/dnsforwarder-gfw.old'
local TSTIME=`date '+%Y-%m-%d %H:%M:%S'`
touch ${GFW_TMP_FILE}
cat /etc/config/gfw.list 2>/dev/null > /tmp/edf.ts
cat /etc/dnsmasq.ssr/gfw_base.conf 2>/dev/null | awk -F '/' '{print $2}' | sed 's/^.//g' >> /tmp/edf.ts
cat /etc/dnsmasq.ssr/gfw_list.conf 2>/dev/null | awk -F '/' '{print $2}' | sed 's/^.//g' >> /tmp/edf.ts
sort /tmp/edf.ts | uniq > /tmp/edf.ts
/usr/share/dnsforwarder/gfwlist.sh -i -l -o /tmp/dnsforwarder-gfw.tmp --extra-domain-file /tmp/edf.ts
if [ $? != 0 ]; then
echo 'Failed to fetch gfwlist'
logger -t Failed to fetch gfwlist
return 2
fi
local gfw=$(cat /tmp/dnsforwarder-gfw.tmp)
echo "# GenerationAt TS_BUILD_TIME" > ${GFW_TMP_FILE}.new
echo "protocol tcp" >> ${GFW_TMP_FILE}.new
echo "server 8.8.8.8,8.8.4.4,1.1.1.1,1.0.0.1,208.67.222.222,208.67.220.220,209.244.0.3,209.244.0.4,8.26.56.26,8.20.247.20,156.154.70.1,156.154.71.1,199.85.126.10" >> ${GFW_TMP_FILE}.new
echo -e 'proxy no\n\n\n' >> ${GFW_TMP_FILE}.new
echo "${gfw}" >> ${GFW_TMP_FILE}.new
if [ "`cat ${GFW_TMP_FILE}.new | md5sum`" == "`cat ${GFW_TMP_FILE} | md5sum`" ]; then
printf "[\e[32m%s\e[0m]\n" "hold"
else
cp ${GFW_TMP_FILE}.new ${GFW_TMP_FILE}
cp ${GFW_TMP_FILE} ${GFW_FILE}
sed -i "s/TS_BUILD_TIME/${TSTIME}/g" ${GFW_FILE}
printf "[\e[33m%s\e[0m]" "PID"
restart
fi
}
makeconfig () {
config_load dnsforwarder
local log=$(uci get dnsforwarder.@config[0].log 2>/dev/null)
local log_size=$(uci get dnsforwarder.@config[0].log_size 2>/dev/null)
local gfw=$(uci get dnsforwarder.@config[0].gfw 2>/dev/null)
local udp_local=$(uci -d ',' get dnsforwarder.@config[0].udp_local 2>/dev/null)
local udp_local_list=$(uci get dnsforwarder.@config[0].udp_local 2>/dev/null)
local tcp_group=$(uci get dnsforwarder.@config[0].tcp_group 2>/dev/null)
local udp_group=$(uci get dnsforwarder.@config[0].udp_group 2>/dev/null)
local group_file=$(uci get dnsforwarder.@config[0].group_file 2>/dev/null)
local block_ip=$(uci -d ',' get dnsforwarder.@config[0].block_ip 2>/dev/null)
local ip_substituting=$(uci -d ',' get dnsforwarder.@config[0].ip_substituting 2>/dev/null)
local block_negative_resp=$(uci get dnsforwarder.@config[0].block_negative_resp 2>/dev/null)
local append_host=$(uci get dnsforwarder.@config[0].append_host 2>/dev/null)
local block_ipv6=$(uci get dnsforwarder.@config[0].block_ipv6 2>/dev/null)
local cache=$(uci get dnsforwarder.@config[0].cache 2>/dev/null)
local cache_size=$(uci get dnsforwarder.@config[0].cache_size 2>/dev/null)
local cache_ignore=$(uci get dnsforwarder.@config[0].cache_ignore 2>/dev/null)
local cache_control=$(uci get dnsforwarder.@config[0].cache_control 2>/dev/null)
local domain_statistic=$(uci get dnsforwarder.@config[0].domain_statistic 2>/dev/null)
local udp_local_addr=$(uci get dnsforwarder.@arguments[0].addr 2>/dev/null)
udp_local_addr=${udp_local_addr/:/#}
echo "LogOn ${log}" > $DNSFORWARDER_CONF
if [ $log = "true" ]; then
rm /var/log/dnsforwarder.log.* 2>/dev/null
echo '' > /var/log/dnsforwarder.log
echo "LogFileThresholdLength ${log_size}" >> $DNSFORWARDER_CONF
echo "LogFileFolder /var/log" >> $DNSFORWARDER_CONF
fi
[ -n "$udp_local" ] && echo "UDPLocal ${udp_local}" >> $DNSFORWARDER_CONF
[ -n "$udp_local_addr" ] && eval "makelist 'server=' $udp_local_addr" > /tmp/dnsmasq.dnsforwarder.conf
sed -i "s/ //g" /tmp/dnsmasq.dnsforwarder.conf
eval "makelist 'TCPGroup' $tcp_group" >> $DNSFORWARDER_CONF
eval "makelist 'UDPGroup' $udp_group" >> $DNSFORWARDER_CONF
eval "makelist 'GroupFile' $group_file" >> $DNSFORWARDER_CONF
if [ $gfw = "true" ]; then
echo 'GroupFile /etc/dnsforwarder/gfw.txt' >> $DNSFORWARDER_CONF
fi
echo "BlockIP ${block_ip}" >> $DNSFORWARDER_CONF
eval "makelist 'IPSubstituting' $ip_substituting" >> $DNSFORWARDER_CONF
echo "BlockNegativeResponse ${block_negative_resp}" >> $DNSFORWARDER_CONF
eval "makelist 'AppendHosts' $append_host" >> $DNSFORWARDER_CONF
echo "BlockIpv6WhenIpv4Exists ${block_ipv6}" >> $DNSFORWARDER_CONF
echo "UseCache ${cache}" >> $DNSFORWARDER_CONF
if [ $cache = "true" ]; then
echo "CacheSize ${cache_size}" >> $DNSFORWARDER_CONF
echo "MemoryCache false" >> $DNSFORWARDER_CONF
echo "CacheFile /tmp/dnsforwarder.cache" >> $DNSFORWARDER_CONF
echo "IgnoreTTL ${cache_ignore}" >> $DNSFORWARDER_CONF
eval "makelist 'CacheControl' $cache_control" >> $DNSFORWARDER_CONF
echo "ReloadCache true" >> $DNSFORWARDER_CONF
echo "OverwriteCache true" >> $DNSFORWARDER_CONF
fi
echo "DomainStatistic ${domain_statistic}" >> $DNSFORWARDER_CONF
if [ $domain_statistic = "true" ]; then
touch /tmp/dnsforwarder-statistic.html
mkdir -p /root/.dnsforwarder
rm /root/.dnsforwarder/statistic.html 2 > /dev/null
ln -s /tmp/dnsforwarder-statistic.html /root/.dnsforwarder/statistic.html
local domain_statistic_tag='<!-- TS DNSFORWARDER -->'
echo "DomainStatisticTempletFile /tmp/dnsforwarder-statistic.html" >> $DNSFORWARDER_CONF
echo "StatisticInsertionPosition ${domain_statistic_tag}" >> $DNSFORWARDER_CONF
echo "StatisticUpdateInterval 60" >> $DNSFORWARDER_CONF
echo "${domain_statistic_tag}" > /tmp/dnsforwarder-statistic.html
fi
}
start()
{
echo luci for dnsforwarder
local vt_enabled=$(uci get dnsforwarder.@arguments[0].enabled 2>/dev/null)
if [ $vt_enabled = 0 ]; then
echo dnsforwarder is not enabled
exit
fi
makeconfig
fixturboacc
dnsforwarder -f $DNSFORWARDER_CONF -d
sleep 10
mkdir -p ${PID_PATH}
pid=$(ps | awk '$5 ~ /\[dnsforwarder\]/ {print $1}')
echo "dnsforwarder running pid is ${pid}"
logger -t The pid of dnsforwarder is ${PID_FILE} ${pid}
echo ${pid} > ${PID_FILE}
/etc/init.d/dnsforwarder enable
local dnsmasq=$(uci get dnsforwarder.@arguments[0].dnsmasq 2>/dev/null)
local addr=$(uci get dnsforwarder.@arguments[0].addr 2>/dev/null)
[ -n "${addr}" ] && addr=${addr/:/#}
if [ "${dnsmasq}" = "1" ]; then
uci delete dhcp.@dnsmasq[0].server 2>/dev/null
# uci add_list dhcp.@dnsmasq[0].server=$addr
uci delete dhcp.@dnsmasq[0].resolvfile 2>/dev/null
uci set dhcp.@dnsmasq[0].noresolv=1
uci set dhcp.@dnsmasq[0].serversfile=/tmp/dnsmasq.dnsforwarder.conf
uci commit dhcp
/etc/init.d/dnsmasq restart
fi
local dnsmasq_server_addr=$(uci get dhcp.@dnsmasq[0].server 2>/dev/null)
if [ -n "${dnsmasq_server_addr}" ]; then
uci set dhcp.@dnsmasq[0].noresolv=1
uci commit dhcp
/etc/init.d/dnsmasq restart
fi
add_cron
}
stop()
{
del_cron
logger -t stopping dnsforwarder
local addr=$(uci get dnsforwarder.@arguments[0].addr 2>/dev/null)
local dnsmasq=$(uci get dnsforwarder.@arguments[0].dnsmasq 2>/dev/null)
addr=${addr/:/#}
if [ "${dnsmasq}" = "1" ]; then
uci del_list dhcp.@dnsmasq[0].server=$addr 2>/dev/null
fi
uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto 2>/dev/null
uci delete dhcp.@dnsmasq[0].noresolv 2>/dev/null
uci delete dhcp.@dnsmasq[0].serversfile 2>/dev/null
uci commit dhcp
/etc/init.d/dnsmasq restart
[ -e ${PID_FILE} ] && {
pid=$(cat ${PID_FILE})
logger -t killing dnsforwarder pid ${pid}
echo killing dnsforwarder pid ${pid}
kill ${pid}
rm -f ${PID_FILE}
} || {
logger -t Cannot find dnsforwarder pid file
}
}
restart()
{
pid=$(cat ${PID_FILE} 2>/dev/null)
echo Dnsforwarder pid file is ${pid}
[ -n "$pid" ] && {
echo stopping pid ${pid}
logger -t There is dnsforwarder pid ${pid}
stop
} || {
logger -t Dnsforwarder is not running
}
sleep 7
local vt_enabled=$(uci get dnsforwarder.@arguments[0].enabled 2>/dev/null)
echo dnsforwarder status is ${vt_enabled}
logger -t Dnsforwarder is initializing enabled is ${vt_enabled}
if [ ${vt_enabled} = 1 ]; then
[ -n "$pid" ] && {
logger -t There is dnsforwarder pid ${pid}
stop
} || {
logger -t Dnsforwarder is not running
}
logger -t Restarting dnsforwarder
start
else
/etc/init.d/dnsforwarder disable
fi
}

View File

@ -1,313 +0,0 @@
#/bin/sh
# Name: gfwlist2dnsmasq.sh
# Desription: A shell script which convert gfwlist into dnsmasq rules.
# Version: 0.8.0 (2017.12.25)
# Author: Cokebar Chi
# Website: https://github.com/cokebar
_green() {
printf '\033[1;31;32m'
printf -- "%b" "$1"
printf '\033[0m'
}
_red() {
printf '\033[1;31;31m'
printf -- "%b" "$1"
printf '\033[0m'
}
_yellow() {
printf '\033[1;31;33m'
printf -- "%b" "$1"
printf '\033[0m'
}
usage() {
cat <<-EOF
Name: gfwlist2dnsmasq.sh
Desription: A shell script which convert gfwlist into dnsmasq rules.
Version: 0.8.0 (2017.12.25)
Author: Cokebar Chi
Website: https://github.com/cokebar
Usage: sh gfwlist2dnsmasq.sh [options] -o FILE
Valid options are:
-d, --dns <dns_ip>
DNS IP address for the GfwList Domains (Default: 127.0.0.1)
-p, --port <dns_port>
DNS Port for the GfwList Domains (Default: 5353)
-s, --ipset <ipset_name>
Ipset name for the GfwList domains
(If not given, ipset rules will not be generated.)
-o, --output <FILE>
/path/to/output_filename
-i, --insecure
Force bypass certificate validation (insecure)
-l, --domain-list
Convert Gfwlist into domain list instead of dnsmasq rules
(If this option is set, DNS IP/Port & ipset are not needed)
--exclude-domain-file <FILE>
Delete specific domains in the result from a domain list text file
Please put one domain per line
--extra-domain-file <FILE>
Include extra domains to the result from a domain list text file
This file will be processed after the exclude-domain-file
Please put one domain per line
-h, --help
Usage
EOF
exit $1
}
clean_and_exit(){
# Clean up temp files
printf 'Cleaning up... '
rm -rf $TMP_DIR
_green 'Done\n\n'
[ $1 -eq 0 ] && _green 'Job Finished.\n\n' || _red 'Exit with Error code '$1'.\n'
exit $1
}
check_depends(){
which sed base64 curl >/dev/null
if [ $? != 0 ]; then
_red 'Error: Missing Dependency.\nPlease check whether you have the following binaries on you system:\nwhich, sed, base64, curl.\n'
exit 3
fi
SYS_KERNEL=`uname -s`
if [ $SYS_KERNEL = "Darwin" -o $SYS_KERNEL = "FreeBSD" ]; then
BASE64_DECODE='base64 -D'
SED_ERES='sed -E'
else
BASE64_DECODE='base64 -d'
SED_ERES='sed -r'
fi
}
get_args(){
OUT_TYPE='DNSMASQ_RULES'
DNS_IP='127.0.0.1'
DNS_PORT='5353'
IPSET_NAME=''
FILE_FULLPATH=''
CURL_EXTARG=''
WITH_IPSET=0
EXTRA_DOMAIN_FILE=''
EXCLUDE_DOMAIN_FILE=''
IPV4_PATTERN='^((2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)\.){3}(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)$'
IPV6_PATTERN='^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}))|:)))(%.+)?$'
while [ ${#} -gt 0 ]; do
case "${1}" in
--help | -h)
usage 0
;;
--domain-list | -l)
OUT_TYPE='DOMAIN_LIST'
;;
--insecure | -i)
CURL_EXTARG='--insecure'
;;
--dns | -d)
DNS_IP="$2"
shift
;;
--port | -p)
DNS_PORT="$2"
shift
;;
--ipset | -s)
IPSET_NAME="$2"
shift
;;
--output | -o)
OUT_FILE="$2"
shift
;;
--extra-domain-file)
EXTRA_DOMAIN_FILE="$2"
shift
;;
--exclude-domain-file)
EXCLUDE_DOMAIN_FILE="$2"
shift
;;
*)
_red "Invalid argument: $1"
usage 1
;;
esac
shift 1
done
# Check path & file name
if [ -z $OUT_FILE ]; then
_red 'Error: Please specify the path to the output file(using -o/--output argument).\n'
exit 1
else
if [ -z ${OUT_FILE##*/} ]; then
_red 'Error: '$OUT_FILE' is a path, not a file.\n'
exit 1
else
if [ ${OUT_FILE}a != ${OUT_FILE%/*}a ] && [ ! -d ${OUT_FILE%/*} ]; then
_red 'Error: Folder do not exist: '${OUT_FILE%/*}'\n'
exit 1
fi
fi
fi
if [ $OUT_TYPE = 'DNSMASQ_RULES' ]; then
# Check DNS IP
IPV4_TEST=$(echo $DNS_IP | grep -E $IPV4_PATTERN)
IPV6_TEST=$(echo $DNS_IP | grep -E $IPV6_PATTERN)
if [ "$IPV4_TEST" != "$DNS_IP" -a "$IPV6_TEST" != "$DNS_IP" ]; then
_red 'Error: Please enter a valid DNS server IP address.\n'
exit 1
fi
# Check DNS port
if [ $DNS_PORT -lt 1 -o $DNS_PORT -gt 65535 ]; then
_red 'Error: Please enter a valid DNS server port.\n'
exit 1
fi
# Check ipset name
if [ -z $IPSET_NAME ]; then
WITH_IPSET=0
else
IPSET_TEST=$(echo $IPSET_NAME | grep -E '^\w+$')
if [ "$IPSET_TEST" != "$IPSET_NAME" ]; then
_red 'Error: Please enter a valid IP set name.\n'
exit 1
else
WITH_IPSET=1
fi
fi
fi
if [ ! -z $EXTRA_DOMAIN_FILE ] && [ ! -f $EXTRA_DOMAIN_FILE ]; then
_yellow 'WARNING:\nExtra domain file does not exist, ignored.\n\n'
EXTRA_DOMAIN_FILE=''
fi
if [ ! -z $EXCLUDE_DOMAIN_FILE ] && [ ! -f $EXCLUDE_DOMAIN_FILE ]; then
_yellow 'WARNING:\nExclude domain file does not exist, ignored.\n\n'
EXCLUDE_DOMAIN_FILE=''
fi
}
process(){
# Set Global Var
BASE_URL='https://github.com/gfwlist/gfwlist/raw/master/gfwlist.txt'
TMP_DIR=`mktemp -d /tmp/gfwlist2dnsmasq.XXXXXX`
BASE64_FILE="$TMP_DIR/base64.txt"
GFWLIST_FILE="$TMP_DIR/gfwlist.txt"
DOMAIN_TEMP_FILE="$TMP_DIR/gfwlist2domain.tmp"
DOMAIN_FILE="$TMP_DIR/gfwlist2domain.txt"
CONF_TMP_FILE="$TMP_DIR/gfwlist.conf.tmp"
OUT_TMP_FILE="$TMP_DIR/gfwlist.out.tmp"
# Fetch GfwList and decode it into plain text
printf 'Fetching GfwList... '
local tscurl='curl -L --connect-timeout 5 -m 300 --retry 3 --retry-delay 1'
$tscurl $CURL_EXTARG -o$BASE64_FILE $BASE_URL \
|| $tscurl $CURL_EXTARG -o$BASE64_FILE https://gitlab.com/gfwlist/gfwlist/raw/master/gfwlist.txt \
|| $tscurl $CURL_EXTARG -o$BASE64_FILE https://git.tuxfamily.org/gfwlist/gfwlist.git/plain/gfwlist.txt \
|| $tscurl $CURL_EXTARG -o$BASE64_FILE https://pagure.io/gfwlist/raw/master/f/gfwlist.txt \
|| $tscurl $CURL_EXTARG -o$BASE64_FILE http://repo.or.cz/gfwlist.git/blob_plain/HEAD:/gfwlist.txt \
|| $tscurl $CURL_EXTARG -o$BASE64_FILE https://bitbucket.org/gfwlist/gfwlist/raw/HEAD/gfwlist.txt \
|| $tscurl $CURL_EXTARG -o$BASE64_FILE $BASE_URL
if [ $? != 0 ]; then
_red '\nFailed to fetch gfwlist.txt. Please check your Internet connection.\n'
clean_and_exit 2
fi
$BASE64_DECODE $BASE64_FILE > $GFWLIST_FILE || ( _red 'Failed to decode gfwlist.txt. Quit.\n'; clean_and_exit 2 )
_green 'Done.\n\n'
# Convert
IGNORE_PATTERN='^\!|\[|^@@|(https?://){0,1}[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
HEAD_FILTER_PATTERN='s#^(\|\|?)?(https?://)?##g'
TAIL_FILTER_PATTERN='s#/.*$|%2F.*$##g'
DOMAIN_PATTERN='([a-zA-Z0-9][-a-zA-Z0-9]*(\.[a-zA-Z0-9][-a-zA-Z0-9]*)+)'
HANDLE_WILDCARD_PATTERN='s#^(([a-zA-Z0-9]*\*[-a-zA-Z0-9]*)?(\.))?([a-zA-Z0-9][-a-zA-Z0-9]*(\.[a-zA-Z0-9][-a-zA-Z0-9]*)+)(\*)?#\4#g'
printf 'Converting GfwList to ' && _green $OUT_TYPE && printf ' ...\n'
_yellow '\nWARNING:\nThe following lines in GfwList contain regex, and might be ignored:\n\n'
cat $GFWLIST_FILE | grep -n '^/.*$'
_yellow "\nThis script will try to convert some of the regex rules. But you should know this may not be a equivalent conversion.\nIf there's regex rules which this script do not deal with, you should add the domain manually to the list.\n\n"
grep -vE $IGNORE_PATTERN $GFWLIST_FILE | $SED_ERES $HEAD_FILTER_PATTERN | $SED_ERES $TAIL_FILTER_PATTERN | grep -E $DOMAIN_PATTERN | $SED_ERES $HANDLE_WILDCARD_PATTERN > $DOMAIN_TEMP_FILE
printf 'google.com\ngoogle.ad\ngoogle.ae\ngoogle.com.af\ngoogle.com.ag\ngoogle.com.ai\ngoogle.al\ngoogle.am\ngoogle.co.ao\ngoogle.com.ar\ngoogle.as\ngoogle.at\ngoogle.com.au\ngoogle.az\ngoogle.ba\ngoogle.com.bd\ngoogle.be\ngoogle.bf\ngoogle.bg\ngoogle.com.bh\ngoogle.bi\ngoogle.bj\ngoogle.com.bn\ngoogle.com.bo\ngoogle.com.br\ngoogle.bs\ngoogle.bt\ngoogle.co.bw\ngoogle.by\ngoogle.com.bz\ngoogle.ca\ngoogle.cd\ngoogle.cf\ngoogle.cg\ngoogle.ch\ngoogle.ci\ngoogle.co.ck\ngoogle.cl\ngoogle.cm\ngoogle.cn\ngoogle.com.co\ngoogle.co.cr\ngoogle.com.cu\ngoogle.cv\ngoogle.com.cy\ngoogle.cz\ngoogle.de\ngoogle.dj\ngoogle.dk\ngoogle.dm\ngoogle.com.do\ngoogle.dz\ngoogle.com.ec\ngoogle.ee\ngoogle.com.eg\ngoogle.es\ngoogle.com.et\ngoogle.fi\ngoogle.com.fj\ngoogle.fm\ngoogle.fr\ngoogle.ga\ngoogle.ge\ngoogle.gg\ngoogle.com.gh\ngoogle.com.gi\ngoogle.gl\ngoogle.gm\ngoogle.gp\ngoogle.gr\ngoogle.com.gt\ngoogle.gy\ngoogle.com.hk\ngoogle.hn\ngoogle.hr\ngoogle.ht\ngoogle.hu\ngoogle.co.id\ngoogle.ie\ngoogle.co.il\ngoogle.im\ngoogle.co.in\ngoogle.iq\ngoogle.is\ngoogle.it\ngoogle.je\ngoogle.com.jm\ngoogle.jo\ngoogle.co.jp\ngoogle.co.ke\ngoogle.com.kh\ngoogle.ki\ngoogle.kg\ngoogle.co.kr\ngoogle.com.kw\ngoogle.kz\ngoogle.la\ngoogle.com.lb\ngoogle.li\ngoogle.lk\ngoogle.co.ls\ngoogle.lt\ngoogle.lu\ngoogle.lv\ngoogle.com.ly\ngoogle.co.ma\ngoogle.md\ngoogle.me\ngoogle.mg\ngoogle.mk\ngoogle.ml\ngoogle.com.mm\ngoogle.mn\ngoogle.ms\ngoogle.com.mt\ngoogle.mu\ngoogle.mv\ngoogle.mw\ngoogle.com.mx\ngoogle.com.my\ngoogle.co.mz\ngoogle.com.na\ngoogle.com.nf\ngoogle.com.ng\ngoogle.com.ni\ngoogle.ne\ngoogle.nl\ngoogle.no\ngoogle.com.np\ngoogle.nr\ngoogle.nu\ngoogle.co.nz\ngoogle.com.om\ngoogle.com.pa\ngoogle.com.pe\ngoogle.com.pg\ngoogle.com.ph\ngoogle.com.pk\ngoogle.pl\ngoogle.pn\ngoogle.com.pr\ngoogle.ps\ngoogle.pt\ngoogle.com.py\ngoogle.com.qa\ngoogle.ro\ngoogle.ru\ngoogle.rw\ngoogle.com.sa\ngoogle.com.sb\ngoogle.sc\ngoogle.se\ngoogle.com.sg\ngoogle.sh\ngoogle.si\ngoogle.sk\ngoogle.com.sl\ngoogle.sn\ngoogle.so\ngoogle.sm\ngoogle.sr\ngoogle.st\ngoogle.com.sv\ngoogle.td\ngoogle.tg\ngoogle.co.th\ngoogle.com.tj\ngoogle.tk\ngoogle.tl\ngoogle.tm\ngoogle.tn\ngoogle.to\ngoogle.com.tr\ngoogle.tt\ngoogle.com.tw\ngoogle.co.tz\ngoogle.com.ua\ngoogle.co.ug\ngoogle.co.uk\ngoogle.com.uy\ngoogle.co.uz\ngoogle.com.vc\ngoogle.co.ve\ngoogle.vg\ngoogle.co.vi\ngoogle.com.vn\ngoogle.vu\ngoogle.ws\ngoogle.rs\ngoogle.co.za\ngoogle.co.zm\ngoogle.co.zw\ngoogle.cat\n' >> $DOMAIN_TEMP_FILE
printf 'Google search domains... ' && _green 'Added\n'
# Add blogspot domains
printf 'blogspot.ca\nblogspot.co.uk\nblogspot.com\nblogspot.com.ar\nblogspot.com.au\nblogspot.com.br\nblogspot.com.by\nblogspot.com.co\nblogspot.com.cy\nblogspot.com.ee\nblogspot.com.eg\nblogspot.com.es\nblogspot.com.mt\nblogspot.com.ng\nblogspot.com.tr\nblogspot.com.uy\nblogspot.de\nblogspot.gr\nblogspot.in\nblogspot.mx\nblogspot.ch\nblogspot.fr\nblogspot.ie\nblogspot.it\nblogspot.pt\nblogspot.ro\nblogspot.sg\nblogspot.be\nblogspot.no\nblogspot.se\nblogspot.jp\nblogspot.in\nblogspot.ae\nblogspot.al\nblogspot.am\nblogspot.ba\nblogspot.bg\nblogspot.ch\nblogspot.cl\nblogspot.cz\nblogspot.dk\nblogspot.fi\nblogspot.gr\nblogspot.hk\nblogspot.hr\nblogspot.hu\nblogspot.ie\nblogspot.is\nblogspot.kr\nblogspot.li\nblogspot.lt\nblogspot.lu\nblogspot.md\nblogspot.mk\nblogspot.my\nblogspot.nl\nblogspot.no\nblogspot.pe\nblogspot.qa\nblogspot.ro\nblogspot.ru\nblogspot.se\nblogspot.sg\nblogspot.si\nblogspot.sk\nblogspot.sn\nblogspot.tw\nblogspot.ug\nblogspot.cat\n' >> $DOMAIN_TEMP_FILE
printf 'Blogspot domains... ' && _green 'Added\n'
# Add twimg.edgesuite.net
printf 'twimg.edgesuite.net\n' >> $DOMAIN_TEMP_FILE
printf 'twimg.edgesuite.net... ' && _green 'Added\n'
# Delete exclude domains
if [ ! -z $EXCLUDE_DOMAIN_FILE ]; then
for line in $(cat $EXCLUDE_DOMAIN_FILE)
do
cat $DOMAIN_TEMP_FILE | grep -vF -f $EXCLUDE_DOMAIN_FILE > $DOMAIN_FILE
done
printf 'Domains in exclude domain file '$EXCLUDE_DOMAIN_FILE'... ' && _green 'Deleted\n'
else
cat $DOMAIN_TEMP_FILE > $DOMAIN_FILE
fi
# Add extra domains
if [ ! -z $EXTRA_DOMAIN_FILE ]; then
cat $EXTRA_DOMAIN_FILE >> $DOMAIN_FILE
printf 'Extra domain file '$EXTRA_DOMAIN_FILE'... ' && _green 'Added\n'
fi
if [ $OUT_TYPE = 'DNSMASQ_RULES' ]; then
# Convert domains into dnsmasq rules
if [ $WITH_IPSET -eq 1 ]; then
_green 'Ipset rules included.'
sort -u $DOMAIN_FILE | $SED_ERES 's#(.+)#server=/\1/'$DNS_IP'\#'$DNS_PORT'\
ipset=/\1/'$IPSET_NAME'#g' > $CONF_TMP_FILE
else
_green 'Ipset rules not included.'
sort -u $DOMAIN_FILE | $SED_ERES 's#(.+)#server=/\1/'$DNS_IP'\#'$DNS_PORT'#g' > $CONF_TMP_FILE
fi
# Generate output file
echo '# dnsmasq rules generated by gfwlist' > $OUT_TMP_FILE
echo "# Last Updated on $(date "+%Y-%m-%d %H:%M:%S")" >> $OUT_TMP_FILE
echo '# ' >> $OUT_TMP_FILE
cat $CONF_TMP_FILE >> $OUT_TMP_FILE
cp $OUT_TMP_FILE $OUT_FILE
else
sort -u $DOMAIN_FILE > $OUT_TMP_FILE
fi
cp $OUT_TMP_FILE $OUT_FILE
printf '\nConverting GfwList to '$OUT_TYPE'... ' && _green 'Done\n\n'
# Clean up
clean_and_exit 0
}
main() {
if [ -z "$1" ]; then
usage 0
else
check_depends
get_args "$@"
_green '\nJob Started.\n\n'
process
fi
}
main "$@"

View File

@ -1,68 +0,0 @@
#
# 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:=frp
PKG_VERSION:=0.38.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=8a5e1af0455916ee17e1ad8d8bad32b637e50226d4bc991c0052fef88efc4745
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/fatedier/frp
GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/...
GO_PKG_LDFLAGS:=-s -w
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define frp/templates
define Package/$(1)
TITLE:=A fast reverse proxy ($(1))
URL:=https://github.com/fatedier/frp
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
DEPENDS:=$$(GO_ARCH_DEPENDS)
endef
define Package/$(1)/description
frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall
to the internet. As of now, it supports tcp & udp, as well as http and https protocols,
where requests can be forwarded to internal services by domain name.
This package contains the $(1).
endef
define Package/$(1)/install
$$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR))
$$(INSTALL_DIR) $$(1)/usr/bin
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/
$(STAGING_DIR_HOST)/bin/upx --lzma --best $$(1)/usr/bin/$(1) || true
endef
endef
FRP_COMPONENTS:=frpc frps
$(foreach component,$(FRP_COMPONENTS), \
$(eval $(call frp/templates,$(component))) \
$(eval $(call GoBinPackage,$(component))) \
$(eval $(call BuildPackage,$(component))) \
)

View File

@ -1,51 +0,0 @@
#
# Copyright (C) 2020 coolsnowwolf@gmail.com
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gmediarender
PKG_VERSION:=2021-03-15
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/hzeller/gmrender-resurrect.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=4ac7d8914dc089651ae9d6c421ecda8f4d0ab5e3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=08e8e60b8734131acd5d667c40a9a7e9d8bc7e86f59b4972d177e653608a1215
PKG_FIXUP:=autoreconf
PKG_INSTALL=1
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/gmediarender
SECTION:=multimedia
CATEGORY:=Multimedia
DEPENDS:= +gstreamer1 +libgstreamer1 +gstreamer1-libs +glib2 +libupnp
TITLE:=A Headless UPnP Renderer
endef
define Package/gmediarender/description
gmediarender implements the server component that provides UPnP
controllers a means to render media content (audio, video and images)
from a UPnP media server.
endef
CONFIGURE_ARGS+= \
CFLAGS="$(TARGET_CFLAGS) -std=gnu99" --with-build-cc="$(HOSTCC)" \
--prefix="\usr"
define Package/gmediarender/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,gmediarender))

View File

@ -1,81 +0,0 @@
# SPDX-Identifier-License: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=go-aliyundrive-webdav
PKG_VERSION:=1.1.1
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/LinkLeong/go-aliyundrive-webdav/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=967472971586bc9c62d1579a780e52431eaf37e54f2fe1b180c9a52db2304874
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_CONFIG_DEPENDS:= \
CONFIG_GO_ALIYUNDRIVE_WEBDAV_COMPRESS_GOPROXY \
CONFIG_GO_ALIYUNDRIVE_WEBDAV_COMPRESS_UPX
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=go-aliyun-webdav
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/go-aliyundrive-webdav
SECTION:=net
CATEGORY:=Network
SUBMENU:=File Transfer
TITLE:=A WebDav server for AliyunDrive
URL:=https://github.com/LinkLeong/go-aliyundrive-webdav
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
define Package/go-aliyundrive-webdav/config
config GO_ALIYUNDRIVE_WEBDAV_COMPRESS_GOPROXY
bool "Compiling with GOPROXY proxy"
default n
config GO_ALIYUNDRIVE_WEBDAV_COMPRESS_UPX
bool "Compress executable files with UPX"
default y
endef
ifeq ($(CONFIG_GO_ALIYUNDRIVE_WEBDAV_COMPRESS_GOPROXY),y)
export GO111MODULE=on
export GOPROXY=https://goproxy.baidu.com
endif
define Package/go-aliyundrive-webdav/conffiles
/etc/config/go-aliyundrive-webdav
endef
define Build/Compile
$(call GoPackage/Build/Compile)
ifeq ($(CONFIG_GO_ALIYUNDRIVE_WEBDAV_COMPRESS_UPX),y)
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/go-aliyun-webdav
endif
endef
define Package/go-aliyundrive-webdav/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/go-aliyun-webdav $(1)/usr/bin/go-aliyundrive-webdav
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_CONF) $(CURDIR)/files/go-aliyundrive-webdav.config $(1)/etc/config/go-aliyundrive-webdav
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(CURDIR)/files/go-aliyundrive-webdav.init $(1)/etc/init.d/go-aliyundrive-webdav
endef
$(eval $(call GoBinPackage,go-aliyundrive-webdav))
$(eval $(call BuildPackage,go-aliyundrive-webdav))

View File

@ -1,23 +0,0 @@
config go-aliyundrive-webdav 'config'
option enabled '0'
# Listening port
option port '8085'
# Refresh token
option rt ''
# Mounting directory
option path '/'
# Webdav auth username, default: admin
option user 'admin'
# Webdav auth password, default: 123456
option pwd '123456'
# Enable detailed logging
option verbose '0'

View File

@ -1,50 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2021 Tianling Shen <cnsztl@immortalwrt.org>
USE_PROCD=1
START=99
CONF="go-aliyundrive-webdav"
PROG="/usr/bin/go-aliyundrive-webdav"
start_service() {
config_load "$CONF"
local enabled
config_get_bool enabled "config" "enabled"
[ "$enabled" -eq "1" ] || return 1
local port rt path user pwd verbose
config_get port "config" "port"
config_get rt "config" "rt"
config_get path "config" "path"
config_get user "config" "user"
config_get pwd "config" "pwd"
config_get_bool verbose "config" "verbose"
procd_open_instance "$CONF"
procd_set_param command "$PROG"
procd_append_param command "-rt" "$rt"
procd_append_param command "-port" "$port"
procd_append_param command "-path" "$path"
procd_append_param command "-user" "$user"
procd_append_param command "-pwd" "$pwd"
[ "$verbose" -eq "0" ] || procd_append_param command "-v"
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 "go-aliyundrive-webdav"
}

View File

@ -1,43 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=ipt2socks
PKG_VERSION:=1.1.3
PKG_RELEASE:=2
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:=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.
endef
TARGET_CFLAGS += $(FPIC) -flto
TARGET_LDFLAGS += -flto
define Package/ipt2socks/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/ipt2socks $(1)/usr/bin
endef
$(eval $(call BuildPackage,ipt2socks))

View File

@ -1,43 +0,0 @@
# 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_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_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:=Tiny, portable SOCKS5 server
URL:=https://github.com/rofl0r/microsocks
DEPENDS:=+libpthread
endef
define Package/microsocks/description
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_INSTALL_DIR)/usr/local/bin/microsocks $(1)/usr/bin/microsocks
endef
$(eval $(call BuildPackage,microsocks))

View File

@ -1,87 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=nps
PKG_VERSION:=0.26.10
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ehang-io/nps/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=1b2fe9d251f55105d65027a1cee464f65d2f6ab3bd4a20e4655e5135db68aee7
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINTER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_CONFIG_DEPENDS:= \
CONFIG_NPC_COMPRESS_UPX \
CONFIG_NPS_COMPRESS_UPX
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=ehang.io/nps
GO_PKG_BUILD_PKG:=ehang.io/nps/cmd/...
GO_PKG_LDFLAGS:=-s -w
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/nps/template
SECTION:=net
CATEGORY:=Network
TITLE:=A intranet penetration proxy server ($(1))
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
URL:=https://ehang-io.github.io/nps
endef
Package/npc = $(call Package/nps/template,client)
Package/nps = $(call Package/nps/template,server)
define Package/nps/description/template
NPS is a lightweight, high-performance, powerful intranet penetration proxy server,
with a powerful web management terminal.
endef
Package/npc/description = $(Package/nps/description/template)
Package/nps/description = $(Package/nps/description/template)
define Package/npc/config
config NPC_COMPRESS_UPX
bool "Compress executable files with UPX"
default y
endef
define Package/nps/config
config NPS_COMPRESS_UPX
bool "Compress executable files with UPX"
default y
endef
define Build/Compile
$(call GoPackage/Build/Compile)
ifeq ($(CONFIG_NPC_COMPRESS_UPX),y)
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/npc
endif
ifeq ($(CONFIG_NPS_COMPRESS_UPX),y)
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/nps
endif
endef
define Package/nps/install/template
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/$(2)
endef
Package/npc/install = $(call Package/nps/install/template,$(1),npc)
Package/nps/install = $(call Package/nps/install/template,$(1),nps)
$(eval $(call GoBinPackage,npc))
$(eval $(call GoBinPackage,nps))
$(eval $(call BuildPackage,npc))
$(eval $(call BuildPackage,nps))

View File

@ -1,4 +0,0 @@
diff --git a/cmd/npc/sdk.go b/cmd/npc/sdk.go.bak
similarity index 100%
rename from cmd/npc/sdk.go
rename to cmd/npc/sdk.go.bak

View File

@ -1,57 +0,0 @@
# 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:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shadowsocks/pdnsd.git
PKG_SOURCE_DATE:=2012-04-26
PKG_SOURCE_VERSION:=a8e46ccba7b0fa2230d6c42ab6dcd92926f6c21d
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:=IP Addresses and Names
TITLE:=Proxy DNS Server
DEPENDS:=+libpthread
endef
define Package/pdnsd-alt/description
pdnsd, is an IPv6 capable proxy DNS server with permanent caching (the cache
contents are written to hard disk on exit) that is designed to cope with
unreachable or down DNS servers (for example in dial-in networking).
pdnsd can be used with applications that do dns lookups, eg on startup, and
can't be configured to change that behaviour, to prevent the often
minute-long hangs (or even crashes) that result from stalled dns queries.
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
CONFIGURE_ARGS += \
--with-cachedir=/var/pdnsd \
--with-target=Linux
define Package/pdnsd-alt/install
$(INSTALL_DIR) $(1)/usr/sbin
$(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
endef
$(eval $(call BuildPackage,pdnsd-alt))

View File

@ -1,46 +0,0 @@
#!/bin/sh /etc/rc.common
START=65
NAME=pdnsd
DESC="proxy DNS server"
DAEMON=/usr/sbin/pdnsd
PID_FILE=/var/run/$NAME.pid
CACHEDIR=/var/pdnsd
CACHE=$CACHEDIR/pdnsd.cache
USER=nobody
GROUP=nogroup
start() {
echo -n "Starting $DESC: $NAME"
gen_cache
$DAEMON --daemon -p $PID_FILE
echo " ."
}
stop() {
echo -n "Stopping $DESC: $NAME"
kill `cat $PID_FILE` > /dev/null 2>&1
rm -rf $PID_FILE
echo " ."
}
restart() {
echo "Restarting $DESC: $NAME... "
stop
sleep 2
start
}
gen_cache()
{
if ! test -f "$CACHE"; then
mkdir -p `dirname $CACHE`
dd if=/dev/zero of="$CACHE" bs=1 count=4 2> /dev/null
chown -R $USER.$GROUP $CACHEDIR
fi
}

View File

@ -1,52 +0,0 @@
From 09171eef574503a82342a8b23d4a55b8a5286724 Mon Sep 17 00:00:00 2001
From: W_Y_CPP <383152993@qq.com>
Date: Sat, 1 Jan 2022 13:05:37 +0900
Subject: [PATCH] fix pdnsd alt build error with kernel_5.15
---
src/conff.h | 2 +-
src/dns.h | 2 +-
src/netdev.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conff.h b/src/conff.h
index a07b1561b..c66d210aa 100644
--- a/src/conff.h
+++ b/src/conff.h
@@ -32,7 +32,7 @@
#include <stdio.h>
#include <pthread.h>
#include <sys/socket.h>
-#include <net/if.h>
+#include <linux/if.h>
#include "ipvers.h"
#include "list.h"
diff --git a/src/dns.h b/src/dns.h
index 0f6a4ac1e..ecc9680b2 100644
--- a/src/dns.h
+++ b/src/dns.h
@@ -27,7 +27,7 @@
#include <config.h>
#include <arpa/inet.h>
#include <sys/socket.h>
-#include <net/if.h>
+#include <linux/if.h>
#include <sys/types.h>
#include <inttypes.h>
#include "rr_types.h"
diff --git a/src/netdev.c b/src/netdev.c
index bd5f8c451..bfd5046df 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -59,7 +59,7 @@
#include "ipvers.h"
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include <net/if.h>
+#include <linux/if.h>
#include <netdb.h>
#include <string.h>
#include <unistd.h>
--
2.17.1

View File

@ -1,37 +0,0 @@
--- a/src/main.c
+++ b/src/main.c
@@ -219,6 +219,16 @@ static int check_ipv6()
*/
int main(int argc,char *argv[])
{
+#if DEBUG>0
+ {
+ int err;
+ /* Generate a key for storing our thread id's */
+ if ((err=pthread_key_create(&thrid_key, NULL)) != 0) {
+ log_error("pthread_key_create failed: %s",strerror(err));
+ _exit(1);
+ }
+ }
+#endif
int i,sig,pfd=-1; /* Initialized to inhibit compiler warning */
main_thrid=pthread_self();
@@ -626,17 +636,6 @@ int main(int argc,char *argv[])
pthread_sigmask(SIG_BLOCK,&sigs_msk,NULL);
#endif
-#if DEBUG>0
- {
- int err;
- /* Generate a key for storing our thread id's */
- if ((err=pthread_key_create(&thrid_key, NULL)) != 0) {
- log_error("pthread_key_create failed: %s",strerror(err));
- _exit(1);
- }
- }
-#endif
-
{
#if DEBUG>0
int thrdsucc=1;

View File

@ -1,66 +0,0 @@
#
# Copyright (C) 2017-2020
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qBittorrent-static
PKG_VERSION:=4.4.0_v1.2.15
PKG_RELEASE=1
STRIP:=true
ifeq ($(ARCH),x86_64)
PKG_ARCH:=x86_64
endif
ifeq ($(ARCH),arm64)
PKG_ARCH:=aarch64
endif
ifeq ($(ARCH),aarch64)
PKG_ARCH:=aarch64
endif
ifeq ($(ARCH),arm)
PKG_ARCH:=armv7
endif
include $(INCLUDE_DIR)/package.mk
define Package/qBittorrent-static
SECTION:=net
CATEGORY:=Network
DEPENDS:=@(arm||aarch64||x86_64)
SUBMENU:=BitTorrent
TITLE:=bittorrent client programmed in C++ / Qt
URL:=https://www.qbittorrent.org/
endef
define Package/qBittorrent-static/description
qBittorrent is a bittorrent client programmed in C++ / Qt that uses
libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
It aims to be a good alternative to all other bittorrent clients out
there. qBittorrent is fast, stable and provides unicode support as
well as many features.
endef
define Download/qbittorrent
URL:=https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-$(PKG_VERSION)
URL_FILE:=$(PKG_ARCH)-qbittorrent-nox
FILE:=qbittorrent-nox
HASH:=skip
endef
define Build/Compile
endef
define Package/qBittorrent-static/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(DL_DIR)/qbittorrent-nox $(1)/usr/bin
endef
$(eval $(call Download,qbittorrent))
$(eval $(call BuildPackage,qBittorrent-static))

View File

@ -1,76 +0,0 @@
#
# Copyright (C) 2017-2020
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qbittorrent
PKG_VERSION:=4.4.0
PKG_RELEASE=1
PKG_SOURCE:=qBittorrent-release-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/qbittorrent/qBittorrent/tar.gz/release-$(PKG_VERSION)?
PKG_HASH:=da240744c6cc5953d7c4d298a02a0cf36d2c8897931819f1e6459bd5270a7c5c
PKG_BUILD_DIR:=$(BUILD_DIR)/qBittorrent-release-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:qbittorrent:qbittorrent
PKG_BUILD_DEPENDS:=qttools
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
define Package/qbittorrent
SECTION:=net
CATEGORY:=Network
SUBMENU:=BitTorrent
DEPENDS:=+libgcc +libstdcpp \
+rblibtorrent \
+libopenssl \
+qt5-core \
+qt5-network \
+qt5-sql \
+qt5-xml \
+zlib
TITLE:=bittorrent client programmed in C++ / Qt
URL:=https://www.qbittorrent.org/
PROVIDES:=qBittorrent
endef
define Package/qbittorrent/description
qBittorrent is a bittorrent client programmed in C++ / Qt that uses
libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
It aims to be a good alternative to all other bittorrent clients out
there. qBittorrent is fast, stable and provides unicode support as
well as many features.
endef
CONFIGURE_ARGS += \
--disable-gui \
--enable-stacktrace=no \
--with-boost=$(STAGING_DIR)/usr
MAKE_VARS += \
INSTALL_ROOT="$(PKG_INSTALL_DIR)"
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
define Package/qbittorrent/conffiles
/etc/config/qbittorrent
endef
define Package/qbittorrent/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qbittorrent-nox $(1)/usr/bin
endef
$(eval $(call BuildPackage,qbittorrent))

View File

@ -1,201 +0,0 @@
#
# Copyright (C) 2020 Openwrt.org
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qtbase
PKG_BASE:=5.15
PKG_BUGFIX:=2
PKG_VERSION:=$(PKG_BASE).$(PKG_BUGFIX)
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-everywhere-src-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:= \
http://download.qt.io/official_releases/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://master.qt.io/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://qt.mirror.constant.com/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules
PKG_HASH:=909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-everywhere-src-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_CPE_ID:=cpe:/a:qt:qt
include $(INCLUDE_DIR)/package.mk
define Package/qtbase/Default
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Qt5
TITLE:=qtbase
URL:=http://qt-project.org
DEPENDS:=+libgcc +libstdcpp @!LINUX_2_6_36
endef
define Package/qtbase/description
This package provides the Qt5 libraries.
Qt is a cross-platform application development framework for desktop, embedded and mobile.
Supported Platforms include Linux, OS X, Windows, VxWorks, QNX, Android, iOS, BlackBerry,
Sailfish OS and others.
Qt is not a programming language on its own. It is a framework written in C++.
This package provides the following run-time libraries:
- core
- network
- xml
endef
define Package/qtbase
$(call Package/qtbase/Default)
TITLE+=all libs
DEPENDS+=$(QTBASE_DEPENDS)
endef
define Package/qtbase/install
true
endef
define Package/qtbase/config
config QT5_INCLUDE_ATOMIC
bool "Depends on libatomic"
default y if !(arm_v7 || ARCH_64BIT || TARGET_x86)
default n
help
Check this options to add the libatomic to the dependences.
- You'd better to confirm whether your compiler need the external libatomic.
Otherwise, it is not recommended to modify this option mannually.
menu "Select Qtbase Libraries"
comment "Qtbase Libraries"
$(foreach lib,$(QTBASE_LIBS),
config PACKAGE_qt5-$(lib)
prompt "Qtbase $(lib) library."
default m if ALL
)
endmenu
endef
PKG_CONFIG_DEPENDS = CONFIG_QT5_INCLUDE_ATOMIC
EXTRA_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
EXTRA_LDFLAGS += -Wl,--gc-sections,--as-needed
CONFIGURE_ARGS = \
-sysroot $(STAGING_DIR) \
-hostprefix $(STAGING_DIR_HOSTPKG) \
-extprefix $(STAGING_DIR)/usr \
-prefix /usr \
-archdatadir /usr/share/Qt \
-datadir /usr/share/Qt \
-device linux-generic-g++ \
-device-option CROSS_COMPILE="$(TARGET_CROSS)" \
-device-option COMPILER_FLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
-device-option LINKER_FLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
-confirm-license \
-opensource \
-release \
-shared \
-strip \
-no-rpath \
-no-use-gold-linker \
-ltcg \
-mimetype-database \
-openssl-linked \
-qt-doubleconversion \
-system-pcre \
-system-zlib \
$(if $(findstring i386,$(ARCH)),-no-sse2 -no-sse4.1) \
-no-angle \
-no-cups \
-no-dbus \
-no-directfb \
-no-dtls\
-no-egl \
-no-eglfs \
-no-freetype \
-no-gbm \
-no-glib \
-no-gtk \
-no-gui \
-no-harfbuzz \
-no-iconv \
-no-icu \
-no-kms \
-no-libjpeg \
-no-libmd4c \
-no-libpng \
-no-libudev \
-no-mtdev \
-no-opengl \
-no-opengles3 \
-no-openvg \
-no-pch \
-no-slog2 \
-sql-sqlite \
-no-trace \
-no-tslib \
-no-vulkan \
-no-widgets \
-no-xcb \
-no-xkbcommon \
-no-zstd \
-no-compile-examples \
-no-feature-concurrent \
-no-feature-gssapi \
-no-feature-testlib \
-make libs \
-nomake examples \
-nomake tests \
-nomake tools \
-v
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef
define Build/InstallDev
$(MAKE) -C $(PKG_BUILD_DIR) install
endef
define Package/qtbase/Default/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/libQt5$(shell echo $(2) | sed -e 's/\b[[:alpha:]]/\u&/g').so* $(1)/usr/lib
endef
define DefineQtbaseLibrary
QTBASE_DEPENDS+=+qt5-$(1)
QTBASE_LIBS+=$(1)
define Package/qt5-$(1)
$(call Package/qtbase/Default)
TITLE+=$(1)
DEPENDS+=$(foreach lib,$(2),+qt5-$(lib)) $(3)
HIDDEN:=1
endef
define Package/qt5-$(1)/description
This package contains the qt5 $(1) library.
endef
define Package/qt5-$(1)/install
$(call Package/qtbase/Default/install,$$(1),$(1))
endef
endef
$(eval $(call DefineQtbaseLibrary,core,,+QT5_INCLUDE_ATOMIC:libatomic +libpcre2-16 +zlib))
$(eval $(call DefineQtbaseLibrary,network,core,+libopenssl +zlib))
$(eval $(call DefineQtbaseLibrary,xml,core,))
$(eval $(call DefineQtbaseLibrary,sql,core))
$(foreach lib,$(QTBASE_LIBS),$(eval $(call BuildPackage,qt5-$(lib))))
$(eval $(call BuildPackage,qtbase))

View File

@ -1,36 +0,0 @@
diff --color -uNr a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
--- a/src/corelib/global/qendian.h 2020-10-27 16:02:11.000000000 +0800
+++ b/src/corelib/global/qendian.h 2021-07-19 06:21:23.185297425 +0800
@@ -43,7 +43,7 @@
#include <QtCore/qfloat16.h>
#include <QtCore/qglobal.h>
-
+#include <limits>
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
#include <stdlib.h>
#include <string.h>
diff --color -uNr a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
--- a/src/corelib/global/qfloat16.h 2020-10-27 16:02:11.000000000 +0800
+++ b/src/corelib/global/qfloat16.h 2021-07-19 06:22:10.387349829 +0800
@@ -44,7 +44,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qmetatype.h>
#include <string.h>
-
+#include <limits>
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
// All processors that support AVX2 do support F16C too. That doesn't mean
// we're allowed to use the intrinsics directly, so we'll do it only for
diff --color -uNr a/src/corelib/text/qbytearraymatcher.h b/src/corelib/text/qbytearraymatcher.h
--- a/src/corelib/text/qbytearraymatcher.h 2020-10-27 16:02:11.000000000 +0800
+++ b/src/corelib/text/qbytearraymatcher.h 2021-07-19 06:22:30.139372013 +0800
@@ -41,7 +41,7 @@
#define QBYTEARRAYMATCHER_H
#include <QtCore/qbytearray.h>
-
+#include <limits>
QT_BEGIN_NAMESPACE

View File

@ -1,51 +0,0 @@
#
# Copyright (C) 2019 Openwrt.org
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qttools
PKG_BASE:=5.15
PKG_BUGFIX:=2
PKG_VERSION:=$(PKG_BASE).$(PKG_BUGFIX)
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-everywhere-src-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:= \
http://download.qt.io/official_releases/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://master.qt.io/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules \
http://qt.mirror.constant.com/archive/qt/$(PKG_BASE)/$(PKG_VERSION)/submodules
PKG_HASH:=c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-everywhere-src-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=qtbase
include $(INCLUDE_DIR)/package.mk
define Package/qttools
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=Qt5
TITLE:=qttools
URL:=http://qt-project.org
BUILDONLY:=1
endef
define Build/Configure
cd $(PKG_BUILD_DIR) && qmake -o Makefile qttools.pro
endef
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef
define Build/InstallDev
$(MAKE) -C $(PKG_BUILD_DIR) install
endef
$(eval $(call BuildPackage,qttools))

View File

@ -1,75 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rblibtorrent
PKG_VERSION:=1.2.15
PKG_RELEASE=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/arvidn/libtorrent.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=9c5b26b8d9bdb168256566a2986c563187638e5a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MIRROR_HASH:=15c9d37a56cf09b22b9d1eeec8a0c21eff7c9fb6b30b04c4cba9a61d5201d57a
PKG_LICENSE:=BSD
PKG_LICENSE_FILES:=COPYING
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/rblibtorrent
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Rasterbar BitTorrent library
URL:=https://www.libtorrent.org/
DEPENDS:=+libgcc +libstdcpp +libopenssl +boost +boost-system +boost-chrono +boost-random
MAINTAINER:=Arvid Norberg <arvid@libtorrent.org>
endef
define Package/rblibtorrent/description
Rasterbar libtorrent is a C++ library that aims to be a good alternative to
all the other bittorrent implementations around. It is a library and not a
full featured client, although it comes with a working example client.
endef
TARGET_CFLAGS += $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC
EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
TARGET_LDFLAGS += -lstdc++
CONFIGURE_ARGS += \
--disable-debug \
--disable-rpath \
--enable-encryption \
--enable-deprecated-functions \
--with-gnu-ld \
--with-openssl=$(STAGING_DIR)/usr \
--with-boost=$(STAGING_DIR)/usr \
--with-libiconv \
--with-libiconv-prefix=$(ICONV_PREFIX)
define Build/Configure
cd $(PKG_BUILD_DIR) ; \
sh autotool.sh
$(call Build/Configure/Default)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libtorrent $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtorrent-rasterbar.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libtorrent-rasterbar.pc $(1)/usr/lib/pkgconfig/
endef
define Package/rblibtorrent/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
endef
$(eval $(call BuildPackage,rblibtorrent))

View File

@ -1,43 +0,0 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copyright (C) 2020 Elon Huang <elonhhuang@gmail.com>
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=rclone-ng
PKG_VERSION:=0.5.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=RcloneNg-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/ElonH/RcloneNg/releases/download/v$(PKG_VERSION)/
PKG_HASH:=0b4916ddd0bacb5b358dc8d36b64c30f4182c0ace3eb06cda94b6578c419dcd9
PKG_LICENSE:=MIT
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Elon Huang <elonhhuang@gmail.com> \
Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
define Package/rclone-ng
SECTION:=net
CATEGORY:=Network
SUBMENU:=Cloud Manager
TITLE:=An angular web application for rclone
URL:=https://github.com/ElonH/RcloneNg
DEPENDS:=+rclone-config
PKGARCH:=all
endef
define Build/Compile
endef
define Package/rclone-ng/install
$(INSTALL_DIR) $(1)/www
$(CP) $(PKG_BUILD_DIR)/RcloneNg $(1)/www
endef
$(eval $(call BuildPackage,rclone-ng))

View File

@ -1,47 +0,0 @@
# SPDX-Identifier-License: GPL-3.0-or-later
#
# Copyright (C) 2019 Elon Huang <elonhhuang@gmail.com>
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=rclone-webui-react
PKG_VERSION:=2.0.5
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
PKG_SOURCE_URL:=https://github.com/rclone/rclone-webui-react/releases/download/v$(PKG_VERSION)/currentbuild.zip?
PKG_HASH:=afd6836ecc5c5a1161e25cb0633c1167eb5933bb5069545680d69fcba635f011
PKG_LICENSE:=MIT
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Elon Huang <elonhhuang@gmail.com> \
Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
UNZIP_CMD:=unzip -q -d $(PKG_BUILD_DIR) $(DL_DIR)/$(PKG_SOURCE)
define Package/rclone-webui-react
SECTION:=net
CATEGORY:=Network
SUBMENU:=Cloud Manager
TITLE:=A reactjs based web UI for rclone
URL:=https://github.com/rclone/rclone-webui-react
DEPENDS:=+rclone-config
PKGARCH:=all
endef
define Package/rclone-webui-react/description
A full fledged UI for the rclone cloud sync tool.
endef
define Build/Compile
endef
define Package/rclone-webui-react/install
$(INSTALL_DIR) $(1)/www/rclone-webui-react
$(CP) $(PKG_BUILD_DIR)/build/* $(1)/www/rclone-webui-react
endef
$(eval $(call BuildPackage,rclone-webui-react))

View File

@ -1,107 +0,0 @@
# SPDX-Identifier-License: GPL-3.0-or-later
#
# Copyright (C) 2019 Elon Huang <elonhhuang@gmail.com>
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=rclone
PKG_VERSION:=1.57.0
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rclone/rclone/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=294f7a6b0874509997d3a9ffae7c74f0c45b687df0ac7d7742f284ad3814fe55
PKG_LICENSE:=MIT
PKG_LICENSE_FILE:=LICENSE
PKG_MAINTAINER:=Elon Huang <elonhhuang@gmail.com> \
Tianling Shen <cnsztl@immortalwrt.org>
PKG_CONFIG_DEPENDS:= \
CONFIG_RCLONE_COMPRESS_GOPROXY \
CONFIG_RCLONE_COMPRESS_UPX
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/rclone/rclone
GO_PKG_EXCLUDES:=test
GO_PKG_LDFLAGS:=-s -w
GO_PKG_LDFLAGS_X:= \
github.com/rclone/rclone/fs.Version=v$(PKG_VERSION) \
main.Version=v$(PKG_VERSION) \
main.BuildUser=openwrt \
main.BuildHost=openwrt
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/rclone/Default
SECTION:=net
CATEGORY:=Network
SUBMENU:=File Transfer
TITLE:=rsync for cloud storage
URL:=https://rclone.org
endef
define Package/rclone
$(call Package/rclone/Default)
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle +fuse-utils
USERID:=rclone:rclone
endef
define Package/rclone-config
$(call Package/rclone/Default)
TITLE+= (Config Scripts)
DEPENDS:=+rclone
endef
define Package/rclone/description
Rclone ("rsync for cloud storage") is a command line program to sync
files and directories to and from different cloud storage providers.
endef
define Package/rclone/config
config RCLONE_COMPRESS_GOPROXY
bool "Compiling with GOPROXY proxy"
default n
config RCLONE_COMPRESS_UPX
bool "Compress executable files with UPX"
default n
endef
ifeq ($(CONFIG_RCLONE_COMPRESS_GOPROXY),y)
export GO111MODULE=on
export GOPROXY=https://goproxy.baidu.com
endif
define Package/rclone-config/conffiles
/etc/config/rclone
endef
define Build/Compile
$(call GoPackage/Build/Compile)
ifeq ($(CONFIG_RCLONE_COMPRESS_UPX),y)
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/rclone
endif
endef
define Package/rclone/install
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rclone $(1)/usr/bin/
endef
define Package/rclone-config/install
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_CONF) $(CURDIR)/files/rclone.config $(1)/etc/config/rclone
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(CURDIR)/files/rclone.init $(1)/etc/init.d/rclone
endef
$(eval $(call GoBinPackage,rclone))
$(eval $(call BuildPackage,rclone))
$(eval $(call BuildPackage,rclone-config))

View File

@ -1,18 +0,0 @@
config global 'global'
option enabled '0'
config conf 'config'
option config_path '/etc/rclone/rclone.conf'
option port '5572'
option username 'admin'
option password 'admin'
option addr_type 'lan'
config proxy 'proxy'
option enabled '0'
option proxy_addr 'socks5://127.0.0.1:1080'
config log 'log'
option path '/var/log/rclone/output'

View File

@ -1,100 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2019 Elon Huang <elonhhuang@gmail.com>
USE_PROCD=1
START=95
STOP=10
APP="rclone"
CONFIGURATION="rclone"
_info() {
logger -p daemon.info -t "$APP" "$*"
}
_err() {
logger -p daemon.err -t "$APP" "$*"
}
start_service() {
config_load "${CONFIGURATION}"
local enabled
config_get_bool enabled global enabled
if [ "$enabled" -ne "1" ]; then
_info 'Instance "rclone" is disabled.'
return 1
else
_info 'Instance "rclone" is starting.'
fi
local config_path log_path
local addr addr_type port
local username password
local proxy_enable proxy_addr
config_get config_path config config_path
config_get log_path log path
config_get addr_type config addr_type
config_get port config port
config_get username config username
config_get password config password
config_get_bool proxy_enable proxy enabled
config_get proxy_addr proxy proxy_addr
if [ "${addr_type}" = "local" ]; then
addr="$(uci get network.loopback.ipaddr)"
elif [ "${addr_type}" = "lan" ]; then
addr="$(uci get network.lan.ipaddr)"
else
addr=""
fi
local config_dir="${config_path%/*}"
[ -d "$config_dir" ] || mkdir -p "$config_dir"
touch "${config_path}"
chown rclone "${config_path}"
[ -d "/lib/upgrade/keep.d" ] || mkdir -p "/lib/upgrade/keep.d/"
echo "$config_path" > "/lib/upgrade/keep.d/luci-app-rclone"
local log_dir="${log_path%/*}"
[ -d "$log_dir" ] || mkdir -p "$log_dir"
chown -R rclone:rclone "$log_dir"
procd_open_instance
procd_set_param command /usr/bin/$APP rcd -vv
procd_append_param command "--rc-addr=$addr:$port"
procd_append_param command "--rc-user=$username" "--rc-pass=$password"
procd_append_param command "--config=$config_path"
procd_append_param command "--rc-allow-origin=*"
procd_append_param command "--log-file=${log_path}"
if [ "${proxy_enable}" -eq "1" ]; then
procd_set_param env all_proxy="$proxy_addr" https_proxy="$proxy_addr" http_proxy="$proxy_addr"
procd_append_param env ALL_PROXY="$proxy_addr" HTTPS_PROXY="$proxy_addr" HTTP_PROXY="$proxy_addr"
fi
procd_set_param stdout 1
procd_set_param stderr 1
# procd_set_param pidfile /var/run/rclone.pid
procd_set_param respawn
procd_set_param user rclone
procd_set_param group rclone
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "rclone"
}

View File

@ -1,22 +0,0 @@
--- a/librclone/librclone.go
+++ b/librclone/librclone.go
@@ -37,7 +37,7 @@ import (
_ "github.com/rclone/rclone/backend/all" // import all backends
_ "github.com/rclone/rclone/fs/operations" // import operations/* rc commands
_ "github.com/rclone/rclone/fs/sync" // import sync/*
- _ "github.com/rclone/rclone/lib/plugin" // import plugins
+ // _ "github.com/rclone/rclone/lib/plugin" // import plugins
)
// RcloneInitialize initializes rclone as a library
--- a/rclone.go
+++ b/rclone.go
@@ -7,7 +7,7 @@ import (
_ "github.com/rclone/rclone/backend/all" // import all backends
"github.com/rclone/rclone/cmd"
_ "github.com/rclone/rclone/cmd/all" // import all commands
- _ "github.com/rclone/rclone/lib/plugin" // import plugins
+ // _ "github.com/rclone/rclone/lib/plugin" // import plugins
)
func main() {

View File

@ -1,53 +0,0 @@
#
# Copyright (C) 2014 OpenWrt-dist
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=redsocks2
PKG_VERSION:=0.67
PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/semigodking/redsocks.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=d94c245ea47859cda5b4b7373308589206b97bdc
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=semigodking <semigodking@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/redsocks2
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=Redirect any TCP connection to a SOCKS or HTTPS proxy server
URL:=https://github.com/semigodking/redsocks
DEPENDS:=+libevent2 +libopenssl
endef
define Package/redsocks2/description
This is a modified version of original redsocks. \
The name is changed to be REDSOCKS2 since this release to distinguish with original redsocks. \
This variant is useful for anti-GFW (Great Fire Wall).
endef
define Package/redsocks2/conffiles
/etc/config/redsocks2
endef
define Build/Compile
$(call Build/Compile/Default,DISABLE_SHADOWSOCKS=true)
endef
define Package/redsocks2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/redsocks2 $(1)/usr/sbin
endef
$(eval $(call BuildPackage,redsocks2))

View File

@ -1,38 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tcpping
PKG_VERSION:=0.2
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/coolsnowwolf/tcping
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=d890cc1bd8e3951390ceeff1ccb092a5d802850c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/tcpping
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libnet-1.2.x
TITLE:=Ping look-alike that uses TCP SYN packets to get around firewalls and ICMP blackholes
endef
define Package/tcpping/description
Ping look-alike that uses TCP SYN packets to get around firewalls and ICMP blackholes
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.2.x/include -L$(STAGING_DIR)/usr/lib/libnet-1.2.x/lib" \
INSTALL_PROG=":"
endef
define Package/tcpping/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcpping $(1)/usr/bin/tcpping
endef
$(eval $(call BuildPackage,tcpping))

View File

@ -1,85 +0,0 @@
#
# Copyright (C) 2021 KFERMercer <KFER.Mercer@gmail.com>
#
# This is free software, licensed under the GNU General Public License v3.
#
#
# to get the latest version & md5 checksum:
# curl -L -s -k -H "Accept:text/plain" "http://router.uu.163.com/api/plugin?type=openwrt-$(UU_ARCH)"
#
include $(TOPDIR)/rules.mk
PKG_NAME:=uugamebooster
PKG_VERSION:=v2.18.2
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/uugamebooster
SECTION:=net
CATEGORY:=Network
DEPENDS:=@(aarch64||arm||mipsel||x86_64) +kmod-tun
TITLE:=NetEase UU Game Booster
URL:=https://uu.163.com
endef
define Package/uugamebooster/description
NetEase's UU Game Booster Accelerates Triple-A Gameplay and Market
endef
ifeq ($(ARCH),arm)
UU_ARCH:=arm
PKG_MD5SUM:=c5b71d076a0901ab9a81496c916480f2
endif
ifeq ($(ARCH),aarch64)
UU_ARCH:=aarch64
PKG_MD5SUM:=36a66e4e33d7d1fa729c731e31d8219a
endif
ifeq ($(ARCH),mipsel)
UU_ARCH:=mipsel
PKG_MD5SUM:=06abb6adbabd87a264fae6ce9ec1875c
endif
ifeq ($(ARCH),x86_64)
UU_ARCH:=x86_64
PKG_MD5SUM:=a0cbc202f512034b3162244398a2ddc7
endif
PKG_SOURCE_URL:=https://uu.gdl.netease.com/uuplugin/openwrt-$(UU_ARCH)/$(PKG_VERSION)/uu.tar.gz?
PKG_SOURCE:=$(PKG_NAME)-$(UU_ARCH)-$(PKG_VERSION).tar.gz
STRIP:=true
UNTAR_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)-$(UU_ARCH)-bin
define Build/Prepare
mkdir -vp $(UNTAR_DIR)
tar -zxvf $(DL_DIR)/$(PKG_SOURCE) -C $(UNTAR_DIR)
endef
define Build/Compile
endef
define Package/uugamebooster/conffiles
/root/.uuplugin_uuid
endef
define Package/uugamebooster/install
# $(INSTALL_DIR) $(1)/etc/init.d
# $(INSTALL_BIN) ./files/uugamebooster.init $(1)/etc/init.d/uuplugin
$(INSTALL_DIR) $(1)/usr/share/uugamebooster
$(INSTALL_BIN) $(UNTAR_DIR)/uuplugin $(1)/usr/share/uugamebooster/uuplugin
$(INSTALL_CONF) $(UNTAR_DIR)/uu.conf $(1)/usr/share/uugamebooster/uu.conf
# not finish yet:
# $(INSTALL_DIR) $(1)/usr/bin
# $(INSTALL_BIN) ./files/uugamebooster-update $(1)/usr/bin/uugamebooster
# $(LN) $(1)/usr/bin/uugamebooster/uugamebooster-update $(1)/usr/bin/uugamebooster-update
endef
$(eval $(call BuildPackage,uugamebooster))

View File

@ -1,18 +0,0 @@
#!/bin/sh
# Return: 0 means update flag is set.
check_update() {
if [ -f "/usr/bin/uugamebooster/uu.update" ];then
return 0
else
return 1
fi
}
check_update
if [ "$?" != "0" ];then
exit 0
return
fi
exit 0

View File

@ -1,76 +0,0 @@
#
# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
ifeq ($(ARCH),x86_64)
PKG_ARCH_VERYSYNC:=amd64
endif
ifeq ($(ARCH),mipsel)
PKG_ARCH_VERYSYNC:=mipsle
endif
ifeq ($(ARCH),mips)
PKG_ARCH_VERYSYNC:=mips
endif
ifeq ($(ARCH),i386)
PKG_ARCH_VERYSYNC:=386
endif
ifeq ($(ARCH),arm)
PKG_ARCH_VERYSYNC:=arm
endif
ifeq ($(ARCH),aarch64)
PKG_ARCH_VERYSYNC:=arm64
endif
ifeq ($(ARCH),powerpc64)
PKG_ARCH_VERYSYNC:=ppc64
endif
LATEST_VERSION:=$(shell curl http://www.verysync.com/shell/latest)
PKG_NAME:=verysync
ifneq ($(LATEST_VERSION),)
PKG_VERSION:=$(LATEST_VERSION)
else
PKG_VERSION:=v1.5.5
endif
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dl.verysync.com/releases/$(PKG_VERSION)/
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/verysync
SECTION:=net
CATEGORY:=Network
TITLE:=A efficient data transmission tool
DEPENDS:=
URL:=http://www.verysync.com
endef
define Package/verysync/description
Verysync is a efficient data transmission tool.
endef
define Build/Prepare
tar -xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/verysync/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-linux-$(PKG_ARCH_VERYSYNC)-$(PKG_VERSION)/verysync $(1)/usr/bin/verysync
endef
$(eval $(call BuildPackage,verysync))

View File

@ -1,41 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=vlmcsd
PKG_VERSION:=svn1113
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/Wind4/vlmcsd/tar.gz/$(PKG_VERSION)?
PKG_HASH:=62f55c48f5de1249c2348ab6b96dabbe7e38899230954b0c8774efb01d9c42cc
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=fuyumi <280604399@qq.com>
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/vlmcsd
SECTION:=net
CATEGORY:=Network
TITLE:=vlmcsd for OpenWRT
URL:=http://forums.mydigitallife.info/threads/50234
DEPENDS:=+libpthread
endef
define Package/vlmcsd/description
vlmcsd is a KMS Emulator in C.
endef
MAKE_FLAGS += \
-C $(PKG_BUILD_DIR)
define Package/vlmcsd/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vlmcsd $(1)/usr/bin/vlmcsd
$(INSTALL_DIR) $(1)/etc/vlmcsd
$(INSTALL_BIN) ./files/vlmcsd.ini $(1)/etc/vlmcsd/vlmcsd.ini
endef
$(eval $(call BuildPackage,vlmcsd))

View File

@ -1,74 +0,0 @@
#ePID/HwId设置为Windows显式
;Windows = 06401-00206-471-111111-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID设置为Office2010包含Visio和Project显式
;Office2010 = 06401-00096-199-222222-03-1033-17763.0000-2822018
#ePID/HwId设置为Office2013包含Visio和Project显式
;Office2013 = 06401-00206-234-333333-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID/HwId设置为Office2016包含Visio和Project显式
;Office2016 = 06401-00206-437-444444-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID/HwId设置为Office2019包含Visio和Project显式
;Office2019 = 06401-00206-666-666666-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#ePID/HwId设置为Windows中国政府版 (Enterprise G/GN) 显式
;WinChinaGov = 06401-03858-000-555555-03-1033-17763.0000-2822018 / 01 02 03 04 05 06 07 08
#使用自定义TCP端口
;Port = 1688
#监听所有IPv4地址默认端口1688
;Listen = 0.0.0.0:1688
#监听所有IPv6地址默认端口1688
;Listen = [::]:1688
#程序启动时随机ePIDs只有那些未显式指定的
;RandomizationLevel = 1
#在ePIDs中使用特定区域 (1033 = 美国英语)即使ePID是随机的
;LCID = 1033
#设置最多4个同时工作分叉进程或线程
;MaxWorkers = 4
#闲置30秒后断开用户
;ConnectionTimeout = 30
#每次请求后立即断开客户端
;DisconnectClientsImmediately = yes
#写一个pid文件包含vlmcsd的进程ID的文件
;PidFile = /var/run/vlmcsd.pid
#写日志到/var/log/vlmcsd.log
;LogFile = /var/log/vlmcsd.log
#创建详细日志
;LogVerbose = true
#设置激活间隔2小时
;ActivationInterval = 2h
#设置更新间隔7天
;RenewalInterval = 7d
#运行程序的用户为vlmcsduser
;user = vlmcsduser
#运行程序的组为vlmcsdgroup
;group = vlmcsdgroup
#禁用或启用RPC的NDR64传输语法默认启用
;UseNDR64 = true
#禁用或启用RPC的绑定时间特性协商默认启用
;UseBTFN = true
#Windows 10/ Windows 11 KMS 安装激活密钥
#Windows 10/11 ProW269N-WFGWX-YVC9B-4J6C9-T83GX
#Windows 10/11 EnterpriseNPPR9-FWDCX-D2C8J-H872K-2YT43
#Windows 10/11 Pro for WorkstationsNRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J

View File

@ -1,37 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2011-2015 OpenWrt.org
START=90
start(){
if [ ! -f "/tmp/vlmcsd.pid" ]; then
/usr/bin/vlmcsd -i /etc/vlmcsd/vlmcsd.ini -p /tmp/vlmcsd.pid -L 0.0.0.0:1688
iptables -D input_rule -p tcp --dport 1688 -j ACCEPT
iptables -A input_rule -p tcp --dport 1688 -j ACCEPT
sed -i '/## luci-app-vlmcsd/d' /etc/firewall.user
echo "iptables -A input_rule -p tcp --dport 1688 -j ACCEPT ## luci-app-vlmcsd" >> /etc/firewall.user
echo "KMS Server has started."
else
echo "KMS Server has already started."
fi
}
stop(){
if [ ! -f "/tmp/vlmcsd.pid" ]; then
echo "KMS Server is not running."
else
pid=`cat /tmp/vlmcsd.pid`
kill $pid
rm -f /tmp/vlmcsd.pid
iptables -D input_rule -p tcp --dport 1688 -j ACCEPT
sed -i '/## luci-app-vlmcsd/d' /etc/firewall.user
echo "KMS Server has stopped."
fi
}
restart(){
stop
sleep 2
start
echo "KMS Server has restarted."
}

View File

@ -1,136 +0,0 @@
#
# Copyright (C) 2007-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=wxbase
PKG_VERSION:=2.8.12
PKG_RELEASE:=1
PKG_SOURCE:=wxGTK-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/wxwindows
PKG_MD5SUM:=08f81ab60647308058f6ce99712b14f8
PKG_BUILD_DIR:=$(BUILD_DIR)/wxGTK-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_CHECK_FORMAT_SECURITY:=0
include $(INCLUDE_DIR)/package.mk
define Package/libwxbase
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Cross-platform C++ framework
URL:=http://www.wxwidgets.org/
DEPENDS:=+libexpat +libstdcpp +zlib +libpthread
endef
define Package/libwxbase/description
wxBase contains most of the non-GUI classes from the wxWindows cross-
-platform C++ framework. There are 2 categories: generally useful portable
code (date/time handling, command line parsing, regular expression support)
and wrappers for the OS objects (files, directories, sockets, threads,
etc.) allowing you to write portable programs easily.
endef
TARGET_CFLAGS += $(FPIC)
# XXX: aMule *needs* the following configure options to be enabled:
# --enable-intl
# --enable-largefile
# --disable-no_rtti
# --with-regex
# --enable-unicode
CONFIGURE_ARGS+= \
--enable-shared \
--disable-rpath \
--with-gnu-ld \
--disable-gui \
--disable-monolithic \
--enable-plugins \
--disable-universal \
--disable-nanox \
--disable-gtk2 \
--disable-gpe \
--disable-optimise \
--disable-debug \
--disable-stl \
--disable-omf \
--disable-debug_flag \
--disable-debug_info \
--disable-debug_gdb \
--disable-debug_cntxt \
--disable-mem_tracing \
--disable-profile \
--disable-no_rtti \
--disable-no_exceptions \
--disable-compat22 \
--disable-compat24 \
--enable-intl \
--disable-backtrace \
--enable-exceptions \
--disable-sound \
--enable-largefile \
\
--without-gtk \
--without-motif \
--without-mac \
--without-cocoa \
--without-wine \
--without-msw \
--without-pm \
--without-mgl \
--without-microwin \
--without-x11 \
--without-libpng \
--without-libjpeg \
--without-libtiff \
--without-libxpm \
--without-libmspack \
--without-sdl \
--without-gnomeprint \
--without-opengl \
--without-dmalloc \
--with-regex="sys" \
--with-zlib="sys" \
--without-odbc \
--with-expat="sys" \
--without-gtk-prefix \
--without-x \
--without-libiconv-prefix \
--without-sdl-prefix \
--without-cppunit-prefix \
--disable-precomp-headers
UNICODE=yes
ifeq ($(UNICODE),yes)
CONFIGURE_ARGS+= --enable-unicode
LIB_PFX:=u
else
CONFIGURE_ARGS+= --disable-unicode
LIB_PFX:=
endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
$(CP) -L $(PKG_BUILD_DIR)/wx-config $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/include/wx-2.8 $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwx_base$(LIB_PFX){,_net,_xml}-*.so* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/wx $(1)/usr/lib/
$(SED) 's,-I$$$${includedir}/wx-2.8,-I$(STAGING_DIR)/usr/include/wx-2.8,g' $(1)/usr/bin/wx-config
$(SED) 's,-I$$$${libdir}/wx/include,-I$(STAGING_DIR)/usr/lib/wx/include,g' $(1)/usr/bin/wx-config
endef
define Package/libwxbase/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwx_base$(LIB_PFX){,_net,_xml}-*.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libwxbase))

View File

@ -1,15 +0,0 @@
diff -up wxGTK-2.8.12/src/common/appbase.cpp.abicheck wxGTK-2.8.12/src/common/appbase.cpp
--- wxGTK-2.8.12/src/common/appbase.cpp.abicheck 2015-03-12 17:15:18.000000000 +0100
+++ wxGTK-2.8.12/src/common/appbase.cpp 2015-03-12 17:15:57.000000000 +0100
@@ -424,10 +424,7 @@ bool wxAppConsole::CheckBuildOptions(con
msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
lib.c_str(), progName.c_str(), prog.c_str());
- wxLogFatalError(msg.c_str());
-
- // normally wxLogFatalError doesn't return
- return false;
+ wxLogWarning(msg.c_str());
}
#undef wxCMP