🏅 Sync 2023-12-04 07:24:26

This commit is contained in:
github-actions[bot] 2023-12-04 07:24:26 +08:00
parent fa347c7282
commit 7d9b30312c
24 changed files with 608 additions and 156 deletions

View File

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dns2tcp
PKG_VERSION:=1.1.0
PKG_RELEASE:=10
PKG_RELEASE:=11
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/zfl9/dns2tcp.git
@ -20,6 +20,7 @@ PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_BUILD_FLAGS:=no-mips16
include $(INCLUDE_DIR)/package.mk

View File

@ -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:=7
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
PKG_SOURCE_DATE:=2023-04-05
PKG_SOURCE_VERSION:=28b7b6c507eb808567e3aea446cd259f7691fddc
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=gn
PKG_RELEASE:=8
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:=skip
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))
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))

View File

@ -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')

View File

@ -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_

View File

@ -5,8 +5,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hysteria
PKG_VERSION:=2.2.0
PKG_RELEASE:=56
PKG_VERSION:=2.2.2
PKG_RELEASE:=57
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/apernet/hysteria/tar.gz/app/v$(PKG_VERSION)?

View File

@ -5,8 +5,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=naiveproxy
PKG_VERSION:=113.0.5672.62-2
PKG_RELEASE:=93
PKG_VERSION:=113.0.5672.62-1
PKG_RELEASE:=94
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
@ -43,7 +43,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||TARGET_gemini) +libatomic
DEPENDS:=@!(arc||armeb||mips||mips64||powerpc||riscv64||TARGET_gemini) +libatomic
endef
define Package/naiveproxy/description

View File

@ -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>
-

View File

@ -71,7 +71,6 @@ 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"
@ -82,9 +81,11 @@ case "${target_arch}" in
else
naive_flags+=" arm_float_abi=\"soft\" arm_use_neon=false"
fi
;;
"arm64")
[ -n "${cpu_type}" ] && naive_flags+=" arm_cpu=\"${cpu_type}\""
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\""

View File

@ -1,55 +1,63 @@
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copyright (C) 2017-2019 Jian Chang <aa65535@live.com>
# Copyright (C) 2021 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:=simple-obfs
PKG_VERSION:=0.0.5
PKG_RELEASE:=17
PKG_RELEASE:=18
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/shadowsocks/simple-obfs.git
PKG_SOURCE_DATE:=2019-08-17
PKG_SOURCE_VERSION:=486bebd9208539058e57e23a12f23103016e09b4
PKG_MIRROR_HASH:=skip
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_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_LICENSE_FILES:=COPYING LICENSE
PKG_MAINTAINER:=Jian Chang <aa65535@live.com>
PKG_BUILD_DEPENDS:=libev
PKG_FIXUP:=autoreconf
PKG_BUILD_PARALLEL:=1
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
include $(INCLUDE_DIR)/package.mk
define Package/simple-obfs/template
SECTION:=net
CATEGORY:=Network
TITLE:=A simple obfuscating tool
URL:=https://github.com/shadowsocks/simple-obfs
DEPENDS:=+libpthread +libev
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
endef
define Package/simple-obfs-client
$(call Package/simple-obfs/template)
TITLE+= (client)
PROVIDES:=simple-obfs
endef
Package/simple-obfs-server = $(Package/simple-obfs)
define Package/simple-obfs-server
$(call Package/simple-obfs/template)
TITLE+= (server)
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
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 += \
@ -57,15 +65,21 @@ CONFIGURE_ARGS += \
--disable-documentation \
--disable-assert
define Package/simple-obfs-client/install
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
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfs-local $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-local $(1)/usr/bin
endef
define Package/simple-obfs-server/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfs-server $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/obfs-server $(1)/usr/bin
endef
$(eval $(call BuildPackage,simple-obfs-client))
$(eval $(call BuildPackage,simple-obfs))
$(eval $(call BuildPackage,simple-obfs-server))

View File

@ -1,29 +1,41 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
# 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:=25
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/Mattraks/tcping/tar.gz/$(PKG_VERSION)?
PKG_HASH:=skip
PKG_RELEASE:=26
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILE:=license.txt
PKG_LICENSE_FILES:=license.txt
PKG_BUILD_PARALLEL:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Lienol/tcping
PKG_MIRROR_HASH:=skip
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
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

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=trojan
PKG_VERSION:=1.16.0
PKG_RELEASE:=10
PKG_RELEASE:=11
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/trojan-gfw/trojan/tar.gz/v$(PKG_VERSION)?
@ -50,14 +50,13 @@ CMAKE_OPTIONS += \
-DBoost_NO_BOOST_CMAKE=ON
define Package/trojan
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
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
endef
define Package/trojan/install

View File

@ -0,0 +1,11 @@
--- 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)

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tuic-client
PKG_VERSION:=1.0.0
PKG_RELEASE:=8
PKG_RELEASE:=9
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
@ -72,4 +72,4 @@ define Package/tuic-client/install
$(INSTALL_BIN) $(DL_DIR)/$(TUIC_ARCH) $(1)/usr/bin/tuic-client
endef
$(eval $(call BuildPackage,tuic-client))
$(eval $(call BuildPackage,tuic-client))

View File

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-core
PKG_VERSION:=5.12.1
PKG_RELEASE:=66
PKG_RELEASE:=67
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
@ -42,6 +42,13 @@ 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)
@ -58,16 +65,41 @@ 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
@ -76,4 +108,5 @@ define Package/v2ray-extra/install
endef
$(eval $(call BuildPackage,v2ray-core))
$(eval $(call BuildPackage,v2ray-example))
$(eval $(call BuildPackage,v2ray-extra))

View File

@ -0,0 +1,11 @@
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'

57
v2ray-core/files/v2ray.init Executable file
View File

@ -0,0 +1,57 @@
#!/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"
}

View File

@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-geodata
PKG_RELEASE:=32
PKG_RELEASE:=33
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
GEOIP_VER:=202210200105
GEOIP_VER:=202311230040
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
define Download/geoip
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
@ -21,7 +21,7 @@ define Download/geoip
HASH:=skip
endef
GEOSITE_VER:=20221023064040
GEOSITE_VER:=20231122065640
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=xray-core
PKG_NAME:=Xray-core
PKG_VERSION:=1.8.6
PKG_RELEASE:=73
PKG_RELEASE:=74
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
@ -12,14 +12,12 @@ 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 \
@ -28,23 +26,64 @@ GO_PKG_LDFLAGS_X:= \
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/xray-core
define Package/xray/template
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-core/description
define Package/xray-example
$(call Package/xray/template)
TITLE+= (example configs)
DEPENDS:=xray-core
PKGARCH:=all
endef
define Package/xray/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))

View File

@ -0,0 +1,144 @@
// 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": {}
}

View File

@ -0,0 +1,25 @@
{
"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}
}
}
}

View File

@ -0,0 +1,31 @@
{
"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"
}
]
}
}

11
xray-core/files/xray.conf Normal file
View File

@ -0,0 +1,11 @@
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'

58
xray-core/files/xray.init Executable file
View File

@ -0,0 +1,58 @@
#!/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"
}

View File

@ -1,12 +1,12 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2022 ImmortalWrt.org
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=xray-plugin
PKG_VERSION:=1.8.6
PKG_RELEASE:=62
PKG_RELEASE:=63
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/teddysun/xray-plugin/tar.gz/v$(PKG_VERSION)?
@ -35,5 +35,10 @@ 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))