mirror of
https://github.com/kenzok8/openwrt-packages.git
synced 2025-11-01 08:18:52 +08:00
update 2023-04-27 11:32:41
This commit is contained in:
44
lua-neturl/Makefile
Normal file
44
lua-neturl/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2022-2023 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=neturl
|
||||
PKG_VERSION:=1.1-1
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/golgote/neturl/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=25f3a94ba9f435ef1395555de2bf17d6f934d789fa515ed965405919e42be27b
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICNESE_FILES:=LICENSE.txt
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/lua-neturl
|
||||
SUBMENU:=Lua
|
||||
SECTION:=lang
|
||||
CATEGORY:=Languages
|
||||
TITLE:=URL and Query string parser, builder, normalizer for Lua
|
||||
URL:=https://github.com/golgote/neturl
|
||||
DEPENDS:=+lua
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/lua-neturl/description
|
||||
This small Lua library provides a few functions to parse URL with
|
||||
querystring and build new URL easily.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/lua-neturl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua
|
||||
$(CP) $(PKG_BUILD_DIR)/lib/net/url.lua $(1)/usr/lib/lua/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,lua-neturl))
|
||||
20
lua-neturl/patches/010-userinfo-regex.patch
Normal file
20
lua-neturl/patches/010-userinfo-regex.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/lib/net/url.lua
|
||||
+++ b/lib/net/url.lua
|
||||
@@ -340,7 +340,7 @@ function M:setAuthority(authority)
|
||||
self.password = v
|
||||
return ''
|
||||
end)
|
||||
- if string.find(userinfo, "^[%w%+%.]+$") then
|
||||
+ if string.find(userinfo, "^[%p%w%+%.]+$") then
|
||||
self.user = userinfo
|
||||
else
|
||||
-- incorrect userinfo
|
||||
@@ -369,7 +369,7 @@ function M.parse(url)
|
||||
comp.fragment = v
|
||||
return ''
|
||||
end)
|
||||
- url =url:gsub('^([%w][%w%+%-%.]*)%:', function(v)
|
||||
+ url =url:gsub('^([%w][%w%+%-%_%.]*)%:', function(v)
|
||||
comp.scheme = v:lower()
|
||||
return ''
|
||||
end)
|
||||
43
microsocks/Makefile
Normal file
43
microsocks/Makefile
Normal file
@ -0,0 +1,43 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=microsocks
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/microsocks/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=6801559b6f8e17240ed8eef17a36eea8643412b5a7476980fd4e24b02a021b82
|
||||
|
||||
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))
|
||||
114
naiveproxy/Makefile
Normal file
114
naiveproxy/Makefile
Normal file
@ -0,0 +1,114 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=naiveproxy
|
||||
PKG_VERSION:=112.0.5615.49-1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=a19110347a5dedd800f3978c7204e9a5e1b1a26935ead61086547807380610da
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=gn/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
ifneq ($(CONFIG_CPU_TYPE)," ")
|
||||
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
|
||||
CPU_SUBTYPE:=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE)))
|
||||
ifeq ($(CPU_SUBTYPE),)
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
else
|
||||
CPU_TYPE:=""
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/naiveproxy
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Make a fortune quietly
|
||||
URL:=https://github.com/klzgrad/naiveproxy
|
||||
DEPENDS:=@!(arc||armeb||mips||mips64||powerpc||TARGET_gemini) +libatomic
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/description
|
||||
NaïveProxy uses Chrome's network stack to camouflage traffic with strong
|
||||
censorship resistance and low detectability. Reusing Chrome's stack also
|
||||
ensures best practices in performance and security.
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
export CCACHE_SLOPPINESS=time_macros
|
||||
export CCACHE_BASEDIR=$(PKG_BUILD_DIR)/src
|
||||
export CCACHE_CPP2=yes
|
||||
export naive_ccache_flags=cc_wrapper="$(CCACHE)"
|
||||
endif
|
||||
|
||||
CLANG_VER:=17-init-2387-g68e81d7e-1
|
||||
CLANG_FILE:=clang-llvmorg-$(CLANG_VER).tgz
|
||||
define Download/CLANG
|
||||
URL:=https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64
|
||||
URL_FILE:=$(CLANG_FILE)
|
||||
FILE:=$(CLANG_FILE)
|
||||
HASH:=6335f2e1f35bb235b8fe610559bbf97e630c4e50662a31b6e70226c2f4b0c290
|
||||
endef
|
||||
|
||||
PGO_VER:=5615-1679995307-0baae343d55c36a01b20eb4c600fca3ba7e0825e
|
||||
PGO_FILE:=chrome-linux-$(PGO_VER).profdata
|
||||
define Download/PGO_PROF
|
||||
URL:=https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles
|
||||
URL_FILE:=$(PGO_FILE)
|
||||
FILE:=$(PGO_FILE)
|
||||
HASH:=06a181474ca4b34f53dec1d2993e97895665cad85e5c4456ae94ed0c1d10e3ec
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
mkdir -p "chrome/build/pgo_profiles" ; \
|
||||
$(CP) "$(DL_DIR)/$(PGO_FILE)" "chrome/build/pgo_profiles" ; \
|
||||
mkdir -p "third_party/llvm-build/Release+Asserts" ; \
|
||||
$(TAR) -xzf "$(DL_DIR)/$(CLANG_FILE)" -C "third_party/llvm-build/Release+Asserts" ; \
|
||||
echo -e "llvmorg-$(CLANG_VER)" > "third_party/llvm-build/Release+Asserts/cr_build_revision" ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd "$(PKG_BUILD_DIR)/src" ; \
|
||||
. ../init_env.sh "$(ARCH)" $(CPU_TYPE) $(CPU_SUBTYPE) "$(TOOLCHAIN_DIR)" ; \
|
||||
export naive_flags+=" $$$${naive_ccache_flags}" ; \
|
||||
mkdir -p "out" ; \
|
||||
gn gen "out/Release" --args="$$$${naive_flags}" --script-executable="$(PYTHON)" ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(NINJA) -C "$(PKG_BUILD_DIR)/src/out/Release" naive
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/out/Release/naive $(1)/usr/bin/naive
|
||||
endef
|
||||
|
||||
$(eval $(call Download,CLANG))
|
||||
$(eval $(call Download,PGO_PROF))
|
||||
|
||||
$(eval $(call BuildPackage,naiveproxy))
|
||||
|
||||
38
naiveproxy/patches/100-macros.patch
Normal file
38
naiveproxy/patches/100-macros.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- a/src/base/allocator/partition_allocator/tagging.cc
|
||||
+++ b/src/base/allocator/partition_allocator/tagging.cc
|
||||
@@ -18,22 +18,25 @@
|
||||
#define PR_GET_TAGGED_ADDR_CTRL 56
|
||||
#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
-#include <linux/version.h>
|
||||
-
|
||||
-// Linux headers already provide these since v5.10.
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
||||
-#define HAS_PR_MTE_MACROS
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
-#ifndef HAS_PR_MTE_MACROS
|
||||
+#ifndef PR_MTE_TCF_SHIFT
|
||||
#define PR_MTE_TCF_SHIFT 1
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_NONE
|
||||
#define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_SYNC
|
||||
#define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_ASYNC
|
||||
#define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_MASK
|
||||
#define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TAG_SHIFT
|
||||
#define PR_MTE_TAG_SHIFT 3
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TAG_MASK
|
||||
#define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
|
||||
#endif
|
||||
#endif
|
||||
100
naiveproxy/src/init_env.sh
Executable file
100
naiveproxy/src/init_env.sh
Executable file
@ -0,0 +1,100 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
# --------------------------------------------------------
|
||||
# Init build dependencies for naiveproxy
|
||||
|
||||
# Read args from shell
|
||||
target_arch="$1"
|
||||
cpu_type="$2"
|
||||
cpu_subtype="$3"
|
||||
toolchain_dir="$4"
|
||||
|
||||
# Set arch info
|
||||
case "${target_arch}" in
|
||||
"aarch64")
|
||||
naive_arch="arm64"
|
||||
;;
|
||||
"i386")
|
||||
naive_arch="x86"
|
||||
;;
|
||||
"x86_64")
|
||||
naive_arch="x64"
|
||||
;;
|
||||
*)
|
||||
naive_arch="${target_arch}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# OS detection
|
||||
[ "$(uname)" != "Linux" -o "$(uname -m)" != "x86_64" ] && { echo -e "Support Linux AMD64 only."; exit 1; }
|
||||
|
||||
# Create TMP dir
|
||||
mkdir -p "$PWD/tmp"
|
||||
export TMPDIR="$PWD/tmp"
|
||||
|
||||
# Set ENV
|
||||
export DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
export naive_flags="
|
||||
is_official_build=true
|
||||
exclude_unwind_tables=true
|
||||
enable_resource_allowlist_generation=false
|
||||
symbol_level=1
|
||||
is_clang=true
|
||||
use_sysroot=false
|
||||
|
||||
fatal_linker_warnings=false
|
||||
treat_warnings_as_errors=false
|
||||
|
||||
enable_base_tracing=false
|
||||
use_udev=false
|
||||
use_aura=false
|
||||
use_ozone=false
|
||||
use_gio=false
|
||||
use_gtk=false
|
||||
use_platform_icu_alternatives=true
|
||||
use_glib=false
|
||||
|
||||
disable_file_support=true
|
||||
enable_websockets=false
|
||||
use_kerberos=false
|
||||
enable_mdns=false
|
||||
enable_reporting=false
|
||||
include_transport_security_state_preload_list=false
|
||||
use_nss_certs=false
|
||||
|
||||
target_os=\"openwrt\"
|
||||
target_cpu=\"${naive_arch}\"
|
||||
target_sysroot=\"${toolchain_dir}\""
|
||||
|
||||
case "${target_arch}" in
|
||||
"arm")
|
||||
naive_flags+=" arm_version=0 arm_cpu=\"${cpu_type}\""
|
||||
if [ -n "${cpu_subtype}" ]; then
|
||||
if grep -q "neon" <<< "${cpu_subtype}"; then
|
||||
neon_flag="arm_use_neon=true"
|
||||
else
|
||||
neon_flag="arm_use_neon=false"
|
||||
fi
|
||||
naive_flags+=" arm_fpu=\"${cpu_subtype}\" arm_float_abi=\"hard\" ${neon_flag}"
|
||||
else
|
||||
naive_flags+=" arm_float_abi=\"soft\" arm_use_neon=false"
|
||||
fi
|
||||
case "${cpu_type}" in
|
||||
"arm1176jzf-s"|"arm926ej-s"|"mpcore"|"xscale")
|
||||
naive_flags+=" arm_use_thumb=false"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"mipsel"|"mips64el")
|
||||
naive_flags+=" use_thin_lto=false chrome_pgo_phase=0 mips_arch_variant=\"r2\""
|
||||
if [ "${target_arch}" == "mipsel" ]; then
|
||||
if [ "${cpu_subtype}" == "24kf" ]; then
|
||||
naive_flags+=" mips_float_abi=\"hard\""
|
||||
else
|
||||
naive_flags+=" mips_float_abi=\"soft\""
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
54
redsocks2/Makefile
Normal file
54
redsocks2/Makefile
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# 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_MIRROR_HASH:=938f859d1b55a91aa5cbcda3ddff1d04ccab292f784b0434060c73acab12c457
|
||||
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))
|
||||
46
tcping/Makefile
Normal file
46
tcping/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# 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:=tcping
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=license.txt
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/Lienol/tcping
|
||||
PKG_MIRROR_HASH:=79414cd8e1d124422a36b8fe36a1f296b7d9bde99807b2c90ad81bbd65e200e0
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=db9101834732dac9aaa59dbb7fb9c74612dbf723
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/tcping
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=tcping measures the latency of a tcp-connection
|
||||
URL:=https://github.com/jlyo/tcping
|
||||
endef
|
||||
|
||||
define Package/tcping/description
|
||||
endef
|
||||
|
||||
define Package/tcping/conffiles
|
||||
endef
|
||||
|
||||
define Package/tcping/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcping $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tcping))
|
||||
Reference in New Issue
Block a user