From 5a3f5987db13a992669ada9a26d0dd93b3ab0394 Mon Sep 17 00:00:00 2001 From: Sense <35366387+sensec@users.noreply.github.com> Date: Sun, 14 Jan 2018 22:27:13 +0800 Subject: [PATCH] Initial commit --- .gitattributes | 2 ++ LICENSE | 21 +++++++++++++++++++ Makefile | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 7 +++++++ 4 files changed, 85 insertions(+) create mode 100644 .gitattributes create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f46c2a8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Sense + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4924b75 --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (c) 2017 Yu Wang +# +# This is free software, licensed under the MIT. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=udp2raw-tunnel +PKG_VERSION:=20180111.1 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/wangyu-/udp2raw-tunnel.git +PKG_SOURCE_VERSION:=c811dc15a33e538f96f10c674eebf7a885ef6691 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz + +PKG_LICENSE:=MIT +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Yu Wang + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/udp2raw-tunnel + SECTION:=net + CATEGORY:=Network + TITLE:=Tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic + URL:=https://github.com/wangyu-/udp2raw-tunnel +endef + +define Package/udp2raw-tunnel/description + udp2raw-tunnel is a tunnel which turns UDP Traffic into Encrypted FakeTCP/UDP/ICMP Traffic by using Raw Socket. +endef + +MAKE_FLAGS += cross2 + +define Build/Configure + $(call Build/Configure/Default) + $(SED) 's/cc_cross[[:space:]]*=.*/cc_cross=$(TARGET_CXX)/' \ + -e 's/\\".*shell git rev-parse HEAD.*\\"/\\"$(PKG_SOURCE_VERSION)\\"/' \ + $(PKG_BUILD_DIR)/makefile +endef + +define Package/udp2raw-tunnel/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/udp2raw_cross $(1)/usr/bin/udp2raw +endef + +$(eval $(call BuildPackage,udp2raw-tunnel)) diff --git a/README.md b/README.md new file mode 100644 index 0000000..42c06be --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +udp2raw-tunnel for OpenWRT/LEDE + + 适配 OpenWRT/LEDE 的 [udp2raw-tunnel][1] 编译文件 + + + [1]: https://github.com/wangyu-/udp2raw-tunnel + [2]: https://github.com/sensec/luci-app-udp2raw