mirror of
https://github.com/outbackdingo/openwrt-passwall-packages.git
synced 2026-01-27 10:19:59 +00:00
packages: import
This commit is contained in:
79
brook/Makefile
Normal file
79
brook/Makefile
Normal file
@@ -0,0 +1,79 @@
|
||||
# Copyright (C) 2020 xiaorouji
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=brook
|
||||
PKG_VERSION:=20200909
|
||||
PKG_RELEASE:=1
|
||||
|
||||
ifeq ($(ARCH),i386)
|
||||
PKG_ARCH:=386
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
PKG_ARCH:=amd64
|
||||
endif
|
||||
ifeq ($(ARCH),mipsel)
|
||||
PKG_ARCH:=mipsle
|
||||
endif
|
||||
ifeq ($(ARCH),mips)
|
||||
PKG_ARCH:=mips
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
PKG_ARCH:=arm7
|
||||
endif
|
||||
ifeq ($(BOARD),bcm53xx)
|
||||
PKG_ARCH:=arm6
|
||||
endif
|
||||
ifeq ($(BOARD),kirkwood)
|
||||
PKG_ARCH:=arm5
|
||||
endif
|
||||
ifeq ($(ARCH),arm64)
|
||||
PKG_ARCH:=arm64
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
PKG_ARCH:=arm64
|
||||
endif
|
||||
|
||||
PKG_FILE:=$(PKG_NAME)_$(PKG_VERSION)_$(PKG_ARCH)
|
||||
PKG_URL:=https://github.com/txthinking/brook/releases/download/v$(PKG_VERSION)/$(PKG_NAME)_linux_$(PKG_ARCH)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_VERSION)
|
||||
PKG_HASH:=skip
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Brook is a cross-platform proxy software
|
||||
DEPENDS:=
|
||||
URL:=https://github.com/txthinking/brook
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Brook is a cross-platform proxy software
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
if [ ! -f $(DL_DIR)/$(PKG_FILE) ] ; then \
|
||||
curl -f --connect-timeout 20 --retry 5 --location --insecure $(PKG_URL) -o $(DL_DIR)/$(PKG_FILE); \
|
||||
fi
|
||||
rm -r $(PKG_BUILD_DIR)
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
cp -f $(DL_DIR)/$(PKG_FILE) $(PKG_BUILD_DIR)/$(PKG_NAME)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/brook
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
43
chinadns-ng/Makefile
Normal file
43
chinadns-ng/Makefile
Normal file
@@ -0,0 +1,43 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=chinadns-ng
|
||||
PKG_VERSION:=1.0-beta.22
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/zfl9/chinadns-ng.git
|
||||
PKG_SOURCE_VERSION:=90e9f263fa6b4954d52dfa2f36948968269bc73b
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=pexcn <i@pexcn.me>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/chinadns-ng
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=ChinaDNS next generation, refactoring with epoll and ipset
|
||||
URL:=https://github.com/zfl9/chinadns-ng
|
||||
DEPENDS:=+ipset
|
||||
endef
|
||||
|
||||
define Package/chinadns-ng/description
|
||||
ChinaDNS next generation, refactoring with epoll and ipset.
|
||||
endef
|
||||
|
||||
define Package/chinadns-ng/conffiles
|
||||
endef
|
||||
|
||||
define Package/chinadns-ng/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/chinadns-ng $(1)/usr/bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,chinadns-ng))
|
||||
66
dns2socks/Makefile
Normal file
66
dns2socks/Makefile
Normal file
@@ -0,0 +1,66 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dns2socks
|
||||
PKG_VERSION:=2.1
|
||||
PKG_RELEASE:=20200218
|
||||
|
||||
PKG_SOURCE:=SourceCode.zip
|
||||
PKG_SOURCE_SUBDIR:=DNS2SOCKS
|
||||
PKG_SOURCE_URL:=@SF/dns2socks
|
||||
PKG_MD5SUM:=ec82de936ad004cc940502cd2a1bff5b
|
||||
|
||||
PKG_MAINTAINER:=ghostmaker
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dns2socks/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=IP Addresses and Names
|
||||
TITLE:=The utility to resolve DNS requests via a SOCKS5 tunnel.
|
||||
URL:=http://dns2socks.sourceforge.net/
|
||||
MAINTAINER:=ghostmaker
|
||||
DEPENDS:=+libpthread
|
||||
endef
|
||||
|
||||
define Package/dns2socks
|
||||
$(call Package/dns2socks/Default)
|
||||
endef
|
||||
|
||||
define Package/dns2socks/description
|
||||
This is a utility to resolve DNS requests via a SOCKS5 tunnel and caches the answers.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
unzip $(DL_DIR)/$(PKG_SOURCE) -d $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(TARGET_CC) \
|
||||
$(TARGET_CFLAGS) \
|
||||
$(TARGET_CPPFLAGS) \
|
||||
$(FPIC) \
|
||||
-o $(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/$(PKG_NAME) \
|
||||
$(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/DNS2SOCKS.c \
|
||||
$(TARGET_LDFLAGS) -pthread
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
endef
|
||||
|
||||
define Package/dns2socks/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/$(PKG_NAME) $(1)/usr/bin/dns2socks
|
||||
endef
|
||||
|
||||
#$(shell $(RM) $(DL_DIR)/$(PKG_SOURCE))
|
||||
|
||||
$(eval $(call BuildPackage,dns2socks))
|
||||
39
ipt2socks/Makefile
Normal file
39
ipt2socks/Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# 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:=ipt2socks
|
||||
PKG_VERSION:=1.1.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/zfl9/ipt2socks.git
|
||||
PKG_SOURCE_VERSION:=384dab4bae5ed9402e07ec1950e502c05812bc26
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/ipt2socks
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Utility for converting iptables (REDIRECT/TPROXY) to SOCKS5
|
||||
URL:=https://github.com/zfl9/ipt2socks
|
||||
endef
|
||||
|
||||
define Package/ipt2socks/description
|
||||
Utility for converting iptables (REDIRECT/TPROXY) to SOCKS5.
|
||||
endef
|
||||
|
||||
define Package/ipt2socks/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ipt2socks $(1)/usr/bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ipt2socks))
|
||||
65
kcptun/Makefile
Normal file
65
kcptun/Makefile
Normal file
@@ -0,0 +1,65 @@
|
||||
#
|
||||
# Copyright (C) 2019 Xingwang Liao
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=kcptun
|
||||
PKG_VERSION:=20201126
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/xtaci/kcptun/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=cb4cc62fe6a9f3452f20ada676996b48039f091bdae25943955ac9e2299a9c09
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE.md
|
||||
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/xtaci/kcptun
|
||||
|
||||
GO_PKG_LDFLAGS:=-s -w -X 'main.VERSION=$(PKG_VERSION)-$(PKG_RELEASE) for OpenWrt'
|
||||
|
||||
# Can't use GO_PKG_LDFLAGS_X to define X args with space
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/kcptun/Default
|
||||
define Package/kcptun-$(1)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
DEPENDS:=$$(GO_ARCH_DEPENDS)
|
||||
TITLE:=Simple UDP Tunnel Based On KCP ($1)
|
||||
URL:=https://github.com/xtaci/kcptun
|
||||
endef
|
||||
|
||||
define Package/kcptun-$(1)/description
|
||||
A Stable & Secure Tunnel Based On KCP with N:M Multiplexing.
|
||||
|
||||
This package contains the kcptun $(1).
|
||||
endef
|
||||
|
||||
define Package/kcptun-$(1)/install
|
||||
$$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR))
|
||||
|
||||
$$(INSTALL_DIR) $$(1)/usr/bin
|
||||
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/kcptun-$(1)
|
||||
endef
|
||||
endef
|
||||
|
||||
KCPTUN_COMPONENTS:=client server
|
||||
|
||||
$(foreach component,$(KCPTUN_COMPONENTS), \
|
||||
$(eval $(call Package/kcptun/Default,$(component))) \
|
||||
$(eval $(call GoBinPackage,kcptun-$(component))) \
|
||||
$(eval $(call BuildPackage,kcptun-$(component))) \
|
||||
)
|
||||
38
microsocks/Makefile
Normal file
38
microsocks/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=microsocks
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=lean
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/rofl0r/microsocks.git
|
||||
PKG_SOURCE_VERSION:=5795a84c4fbd61685690a8cd6d43969efc083614
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
||||
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).$(PKG_RELEASE).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/microsocks
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=microsocks for OpenWRT
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/microsocks/description
|
||||
microsocks is a Tiny Proxy in C.
|
||||
endef
|
||||
|
||||
define Package/microsocks/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/microsocks $(1)/usr/bin/microsocks
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,microsocks))
|
||||
127
naiveproxy/Makefile
Normal file
127
naiveproxy/Makefile
Normal file
@@ -0,0 +1,127 @@
|
||||
#
|
||||
# Copyright (C) 2020 Project OpenWrt
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=naiveproxy
|
||||
PKG_VERSION:=86.0.4240.75-1
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=91f946e137565115649bc5787788a6889d84e0a20e9878553a832b89c0cb161f
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=ncurses/host ninja/host python3/host
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
ifneq ($(CONFIG_CPU_TYPE)," ")
|
||||
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
|
||||
CPU_SUBTYPE:=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE)))
|
||||
ifeq ($(CPU_SUBTYPE),)
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
else
|
||||
CPU_TYPE:=""
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/naiveproxy/config
|
||||
depends on !(arc||armeb||mips||mips64||powerpc)
|
||||
endef
|
||||
|
||||
define Package/naiveproxy
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
URL:=https://github.com/klzgrad/naiveproxy
|
||||
TITLE:=Make a fortune quietly
|
||||
DEPENDS:=+libatomic +libnss
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/description
|
||||
NaïveProxy uses Chrome's network stack to camouflage traffic with strong
|
||||
censorship resistance and low detectability. Reusing Chrome's stack also
|
||||
ensures best practices in performance and security.
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
export CCACHE_SLOPPINESS=time_macros
|
||||
export CCACHE_BASEDIR=$(PKG_BUILD_DIR)/src
|
||||
export CCACHE_CPP2=yes
|
||||
export naive_ccache_flags=cc_wrapper="ccache"
|
||||
endif
|
||||
|
||||
AFDO_VER:=86.0.4237.0_rc-r1-merged
|
||||
AFDO_FILE:=chromeos-chrome-amd64-$(AFDO_VER).afdo.bz2
|
||||
define Download/AFDO_PROF
|
||||
URL:=https://storage.googleapis.com.cnpmjs.org/chromeos-prebuilt/afdo-job/llvm \
|
||||
https://storage.googleapis.com/chromeos-prebuilt/afdo-job/llvm
|
||||
URL_FILE:=$(AFDO_FILE)
|
||||
FILE:=$(AFDO_FILE)
|
||||
HASH:=d5730bd681766bcf4fd22c0e560ad500b2d6eb09164a9b80146cc327a156c98c
|
||||
endef
|
||||
|
||||
CLANG_VER:=llvmorg-12-init-3492-ga1caa302-1
|
||||
CLANG_FILE:=clang-$(CLANG_VER).tgz
|
||||
define Download/CLANG
|
||||
URL:=https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64
|
||||
URL_FILE:=$(CLANG_FILE)
|
||||
FILE:=$(CLANG_FILE)
|
||||
HASH:=05df154999115386fb390a5ec7e6ca9e28aeae2ea1cbf76435247c0eee5b9ef3
|
||||
endef
|
||||
|
||||
GN_VER:=e327ffdc503815916db2543ec000226a8df45163
|
||||
GN_FILE:=gn-git_revision_$(GN_VER).zip
|
||||
define Download/GN_TOOL
|
||||
URL:=https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+
|
||||
URL_FILE:=git_revision:$(GN_VER)
|
||||
FILE:=$(GN_FILE)
|
||||
HASH:=6d141b84a541e31ed7d3cd4d938987fdfa7988d5081d3089bc1509a43d6b742f
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
( \
|
||||
cd $(PKG_BUILD_DIR)/src ; \
|
||||
bzip2 -cd > "chrome/android/profiles/afdo.prof" < $(DL_DIR)/$(AFDO_FILE) ; \
|
||||
mkdir -p "third_party/llvm-build/Release+Asserts" ; \
|
||||
$(TAR) -xzf $(DL_DIR)/$(CLANG_FILE) -C "third_party/llvm-build/Release+Asserts" ; \
|
||||
mkdir -p "gn/out" ; \
|
||||
unzip -o $(DL_DIR)/$(GN_FILE) -d "gn/out" ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
( \
|
||||
cd $(PKG_BUILD_DIR)/src ; \
|
||||
. ../init_env.sh "$(ARCH)" "$(BOARD)" $(CPU_TYPE) $(CPU_SUBTYPE) "$(TOOLCHAIN_DIR)" ; \
|
||||
export naive_flags="$$$${naive_flags} $$$${naive_ccache_flags}" ; \
|
||||
export OP_STAGING_DIR="$(STAGING_DIR)" ; \
|
||||
mkdir -p out ; \
|
||||
./gn/out/gn gen "out/Release" --args="$$$${naive_flags}" --script-executable="$(STAGING_DIR_HOSTPKG)/bin/python3" ; \
|
||||
$(STAGING_DIR_HOSTPKG)/bin/ninja -C "out/Release" naive ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/out/Release/naive $(1)/usr/bin/naive
|
||||
endef
|
||||
|
||||
$(eval $(call Download,AFDO_PROF))
|
||||
$(eval $(call Download,CLANG))
|
||||
$(eval $(call Download,GN_TOOL))
|
||||
|
||||
$(eval $(call BuildPackage,naiveproxy))
|
||||
40
naiveproxy/patches/001-Remove-concurrency-limit.patch
Normal file
40
naiveproxy/patches/001-Remove-concurrency-limit.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From f1a49736010170a70123db07ca41256ba92c0002 Mon Sep 17 00:00:00 2001
|
||||
From: klzgrad <kizdiv@gmail.com>
|
||||
Date: Sat, 3 Oct 2020 08:54:59 +0800
|
||||
Subject: [PATCH] Remove concurrency limit
|
||||
|
||||
---
|
||||
src/net/tools/naive/naive_proxy.cc | 3 +--
|
||||
src/net/tools/naive/naive_proxy_bin.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/src/net/tools/naive/naive_proxy.cc
|
||||
+++ b/src/net/tools/naive/naive_proxy.cc
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include "net/tools/naive/naive_proxy.h"
|
||||
|
||||
-#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include "base/bind.h"
|
||||
@@ -35,7 +34,7 @@ NaiveProxy::NaiveProxy(std::unique_ptr<S
|
||||
const NetworkTrafficAnnotationTag& traffic_annotation)
|
||||
: listen_socket_(std::move(listen_socket)),
|
||||
protocol_(protocol),
|
||||
- concurrency_(std::min(4, std::max(1, concurrency))),
|
||||
+ concurrency_(concurrency),
|
||||
resolver_(resolver),
|
||||
session_(session),
|
||||
net_log_(
|
||||
--- a/src/net/tools/naive/naive_proxy_bin.cc
|
||||
+++ b/src/net/tools/naive/naive_proxy_bin.cc
|
||||
@@ -289,7 +289,7 @@ bool ParseCommandLine(const CommandLine&
|
||||
|
||||
if (!cmdline.concurrency.empty()) {
|
||||
if (!base::StringToInt(cmdline.concurrency, ¶ms->concurrency) ||
|
||||
- params->concurrency < 1 || params->concurrency > 4) {
|
||||
+ params->concurrency < 1) {
|
||||
std::cerr << "Invalid concurrency" << std::endl;
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
From 5b476d92f8dbee8b83061faa8cd18a46e5ab4aae Mon Sep 17 00:00:00 2001
|
||||
From: CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
Date: Tue, 18 Aug 2020 20:36:39 +0000
|
||||
Subject: [PATCH] build: add OpenWrt staging libraries
|
||||
|
||||
---
|
||||
src/build/config/posix/BUILD.gn | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/src/build/config/posix/BUILD.gn
|
||||
+++ b/src/build/config/posix/BUILD.gn
|
||||
@@ -28,6 +28,9 @@ config("runtime_library") {
|
||||
if (!is_mac && !is_ios && sysroot != "") {
|
||||
# Pass the sysroot to all C compiler variants, the assembler, and linker.
|
||||
sysroot_flags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
|
||||
+ sysroot_flags += [ "-I" + getenv("OP_STAGING_DIR") + "/usr/include" ]
|
||||
+ sysroot_flags += [ "-I" + getenv("OP_STAGING_DIR") + "/usr/include/nss" ]
|
||||
+ sysroot_flags += [ "-I" + getenv("OP_STAGING_DIR") + "/usr/include/nspr" ]
|
||||
if (is_linux || is_chromeos) {
|
||||
# This is here so that all files get recompiled after a sysroot roll and
|
||||
# when turning the sysroot on or off. (defines are passed via the command
|
||||
@@ -57,6 +60,7 @@ config("runtime_library") {
|
||||
cflags_objcc += sysroot_flags
|
||||
|
||||
# Need to get some linker flags out of the sysroot.
|
||||
+ ldflags += [ "-L" + getenv("OP_STAGING_DIR") + "/usr/lib" ]
|
||||
ld_paths = exec_script("sysroot_ld_path.py",
|
||||
[
|
||||
rebase_path("//build/linux/sysroot_ld_path.sh",
|
||||
@@ -0,0 +1,27 @@
|
||||
From dd07b78f561914ccc6cbe076ae66c380304bf92c Mon Sep 17 00:00:00 2001
|
||||
From: CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
Date: Wed, 19 Aug 2020 12:42:45 +0000
|
||||
Subject: [PATCH] build: drop useless deps simd_asm
|
||||
|
||||
libjpeg_turbo itself has alreadly set the dependency "simd_asm",
|
||||
and this will cause cross-compile failed:
|
||||
```
|
||||
ERROR Unresolved dependencies.
|
||||
//:gn_all(//build/toolchain/linux:clang_arm64_openwrt)
|
||||
needs //third_party/libjpeg_turbo:simd_asm(//build/toolchain/linux:clang_arm64_openwrt)
|
||||
```
|
||||
So, let's drop it in global build file.
|
||||
---
|
||||
src/BUILD.gn | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/src/BUILD.gn
|
||||
+++ b/src/BUILD.gn
|
||||
@@ -751,7 +751,6 @@ group("gn_all") {
|
||||
if (enable_nacl) {
|
||||
deps += [ "//native_client/src/trusted/platform_qualify:vcpuid" ]
|
||||
}
|
||||
- deps += [ "//third_party/libjpeg_turbo:simd_asm" ]
|
||||
}
|
||||
if ((is_linux || is_chromeos) && current_toolchain == host_toolchain) {
|
||||
deps += [ "//v8:v8_shell" ]
|
||||
87
naiveproxy/src/init_env.sh
Normal file
87
naiveproxy/src/init_env.sh
Normal file
@@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
# [CTCGFW] Project-OpenWrt
|
||||
# Use it under GPLv3.
|
||||
# --------------------------------------------------------
|
||||
# Init build dependencies for naiveproxy
|
||||
|
||||
# Read args from shell
|
||||
target_arch="$1"
|
||||
target_board="$2"
|
||||
cpu_type="$3"
|
||||
cpu_subtype="$4"
|
||||
toolchain_dir="$5"
|
||||
|
||||
# Set arch info
|
||||
naive_arch="${target_arch}"
|
||||
[ "${target_arch}" == "i386" ] && naive_arch="x86"
|
||||
[ "${target_arch}" == "x86_64" ] && naive_arch="x64"
|
||||
[ "${target_arch}" == "aarch64" ] && naive_arch="arm64"
|
||||
ldso_path="/lib/$(find "${toolchain_dir}/" | grep -Eo "ld-musl-[a-z0-9_-]+\\.so\\.1")"
|
||||
|
||||
# OS detection
|
||||
[ "$(uname)" != "Linux" -o "$(uname -m)" != "x86_64" ] && { echo -e "Support Linux AMD64 only."; exit 1; }
|
||||
|
||||
# Set ENV
|
||||
export DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
export naive_flags="
|
||||
is_official_build=true
|
||||
exclude_unwind_tables=true
|
||||
enable_resource_whitelist_generation=false
|
||||
symbol_level=0
|
||||
is_clang=true
|
||||
use_sysroot=false
|
||||
|
||||
use_allocator=\"none\"
|
||||
use_allocator_shim=false
|
||||
|
||||
fatal_linker_warnings=false
|
||||
treat_warnings_as_errors=false
|
||||
|
||||
fieldtrial_testing_like_official_build=true
|
||||
|
||||
enable_base_tracing=false
|
||||
enable_nacl=false
|
||||
enable_print_preview=false
|
||||
enable_remoting=false
|
||||
use_alsa=false
|
||||
use_cups=false
|
||||
use_dbus=false
|
||||
use_gio=false
|
||||
use_platform_icu_alternatives=true
|
||||
use_gtk=false
|
||||
use_system_libdrm=false
|
||||
use_gnome_keyring=false
|
||||
use_libpci=false
|
||||
use_pangocairo=false
|
||||
use_glib=false
|
||||
use_pulseaudio=false
|
||||
use_udev=false
|
||||
|
||||
disable_file_support=true
|
||||
enable_websockets=false
|
||||
disable_ftp_support=true
|
||||
use_kerberos=false
|
||||
enable_mdns=false
|
||||
enable_reporting=false
|
||||
include_transport_security_state_preload_list=false
|
||||
rtc_use_pipewire=false
|
||||
|
||||
use_xkbcommon=false
|
||||
use_ozone=true
|
||||
ozone_auto_platforms=false
|
||||
ozone_platform=\"headless\"
|
||||
ozone_platform_headless=true
|
||||
|
||||
current_os=\"linux\"
|
||||
current_cpu=\"${naive_arch}\"
|
||||
sysroot=\"${toolchain_dir}\"
|
||||
custom_toolchain=\"//build/toolchain/linux:clang_${naive_arch}_openwrt\"
|
||||
ldso_path=\"${ldso_path}\""
|
||||
[ "${target_arch}" == "arm" ] && {
|
||||
naive_flags="${naive_flags} arm_version=0 arm_cpu=\"${cpu_type}\""
|
||||
[ -n "${cpu_subtype}" ] && { echo "${cpu_subtype}" | grep -q "neon" && neon_flag="arm_use_neon=true" || neon_flag="arm_use_neon=false"; naive_flags="${naive_flags} arm_fpu=\"${cpu_subtype}\" arm_float_abi=\"hard\" ${neon_flag}"; } || naive_flags="${naive_flags} arm_float_abi=\"soft\" arm_use_neon=false"
|
||||
}
|
||||
[[ "mips mips64 mipsel mips64el" =~ (^|[[:space:]])"${target_arch}"($|[[:space:]]) ]] && {
|
||||
naive_flags="${naive_flags} use_gold=false is_cfi=false use_cfi_icall=false use_thin_lto=false mips_arch_variant=\"r2\""
|
||||
[[ "${target_arch}" =~ ^"mips"$|^"mipsel"$ ]] && naive_flags="${naive_flags} mips_float_abi=\"soft\" mips_tune=\"${cpu_type}\""
|
||||
}
|
||||
162
openssl1.1/Makefile
Normal file
162
openssl1.1/Makefile
Normal file
@@ -0,0 +1,162 @@
|
||||
#
|
||||
# Copyright (C) 2006-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
### Modified by wongsyrone to fit need of trojan-gfw/trojan
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=openssl1.1
|
||||
|
||||
PKG_BASE:=1.1.1
|
||||
PKG_BUGFIX:=g
|
||||
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
|
||||
PKG_HASH:=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
|
||||
ENGINES_DIR=engines-1.1
|
||||
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PATCH_DIR=./patches/$(PKG_BASE)
|
||||
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/openssl-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=openssl-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:= \
|
||||
http://ftp.fi.muni.cz/pub/openssl/source/ \
|
||||
http://ftp.linux.hr/pub/openssl/source/ \
|
||||
ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \
|
||||
http://www.openssl.org/source/ \
|
||||
http://www.openssl.org/source/old/$(PKG_BASE)/
|
||||
|
||||
PKG_LICENSE:=OpenSSL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_CPE_ID:=cpe:/a:openssl:openssl
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
HOSTCC=$(HOSTCC_NOCACHE)
|
||||
HOSTCXX=$(HOSTCXX_NOCACHE)
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/Default
|
||||
TITLE:=Open source SSL toolkit
|
||||
URL:=http://www.openssl.org/
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
endef
|
||||
|
||||
define Package/openssl1.1/Default/description
|
||||
The OpenSSL Project is a collaborative effort to develop a robust,
|
||||
commercial-grade, full-featured, and Open Source toolkit implementing the
|
||||
Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols as well
|
||||
as a full-strength general-purpose cryptography library.
|
||||
endef
|
||||
|
||||
define Package/libopenssl1.1
|
||||
$(call Package/openssl1.1/Default)
|
||||
SUBMENU:=SSL
|
||||
TITLE+= (libraries)
|
||||
ABI_VERSION:=$(PKG_VERSION)
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libopenssl1.1/description
|
||||
$(call Package/openssl/Default/description)
|
||||
This package contains the OpenSSL shared libraries, needed by other programs.
|
||||
endef
|
||||
|
||||
|
||||
define Package/libopenssl1.1/conffiles
|
||||
/etc/ssl/openssl.cnf
|
||||
endef
|
||||
|
||||
# do NOT interfere original openssl staging dir
|
||||
MY_PKG_STAGING_DIR:=$(BUILD_DIR)/openssl1.1_staging_dir
|
||||
|
||||
OPENSSL_OPTIONS:= no-shared no-ssl3-method
|
||||
|
||||
# https://github.com/openssl/openssl/issues/1607
|
||||
# it seems musl-libc doesn't support this
|
||||
OPENSSL_OPTIONS += no-async
|
||||
|
||||
OPENSSL_OPTIONS += no-sm2 no-sm3 no-sm4
|
||||
|
||||
OPENSSL_OPTIONS += no-idea
|
||||
|
||||
OPENSSL_OPTIONS += no-seed
|
||||
|
||||
OPENSSL_OPTIONS += no-whirlpool
|
||||
|
||||
OPENSSL_OPTIONS += no-deprecated
|
||||
|
||||
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O0 -g3
|
||||
|
||||
|
||||
|
||||
OPENSSL_TARGET:=linux-$(call qstrip,$(CONFIG_ARCH))-openwrt
|
||||
|
||||
|
||||
STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(shell echo $(OPENSSL_OPTIONS) | mkhash md5)
|
||||
|
||||
define Build/Configure
|
||||
[ -f $(STAMP_CONFIGURED) ] || { \
|
||||
rm -f $(PKG_BUILD_DIR)/*.so.* $(PKG_BUILD_DIR)/*.a; \
|
||||
find $(PKG_BUILD_DIR) -name \*.o | xargs rm -f; \
|
||||
rm -rf $(MY_PKG_STAGING_DIR); \
|
||||
}
|
||||
(cd $(PKG_BUILD_DIR); \
|
||||
./Configure $(OPENSSL_TARGET) \
|
||||
--prefix=/usr \
|
||||
--openssldir=/etc/ssl \
|
||||
--libdir=lib \
|
||||
$(TARGET_CPPFLAGS) \
|
||||
$(TARGET_LDFLAGS) \
|
||||
$(OPENSSL_OPTIONS) && \
|
||||
{ [ -f $(STAMP_CONFIGURED) ] || make clean; } \
|
||||
)
|
||||
|
||||
endef
|
||||
|
||||
#$(FPIC)
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
|
||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||
$(OPENSSL_MAKEFLAGS) \
|
||||
all
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
CC="$(TARGET_CC)" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
$(OPENSSL_MAKEFLAGS) \
|
||||
install_sw install_ssldirs
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(MY_PKG_STAGING_DIR)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/openssl $(MY_PKG_STAGING_DIR)/usr/include/
|
||||
$(INSTALL_DIR) $(MY_PKG_STAGING_DIR)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{crypto,ssl}.a $(MY_PKG_STAGING_DIR)/usr/lib/
|
||||
endef
|
||||
|
||||
define Build/Clean
|
||||
rm -rf $(MY_PKG_STAGING_DIR)
|
||||
$(call Build/Clean/Default)
|
||||
endef
|
||||
|
||||
define Package/libopenssl1.1/install
|
||||
true
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libopenssl1.1))
|
||||
25
openssl1.1/patches/1.1.1/100-Configure-afalg-support.patch
Normal file
25
openssl1.1/patches/1.1.1/100-Configure-afalg-support.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 559fbff13af9ce2fbc0b9bc5727a7323e1db6217 Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Thu, 27 Sep 2018 08:29:21 -0300
|
||||
Subject: Do not use host kernel version to disable AFALG
|
||||
|
||||
This patch prevents the Configure script from using the host kernel
|
||||
version to disable building the AFALG engine on openwrt targets.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/Configure b/Configure
|
||||
index 5a699836f3..74d057c219 100755
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -1532,7 +1532,9 @@ unless ($disabled{"crypto-mdebug-backtrace"})
|
||||
|
||||
unless ($disabled{afalgeng}) {
|
||||
$config{afalgeng}="";
|
||||
- if (grep { $_ eq 'afalgeng' } @{$target{enable}}) {
|
||||
+ if ($target =~ m/openwrt$/) {
|
||||
+ push @{$config{engdirs}}, "afalg";
|
||||
+ } elsif (grep { $_ eq 'afalgeng' } @{$target{enable}}) {
|
||||
my $minver = 4*10000 + 1*100 + 0;
|
||||
if ($config{CROSS_COMPILE} eq "") {
|
||||
my $verstr = `uname -r`;
|
||||
63
openssl1.1/patches/1.1.1/110-openwrt_targets.patch
Normal file
63
openssl1.1/patches/1.1.1/110-openwrt_targets.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
From 3d43acc6068f00dbfc0c9a06355e2c8f7d302d0f Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Thu, 27 Sep 2018 08:30:24 -0300
|
||||
Subject: Add openwrt targets
|
||||
|
||||
Targets are named: linux-$(CONFIG_ARCH)-openwrt
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf
|
||||
new file mode 100644
|
||||
index 0000000000..86a86d31e4
|
||||
--- /dev/null
|
||||
+++ b/Configurations/25-openwrt.conf
|
||||
@@ -0,0 +1,48 @@
|
||||
+## Openwrt "CONFIG_ARCH" matching targets.
|
||||
+
|
||||
+# The targets need to end in '-openwrt' for the AFALG patch to work
|
||||
+
|
||||
+my %targets = (
|
||||
+ "openwrt" => {
|
||||
+ template => 1,
|
||||
+ CFLAGS => add("\$(OPENWRT_OPTIMIZATION_FLAGS)"),
|
||||
+ },
|
||||
+ "linux-aarch64-openwrt" => {
|
||||
+ inherit_from => [ "linux-aarch64", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-arc-openwrt" => {
|
||||
+ inherit_from => [ "linux-generic32", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-arm-openwrt" => {
|
||||
+ inherit_from => [ "linux-armv4", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-armeb-openwrt" => {
|
||||
+ inherit_from => [ "linux-armv4", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-i386-openwrt" => {
|
||||
+ inherit_from => [ "linux-x86", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-mips-openwrt" => {
|
||||
+ inherit_from => [ "linux-mips32", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-mips64-openwrt" => {
|
||||
+ inherit_from => [ "linux64-mips64", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-mips64el-openwrt" => {
|
||||
+ inherit_from => [ "linux64-mips64", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-mipsel-openwrt" => {
|
||||
+ inherit_from => [ "linux-mips32", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-powerpc-openwrt" => {
|
||||
+ inherit_from => [ "linux-ppc", "openwrt" ],
|
||||
+ },
|
||||
+ "linux-x86_64-openwrt" => {
|
||||
+ inherit_from => [ "linux-x86_64", "openwrt" ],
|
||||
+ },
|
||||
+
|
||||
+### Basic default option
|
||||
+ "linux-generic32-openwrt" => {
|
||||
+ inherit_from => [ "linux-generic32", "openwrt" ],
|
||||
+ },
|
||||
+);
|
||||
23
openssl1.1/patches/1.1.1/120-strip-cflags-from-binary.patch
Normal file
23
openssl1.1/patches/1.1.1/120-strip-cflags-from-binary.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
From 4ad8f2fe6bf3b91df7904fcbe960e5fdfca36336 Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Thu, 27 Sep 2018 08:31:38 -0300
|
||||
Subject: Avoid exposing build directories
|
||||
|
||||
The CFLAGS contain the build directories, and are shown by calling
|
||||
OpenSSL_version(OPENSSL_CFLAGS), or running openssl version -a
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/crypto/build.info b/crypto/build.info
|
||||
index 2c619c62e8..893128345a 100644
|
||||
--- a/crypto/build.info
|
||||
+++ b/crypto/build.info
|
||||
@@ -10,7 +10,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
|
||||
ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
|
||||
|
||||
DEPEND[cversion.o]=buildinf.h
|
||||
-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
|
||||
+GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(filter-out -I% -iremap% -fmacro-prefix-map% -ffile-prefix-map%,$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q))" "$(PLATFORM)"
|
||||
DEPEND[buildinf.h]=../configdata.pm
|
||||
|
||||
GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME)
|
||||
31
openssl1.1/patches/1.1.1/130-dont-build-tests-fuzz.patch
Normal file
31
openssl1.1/patches/1.1.1/130-dont-build-tests-fuzz.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From ba2fe646f2d9104a18b066e43582154049e9ffcb Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Thu, 27 Sep 2018 08:34:38 -0300
|
||||
Subject: Do not build tests and fuzz directories
|
||||
|
||||
This shortens build time.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/Configure b/Configure
|
||||
index 74d057c219..5813e9f8fe 100755
|
||||
--- a/Configure
|
||||
+++ b/Configure
|
||||
@@ -296,7 +296,7 @@ my $auto_threads=1; # enable threads automatically? true by default
|
||||
my $default_ranlib;
|
||||
|
||||
# Top level directories to build
|
||||
-$config{dirs} = [ "crypto", "ssl", "engines", "apps", "test", "util", "tools", "fuzz" ];
|
||||
+$config{dirs} = [ "crypto", "ssl", "engines", "apps", "util", "tools" ];
|
||||
# crypto/ subdirectories to build
|
||||
$config{sdirs} = [
|
||||
"objects",
|
||||
@@ -308,7 +308,7 @@ $config{sdirs} = [
|
||||
"cms", "ts", "srp", "cmac", "ct", "async", "kdf", "store"
|
||||
];
|
||||
# test/ subdirectories to build
|
||||
-$config{tdirs} = [ "ossl_shim" ];
|
||||
+$config{tdirs} = [];
|
||||
|
||||
# Known TLS and DTLS protocols
|
||||
my @tls = qw(ssl3 tls1 tls1_1 tls1_2 tls1_3);
|
||||
82
openssl1.1/patches/1.1.1/140-allow-prefer-chacha20.patch
Normal file
82
openssl1.1/patches/1.1.1/140-allow-prefer-chacha20.patch
Normal file
@@ -0,0 +1,82 @@
|
||||
From 4f7ab2040bb71f03a8f8388911144559aa2a5b60 Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Thu, 27 Sep 2018 08:44:39 -0300
|
||||
Subject: Add OPENSSL_PREFER_CHACHA_OVER_GCM option
|
||||
|
||||
This enables a compile-time option to prefer ChaCha20-Poly1305 over
|
||||
AES-GCM in the openssl default ciphersuite, which is useful in systems
|
||||
without AES specific CPU instructions.
|
||||
OPENSSL_PREFER_CHACHA_OVER_GCM must be defined to enable it.
|
||||
|
||||
Note that this does not have the same effect as the
|
||||
SL_OP_PRIORITIZE_CHACHA option, which prioritizes ChaCha20-Poly1305 only
|
||||
when the client has it on top of its ciphersuite preference.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
|
||||
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
|
||||
index 6724ccf2d2..96d959427e 100644
|
||||
--- a/include/openssl/ssl.h
|
||||
+++ b/include/openssl/ssl.h
|
||||
@@ -173,9 +173,15 @@ extern "C" {
|
||||
# define SSL_DEFAULT_CIPHER_LIST "ALL:!COMPLEMENTOFDEFAULT:!eNULL"
|
||||
/* This is the default set of TLSv1.3 ciphersuites */
|
||||
# if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
|
||||
-# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
|
||||
- "TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
- "TLS_AES_128_GCM_SHA256"
|
||||
+# ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
|
||||
+# define TLS_DEFAULT_CIPHERSUITES "TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
+ "TLS_AES_256_GCM_SHA384:" \
|
||||
+ "TLS_AES_128_GCM_SHA256"
|
||||
+# else
|
||||
+# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
|
||||
+ "TLS_CHACHA20_POLY1305_SHA256:" \
|
||||
+ "TLS_AES_128_GCM_SHA256"
|
||||
+# endif
|
||||
# else
|
||||
# define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \
|
||||
"TLS_AES_128_GCM_SHA256"
|
||||
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
|
||||
index 27a1b2ec68..7039811323 100644
|
||||
--- a/ssl/ssl_ciph.c
|
||||
+++ b/ssl/ssl_ciph.c
|
||||
@@ -1467,11 +1467,29 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
|
||||
&tail);
|
||||
|
||||
+ /*
|
||||
+ * If OPENSSL_PREFER_CHACHA_OVER_GCM is defined, ChaCha20_Poly1305
|
||||
+ * will be placed before AES-256. Otherwise, the default behavior of
|
||||
+ * preferring GCM over CHACHA is used.
|
||||
+ * This is useful for systems that do not have AES-specific CPU
|
||||
+ * instructions, where ChaCha20-Poly1305 is 3 times faster than AES.
|
||||
+ * Note that this does not have the same effect as the SSL_OP_PRIORITIZE_CHACHA
|
||||
+ * option, which prioritizes ChaCha20-Poly1305 only when the client has it on top
|
||||
+ * of its ciphersuite preference.
|
||||
+ */
|
||||
+
|
||||
+#ifdef OPENSSL_PREFER_CHACHA_OVER_GCM
|
||||
+ ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
|
||||
+ &head, &tail);
|
||||
+ ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
|
||||
+ &head, &tail);
|
||||
+#else
|
||||
/* Within each strength group, we prefer GCM over CHACHA... */
|
||||
ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
|
||||
&head, &tail);
|
||||
ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
|
||||
&head, &tail);
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* ...and generally, our preferred cipher is AES.
|
||||
@@ -1527,7 +1545,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
* Within each group, ciphers remain sorted by strength and previous
|
||||
* preference, i.e.,
|
||||
* 1) ECDHE > DHE
|
||||
- * 2) GCM > CHACHA
|
||||
+ * 2) GCM > CHACHA, reversed if OPENSSL_PREFER_CHACHA_OVER_GCM is defined
|
||||
* 3) AES > rest
|
||||
* 4) TLS 1.2 > legacy
|
||||
*
|
||||
55
pdnsd-alt/Makefile
Normal file
55
pdnsd-alt/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=pdnsd
|
||||
PKG_VERSION:=1.2.9b-par
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/shadowsocks/pdnsd.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=a8e46ccba7b0fa2230d6c42ab6dcd92926f6c21d
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
# PKG_MIRROR_MD5SUM:=
|
||||
# CMAKE_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/pdnsd-alt
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
DEPENDS:=+libpthread
|
||||
TITLE:=Proxy DNS Server
|
||||
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
|
||||
#TARGET_CFLAGS += -ggdb3
|
||||
|
||||
CMAKE_OPTIONS += -DDEBUG=1
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-cachedir=/var/pdnsd \
|
||||
--with-target=Linux
|
||||
|
||||
define Package/pdnsd-alt/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pdnsd $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/pdnsd-ctl/pdnsd-ctl $(1)/usr/bin/
|
||||
#$(INSTALL_DIR) $(1)/etc/init.d
|
||||
#$(INSTALL_BIN) ./files/pdnsd.init $(1)/etc/init.d/pdnsd
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/pdnsd.conf $(1)/etc/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,pdnsd-alt))
|
||||
46
pdnsd-alt/files/pdnsd.init
Normal file
46
pdnsd-alt/files/pdnsd.init
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/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
|
||||
}
|
||||
|
||||
67
shadowsocksr-libev/Makefile
Normal file
67
shadowsocksr-libev/Makefile
Normal file
@@ -0,0 +1,67 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=shadowsocksr-libev
|
||||
PKG_VERSION:=2.5.6
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev
|
||||
PKG_SOURCE_VERSION:=d63ff863800a5645aca4309d5dd5962bd1e95543
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
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_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/shadowsocksr-libev
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Lightweight Secured Socks5 Proxy
|
||||
URL:=https://github.com/shadowsocksrr/shadowsocksr-libev
|
||||
DEPENDS:=+libopenssl +libpthread +libpcre +zlib
|
||||
endef
|
||||
|
||||
Package/shadowsocksr-libev-server = $(Package/shadowsocksr-libev)
|
||||
Package/shadowsocksr-libev-alt = $(Package/shadowsocksr-libev)
|
||||
Package/shadowsocksr-libev-ssr-local = $(Package/shadowsocksr-libev)
|
||||
|
||||
CONFIGURE_ARGS += --disable-documentation --disable-ssp --disable-assert
|
||||
|
||||
define Package/shadowsocksr-libev/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local
|
||||
$(LN) ssr-local $(1)/usr/bin/ssr-tunnel
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/ss-check $(1)/usr/bin/ssr-check
|
||||
endef
|
||||
|
||||
define Package/shadowsocksr-libev-alt/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/ss-check $(1)/usr/bin/ssr-check
|
||||
endef
|
||||
|
||||
define Package/shadowsocksr-libev-server/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/ss-server $(1)/usr/bin/ssr-server
|
||||
endef
|
||||
|
||||
define Package/shadowsocksr-libev-ssr-local/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local
|
||||
$(LN) ssr-local $(1)/usr/bin/ssr-tunnel
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,shadowsocksr-libev))
|
||||
$(eval $(call BuildPackage,shadowsocksr-libev-alt))
|
||||
$(eval $(call BuildPackage,shadowsocksr-libev-server))
|
||||
$(eval $(call BuildPackage,shadowsocksr-libev-ssr-local))
|
||||
17186
shadowsocksr-libev/patches/0001-Add-ss-server-and-ss-check.patch
Normal file
17186
shadowsocksr-libev/patches/0001-Add-ss-server-and-ss-check.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
diff --git a/src/obfs/obfs.c b/src/obfs/obfs.c
|
||||
index 463359f..4cd750a 100644
|
||||
--- a/src/obfs/obfs.c
|
||||
+++ b/src/obfs/obfs.c
|
||||
@@ -88,7 +88,7 @@
|
||||
plugin->client_decode = tls12_ticket_auth_client_decode;
|
||||
|
||||
return plugin;
|
||||
- /*} else if (strcmp(plugin_name, "verify_simple") == 0) {
|
||||
+ } else if (strcmp(plugin_name, "verify_simple") == 0) {
|
||||
obfs_class * plugin = (obfs_class*)malloc(sizeof(obfs_class));
|
||||
plugin->init_data = init_data;
|
||||
plugin->new_obfs = verify_simple_new_obfs;
|
||||
@@ -115,7 +115,7 @@
|
||||
plugin->client_udp_pre_encrypt = NULL;
|
||||
plugin->client_udp_post_decrypt = NULL;
|
||||
|
||||
- return plugin;*/
|
||||
+ return plugin;
|
||||
} else if (strcmp(plugin_name, "auth_sha1") == 0) {
|
||||
obfs_class *plugin = (obfs_class *) malloc(sizeof(obfs_class));
|
||||
plugin->init_data = auth_simple_init_data;
|
||||
42
shadowsocksr-libev/patches/0003-Refine-Usage.patch
Normal file
42
shadowsocksr-libev/patches/0003-Refine-Usage.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
diff --git a/src/utils.c b/src/utils.c
|
||||
index 94f8a83..01bcbac 100644
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -258,8 +258,6 @@ usage()
|
||||
{
|
||||
printf("\n");
|
||||
printf("shadowsocks-libev %s with %s\n\n", VERSION, USING_CRYPTO);
|
||||
- printf(
|
||||
- " maintained by Max Lv <max.c.lv@gmail.com> and Linus Yang <laokongzi@gmail.com>\n\n");
|
||||
printf(" usage:\n\n");
|
||||
#ifdef MODULE_LOCAL
|
||||
printf(" ss-local\n");
|
||||
@@ -298,6 +296,25 @@ usage()
|
||||
printf(
|
||||
" The default cipher is rc4-md5.\n");
|
||||
printf("\n");
|
||||
+ printf(
|
||||
+ " -o <obfs> Obfs of your remote server: plain,\n");
|
||||
+ printf(
|
||||
+ " http_simple, http_post and tls1.2_ticket_auth.\n");
|
||||
+ printf(
|
||||
+ " -g <obfs-param> Obfs-Param of your remote server.\n");
|
||||
+ printf(
|
||||
+ " -O <protocol> Protocol of your remote server: orgin,\n");
|
||||
+ printf(
|
||||
+ " auth_sha1, auth_sha1_v2, auth_sha1_v4,\n");
|
||||
+ printf(
|
||||
+ " auth_aes128_md5, auth_aes128_sha1,\n");
|
||||
+ printf(
|
||||
+ " auth_chain_a, auth_chain_b, auth_chain_c,\n");
|
||||
+ printf(
|
||||
+ " auth_chain_d, auth_chain_e and auth_chain_f.\n");
|
||||
+ printf(
|
||||
+ " -G <protocol-param> Protocol-Param of your remote server.\n");
|
||||
+ printf("\n");
|
||||
printf(
|
||||
" [-a <user>] Run as another user.\n");
|
||||
printf(
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/src/local.c
|
||||
+++ b/src/local.c
|
||||
@@ -718,7 +718,7 @@
|
||||
|
||||
ss_free(hostname);
|
||||
} else {
|
||||
- strncpy(host, ip, sizeof(ip));
|
||||
+ strncpy(host, ip, INET6_ADDRSTRLEN);
|
||||
}
|
||||
}
|
||||
|
||||
83
simple-obfs/Makefile
Normal file
83
simple-obfs/Makefile
Normal file
@@ -0,0 +1,83 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=simple-obfs
|
||||
PKG_VERSION:=0.0.5
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/shadowsocks/simple-obfs.git
|
||||
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:=GPLv3
|
||||
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_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=libev
|
||||
|
||||
PKG_CONFIG_DEPENDS:= CONFIG_SIMPLE_OBFS_STATIC_LINK
|
||||
|
||||
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
|
||||
endef
|
||||
|
||||
Package/simple-obfs-server = $(Package/simple-obfs)
|
||||
|
||||
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.
|
||||
endef
|
||||
|
||||
Package/simple-obfs-server/description = $(Package/simple-obfs/description)
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-ssp \
|
||||
--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
|
||||
$(INSTALL_DIR) $(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_BUILD_DIR)/src/obfs-server $(1)/usr/bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,simple-obfs))
|
||||
$(eval $(call BuildPackage,simple-obfs-server))
|
||||
51
ssocks/Makefile
Normal file
51
ssocks/Makefile
Normal file
@@ -0,0 +1,51 @@
|
||||
# Copyright (C) 2020 xiaorouji
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ssocks
|
||||
PKG_VERSION:=0.0.14
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/tostercx/ssocks.git
|
||||
PKG_SOURCE_VERSION:=c2024789c1ee076d171fd6061d7c133302216ea7
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=sSocks Relay
|
||||
URL:=https://github.com/tostercx/ssocks
|
||||
DEPENDS:=+libopenssl
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
sSocks is a package which contains: a socks5 server implements RFC 1928 (SOCKS V5) and RFC 1929 (Authentication for SOCKS V5), a reverse socks server and client, a netcat like tool and a socks5 relay.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)d
|
||||
$(call Package/$(PKG_NAME))
|
||||
TITLE:=sSocks Server
|
||||
endef
|
||||
|
||||
Package/$(PKG_NAME)d/description = $(Package/$(PKG_NAME)/description)
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME)$(2) $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)d/install
|
||||
$(call Package/$(PKG_NAME)/install,$(1),d)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)d))
|
||||
15
ssocks/patches/001-fix.patch
Normal file
15
ssocks/patches/001-fix.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- 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)
|
||||
11
ssocks/patches/002-gcc10.patch
Normal file
11
ssocks/patches/002-gcc10.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- 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
|
||||
42
tcping/Makefile
Normal file
42
tcping/Makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt-dist
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
|
||||
PKG_NAME:=tcping
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/Lienol/tcping
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=db9101834732dac9aaa59dbb7fb9c74612dbf723
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/tcping
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=tcping measures the latency of a tcp-connection
|
||||
URL:=https://github.com/jlyo/tcping
|
||||
endef
|
||||
|
||||
define Package/tcping/description
|
||||
endef
|
||||
|
||||
define Package/tcping/conffiles
|
||||
endef
|
||||
|
||||
define Package/tcping/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcping $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tcping))
|
||||
87
trojan-go/Makefile
Normal file
87
trojan-go/Makefile
Normal file
@@ -0,0 +1,87 @@
|
||||
# Copyright (C) 2020 Lienol
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=trojan-go
|
||||
PKG_VERSION:=0.8.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/p4gefau1t/trojan-go.git
|
||||
PKG_SOURCE_VERSION:=d051cf4c8852d708769ca1c4e514306a88da830b
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_TROJAN_GO_COMPRESS_GOPROXY \
|
||||
CONFIG_TROJAN_GO_COMPRESS_UPX
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/p4gefau1t/trojan-go
|
||||
GO_PKG_TAG:=-tags full
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG)/constant.Version=$(PKG_VERSION) \
|
||||
$(GO_PKG)/constant.Commit=$(PKG_SOURCE_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
TITLE:=An unidentifiable mechanism that helps you bypass GFW. It's compatible with original trojan with experimental features.
|
||||
URL:=https://github.com/p4gefau1t/trojan-go
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
|
||||
menu "Configuration"
|
||||
depends on PACKAGE_$(PKG_NAME)
|
||||
|
||||
config TROJAN_GO_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config TROJAN_GO_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
|
||||
endmenu
|
||||
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TROJAN_GO_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
#export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
tar -zxvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG))
|
||||
$(call GoPackage/Build/Configure)
|
||||
$(call GoPackage/Build/Compile,$(GO_PKG_TAG))
|
||||
ifeq ($(CONFIG_TROJAN_GO_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/$(PKG_NAME)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
68
trojan-plus/Makefile
Normal file
68
trojan-plus/Makefile
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# 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:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/peter-tank/trojan-plus.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=a6394cdd718669b0c7491493a78e61f6f0f899b3
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
CMAKE_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
PKG_BUILD_DEPENDS:=openssl
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
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/$(PKG_NAME)
|
||||
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/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/$(PKG_NAME)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
68
trojan/Makefile
Normal file
68
trojan/Makefile
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# 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
|
||||
PKG_VERSION:=1.16.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/trojan-gfw/trojan.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=8606b7110fe79f8ab02d60c897f87ffb0a9b23f0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
|
||||
CMAKE_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=0
|
||||
PKG_BUILD_DEPENDS:=openssl
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_MAINTAINER:=GreaterFire
|
||||
|
||||
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
|
||||
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
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trojan $(1)/usr/sbin/trojan
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,trojan))
|
||||
11
trojan/patches/001-force-openssl-version.patch
Normal file
11
trojan/patches/001-force-openssl-version.patch
Normal 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)
|
||||
622
v2ray-plugin/LICENSE
Normal file
622
v2ray-plugin/LICENSE
Normal file
@@ -0,0 +1,622 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
74
v2ray-plugin/Makefile
Normal file
74
v2ray-plugin/Makefile
Normal file
@@ -0,0 +1,74 @@
|
||||
#
|
||||
# Copyright (C) 2020 SharerMax
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-plugin
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/teddysun/v2ray-plugin/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=5a8e1912a9902daa64a0aa1ea60ff367d4e806ce4443ba08b4a6e98b0d1515f0
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=madeye <max.c.lv@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
PKG_CONFIG_DEPENDS := CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
config $(PKG_NAME)_INCLUDE_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default y
|
||||
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
#export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Project V
|
||||
TITLE:=SIP003 plugin for shadowsocks, based on v2ray
|
||||
URL:=https://github.com/shadowsocks/v2ray-plugin
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-certificates
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Yet another SIP003 plugin for shadowsocks, based on v2ray
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call GoPackage/Build/Compile)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin $(1)/usr/bin/v2ray-plugin
|
||||
endef
|
||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
136
v2ray/Config.in
Normal file
136
v2ray/Config.in
Normal file
@@ -0,0 +1,136 @@
|
||||
menu "V2Ray Configuration"
|
||||
depends on PACKAGE_v2ray
|
||||
|
||||
choice
|
||||
prompt "JSON Config Support"
|
||||
default V2RAY_JSON_INTERNAL
|
||||
|
||||
config V2RAY_JSON_INTERNAL
|
||||
bool "Load JSON Internally"
|
||||
|
||||
config V2RAY_JSON_V2CTL
|
||||
bool "Load JSON from V2Ctl"
|
||||
|
||||
config V2RAY_JSON_NONE
|
||||
bool "None"
|
||||
|
||||
endchoice
|
||||
|
||||
config V2RAY_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config V2RAY_EXCLUDE_V2CTL
|
||||
bool "Exclude V2Ctl"
|
||||
depends on V2RAY_JSON_INTERNAL || V2RAY_JSON_NONE
|
||||
default y
|
||||
|
||||
config V2RAY_EXCLUDE_ASSETS
|
||||
bool "Exclude geoip.dat & geosite.dat"
|
||||
default y
|
||||
|
||||
config V2RAY_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
|
||||
config V2RAY_CUSTOM_FEATURES
|
||||
bool "Custom Features"
|
||||
default n
|
||||
|
||||
menu "Features Configuration"
|
||||
depends on V2RAY_CUSTOM_FEATURES
|
||||
|
||||
config V2RAY_WITHOUT_DNS
|
||||
bool "Without Internal DNS Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_LOG
|
||||
bool "Without Log Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_TLS
|
||||
bool "Without TLS Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_UDP
|
||||
bool "Without UDP Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_POLICY
|
||||
bool "Without Local Policy Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_REVERSE
|
||||
bool "Without Reverse Proxy Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_ROUTING
|
||||
bool "Without Internal Routing Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_STATISTICS
|
||||
bool "Without Statistics Support"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_BLACKHOLE_PROTO
|
||||
bool "Without Blackhole Protocol"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_DNS_PROXY
|
||||
bool "Without DNS Proxy"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_DOKODEMO_PROTO
|
||||
bool "Without Dokodemo-door Protocol"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_FREEDOM_PROTO
|
||||
bool "Without Freedom Protocol"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_MTPROTO_PROXY
|
||||
bool "Without MTProto Proxy"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_HTTP_PROTO
|
||||
bool "Without HTTP Protocol"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_SHADOWSOCKS_PROTO
|
||||
bool "Without Shadowsocks Protocol"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_SOCKS_PROTO
|
||||
bool "Without Socks Protocol"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_VMESS_PROTO
|
||||
bool "Without VMess Protocol"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_TCP_TRANS
|
||||
bool "Without TCP Transport"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_MKCP_TRANS
|
||||
bool "Without mKCP Transport"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_WEBSOCKET_TRANS
|
||||
bool "Without WebSocket Transport"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_HTTP2_TRANS
|
||||
bool "Without HTTP/2 Transport"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_DOMAIN_SOCKET_TRANS
|
||||
bool "Without Domain Socket Transport"
|
||||
default n
|
||||
|
||||
config V2RAY_WITHOUT_QUIC_TRANS
|
||||
bool "Without QUIC Transport"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endmenu
|
||||
319
v2ray/Makefile
Normal file
319
v2ray/Makefile
Normal file
@@ -0,0 +1,319 @@
|
||||
#
|
||||
# Copyright (C) 2019-2020 Xingwang Liao
|
||||
# Copyright (C) 2019-2020 Mattraks
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray
|
||||
PKG_VERSION:=4.32.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=f5553ffd04ff226573e8132d9beaa63f4d8f4882eba047225b33620848bc6917
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_V2RAY_JSON_V2CTL \
|
||||
CONFIG_V2RAY_JSON_INTERNAL \
|
||||
CONFIG_V2RAY_JSON_NONE \
|
||||
CONFIG_V2RAY_EXCLUDE_V2CTL \
|
||||
CONFIG_V2RAY_EXCLUDE_ASSETS \
|
||||
CONFIG_V2RAY_COMPRESS_GOPROXY \
|
||||
CONFIG_V2RAY_COMPRESS_UPX \
|
||||
CONFIG_V2RAY_CUSTOM_FEATURES \
|
||||
CONFIG_V2RAY_WITHOUT_DNS \
|
||||
CONFIG_V2RAY_WITHOUT_LOG \
|
||||
CONFIG_V2RAY_WITHOUT_TLS \
|
||||
CONFIG_V2RAY_WITHOUT_UDP \
|
||||
CONFIG_V2RAY_WITHOUT_POLICY \
|
||||
CONFIG_V2RAY_WITHOUT_REVERSE \
|
||||
CONFIG_V2RAY_WITHOUT_ROUTING \
|
||||
CONFIG_V2RAY_WITHOUT_STATISTICS \
|
||||
CONFIG_V2RAY_WITHOUT_BLACKHOLE_PROTO \
|
||||
CONFIG_V2RAY_WITHOUT_DNS_PROXY \
|
||||
CONFIG_V2RAY_WITHOUT_DOKODEMO_PROTO \
|
||||
CONFIG_V2RAY_WITHOUT_FREEDOM_PROTO \
|
||||
CONFIG_V2RAY_WITHOUT_MTPROTO_PROXY \
|
||||
CONFIG_V2RAY_WITHOUT_HTTP_PROTO \
|
||||
CONFIG_V2RAY_WITHOUT_SHADOWSOCKS_PROTO \
|
||||
CONFIG_V2RAY_WITHOUT_SOCKS_PROTO \
|
||||
CONFIG_V2RAY_WITHOUT_VMESS_PROTO \
|
||||
CONFIG_V2RAY_WITHOUT_TCP_TRANS \
|
||||
CONFIG_V2RAY_WITHOUT_MKCP_TRANS \
|
||||
CONFIG_V2RAY_WITHOUT_WEBSOCKET_TRANS \
|
||||
CONFIG_V2RAY_WITHOUT_HTTP2_TRANS \
|
||||
CONFIG_V2RAY_WITHOUT_DOMAIN_SOCKET_TRANS \
|
||||
CONFIG_V2RAY_WITHOUT_QUIC_TRANS
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=v2ray.com/core
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
v2ray.com/core.version=$(PKG_VERSION) \
|
||||
v2ray.com/core.build=Lean \
|
||||
v2ray.com/core.codename=OpenWrt
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
TITLE:=A platform for building proxies
|
||||
URL:=https://www.v2fly.org
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Project V
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-certificates
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Project V is a set of network tools that help you to build your own computer network.
|
||||
It secures your network connections and thus protects your privacy.
|
||||
|
||||
This package contains v2ray, v2ctl, geoip.dat and geosite.dat.
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
#export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
endif
|
||||
|
||||
V2RAY_SED_ARGS:=
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_JSON_INTERNAL),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/main/json",// &,; \
|
||||
s,// \(_ "v2ray.com/core/main/jsonem"\),\1,;
|
||||
else ifeq ($(CONFIG_V2RAY_JSON_NONE),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/main/json",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_CUSTOM_FEATURES),y)
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_DNS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/app/dns",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_LOG),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/app/log",// &,; \
|
||||
s,_ "v2ray.com/core/app/log/command",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_TLS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/tls",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_UDP),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/udp",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_POLICY),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/app/policy",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_REVERSE),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/app/reverse",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_ROUTING),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/app/router",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_STATISTICS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/app/stats",// &,; \
|
||||
s,_ "v2ray.com/core/app/stats/command",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_BLACKHOLE_PROTO),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/blackhole",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_DNS_PROXY),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/dns",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_DOKODEMO_PROTO),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/dokodemo",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_FREEDOM_PROTO),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/freedom",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_MTPROTO_PROXY),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/mtproto",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_HTTP_PROTO),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/http",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_SHADOWSOCKS_PROTO),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/shadowsocks",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_SOCKS_PROTO),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/socks",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_VMESS_PROTO),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/proxy/vmess/inbound",// &,; \
|
||||
s,_ "v2ray.com/core/proxy/vmess/outbound",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_TCP_TRANS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/tcp",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_MKCP_TRANS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/kcp",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_WEBSOCKET_TRANS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/websocket",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_HTTP2_TRANS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/http",// &,; \
|
||||
s,_ "v2ray.com/core/transport/internet/headers/http",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_DOMAIN_SOCKET_TRANS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/domainsocket",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_QUIC_TRANS),y)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/quic",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_WITHOUT_MKCP_TRANS)$(CONFIG_V2RAY_WITHOUT_QUIC_TRANS),yy)
|
||||
V2RAY_SED_ARGS += \
|
||||
s,_ "v2ray.com/core/transport/internet/headers/noop",// &,; \
|
||||
s,_ "v2ray.com/core/transport/internet/headers/srtp",// &,; \
|
||||
s,_ "v2ray.com/core/transport/internet/headers/tls",// &,; \
|
||||
s,_ "v2ray.com/core/transport/internet/headers/utp",// &,; \
|
||||
s,_ "v2ray.com/core/transport/internet/headers/wechat",// &,; \
|
||||
s,_ "v2ray.com/core/transport/internet/headers/wireguard",// &,;
|
||||
endif
|
||||
|
||||
endif # custom features
|
||||
|
||||
GEOIP_VER:=latest
|
||||
GEOIP_FILE:=geoip-$(GEOIP_VER).dat
|
||||
|
||||
define Download/geoip.dat
|
||||
URL:=https://github.com/v2fly/geoip/releases/$(GEOIP_VER)/download
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=latest
|
||||
GEOSITE_FILE:=geosite-$(GEOSITE_VER).dat
|
||||
|
||||
define Download/geosite.dat
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/$(GEOSITE_VER)/download
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
ifneq ($(CONFIG_V2RAY_EXCLUDE_ASSETS),y)
|
||||
# move file to make sure download new file every build
|
||||
mv -f $(DL_DIR)/$(GEOIP_FILE) $(PKG_BUILD_DIR)/release/config/geoip.dat
|
||||
mv -f $(DL_DIR)/$(GEOSITE_FILE) $(PKG_BUILD_DIR)/release/config/geosite.dat
|
||||
endif
|
||||
|
||||
ifneq ($(V2RAY_SED_ARGS),)
|
||||
( \
|
||||
$(SED) \
|
||||
'$(V2RAY_SED_ARGS)' \
|
||||
$(PKG_BUILD_DIR)/main/distro/all/all.go ; \
|
||||
)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(eval GO_PKG_BUILD_PKG:=v2ray.com/core/main)
|
||||
$(call GoPackage/Build/Compile)
|
||||
mv -f $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ray
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray || true
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_V2RAY_EXCLUDE_V2CTL),y)
|
||||
$(eval GO_PKG_BUILD_PKG:=v2ray.com/core/infra/control/main)
|
||||
$(call GoPackage/Build/Compile)
|
||||
mv -f $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ctl
|
||||
|
||||
ifeq ($(CONFIG_V2RAY_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ctl || true
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/v2ray
|
||||
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/v2ray $(1)/usr/bin/v2ray
|
||||
|
||||
ifneq ($(CONFIG_V2RAY_EXCLUDE_V2CTL),y)
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/v2ctl $(1)/usr/bin/v2ray
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_V2RAY_EXCLUDE_ASSETS),y)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/{geoip,geosite}.dat $(1)/usr/bin/v2ray
|
||||
endif
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_V2RAY_EXCLUDE_ASSETS),y)
|
||||
$(eval $(call Download,geoip.dat))
|
||||
$(eval $(call Download,geosite.dat))
|
||||
endif
|
||||
|
||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
128
xray/Config.in
Normal file
128
xray/Config.in
Normal file
@@ -0,0 +1,128 @@
|
||||
menu "Xray Configuration"
|
||||
depends on PACKAGE_xray
|
||||
|
||||
choice
|
||||
prompt "JSON Config Support"
|
||||
default XRAY_JSON_INTERNAL
|
||||
|
||||
config XRAY_JSON_INTERNAL
|
||||
bool "Load JSON Internally"
|
||||
|
||||
config XRAY_JSON_NONE
|
||||
bool "None"
|
||||
|
||||
endchoice
|
||||
|
||||
config XRAY_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config XRAY_EXCLUDE_ASSETS
|
||||
bool "Exclude geoip.dat & geosite.dat"
|
||||
default y
|
||||
|
||||
config XRAY_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default y
|
||||
|
||||
config XRAY_CUSTOM_FEATURES
|
||||
bool "Custom Features"
|
||||
default n
|
||||
|
||||
menu "Features Configuration"
|
||||
depends on XRAY_CUSTOM_FEATURES
|
||||
|
||||
config XRAY_WITHOUT_DNS
|
||||
bool "Without Internal DNS Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_LOG
|
||||
bool "Without Log Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_TLS
|
||||
bool "Without TLS Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_UDP
|
||||
bool "Without UDP Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_POLICY
|
||||
bool "Without Local Policy Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_REVERSE
|
||||
bool "Without Reverse Proxy Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_ROUTING
|
||||
bool "Without Internal Routing Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_STATISTICS
|
||||
bool "Without Statistics Support"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_BLACKHOLE_PROTO
|
||||
bool "Without Blackhole Protocol"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_DNS_PROXY
|
||||
bool "Without DNS Proxy"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_DOKODEMO_PROTO
|
||||
bool "Without Dokodemo-door Protocol"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_FREEDOM_PROTO
|
||||
bool "Without Freedom Protocol"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_MTPROTO_PROXY
|
||||
bool "Without MTProto Proxy"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_HTTP_PROTO
|
||||
bool "Without HTTP Protocol"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_SHADOWSOCKS_PROTO
|
||||
bool "Without Shadowsocks Protocol"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_SOCKS_PROTO
|
||||
bool "Without Socks Protocol"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_VMESS_PROTO
|
||||
bool "Without VMess Protocol"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_TCP_TRANS
|
||||
bool "Without TCP Transport"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_MKCP_TRANS
|
||||
bool "Without mKCP Transport"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_WEBSOCKET_TRANS
|
||||
bool "Without WebSocket Transport"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_HTTP2_TRANS
|
||||
bool "Without HTTP/2 Transport"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_DOMAIN_SOCKET_TRANS
|
||||
bool "Without Domain Socket Transport"
|
||||
default n
|
||||
|
||||
config XRAY_WITHOUT_QUIC_TRANS
|
||||
bool "Without QUIC Transport"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endmenu
|
||||
294
xray/Makefile
Normal file
294
xray/Makefile
Normal file
@@ -0,0 +1,294 @@
|
||||
#
|
||||
# Copyright (C) 2019-2020 Xingwang Liao
|
||||
# Copyright (C) 2019-2020 Mattraks
|
||||
# Copyright (C) 2020 xiaorouji
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xray
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/Xray-core-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=xray-core-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/xray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=9f0e8f7a885f082780419ac7211a6e6150529d58fa5317ae4dfb61d3a7ba218c
|
||||
|
||||
PKG_LICENSE:=MPL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_XRAY_JSON_INTERNAL \
|
||||
CONFIG_XRAY_JSON_NONE \
|
||||
CONFIG_XRAY_EXCLUDE_ASSETS \
|
||||
CONFIG_XRAY_COMPRESS_GOPROXY \
|
||||
CONFIG_XRAY_COMPRESS_UPX \
|
||||
CONFIG_XRAY_CUSTOM_FEATURES \
|
||||
CONFIG_XRAY_WITHOUT_DNS \
|
||||
CONFIG_XRAY_WITHOUT_LOG \
|
||||
CONFIG_XRAY_WITHOUT_TLS \
|
||||
CONFIG_XRAY_WITHOUT_UDP \
|
||||
CONFIG_XRAY_WITHOUT_POLICY \
|
||||
CONFIG_XRAY_WITHOUT_REVERSE \
|
||||
CONFIG_XRAY_WITHOUT_ROUTING \
|
||||
CONFIG_XRAY_WITHOUT_STATISTICS \
|
||||
CONFIG_XRAY_WITHOUT_BLACKHOLE_PROTO \
|
||||
CONFIG_XRAY_WITHOUT_DNS_PROXY \
|
||||
CONFIG_XRAY_WITHOUT_DOKODEMO_PROTO \
|
||||
CONFIG_XRAY_WITHOUT_FREEDOM_PROTO \
|
||||
CONFIG_XRAY_WITHOUT_MTPROTO_PROXY \
|
||||
CONFIG_XRAY_WITHOUT_HTTP_PROTO \
|
||||
CONFIG_XRAY_WITHOUT_SHADOWSOCKS_PROTO \
|
||||
CONFIG_XRAY_WITHOUT_SOCKS_PROTO \
|
||||
CONFIG_XRAY_WITHOUT_VMESS_PROTO \
|
||||
CONFIG_XRAY_WITHOUT_TCP_TRANS \
|
||||
CONFIG_XRAY_WITHOUT_MKCP_TRANS \
|
||||
CONFIG_XRAY_WITHOUT_WEBSOCKET_TRANS \
|
||||
CONFIG_XRAY_WITHOUT_HTTP2_TRANS \
|
||||
CONFIG_XRAY_WITHOUT_DOMAIN_SOCKET_TRANS \
|
||||
CONFIG_XRAY_WITHOUT_QUIC_TRANS
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/xtls/xray-core/v1
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG)/core.version=$(PKG_VERSION) \
|
||||
$(GO_PKG)/core.codename=OpenWrt
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
TITLE:=A platform for building proxies
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Project X
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-certificates
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_XRAY_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
#export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
endif
|
||||
|
||||
XRAY_SED_ARGS:=
|
||||
|
||||
ifeq ($(CONFIG_XRAY_JSON_INTERNAL),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/main/json",// &,; \
|
||||
s,// \(_ "$(GO_PKG)/core/main/jsonem"\),\1,;
|
||||
else ifeq ($(CONFIG_XRAY_JSON_NONE),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/main/json",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_CUSTOM_FEATURES),y)
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_DNS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/app/dns",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_LOG),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/app/log",// &,; \
|
||||
s,_ "$(GO_PKG)/core/app/log/command",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_TLS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/tls",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_UDP),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/udp",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_POLICY),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/app/policy",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_REVERSE),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/app/reverse",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_ROUTING),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/app/router",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_STATISTICS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/app/stats",// &,; \
|
||||
s,_ "$(GO_PKG)/core/app/stats/command",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_BLACKHOLE_PROTO),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/blackhole",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_DNS_PROXY),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/dns",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_DOKODEMO_PROTO),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/dokodemo",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_FREEDOM_PROTO),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/freedom",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_MTPROTO_PROXY),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/mtproto",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_HTTP_PROTO),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/http",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_SHADOWSOCKS_PROTO),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/shadowsocks",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_SOCKS_PROTO),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/socks",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_VMESS_PROTO),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/proxy/vmess/inbound",// &,; \
|
||||
s,_ "$(GO_PKG)/core/proxy/vmess/outbound",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_TCP_TRANS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/tcp",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_MKCP_TRANS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/kcp",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_WEBSOCKET_TRANS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/websocket",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_HTTP2_TRANS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/http",// &,; \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/headers/http",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_DOMAIN_SOCKET_TRANS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/domainsocket",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_QUIC_TRANS),y)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/quic",// &,;
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XRAY_WITHOUT_MKCP_TRANS)$(CONFIG_XRAY_WITHOUT_QUIC_TRANS),yy)
|
||||
XRAY_SED_ARGS += \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/headers/noop",// &,; \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/headers/srtp",// &,; \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/headers/tls",// &,; \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/headers/utp",// &,; \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/headers/wechat",// &,; \
|
||||
s,_ "$(GO_PKG)/core/transport/internet/headers/wireguard",// &,;
|
||||
endif
|
||||
|
||||
endif # custom features
|
||||
|
||||
GEOIP_VER:=latest
|
||||
GEOIP_FILE:=geoip-$(GEOIP_VER).dat
|
||||
|
||||
define Download/geoip.dat
|
||||
URL:=https://github.com/v2fly/geoip/releases/$(GEOIP_VER)/download
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=latest
|
||||
GEOSITE_FILE:=geosite-$(GEOSITE_VER).dat
|
||||
|
||||
define Download/geosite.dat
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/$(GEOSITE_VER)/download
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
ifneq ($(CONFIG_XRAY_EXCLUDE_ASSETS),y)
|
||||
# move file to make sure download new file every build
|
||||
mv -f $(DL_DIR)/$(GEOIP_FILE) $(PKG_BUILD_DIR)/release/config/geoip.dat
|
||||
mv -f $(DL_DIR)/$(GEOSITE_FILE) $(PKG_BUILD_DIR)/release/config/geosite.dat
|
||||
endif
|
||||
|
||||
ifneq ($(XRAY_SED_ARGS),)
|
||||
( \
|
||||
$(SED) \
|
||||
'$(XRAY_SED_ARGS)' \
|
||||
$(PKG_BUILD_DIR)/main/distro/all/all.go ; \
|
||||
)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(eval GO_PKG_BUILD_PKG:=$(GO_PKG)/main)
|
||||
$(call GoPackage/Build/Compile)
|
||||
mv -f $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/xray
|
||||
|
||||
ifeq ($(CONFIG_XRAY_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/xray || true
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/xray
|
||||
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/xray $(1)/usr/bin/xray
|
||||
|
||||
ifneq ($(CONFIG_XRAY_EXCLUDE_ASSETS),y)
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/{geoip,geosite}.dat $(1)/usr/bin/xray
|
||||
endif
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_XRAY_EXCLUDE_ASSETS),y)
|
||||
$(eval $(call Download,geoip.dat))
|
||||
$(eval $(call Download,geosite.dat))
|
||||
endif
|
||||
|
||||
$(eval $(call GoBinPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
Reference in New Issue
Block a user