Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
49c7c800
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
49c7c800
编写于
4月 06, 2019
作者:
C
coolsnowwolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v2ray: bump to v4.18 custom build
上级
1d96b095
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
204 addition
and
96 deletion
+204
-96
package/lean/v2ray/Makefile
package/lean/v2ray/Makefile
+140
-96
package/lean/v2ray/all.go
package/lean/v2ray/all.go
+64
-0
未找到文件。
package/lean/v2ray/Makefile
浏览文件 @
49c7c800
#
# Copyright (C) 201
5-2016 OpenWrt.org
# Copyright (C) 201
9 Xingwang Liao
#
# This is free software, licensed under the GNU General Public License v3.
# 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
:=
v4.18.0
PKG_BUILD_DIR
:=
$(BUILD_DIR)
/
$(PKG_NAME)
-
$(PKG_VERSION)
PKG_NAME
:=
v2ray-core
PKG_VERSION
:=
4.18.0
PKG_RELEASE
:=
1
PKG_SOURCE
:=
$(PKG_NAME)
-
$(PKG_VERSION)
.tar.gz
PKG_SOURCE_URL
:=
https://codeload.github.com/v2ray/v2ray-core/tar.gz/v
$(PKG_VERSION)
?
PKG_HASH
:=
0d18418d97d36f986666cf6a979e8e8d0c261bda182d244bb5897f724ae48ce8
PKG_LICENSE
:=
MIT
PKG_LICENSE_FILES
:=
LICENSE
PKG_MAINTAINER
:=
Xingwang Liao <kuoruan@gmail.com>
PKG_BUILD_DEPENDS
:=
golang/host
PKG_BUILD_PARALLEL
:=
1
PKG_USE_MIPS16
:=
0
GO_PKG
:=
v2ray.com/core
include
$(INCLUDE_DIR)/package.mk
include
$(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define
Package/$(PKG_NAME)
SECTION
:=
net
CATEGORY
:=
Network
TITLE
:=
V2Ray is a cross-platform proxy software
DEPENDS
:=
+ca-certificates
URL
:=
https://github.com/v2ray/v2ray-core
define
Package/v2ray-core/Default
TITLE
:=
A platform
for
building proxies
URL
:=
https://www.v2ray.com
endef
define
Package/$(PKG_NAME)/config
menu
"V2Ray Configuration"
depends
on
PACKAGE_v2ray
config
PACKAGE_V2RAY_INCLUDE_V2RAY
bool
"Include v2ray"
default
y
config
PACKAGE_V2RAY_SOFTFLOAT
bool
"Use soft-float binaries (mips/mipsle only)"
depends
on
mipsel
||
mips
||
mips64el
||
mips64
default
n
config
PACKAGE_V2RAY_INCLUDE_V2CTL
bool
"Include v2ctl"
depends
on
PACKAGE_V2RAY_INCLUDE_V2RAY
default
y
config
PACKAGE_V2RAY_INCLUDE_GEOIP
bool
"Include geoip.dat"
depends
on
PACKAGE_V2RAY_INCLUDE_V2CTL
default
n
config
PACKAGE_V2RAY_INCLUDE_GEOSITE
bool
"Include geosite.dat"
depends
on
PACKAGE_V2RAY_INCLUDE_V2CTL
default
n
endmenu
define
Package/v2ray-core/Default/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.
endef
define
Package/$(PKG_NAME)/description
V2Ray
is
a
cross-platform
proxy
software
define
project-v/SubMenu
SECTION
:=
net
CATEGORY
:=
Network
SUBMENU
:=
Project V
endef
ifeq
($(ARCH),x86_64)
PKG_ARCH_V2RAY
:=
linux-64
endif
ifeq
($(ARCH),mipsel)
PKG_ARCH_V2RAY
:=
linux-mipsle
endif
ifeq
($(ARCH),mips)
PKG_ARCH_V2RAY
:=
linux-mips
endif
ifeq
($(ARCH),i386)
PKG_ARCH_V2RAY
:=
linux-32
endif
ifeq
($(ARCH),arm)
PKG_ARCH_V2RAY
:=
linux-arm
endif
ifeq
($(ARCH),aarch64)
PKG_ARCH_V2RAY
:=
linux-arm64
endif
V2RAY_BIN
:=
v2ray
V2CTL_BIN
:=
v2ctl
ifeq
($(ARCH),arm)
ifneq
($(BOARD),bcm53xx)
V2RAY_BIN
:=
v2ray_armv7
V2CTL_BIN
:=
v2ctl_armv7
endif
endif
ifdef
CONFIG_PACKAGE_V2RAY_SOFTFLOAT
V2RAY_BIN
:=
v2ray_softfloat
V2CTL_BIN
:=
v2ctl_softfloat
endif
define
v2ray-core/GoBinDefault
$(call
Package/v2ray-core/Default)
$(call
project-v/SubMenu)
USERID
:=
v2ray
=
10800:v2ray
=
10800
DEPENDS
:=
$(GO_ARCH_DEPENDS)
endef
define
v2ray-core/templates
define
Package/$(1)
$$(call
v2ray-core/GoBinDefault)
TITLE
+=
(
$(1)
)
endef
define
Build/Prepare
[ ! -f $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY).zip ] && wget https
:
//github.com/v2ray/v2ray-core/releases/download/$(PKG_VERSION)/v2ray-$(PKG_ARCH_V2RAY).zip -O $(PKG_BUILD_DIR)/v2ray-$(PKG_VERSION)-$(PKG_ARCH_V2RAY).zip
unzip
-o
$(PKG_BUILD_DIR)
/v2ray-
$(PKG_VERSION)
-
$(PKG_ARCH_V2RAY)
.zip
-d
$(PKG_BUILD_DIR)
define
Package/$(1)/description
$$(call
Package/v2ray-core/Default/description)
This
package
contains
the
$(1).
endef
define
Package/$(1)/install
$$(INSTALL_DIR)
$$(1)/usr/bin/v2ray
$$(INSTALL_BIN)
$$(GO_PKG_BUILD_BIN_DIR)/$(1)
$$(1)/usr/bin/v2ray
endef
endef
define
Build/Configure
V2RAY_COMPONENTS
:=
v2ray v2ctl
$(foreach
component,$(V2RAY_COMPONENTS),
\
$(eval
$(call
v2ray-core/templates,$(component)))
\
)
define
Package/v2ray-assets
$(call
Package/v2ray-core/Default)
$(call
project-v/SubMenu)
TITLE
+=
(
geoip & geosite
)
endef
define
Build/Compile
#chmod +x $(PKG_BUILD_DIR)/$(V2RAY_BIN) && upx --ultra-brute $(PKG_BUILD_DIR)/$(V2RAY_BIN)
#chmod +x $(PKG_BUILD_DIR)/$(V2CTL_BIN) && upx --ultra-brute $(PKG_BUILD_DIR)/$(V2CTL_BIN)
define
Package/v2ray-assets/description
$(call
Package/v2ray-core/Default/description)
This
package
contains
geoip.dat
&
geosite.dat.
endef
define
Package/v2ray-assets/install
$(INSTALL_DIR)
$(1)/usr/bin/v2ray
$(INSTALL_DATA)
\
$(PKG_BUILD_DIR)/release/config/{geoip,geosite}.dat
\
$(1)/usr/bin/v2ray
endef
define
Package/v2ray-core
$(call
v2ray-core/GoBinDefault)
TITLE
+=
(
full
)
PROVIDES
:=
$(V2RAY_COMPONENTS)
v2ray-assets
endef
define
Package/$(PKG_NAME)/install
define
Package/v2ray-core/description
$(call
Package/v2ray-core/Default/description)
This
package
contains
v2ray,
v2ctl
and
v2ray-assets.
endef
define
Package/v2ray-core/install
$(call
Package/v2ray-assets/install,$(1))
$(INSTALL_DIR)
$(1)/usr/bin/v2ray
ifdef
CONFIG_PACKAGE_V2RAY_INCLUDE_V2RAY
$(INSTALL_BIN)
$(PKG_BUILD_DIR)/$(V2RAY_BIN)
$(1)/usr/bin/v2ray/v2ray
endif
ifdef
CONFIG_PACKAGE_V2RAY_INCLUDE_V2CTL
$(INSTALL_BIN)
$(PKG_BUILD_DIR)/$(V2CTL_BIN)
$(1)/usr/bin/v2ray/v2ctl
end
i
f
ifdef
CONFIG_PACKAGE_V2RAY_INCLUDE_GEOIP
$(INSTALL_BIN)
$(PKG_BUILD_DIR)/geoip.dat
$(1)/usr/bin/v2ray/
endif
ifdef
CONFIG_PACKAGE_V2RAY_INCLUDE_GEOSITE
$(INSTALL_BIN)
$(PKG_BUILD_DIR)/geosite.dat
$(1)/usr/bin/v2ray/
endif
(
\
for
component
in
$(V2RAY_COMPONENTS);
do
\
$(INSTALL_BIN)
$(GO_PKG_BUILD_BIN_DIR)/$$$$component
$(1)/usr/bin/v2ray
;
\
done
;
\
)
end
e
f
define
Package/golang-v2ray-core-dev
$(call
Package/v2ray-core/Default)
$(call
GoPackage/GoSubMenu)
TITLE
+=
(
source
files
)
PKGARCH
:=
all
endef
$(eval
$(call
BuildPackage,$(PKG_NAME)))
define
Package/golang-v2ray-core-dev/description
$(call
Package/v2ray-core/Default/description)
This
package
provides
the
source
files
for
v2ray-core.
endef
define
Build/Prepare
$(Build/Prepare/Default)
(
\
sed
-i
\
's/\(version[[:space:]]*=[[:space:]]*"\).*\("\)/\1$(PKG_VERSION)\2/'
\
$(PKG_BUILD_DIR)/core.go
;
\
build
=
"Lean's custom build - Release
$(PKG_RELEASE)
"
;
\
sed
-i
\
"s/
\(
build[[:space:]]*=[[:space:]]*
\"\)
.*
\(\"\)
/
\1
$$$$
build
\2
/"
\
$(PKG_BUILD_DIR)
/core.go
;
\
$(CP)
./all.go
$(PKG_BUILD_DIR)
/main/distro/all/all.go
;
\
)
endef
define
Build/Compile
$(eval GO_PKG_BUILD_PKG
:
=v2ray.com/core/main)
$(
call
GoPackage/Build/Compile,-ldflags
"-s -w"
)
mv
-f
$(GO_PKG_BUILD_BIN_DIR)
/main
$(GO_PKG_BUILD_BIN_DIR)
/v2ray
$(eval GO_PKG_BUILD_PKG
:
=v2ray.com/core/infra/control/main)
$(
call
GoPackage/Build/Compile,-ldflags
"-s -w"
)
mv
-f
$(GO_PKG_BUILD_BIN_DIR)
/main
$(GO_PKG_BUILD_BIN_DIR)
/v2ctl
endef
$(foreach
component,$(V2RAY_COMPONENTS),
\
$(eval
$(call
GoBinPackage,$(component)))
\
$(eval
$(call
BuildPackage,$(component)))
\
)
$(eval
$(call
BuildPackage,v2ray-assets))
$(eval
$(call
GoBinPackage,v2ray-core))
$(eval
$(call
BuildPackage,v2ray-core))
$(eval
$(call
GoSrcPackage,golang-v2ray-core-dev))
$(eval
$(call
BuildPackage,golang-v2ray-core-dev))
package/lean/v2ray/all.go
0 → 100644
浏览文件 @
49c7c800
package
all
import
(
// The following are necessary as they register handlers in their init functions.
// Required features. Can't remove unless there is replacements.
_
"v2ray.com/core/app/dispatcher"
_
"v2ray.com/core/app/proxyman/inbound"
_
"v2ray.com/core/app/proxyman/outbound"
// Default commander and all its services. This is an optional feature.
_
"v2ray.com/core/app/commander"
_
"v2ray.com/core/app/log/command"
_
"v2ray.com/core/app/proxyman/command"
_
"v2ray.com/core/app/stats/command"
// Other optional features.
_
"v2ray.com/core/app/dns"
_
"v2ray.com/core/app/log"
_
"v2ray.com/core/app/policy"
_
"v2ray.com/core/app/reverse"
_
"v2ray.com/core/app/router"
_
"v2ray.com/core/app/stats"
// Inbound and outbound proxies.
_
"v2ray.com/core/proxy/blackhole"
_
"v2ray.com/core/proxy/dns"
_
"v2ray.com/core/proxy/dokodemo"
_
"v2ray.com/core/proxy/freedom"
_
"v2ray.com/core/proxy/http"
_
"v2ray.com/core/proxy/mtproto"
_
"v2ray.com/core/proxy/shadowsocks"
_
"v2ray.com/core/proxy/socks"
_
"v2ray.com/core/proxy/vmess/inbound"
_
"v2ray.com/core/proxy/vmess/outbound"
// Transports
_
"v2ray.com/core/transport/internet/domainsocket"
_
"v2ray.com/core/transport/internet/http"
_
"v2ray.com/core/transport/internet/kcp"
_
"v2ray.com/core/transport/internet/quic"
_
"v2ray.com/core/transport/internet/tcp"
_
"v2ray.com/core/transport/internet/tls"
_
"v2ray.com/core/transport/internet/udp"
_
"v2ray.com/core/transport/internet/websocket"
// Transport headers
_
"v2ray.com/core/transport/internet/headers/http"
_
"v2ray.com/core/transport/internet/headers/noop"
_
"v2ray.com/core/transport/internet/headers/srtp"
_
"v2ray.com/core/transport/internet/headers/tls"
_
"v2ray.com/core/transport/internet/headers/utp"
_
"v2ray.com/core/transport/internet/headers/wechat"
_
"v2ray.com/core/transport/internet/headers/wireguard"
// JSON config support. Choose only one from the two below.
// The following line loads JSON from v2ctl
// _ "v2ray.com/core/main/json"
// The following line loads JSON internally
_
"v2ray.com/core/main/jsonem"
// Load config from file or http(s)
_
"v2ray.com/core/main/confloader/external"
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录