add v2ray-plugin

This commit is contained in:
CN_SZTL 2019-08-04 06:16:23 +08:00
parent 55374cf592
commit bec8a127eb
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 81 additions and 5 deletions

View File

@ -0,0 +1,69 @@
#
# Copyright (C) 2018-2019 chenhw2 <https://github.com/chenhw2>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-plugin
PKG_VERSION:=1.1.0
PKG_RELEASE:=20190219
PKG_MAINTAINER:=chenhw2 <https://github.com/chenhw2>
# OpenWrt ARCH: arm, i386, x86_64, mips, mipsel
# Golang ARCH: arm[5-7], 386, amd64, mips, mipsle
PKG_ARCH:=$(ARCH)
BIN_ARCH:=$(ARCH)
ifeq ($(ARCH),mips)
BIN_ARCH:=mips_sf
endif
ifeq ($(ARCH),mipsel)
PKG_ARCH:=mips
BIN_ARCH:=mipsle_sf
endif
ifeq ($(ARCH),i386)
PKG_ARCH:=386
BIN_ARCH:=386
endif
ifeq ($(ARCH),x86_64)
PKG_ARCH:=amd64
BIN_ARCH:=amd64
endif
ifeq ($(ARCH),arm)
BIN_ARCH:=arm7
endif
PKG_SOURCE:=v2ray-plugin-linux-$(PKG_ARCH)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/shadowsocks/v2ray-plugin/releases/download/v$(PKG_VERSION)/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/v2ray-plugin
SECTION:=net
CATEGORY:=Network
TITLE:=SIP003 plugin for shadowsocks, based on v2ray
URL:=https://github.com/shadowsocks/v2ray-plugin
endef
define Package/v2ray-plugin/description
Yet another SIP003 plugin for shadowsocks, based on v2ray
endef
define Build/Prepare
gzip -dc "$(DL_DIR)/$(PKG_SOURCE)" | tar -C $(PKG_BUILD_DIR)/ -xf -
endef
define Build/Compile
echo "$(PKG_NAME)Compile Skiped!"
endef
define Package/v2ray-plugin/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ray-plugin_linux_$(BIN_ARCH) $(1)/usr/bin/v2ray-plugin
endef
$(eval $(call BuildPackage,v2ray-plugin))

View File

@ -11,6 +11,8 @@ PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Server \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Socks \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Ofbs \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2Ray \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_dnscrypt_proxy \
CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_dnsforwarder \
@ -22,15 +24,15 @@ define Package/$(PKG_NAME)/config
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks
bool "Include Shadowsocks New Version"
default n
config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray
bool "Include V2ray"
default n
config PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun
bool "Include Kcptun"
default n
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server
bool "Include ShadowsocksR Server"
default n
@ -38,7 +40,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Server
bool "Include Shadowsocks Server"
default n
config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks
bool "Include ShadowsocksR Socks and Tunnel"
default n
@ -51,6 +53,10 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs
bool "Include Shadowsocks Simple Obfs Plugin"
default n
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2Ray
bool "Include Shadowsocks V2Ray Plugin"
defalut n
config PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS
bool "ChinaDNS"
default n
@ -80,9 +86,10 @@ define Package/luci-app-ssr-plus-jsda
+PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:kcptun-client \
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server:shadowsocksr-libev-server \
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Server:shadowsocks-libev-ss-server \
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs:simple_obfs \
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Socks:shadowsocksr-libev-ssr-local \
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Socks:shadowsocks-libev-ss-local \
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs:simple_obfs \
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2Ray:v2ray-plugin \
+PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS:openwrt_chinadns \
+PACKAGE_$(PKG_NAME)_INCLUDE_dnscrypt_proxy:dnscrypt-proxy-full \
+PACKAGE_$(PKG_NAME)_INCLUDE_dnsforwarder:openwrt-dnsforwarder \