mirror of
https://github.com/roacn/openwrt-packages.git
synced 2025-01-08 11:57:31 +08:00
💐 Sync 2023-09-11 09:19
This commit is contained in:
parent
9dc515bf4a
commit
64d90a16ef
@ -1,45 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=brook
|
||||
PKG_VERSION:=20230606
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/txthinking/brook/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=4490f203973b59e5bbaa4cbfb8835232f9671dac1b82ab4de882d32a2ad6b612
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/txthinking/brook
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/cli/brook
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/brook
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=A cross-platform proxy software
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
URL:=https://github.com/txthinking/brook
|
||||
endef
|
||||
|
||||
define Package/brook/description
|
||||
Brook is a cross-platform strong encryption and not detectable proxy.
|
||||
Zero-Configuration.
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,brook))
|
||||
$(eval $(call BuildPackage,brook))
|
@ -1,41 +0,0 @@
|
||||
From 934fd3f3d7c5602020850298443a08af6bbc3771 Mon Sep 17 00:00:00 2001
|
||||
From: MoetaYuko <loli@yuko.moe>
|
||||
Date: Tue, 6 Jun 2023 17:49:59 +0800
|
||||
Subject: [PATCH] update iploc to fix build for riscv64
|
||||
|
||||
---
|
||||
go.mod | 2 +-
|
||||
go.sum | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/go.mod b/go.mod
|
||||
index 7aaac17..ab71685 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -8,7 +8,7 @@ require (
|
||||
github.com/krolaw/dhcp4 v0.0.0-20190909130307-a50d88189771
|
||||
github.com/miekg/dns v1.1.51
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
- github.com/phuslu/iploc v1.0.20230201
|
||||
+ github.com/phuslu/iploc v1.0.20230606
|
||||
github.com/prometheus/client_golang v1.14.0
|
||||
github.com/quic-go/quic-go v0.32.0
|
||||
github.com/refraction-networking/utls v1.3.2
|
||||
diff --git a/go.sum b/go.sum
|
||||
index ee5c8bf..cecdb21 100644
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -180,8 +180,8 @@ github.com/onsi/ginkgo/v2 v2.2.0/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7
|
||||
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||
-github.com/phuslu/iploc v1.0.20230201 h1:AMhy7j8z0N5iI0jaqh514KTDEB7wVdQJ4Y4DJPCvKBU=
|
||||
-github.com/phuslu/iploc v1.0.20230201/go.mod h1:gsgExGWldwv1AEzZm+Ki9/vGfyjkL33pbSr9HGpt2Xg=
|
||||
+github.com/phuslu/iploc v1.0.20230606 h1:7DcZSXuvVAlNbvGjKWOuXgpvDoUmECp8rlVEGaAydUg=
|
||||
+github.com/phuslu/iploc v1.0.20230606/go.mod h1:gsgExGWldwv1AEzZm+Ki9/vGfyjkL33pbSr9HGpt2Xg=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
--
|
||||
2.41.0
|
||||
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dns2tcp
|
||||
PKG_VERSION:=1.1.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/zfl9/dns2tcp.git
|
||||
@ -20,7 +20,6 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
122
gn/Makefile
122
gn/Makefile
@ -1,61 +1,61 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gn
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
|
||||
PKG_SOURCE_DATE:=2023-04-05
|
||||
PKG_SOURCE_VERSION:=28b7b6c507eb808567e3aea446cd259f7691fddc
|
||||
PKG_MIRROR_HASH:=5b112442eabea4b906cc409237fac13b8efb4f5acb25989b1883d5ce96deebd2
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),)
|
||||
PKG_BUILD_DEPENDS+= ninja/host
|
||||
endif
|
||||
PKG_HOST_ONLY:=1
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/gn
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=A meta-build system that generates build files for Ninja
|
||||
URL:=https://gn.googlesource.com/gn/
|
||||
BUILDONLY:=1
|
||||
endef
|
||||
|
||||
define Package/gn/description
|
||||
GN can generate Ninja build files for C, C++, Rust, Objective C,
|
||||
and Swift source on most popular platforms.
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
$(PYTHON) $(HOST_BUILD_DIR)/build/gen.py \
|
||||
--no-last-commit-position
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
ninja -C $(HOST_BUILD_DIR)/out
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/out/gn $(STAGING_DIR_HOSTPKG)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
$(RM) $(STAGING_DIR_HOSTPKG)/bin/gn
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,gn))
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gn
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
|
||||
PKG_SOURCE_DATE:=2023-04-05
|
||||
PKG_SOURCE_VERSION:=28b7b6c507eb808567e3aea446cd259f7691fddc
|
||||
PKG_MIRROR_HASH:=5b112442eabea4b906cc409237fac13b8efb4f5acb25989b1883d5ce96deebd2
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),)
|
||||
PKG_BUILD_DEPENDS+= ninja/host
|
||||
endif
|
||||
PKG_HOST_ONLY:=1
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/gn
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=A meta-build system that generates build files for Ninja
|
||||
URL:=https://gn.googlesource.com/gn/
|
||||
BUILDONLY:=1
|
||||
endef
|
||||
|
||||
define Package/gn/description
|
||||
GN can generate Ninja build files for C, C++, Rust, Objective C,
|
||||
and Swift source on most popular platforms.
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
$(PYTHON) $(HOST_BUILD_DIR)/build/gen.py \
|
||||
--no-last-commit-position
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
ninja -C $(HOST_BUILD_DIR)/out
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/out/gn $(STAGING_DIR_HOSTPKG)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
$(RM) $(STAGING_DIR_HOSTPKG)/bin/gn
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,gn))
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- a/build/gen.py
|
||||
+++ b/build/gen.py
|
||||
@@ -368,7 +368,7 @@ def WriteGNNinja(path, platform, host, o
|
||||
cxx = os.environ.get('CXX', 'g++')
|
||||
ld = os.environ.get('LD', 'g++')
|
||||
ar = os.environ.get('AR', 'ar -X64')
|
||||
- elif platform.is_msys() or platform.is_mingw():
|
||||
+ elif platform.is_msys() or platform.is_mingw() or platform.is_linux():
|
||||
cxx = os.environ.get('CXX', 'g++')
|
||||
ld = os.environ.get('LD', 'g++')
|
||||
ar = os.environ.get('AR', 'ar')
|
||||
--- a/build/gen.py
|
||||
+++ b/build/gen.py
|
||||
@@ -368,7 +368,7 @@ def WriteGNNinja(path, platform, host, o
|
||||
cxx = os.environ.get('CXX', 'g++')
|
||||
ld = os.environ.get('LD', 'g++')
|
||||
ar = os.environ.get('AR', 'ar -X64')
|
||||
- elif platform.is_msys() or platform.is_mingw():
|
||||
+ elif platform.is_msys() or platform.is_mingw() or platform.is_linux():
|
||||
cxx = os.environ.get('CXX', 'g++')
|
||||
ld = os.environ.get('LD', 'g++')
|
||||
ar = os.environ.get('AR', 'ar')
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Generated by build/gen.py.
|
||||
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
#define OUT_LAST_COMMIT_POSITION_H_
|
||||
|
||||
#define LAST_COMMIT_POSITION_NUM 2085
|
||||
#define LAST_COMMIT_POSITION "2085 (28b7b6c507eb)"
|
||||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
// Generated by build/gen.py.
|
||||
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
#define OUT_LAST_COMMIT_POSITION_H_
|
||||
|
||||
#define LAST_COMMIT_POSITION_NUM 2085
|
||||
#define LAST_COMMIT_POSITION "2085 (28b7b6c507eb)"
|
||||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
@ -20,7 +20,6 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/apernet/hysteria
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/app
|
||||
@ -51,7 +50,7 @@ endef
|
||||
define Package/hysteria/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/app $(1)/usr/bin/hysteria
|
||||
endef
|
||||
|
||||
|
@ -14,7 +14,6 @@ PKG_HASH:=5279eb1cb7555cf9292423cc9f672dc43e6e214b3411a6df26a6a1cfa59d88b7
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
PKG_LICENSE:=AGPL-3.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=microsocks
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_RELEASE:=1
|
||||
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)?
|
||||
|
@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=naiveproxy
|
||||
PKG_VERSION:=113.0.5672.62-1
|
||||
PKG_VERSION:=113.0.5672.62-2
|
||||
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:=f8e86f5e9fc8985042d4fa8e0122b513f187cc878bfbabf133e520fa8d5f3410
|
||||
PKG_HASH:=75db685789d550094343a76fdcbb6ea2bfcb708c3330af621ca532842251fb26
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@ -22,7 +22,6 @@ PKG_BUILD_DEPENDS+= ninja/host
|
||||
endif
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
ifneq ($(CONFIG_CPU_TYPE)," ")
|
||||
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
|
||||
@ -43,7 +42,7 @@ define Package/naiveproxy
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Make a fortune quietly
|
||||
URL:=https://github.com/klzgrad/naiveproxy
|
||||
DEPENDS:=@!(arc||armeb||mips||mips64||powerpc||riscv64||TARGET_gemini) +libatomic
|
||||
DEPENDS:=@!(arc||armeb||mips||mips64||powerpc||TARGET_gemini) +libatomic
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/description
|
||||
|
@ -3,7 +3,7 @@
|
||||
@@ -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>
|
||||
-
|
||||
|
@ -71,6 +71,7 @@ target_sysroot=\"${toolchain_dir}\""
|
||||
case "${target_arch}" in
|
||||
"arm")
|
||||
naive_flags+=" arm_version=0 arm_cpu=\"${cpu_type}\""
|
||||
case "${cpu_type}" in "arm1176jzf-s"|"arm926ej-s"|"mpcore"|"xscale") naive_flags+=" arm_use_thumb=false" ;; esac
|
||||
if [ -n "${cpu_subtype}" ]; then
|
||||
if grep -q "neon" <<< "${cpu_subtype}"; then
|
||||
neon_flag="arm_use_neon=true"
|
||||
@ -81,11 +82,9 @@ case "${target_arch}" in
|
||||
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
|
||||
;;
|
||||
"arm64")
|
||||
[ -n "${cpu_type}" ] && naive_flags+=" arm_cpu=\"${cpu_type}\""
|
||||
;;
|
||||
"mipsel"|"mips64el")
|
||||
naive_flags+=" use_thin_lto=false chrome_pgo_phase=0 mips_arch_variant=\"r2\""
|
||||
|
@ -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))
|
@ -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
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-SUBDIRS = src doc contrib
|
||||
+SUBDIRS = src contrib
|
||||
|
||||
EXTRA_DIST = version ChangeLog.old COPYING.BSD README.par README.par.old PKGBUILD
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -196,7 +196,7 @@ threadlib = @threadlib@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-SUBDIRS = src doc contrib
|
||||
+SUBDIRS = src contrib
|
||||
EXTRA_DIST = version ChangeLog.old COPYING.BSD README.par README.par.old PKGBUILD
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -15,7 +15,7 @@ EXTRA_DIST = make_rr_types_h.pl rr_types
|
||||
|
||||
## Try to do this last
|
||||
|
||||
-SUBDIRS = . pdnsd-ctl rc test
|
||||
+SUBDIRS = . pdnsd-ctl
|
||||
|
||||
$(pdnsd_OBJECTS): rr_types.h
|
||||
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -215,7 +215,7 @@ pdnsd_SOURCES = conf-parser.c conff.c co
|
||||
freebsd_netinet_ip_icmp.h
|
||||
|
||||
EXTRA_DIST = make_rr_types_h.pl rr_types.in
|
||||
-SUBDIRS = . pdnsd-ctl rc test
|
||||
+SUBDIRS = . pdnsd-ctl
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
@ -1,66 +0,0 @@
|
||||
--- 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"
|
||||
|
||||
--- 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"
|
||||
--- a/src/dns_answer.c
|
||||
+++ b/src/dns_answer.c
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <sys/uio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include <netdb.h>
|
||||
--- a/src/dns_query.c
|
||||
+++ b/src/dns_query.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <config.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <netdb.h>
|
||||
--- a/src/icmp.c
|
||||
+++ b/src/icmp.c
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
-#include <sys/poll.h>
|
||||
+#include <poll.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
--- 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>
|
@ -21,7 +21,6 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Copyright (C) 2017-2019 Jian Chang <aa65535@live.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
@ -13,51 +11,45 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/shadowsocks/simple-obfs.git
|
||||
PKG_MIRROR_HASH:=ea8f2b9825bbb87d5d860524e29bade265141687338db2dbf7ecd32690cf02fc
|
||||
PKG_SOURCE_DATE:=2019-08-17
|
||||
PKG_SOURCE_VERSION:=486bebd9208539058e57e23a12f23103016e09b4
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=b1ae62a6826616b35b6aea0c6b2d55b5f36da96be0cd1c229c263b508d1aeef0
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING LICENSE
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Jian Chang <aa65535@live.com>
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=libev
|
||||
|
||||
PKG_CONFIG_DEPENDS:= CONFIG_SIMPLE_OBFS_STATIC_LINK
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/simple-obfs
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Simple-obfs
|
||||
URL:=https://github.com/shadowsocks/simple-obfs
|
||||
DEPENDS:=+libpthread +!SIMPLE_OBFS_STATIC_LINK:libev
|
||||
define Package/simple-obfs/template
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=A simple obfuscating tool
|
||||
URL:=https://github.com/shadowsocks/simple-obfs
|
||||
DEPENDS:=+libpthread +libev
|
||||
endef
|
||||
|
||||
Package/simple-obfs-server = $(Package/simple-obfs)
|
||||
define Package/simple-obfs-client
|
||||
$(call Package/simple-obfs/template)
|
||||
TITLE+= (client)
|
||||
PROVIDES:=simple-obfs
|
||||
endef
|
||||
|
||||
define Package/simple-obfs-server/config
|
||||
menu "Simple-obfs Compile Configuration"
|
||||
depends on PACKAGE_simple-obfs || PACKAGE_simple-obfs-server
|
||||
config SIMPLE_OBFS_STATIC_LINK
|
||||
bool "enable static link libraries."
|
||||
default n
|
||||
endmenu
|
||||
define Package/simple-obfs-server
|
||||
$(call Package/simple-obfs/template)
|
||||
TITLE+= (server)
|
||||
endef
|
||||
|
||||
define Package/simple-obfs/description
|
||||
Simple-obfs is a simple obfusacting tool, designed as plugin server of shadowsocks.
|
||||
Simple-obfs is a simple obfusacting tool, designed as plugin server of shadowsocks.
|
||||
endef
|
||||
|
||||
Package/simple-obfs-client/description = $(Package/simple-obfs/description)
|
||||
Package/simple-obfs-server/description = $(Package/simple-obfs/description)
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
@ -65,21 +57,15 @@ CONFIGURE_ARGS += \
|
||||
--disable-documentation \
|
||||
--disable-assert
|
||||
|
||||
ifeq ($(CONFIG_SIMPLE_OBFS_STATIC_LINK),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--with-ev="$(STAGING_DIR)/usr" \
|
||||
LDFLAGS="-Wl,-static -static -static-libgcc"
|
||||
endif
|
||||
|
||||
define Package/simple-obfs/install
|
||||
define Package/simple-obfs-client/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-local $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfs-local $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/simple-obfs-server/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-server $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfs-server $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,simple-obfs))
|
||||
$(eval $(call BuildPackage,simple-obfs-client))
|
||||
$(eval $(call BuildPackage,simple-obfs-server))
|
||||
|
@ -1,156 +0,0 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sing-box
|
||||
PKG_VERSION:=1.5.0-beta.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=571aceb8309ffe634636fdbbc903cda7352fb9f7b01a8b06f9f9038baef5df31
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/sagernet/sing-box
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/sing-box
|
||||
GO_PKG_LDFLAGS_X:=$(GO_PKG)/constant.Version=v$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=The universal proxy platform.
|
||||
URL:=https://sing-box.sagernet.org
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) \
|
||||
+ca-bundle \
|
||||
+kmod-inet-diag \
|
||||
+kmod-netlink-diag \
|
||||
+kmod-tun
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Sing-box is a universal proxy platform which supports hysteria, SOCKS, Shadowsocks,
|
||||
ShadowsocksR, ShadowTLS, Tor, trojan, VLess, VMess, WireGuard and so on.
|
||||
endef
|
||||
|
||||
GO_PKG_TARGET_VARS:=$(filter-out CGO_ENABLED=%,$(GO_PKG_TARGET_VARS)) CGO_ENABLED=0
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
menu "Customizing build tags"
|
||||
depends on PACKAGE_sing-box
|
||||
|
||||
config SING_BOX_WITH_ACME
|
||||
bool "Build with ACME TLS certificate issuer support"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_CLASH_API
|
||||
bool "Build with Clash API support (EXPERIMENTAL!!!)"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_DHCP
|
||||
bool "Build with DHCP support"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_ECH
|
||||
bool "Build with TLS ECH extension support"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_GRPC
|
||||
bool "Build with standard gRPC support"
|
||||
default n
|
||||
help
|
||||
sing-box has better performance gun-lite gRPC built-in by default.
|
||||
This standard gRPC has better compatibility but poor performance.
|
||||
|
||||
config SING_BOX_WITH_GVISOR
|
||||
bool "Build with gVisor support"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_QUIC
|
||||
bool "Build with QUIC support"
|
||||
default y
|
||||
help
|
||||
Required by HTTP3 DNS transports, Naive inbound,
|
||||
Hysteria inbound / outbound, and v2ray QUIC transport.
|
||||
|
||||
config SING_BOX_WITH_REALITY_SERVER
|
||||
bool "Build with reality TLS server support"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_SHADOWSOCKSR
|
||||
bool "Build with ShadowsockR support"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_UTLS
|
||||
bool "Build with uTLS support"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_V2RAY_API
|
||||
bool "Build with V2Ray API support (EXPERIMENTAL!!!)"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_WIREGUARD
|
||||
bool "Build with WireGuard support"
|
||||
default y
|
||||
|
||||
endmenu
|
||||
endef
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_SING_BOX_WITH_ACME \
|
||||
CONFIG_SING_BOX_WITH_CLASH_API \
|
||||
CONFIG_SING_BOX_WITH_DHCP \
|
||||
CONFIG_SING_BOX_WITH_ECH \
|
||||
CONFIG_SING_BOX_WITH_GRPC \
|
||||
CONFIG_SING_BOX_WITH_GVISOR \
|
||||
CONFIG_SING_BOX_WITH_QUIC \
|
||||
CONFIG_SING_BOX_WITH_REALITY_SERVER \
|
||||
CONFIG_SING_BOX_WITH_SHADOWSOCKSR \
|
||||
CONFIG_SING_BOX_WITH_UTLS \
|
||||
CONFIG_SING_BOX_WITH_V2RAY_API \
|
||||
CONFIG_SING_BOX_WITH_WIREGUARD
|
||||
|
||||
GO_PKG_TAGS:=$(subst $(space),$(comma),$(strip \
|
||||
$(if $(CONFIG_SING_BOX_WITH_ACME),with_acme) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_CLASH_API),with_clash_api) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_DHCP),with_dhcp) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_ECH),with_ech) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_GRPC),with_grpc) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_GVISOR),with_gvisor) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_QUIC),with_quic) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_REALITY_SERVER),with_reality_server) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_SHADOWSOCKSR),with_shadowsocksr) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_UTLS),with_utls) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_V2RAY_API),with_v2ray_api) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_WIREGUARD),with_wireguard) \
|
||||
))
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
/etc/sing-box/config.json
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/sing-box.init $(1)/etc/init.d/sing-box
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/sing-box
|
||||
$(INSTALL_DATA) ./files/config.json.example $(1)/etc/sing-box/config.json.example
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,sing-box))
|
||||
$(eval $(call BuildPackage,sing-box))
|
@ -1,296 +0,0 @@
|
||||
{
|
||||
"log": {
|
||||
"disabled": false,
|
||||
"level": "warn",
|
||||
"output": "/tmp/sing-box.log",
|
||||
"timestamp": true
|
||||
},
|
||||
"experimental": {
|
||||
"clash_api": {
|
||||
"external_controller": "0.0.0.0:9090",
|
||||
"external_ui": "",
|
||||
"secret": "********",
|
||||
"default_mode": "rule",
|
||||
"store_selected": true,
|
||||
"cache_file": "cache.db"
|
||||
}
|
||||
},
|
||||
"dns": {
|
||||
"servers": [
|
||||
{
|
||||
"tag": "foreign",
|
||||
"address": "https://1.1.1.1/dns-query"
|
||||
},
|
||||
{
|
||||
"tag": "local",
|
||||
"address": "tls://1.12.12.12",
|
||||
"detour": "direct"
|
||||
},
|
||||
{
|
||||
"tag": "block",
|
||||
"address": "rcode://success"
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"geosite": "category-ads-all",
|
||||
"server": "block",
|
||||
"disable_cache": true
|
||||
},
|
||||
{
|
||||
"domain": "mydomain.com",
|
||||
"geosite": "cn",
|
||||
"server": "local"
|
||||
}
|
||||
],
|
||||
"strategy": "ipv4_only"
|
||||
},
|
||||
"ntp": {
|
||||
"enabled": false,
|
||||
"server": "ntp.aliyun.com",
|
||||
"server_port": 123,
|
||||
"interval": "30m",
|
||||
"detour": "direct"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "tun",
|
||||
"tag": "TUN-in",
|
||||
"interface_name": "sb-tun0",
|
||||
"inet4_address": "172.19.0.1/30",
|
||||
"auto_route": false,
|
||||
"endpoint_independent_nat": true,
|
||||
"stack": "system",
|
||||
"sniff": true
|
||||
},
|
||||
{
|
||||
"type": "mixed",
|
||||
"tag": "SOCKS-in",
|
||||
"listen": "::",
|
||||
"listen_port": *****
|
||||
},
|
||||
{
|
||||
"type": "redirect",
|
||||
"tag": "REDIRECT-in",
|
||||
"listen": "::",
|
||||
"listen_port": *****,
|
||||
"sniff": true
|
||||
},
|
||||
{
|
||||
"type": "tproxy",
|
||||
"tag": "TPROXY-in",
|
||||
"listen": "::",
|
||||
"listen_port": *****,
|
||||
"sniff": true
|
||||
},
|
||||
{
|
||||
"type": "direct",
|
||||
"tag": "DNS-in",
|
||||
"listen": "::",
|
||||
"listen_port": *****,
|
||||
"network": "udp",
|
||||
"sniff": true
|
||||
},
|
||||
{
|
||||
"type": "shadowsocks",
|
||||
"tag": "SS-in",
|
||||
"listen": "::",
|
||||
"listen_port": *****,
|
||||
"sniff": true,
|
||||
"method": "2022-blake3-aes-128-gcm",
|
||||
"password": "bZzjl2DAXUs02L2Sosgu7A==",
|
||||
"users": [
|
||||
{
|
||||
"name": "User1",
|
||||
"password": "SGEFjWc+VgNGBXe1JhoRfg=="
|
||||
},
|
||||
{
|
||||
"name": "User2",
|
||||
"password": "XoXhbj4V9cMXfuUXF/C+cg=="
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "selector",
|
||||
"tag": "Proxy-out",
|
||||
"outbounds": [
|
||||
"URL-Test",
|
||||
"direct",
|
||||
"Shadowsocks-ShadowTLS-out",
|
||||
"Trojan-GRPC-out",
|
||||
"Trojan-WebSocket-out",
|
||||
"Hysteria-out"
|
||||
],
|
||||
"default": "URL-Test"
|
||||
},
|
||||
{
|
||||
"type": "urltest",
|
||||
"tag": "URL-Test",
|
||||
"outbounds": [
|
||||
"Shadowsocks-ShadowTLS-out",
|
||||
"Trojan-GRPC-out",
|
||||
"Trojan-WebSocket-out",
|
||||
"Hysteria-out"
|
||||
],
|
||||
"url": "https://cp.cloudflare.com",
|
||||
"interval": "1m",
|
||||
"tolerance": 50
|
||||
},
|
||||
{
|
||||
"type": "shadowsocks",
|
||||
"tag": "Shadowsocks-ShadowTLS-out",
|
||||
"detour": "Shadowsocks-ShadowTLS",
|
||||
"method": "2022-blake3-aes-128-gcm",
|
||||
"password": "F7cx1ASHX/eqQwed+pISzw==:CB8sXcYLzf1P5dUizIzYVg==",
|
||||
"udp_over_tcp": true,
|
||||
"multiplex": {
|
||||
"enabled": false,
|
||||
"max_connections": 4,
|
||||
"min_streams": 4,
|
||||
"max_streams": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "shadowtls",
|
||||
"tag": "Shadowsocks-ShadowTLS",
|
||||
"server": "***.***.***.***",
|
||||
"server_port": *****,
|
||||
"version": 3,
|
||||
"password": "************",
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"server_name": "something.example.org",
|
||||
"utls": {
|
||||
"enabled": true,
|
||||
"fingerprint": "chrome"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "trojan",
|
||||
"tag": "Trojan-GRPC-out",
|
||||
"server": "***.***.***.***",
|
||||
"server_port": *****,
|
||||
"password": "************",
|
||||
"transport": {
|
||||
"type": "grpc",
|
||||
"service_name": "************"
|
||||
},
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"disable_sni": false,
|
||||
"server_name": "yours.example.org",
|
||||
"utls": {
|
||||
"enabled": true,
|
||||
"fingerprint": "chrome"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "trojan",
|
||||
"tag": "WebSocket-out",
|
||||
"server": "***.***.***.***",
|
||||
"server_port": *****,
|
||||
"password": "************",
|
||||
"transport": {
|
||||
"type": "ws",
|
||||
"path": "/************",
|
||||
"early_data_header_name": "Sec-WebSocket-Protocol"
|
||||
},
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"disable_sni": false,
|
||||
"server_name": "yours.example.org",
|
||||
"utls": {
|
||||
"enabled": true,
|
||||
"fingerprint": "chrome"
|
||||
}
|
||||
},
|
||||
"multiplex": {
|
||||
"enabled": true,
|
||||
"max_connections": 4,
|
||||
"min_streams": 4,
|
||||
"max_streams": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "hysteria",
|
||||
"tag": "Hysteria-out",
|
||||
"server": "***.***.***.***",
|
||||
"server_port": *****,
|
||||
"up_mbps": 100,
|
||||
"down_mbps": ,
|
||||
"obfs": "************",
|
||||
"auth_str": "************",
|
||||
"tls": {
|
||||
"enabled": true,
|
||||
"disable_sni": false,
|
||||
"server_name": "yours.example.org",
|
||||
"alpn": [
|
||||
"h3"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "direct",
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"type": "block",
|
||||
"tag": "block"
|
||||
},
|
||||
{
|
||||
"type": "dns",
|
||||
"tag": "dns-out"
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"geoip": {
|
||||
"path": "/tmp/geoip.db",
|
||||
"download_url": "https://github.com/1715173329/sing-geoip/releases/latest/download/geoip.db",
|
||||
"download_detour": ""
|
||||
},
|
||||
"geosite": {
|
||||
"path": "/tmp/geosite.db",
|
||||
"download_url": "https://github.com/1715173329/sing-geosite/releases/latest/download/geosite.db",
|
||||
"download_detour": ""
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"protocol": "dns",
|
||||
"outbound": "dns-out"
|
||||
},
|
||||
{
|
||||
"protocol": "quic",
|
||||
"outbound": "block"
|
||||
},
|
||||
{
|
||||
"geosite": "category-ads-all",
|
||||
"outbound": "block"
|
||||
},
|
||||
{
|
||||
"geoip": [
|
||||
"telegram"
|
||||
],
|
||||
"outbound": "Trojan-GRPC-out"
|
||||
},
|
||||
{
|
||||
"inbound": [
|
||||
"SOCKS-in"
|
||||
],
|
||||
"outbound": "Proxy-out"
|
||||
},
|
||||
{
|
||||
"geosite": "cn",
|
||||
"geoip": [
|
||||
"cn",
|
||||
"private"
|
||||
],
|
||||
"outbound": "direct"
|
||||
}
|
||||
],
|
||||
"auto_detect_interface": true
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2022 by nekohasekai <contact-sagernet@sekai.icu>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
##### ONLY CHANGE THIS BLOCK ######
|
||||
PROG=/usr/bin/sing-box # where is sing-box
|
||||
RES_DIR=/etc/sing-box/ # resource dir / working dir / the dir where you store ip/domain lists
|
||||
CONF=./config.json # where is the config file, it can be a relative path to $RES_DIR
|
||||
##### ONLY CHANGE THIS BLOCK ######
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG run -D $RES_DIR -c $CONF
|
||||
|
||||
procd_set_param user root
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param limits nofile="1000000 1000000"
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
|
||||
procd_close_instance
|
||||
iptables -I FORWARD -o sb-tun+ -j ACCEPT
|
||||
echo "sing-box is started!"
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
service_stop $PROG
|
||||
iptables -D FORWARD -o sb-tun+ -j ACCEPT
|
||||
echo "sing-box is stopped!"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
sleep 2s
|
||||
echo "sing-box is restarted!"
|
||||
start
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2017-2018 Jian Chang <aa65535@live.com>
|
||||
#
|
||||
# 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:=ssocks
|
||||
PKG_VERSION:=0.0.14
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/tostercx/ssocks.git
|
||||
PKG_SOURCE_DATE:=2020-07-09
|
||||
PKG_SOURCE_VERSION:=c2024789c1ee076d171fd6061d7c133302216ea7
|
||||
PKG_MIRROR_HASH:=3654e9f1fb54646e1e89c19e7aa3e105b84b2e20b5b634662c21c66691d1d22e
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/ssocks/template
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=sSocks
|
||||
URL:=https://github.com/tostercx/ssocks
|
||||
DEPENDS:=+libopenssl
|
||||
endef
|
||||
|
||||
define Package/ssocks
|
||||
$(call Package/ssocks/template)
|
||||
TITLE+= Relay
|
||||
endef
|
||||
|
||||
define Package/ssocksd
|
||||
$(call Package/ssocks/template)
|
||||
TITLE+= Server
|
||||
endef
|
||||
|
||||
define Package/ssocks/description/template
|
||||
sSocks is a package which contains: a socks5 server implements RFC 1928 (SOCKS V5) and
|
||||
RFC 1929 (Authentication for SOCKS V5), a reverse socks server and client, a netcat like tool
|
||||
and a socks5 relay.
|
||||
endef
|
||||
|
||||
Package/ssocks/description = $(Package/ssocks/description/template)
|
||||
Package/ssocksd/description = $(Package/ssocks/description/template)
|
||||
|
||||
define Build/Install
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/ssocks/install/template
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2) $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/ssocks/install
|
||||
$(call Package/ssocks/install/template,$(1),ssocks)
|
||||
endef
|
||||
|
||||
define Package/ssocksd/install
|
||||
$(call Package/ssocks/install/template,$(1),ssocksd)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ssocks))
|
||||
$(eval $(call BuildPackage,ssocksd))
|
@ -1,15 +0,0 @@
|
||||
--- a/CMakeLists.txt 2020-09-07 14:23:49.000000000 +0800
|
||||
+++ b/CMakeLists.txt 2020-09-07 14:23:24.000000000 +0800
|
||||
@@ -11,7 +11,12 @@
|
||||
endif(WIN32)
|
||||
|
||||
add_executable(ssocks src/ssocks.c ${AUX})
|
||||
+INSTALL(TARGETS ssocks RUNTIME DESTINATION bin)
|
||||
add_executable(ssocksd src/ssocksd.c ${AUX})
|
||||
+INSTALL(TARGETS ssocksd RUNTIME DESTINATION bin)
|
||||
add_executable(nsocks src/nsocks.c ${AUX})
|
||||
+INSTALL(TARGETS nsocks RUNTIME DESTINATION bin)
|
||||
add_executable(rcsocks src/rcsocks.c ${AUX})
|
||||
+INSTALL(TARGETS rcsocks RUNTIME DESTINATION bin)
|
||||
add_executable(rssocks src/rssocks.c ${AUX})
|
||||
+INSTALL(TARGETS rssocks RUNTIME DESTINATION bin)
|
@ -1,11 +0,0 @@
|
||||
--- a/src/configd-util.h 2020-07-09 05:30:54.000000000 +0800
|
||||
+++ b/src/configd-util.h 2020-09-08 19:35:11.000000000 +0800
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
|
||||
-struct globalArgsServer_t {
|
||||
+static struct globalArgsServer_t {
|
||||
char fileauth[255]; // -a option
|
||||
char fileconfig[255]; // -f option
|
||||
char filelog[255]; // -l option
|
@ -1,41 +1,29 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt-dist
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
|
||||
PKG_NAME:=tcping
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/Mattraks/tcping/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=c703481d1751adf051dd3391c4dccdadc6dfca7484e636222b392e1213312e02
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=license.txt
|
||||
PKG_LICENSE_FILE:=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)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
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
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=tcping measures the latency of a tcp-connection
|
||||
URL:=https://github.com/jlyo/tcping
|
||||
endef
|
||||
|
||||
define Package/tcping/install
|
||||
|
@ -1,49 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=trojan-go
|
||||
PKG_VERSION:=0.10.6
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/p4gefau1t/trojan-go/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=925f02647dda944813f1eab0b71eac98b83eb5964ef5a6f63e89bc7eb4486c1f
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/p4gefau1t/trojan-go
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG)/constant.Version=$(PKG_VERSION) \
|
||||
$(GO_PKG)/constant.Commit=v$(PKG_VERSION)
|
||||
GO_PKG_TAGS:=full
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/trojan-go
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=A Trojan proxy written in Go
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
URL:=https://p4gefau1t.github.io/trojan-go/
|
||||
endef
|
||||
|
||||
define Package/trojan-go/description
|
||||
Trojan features multiple protocols over TLS to avoid both
|
||||
active/passive detections and ISP QoS limitations.
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,trojan-go))
|
||||
$(eval $(call BuildPackage,trojan-go))
|
@ -1,69 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2018-2019 wongsyrone
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=trojan-plus
|
||||
PKG_VERSION:=10.0.3
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/peter-tank/trojan-plus.git
|
||||
PKG_SOURCE_DATE:=2020-09-06
|
||||
PKG_SOURCE_VERSION:=a6394cdd718669b0c7491493a78e61f6f0f899b3
|
||||
PKG_MIRROR_HASH:=2d37d09fe6d39d7981116ad387706f58f2b30b74a34e27fc5608f267dacc9208
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=openssl
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
PKG_MAINTAINER:=Trojan-Plus-Group
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
TARGET_CXXFLAGS += -Wall -Wextra
|
||||
TARGET_CXXFLAGS += $(FPIC)
|
||||
|
||||
# LTO
|
||||
TARGET_CXXFLAGS += -flto
|
||||
TARGET_LDFLAGS += -flto
|
||||
|
||||
# CXX standard
|
||||
TARGET_CXXFLAGS += -std=c++11
|
||||
TARGET_CXXFLAGS := $(filter-out -O%,$(TARGET_CXXFLAGS)) -O3
|
||||
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DENABLE_MYSQL=OFF \
|
||||
-DENABLE_NAT=ON \
|
||||
-DENABLE_REUSE_PORT=ON \
|
||||
-DENABLE_SSL_KEYLOG=ON \
|
||||
-DENABLE_TLS13_CIPHERSUITES=ON \
|
||||
-DFORCE_TCP_FASTOPEN=OFF \
|
||||
-DSYSTEMD_SERVICE=OFF \
|
||||
-DOPENSSL_USE_STATIC_LIBS=FALSE \
|
||||
-DBoost_DEBUG=ON \
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
|
||||
define Package/trojan-plus
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=An unidentifiable mechanism that helps you bypass GFW. It's compatible with original trojan with experimental features.
|
||||
URL:=https://github.com/Trojan-Plus-Group/trojan-plus
|
||||
DEPENDS:= \
|
||||
+libpthread +libstdcpp +libopenssl \
|
||||
+boost +boost-system +boost-program_options
|
||||
endef
|
||||
|
||||
define Package/trojan-plus/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/trojan-plus
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,trojan-plus))
|
@ -50,13 +50,14 @@ CMAKE_OPTIONS += \
|
||||
-DBoost_NO_BOOST_CMAKE=ON
|
||||
|
||||
define Package/trojan
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=An unidentifiable mechanism that helps you bypass GFW
|
||||
URL:=https://github.com/trojan-gfw/trojan
|
||||
DEPENDS:= \
|
||||
+libpthread +libstdcpp +libopenssl \
|
||||
+boost +boost-system +boost-program_options +boost-date_time
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=An unidentifiable mechanism that helps you bypass GFW
|
||||
URL:=https://github.com/trojan-gfw/trojan
|
||||
DEPENDS:= \
|
||||
+libpthread +libstdcpp +libopenssl \
|
||||
+boost +boost-system +boost-program_options +boost-date_time
|
||||
endef
|
||||
|
||||
define Package/trojan/install
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -43,7 +43,7 @@ if(MSVC)
|
||||
add_definitions(-DBOOST_DATE_TIME_NO_LIB)
|
||||
endif()
|
||||
|
||||
-find_package(OpenSSL 1.1.0 REQUIRED)
|
||||
+find_package(OpenSSL 1.1.1 REQUIRED)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
target_link_libraries(trojan ${OPENSSL_LIBRARIES})
|
||||
if(OPENSSL_VERSION VERSION_GREATER_EQUAL 1.1.1)
|
@ -19,8 +19,7 @@ TUIC_FOOT:=unknown-linux-musl
|
||||
ifeq ($(ARCH),aarch64)
|
||||
TUIC_ARCH:=$(TUIC_TYPE)-aarch64-$(TUIC_FOOT)
|
||||
PKG_HASH:=c29eaaf3bc05115acc7453ac26bacf9aff65211b1e8ca7f771b818248bec8601
|
||||
else ifeq ($(ARCH),arm)
|
||||
# Referred to golang/golang-values.mk
|
||||
else ifeq ($ARCH),arm64)
|
||||
ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
|
||||
ifeq ($(ARM_CPU_FEATURES),)
|
||||
TUIC_ARCH:=$(TUIC_TYPE)-armv7-$(TUIC_FOOT)eabi
|
||||
@ -29,16 +28,12 @@ else ifeq ($(ARCH),arm)
|
||||
TUIC_ARCH:=$(TUIC_TYPE)-armv7-$(TUIC_FOOT)eabihf
|
||||
PKG_HASH:=e2cc1d81ac376ff2a94976e78c861f5cd21ad809ff5b587ae967e2a63e4c35e4
|
||||
endif
|
||||
else ifeq ($(ARCH),i386)
|
||||
else ifeq ($(ARCH),i686)
|
||||
TUIC_ARCH:=$(TUIC_TYPE)-i686-$(TUIC_FOOT)
|
||||
PKG_HASH:=67d930b4381a8848bf98acbccb538c73b72ca9dde0aed3705f73e62a9922f758
|
||||
else ifeq ($(ARCH),x86_64)
|
||||
TUIC_ARCH:=$(TUIC_TYPE)-x86_64-$(TUIC_FOOT)
|
||||
PKG_HASH:=180c562691247a7feddf553706bc8fd5b5b9de3027154f94a767ea907a45e2de
|
||||
# Set the default value to make OpenWrt Package Checker happy
|
||||
else
|
||||
PKG_SOURCE:=dummy
|
||||
PKG_HASH:=dummy
|
||||
endif
|
||||
|
||||
define Download/tuic-client
|
||||
@ -54,7 +49,8 @@ define Package/tuic-client
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Delicately-TUICed 0-RTT proxy protocol
|
||||
URL:=https://github.com/EAimTY/tuic/
|
||||
DEPENDS:=@USE_MUSL @(aarch64||arm||i386||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy)
|
||||
DEPENDS:=@USE_MUSL @(aarch64||arm64||i686||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy)
|
||||
#PKGARCH:=all aarch64 arm i686 x86_64
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
@ -70,6 +66,7 @@ endef
|
||||
define Package/tuic-client/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(DL_DIR)/$(TUIC_ARCH) $(1)/usr/bin/tuic-client
|
||||
chmod +x $(1)/usr/bin/tuic-client
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tuic-client))
|
||||
|
@ -19,7 +19,6 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/v2fly/v2ray-core/v5
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/main
|
||||
@ -42,13 +41,6 @@ define Package/v2ray-core
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
endef
|
||||
|
||||
define Package/v2ray-example
|
||||
$(call Package/v2ray/template)
|
||||
TITLE+= (example configs)
|
||||
DEPENDS:=v2ray-core
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra
|
||||
$(call Package/v2ray/template)
|
||||
TITLE+= (extra resources)
|
||||
@ -65,41 +57,16 @@ define Package/v2ray-core/description
|
||||
$(call Package/v2ray/description)
|
||||
endef
|
||||
|
||||
define Package/v2ray-example/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes example configuration files for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra/description
|
||||
$(call Package/v2ray/description)
|
||||
|
||||
This includes extra resources for v2ray-core.
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/conffiles
|
||||
/etc/config/v2ray
|
||||
/etc/v2ray/
|
||||
endef
|
||||
|
||||
define Package/v2ray-core/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/v2ray
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/config.json $(1)/etc/v2ray/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) $(CURDIR)/files/v2ray.conf $(1)/etc/config/v2ray
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/v2ray.init $(1)/etc/init.d/v2ray
|
||||
endef
|
||||
|
||||
define Package/v2ray-example/install
|
||||
$(INSTALL_DIR) $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_socks_vmess.json $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_vmess_freedom.json $(1)/etc/v2ray/
|
||||
endef
|
||||
|
||||
define Package/v2ray-extra/install
|
||||
@ -108,5 +75,4 @@ define Package/v2ray-extra/install
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,v2ray-core))
|
||||
$(eval $(call BuildPackage,v2ray-example))
|
||||
$(eval $(call BuildPackage,v2ray-extra))
|
||||
|
@ -1,11 +0,0 @@
|
||||
|
||||
config v2ray 'enabled'
|
||||
option enabled '0'
|
||||
|
||||
config v2ray 'config'
|
||||
option confdir '/etc/v2ray'
|
||||
list conffiles '/etc/v2ray/config.json'
|
||||
option datadir '/usr/share/v2ray'
|
||||
option format 'json'
|
||||
option memconservative '1'
|
||||
|
@ -1,57 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
USE_PROCD=1
|
||||
START=99
|
||||
|
||||
CONF="v2ray"
|
||||
PROG="/usr/bin/v2ray"
|
||||
|
||||
start_service() {
|
||||
config_load "$CONF"
|
||||
|
||||
local enabled
|
||||
config_get_bool enabled "enabled" "enabled" "0"
|
||||
[ "$enabled" -eq "0" ] && exit 1
|
||||
|
||||
local confdir
|
||||
local conffiles
|
||||
local datadir
|
||||
local format
|
||||
|
||||
config_get confdir "config" "confdir"
|
||||
config_get conffiles "config" "conffiles"
|
||||
config_get datadir "config" "datadir" "/usr/share/v2ray"
|
||||
config_get format "config" "format" "json"
|
||||
config_get_bool memconservative "config" "memconservative" "1"
|
||||
|
||||
procd_open_instance "$CONF"
|
||||
procd_set_param command "$PROG" run
|
||||
[ -n "$confdir" ] && procd_append_param command -confdir "$confdir"
|
||||
[ -n "$conffiles" ] && {
|
||||
for i in $conffiles
|
||||
do
|
||||
procd_append_param command -config "$i"
|
||||
done
|
||||
}
|
||||
[ -n "$format" ] && procd_append_param command -format "$format"
|
||||
procd_set_param env v2ray.local.asset="$datadir"
|
||||
[ "$memconservative" -eq "1" ] && procd_append_param env V2RAY_CONF_GEOLOADER="memconservative"
|
||||
procd_set_param file $conffiles
|
||||
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param limits nofile="1000000 1000000"
|
||||
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 "$CONF"
|
||||
}
|
@ -5,29 +5,29 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-geodata
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
GEOIP_VER:=202302090046
|
||||
GEOIP_VER:=202210200105
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
define Download/geoip
|
||||
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=38e200a655c3e401dde6a438e79d493c3dbdd224e104a5158bef01f78ad4a151
|
||||
HASH:=08b8039a1a3f6fca59864b658bd0b0698588a950dc08ff76e83d3e204fc10679
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20230208103804
|
||||
GEOSITE_VER:=20221023064040
|
||||
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
||||
define Download/geosite
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=479fe1557bf873a2951483315eb75d769e7e74e4523fd130c6762b30b7c49a2c
|
||||
HASH:=d1706f66a29795fa29093f85a6cd620854c53911c0b437ba80d81953280d7bf7
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/template
|
||||
|
@ -20,7 +20,6 @@ PKG_MAINTAINER:=madeye <max.c.lv@gmail.com>
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
||||
GO_PKG_LDFLAGS_X:=main.VERSION=v$(PKG_VERSION)
|
||||
|
@ -1,6 +1,6 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=Xray-core
|
||||
PKG_NAME:=xray-core
|
||||
PKG_VERSION:=1.8.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
@ -12,12 +12,13 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=MPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/Xray-core-$(PKG_VERSION)
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/xtls/xray-core
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/main
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG)/core.build=OpenWrt \
|
||||
@ -26,64 +27,23 @@ GO_PKG_LDFLAGS_X:= \
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/xray/template
|
||||
define Package/xray-core
|
||||
TITLE:=A platform for building proxies to bypass network restrictions
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
URL:=https://xtls.github.io
|
||||
endef
|
||||
|
||||
define Package/xray-core
|
||||
$(call Package/xray/template)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
endef
|
||||
|
||||
define Package/xray-example
|
||||
$(call Package/xray/template)
|
||||
TITLE+= (example configs)
|
||||
DEPENDS:=xray-core
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/xray/description
|
||||
define Package/xray-core/description
|
||||
Xray, Penetrates Everything. It helps you to build your own computer network.
|
||||
It secures your network connections and thus protects your privacy.
|
||||
endef
|
||||
|
||||
define Package/xray-core/description
|
||||
$(call Package/xray/description)
|
||||
endef
|
||||
|
||||
define Package/xray-example/description
|
||||
$(call Package/xray/description)
|
||||
|
||||
This includes example configuration files for xray-core.
|
||||
endef
|
||||
|
||||
define Package/xray-core/conffiles
|
||||
/etc/xray/
|
||||
/etc/config/xray
|
||||
endef
|
||||
|
||||
define Package/xray-core/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/xray
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/xray/
|
||||
$(INSTALL_DATA) $(CURDIR)/files/config.json.example $(1)/etc/xray/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) $(CURDIR)/files/xray.conf $(1)/etc/config/xray
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/xray.init $(1)/etc/init.d/xray
|
||||
endef
|
||||
|
||||
define Package/xray-example/install
|
||||
$(INSTALL_DIR) $(1)/etc/xray/
|
||||
$(INSTALL_DATA) $(CURDIR)/files/vpoint_socks_vmess.json $(1)/etc/xray/
|
||||
$(INSTALL_DATA) $(CURDIR)/files/vpoint_vmess_freedom.json $(1)/etc/xray/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,xray-core))
|
||||
$(eval $(call BuildPackage,xray-example))
|
||||
|
@ -1,144 +0,0 @@
|
||||
// Config file of Xray. This file follows standard JSON format, with comments support.
|
||||
// Uncomment entries below to satisfy your needs. Also read our manual for more detail at
|
||||
// https://xtls.github.io/en/config/
|
||||
{
|
||||
"log": {
|
||||
// By default, Xray writes access log to stdout.
|
||||
// "access": "/path/to/access/log/file",
|
||||
|
||||
// By default, Xray write error log to stdout.
|
||||
// "error": "/path/to/error/log/file",
|
||||
|
||||
// Log level, one of "debug", "info", "warning", "error", "none"
|
||||
"loglevel": "warning"
|
||||
},
|
||||
// List of inbound proxy configurations.
|
||||
"inbounds": [{
|
||||
// Port to listen on. You may need root access if the value is less than 1024.
|
||||
"port": 1080,
|
||||
|
||||
// IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
|
||||
"listen": "127.0.0.1",
|
||||
|
||||
// Tag of the inbound proxy. May be used for routing.
|
||||
"tag": "socks-inbound",
|
||||
|
||||
// Protocol name of inbound proxy.
|
||||
"protocol": "socks",
|
||||
|
||||
// Settings of the protocol. Varies based on protocol.
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1"
|
||||
},
|
||||
|
||||
// Enable sniffing on TCP connection.
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
// Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS.
|
||||
"destOverride": ["http", "tls"]
|
||||
}
|
||||
}],
|
||||
// List of outbound proxy configurations.
|
||||
"outbounds": [{
|
||||
// Protocol name of the outbound proxy.
|
||||
"protocol": "freedom",
|
||||
|
||||
// Settings of the protocol. Varies based on protocol.
|
||||
"settings": {},
|
||||
|
||||
// Tag of the outbound. May be used for routing.
|
||||
"tag": "direct"
|
||||
},{
|
||||
"protocol": "blackhole",
|
||||
"settings": {},
|
||||
"tag": "blocked"
|
||||
}],
|
||||
|
||||
// Transport is for global transport settings. If you have multiple transports with same settings
|
||||
// (say mKCP), you may put it here, instead of in each individual inbound/outbounds.
|
||||
//"transport": {},
|
||||
|
||||
// Routing controls how traffic from inbounds are sent to outbounds.
|
||||
"routing": {
|
||||
"domainStrategy": "IPOnDemand",
|
||||
"rules":[
|
||||
{
|
||||
// Blocks access to private IPs. Remove this if you want to access your router.
|
||||
"type": "field",
|
||||
"ip": ["geoip:private"],
|
||||
"outboundTag": "blocked"
|
||||
},
|
||||
{
|
||||
// Blocks major ads.
|
||||
"type": "field",
|
||||
"domain": ["geosite:category-ads"],
|
||||
"outboundTag": "blocked"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// Dns settings for domain resolution.
|
||||
"dns": {
|
||||
// Static hosts, similar to hosts file.
|
||||
"hosts": {
|
||||
// Match v2ray.com to another domain on CloudFlare. This domain will be used when querying IPs for v2ray.com.
|
||||
"domain:v2ray.com": "www.vicemc.net",
|
||||
|
||||
// The following settings help to eliminate DNS poisoning in mainland China.
|
||||
// It is safe to comment these out if this is not the case for you.
|
||||
"domain:github.io": "pages.github.com",
|
||||
"domain:wikipedia.org": "www.wikimedia.org",
|
||||
"domain:shadowsocks.org": "electronicsrealm.com"
|
||||
},
|
||||
"servers": [
|
||||
"1.1.1.1",
|
||||
{
|
||||
"address": "114.114.114.114",
|
||||
"port": 53,
|
||||
// List of domains that use this DNS first.
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
]
|
||||
},
|
||||
"8.8.8.8",
|
||||
"localhost"
|
||||
]
|
||||
},
|
||||
|
||||
// Policy controls some internal behavior of how Xray handles connections.
|
||||
// It may be on connection level by user levels in 'levels', or global settings in 'system.'
|
||||
"policy": {
|
||||
// Connection policys by user levels
|
||||
"levels": {
|
||||
"0": {
|
||||
"uplinkOnly": 0,
|
||||
"downlinkOnly": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"statsInboundUplink": false,
|
||||
"statsInboundDownlink": false,
|
||||
"statsOutboundUplink": false,
|
||||
"statsOutboundDownlink": false
|
||||
}
|
||||
},
|
||||
|
||||
// Stats enables internal stats counter.
|
||||
// This setting can be used together with Policy and Api.
|
||||
//"stats":{},
|
||||
|
||||
// Api enables gRPC APIs for external programs to communicate with Xray instance.
|
||||
//"api": {
|
||||
//"tag": "api",
|
||||
//"services": [
|
||||
// "HandlerService",
|
||||
// "LoggerService",
|
||||
// "StatsService"
|
||||
//]
|
||||
//},
|
||||
|
||||
// You may add other entries to the configuration, but they will not be recognized by Xray.
|
||||
"other": {}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"inbounds": [{
|
||||
"port": 1080,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": false,
|
||||
"ip": "127.0.0.1"
|
||||
}
|
||||
}],
|
||||
"outbounds": [{
|
||||
"protocol": "freedom",
|
||||
"settings": {},
|
||||
"tag": "direct"
|
||||
}],
|
||||
"policy": {
|
||||
"levels": {
|
||||
"0": {"uplinkOnly": 0}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
{
|
||||
"inbounds": [{
|
||||
"port": 10086,
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
|
||||
"level": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}],
|
||||
"outbounds": [{
|
||||
"protocol": "freedom",
|
||||
"settings": {}
|
||||
},{
|
||||
"protocol": "blackhole",
|
||||
"settings": {},
|
||||
"tag": "blocked"
|
||||
}],
|
||||
"routing": {
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"ip": ["geoip:private"],
|
||||
"outboundTag": "blocked"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
|
||||
config xray 'enabled'
|
||||
option enabled '0'
|
||||
|
||||
config xray 'config'
|
||||
option confdir '/etc/xray'
|
||||
list conffiles '/etc/xray/config.json'
|
||||
option datadir '/usr/share/v2ray'
|
||||
option dialer ''
|
||||
option format 'json'
|
||||
|
@ -1,58 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
USE_PROCD=1
|
||||
START=99
|
||||
|
||||
CONF="xray"
|
||||
PROG="/usr/bin/xray"
|
||||
|
||||
start_service() {
|
||||
config_load "$CONF"
|
||||
|
||||
local enabled
|
||||
config_get enabled "enabled" "enabled" "0"
|
||||
[ "$enabled" -eq "0" ] && exit 1
|
||||
|
||||
local confdir
|
||||
local conffiles
|
||||
local datadir
|
||||
local dialer
|
||||
local format
|
||||
|
||||
config_get confdir "config" "confdir"
|
||||
config_get conffiles "config" "conffiles"
|
||||
config_get datadir "config" "datadir" "/usr/share/v2ray"
|
||||
config_get dialer "config" "dialer"
|
||||
config_get format "config" "format" "json"
|
||||
|
||||
procd_open_instance "$CONF"
|
||||
procd_set_param command "$PROG" run
|
||||
[ -n "$confdir" ] && procd_append_param command -confdir "$confdir"
|
||||
[ -n "$conffiles" ] && {
|
||||
for i in $conffiles
|
||||
do
|
||||
procd_append_param command -config "$i"
|
||||
done
|
||||
}
|
||||
[ -n "$format" ] && procd_append_param command -format "$format"
|
||||
[ -n "$dialer" ] && procd_set_param env XRAY_BROWSER_DIALER="$dialer"
|
||||
procd_set_param env XRAY_LOCATION_ASSET="$datadir"
|
||||
procd_set_param file $conffiles
|
||||
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param limits nofile="1000000 1000000"
|
||||
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 "$CONF"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
@ -19,7 +19,6 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/teddysun/xray-plugin
|
||||
|
||||
@ -35,10 +34,5 @@ define Package/xray-plugin
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
endef
|
||||
|
||||
define Package/xray-plugin/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/xray-plugin $(1)/usr/bin/xray-plugin
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,xray-plugin))
|
||||
$(eval $(call BuildPackage,xray-plugin))
|
||||
|
Loading…
Reference in New Issue
Block a user