mirror of
				https://github.com/wangyu-/udp2raw.git
				synced 2025-10-31 10:15:33 +08:00 
			
		
		
		
	add luci-app-udp2raw and udp2raw-openwrt-makefile
This commit is contained in:
		
							
								
								
									
										21
									
								
								third-party/udp2raw-openwrt-makefile/LICENSE
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								third-party/udp2raw-openwrt-makefile/LICENSE
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| MIT License | ||||
|  | ||||
| Copyright (c) 2017 Yu Wang (wangyucn at gmail.com) | ||||
|  | ||||
| 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. | ||||
							
								
								
									
										56
									
								
								third-party/udp2raw-openwrt-makefile/Makefile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								third-party/udp2raw-openwrt-makefile/Makefile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| # | ||||
| # Copyright (c) 2017 Yu Wang <wangyucn@gmail.com> | ||||
| # | ||||
| # This is free software, licensed under the MIT. | ||||
| # See /LICENSE for more information. | ||||
| # | ||||
|  | ||||
| include $(TOPDIR)/rules.mk | ||||
|  | ||||
| PKG_NAME:=udp2raw-tunnel | ||||
| PKG_VERSION:=20171125.0 | ||||
| PKG_RELEASE:=1 | ||||
|  | ||||
| PKG_SOURCE_PROTO:=git | ||||
| PKG_SOURCE_URL:=https://github.com/wangyu-/udp2raw-tunnel.git | ||||
| PKG_SOURCE_VERSION:=b35edf74865275cdc970384681a1a076d3a8d0e1 | ||||
| PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | ||||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_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/Prepare | ||||
| 	$(PKG_UNPACK) | ||||
| 	sed -i 's/cc_cross=.*/cc_cross=$(TARGET_CXX)/g' $(PKG_BUILD_DIR)/makefile | ||||
| 	sed -i '/\*gitversion/d' $(PKG_BUILD_DIR)/makefile | ||||
| 	echo 'const char *gitversion = "$(PKG_SOURCE_VERSION)";' > $(PKG_BUILD_DIR)/git_version.h | ||||
| 	$(Build/Patch) | ||||
| 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)) | ||||
		Reference in New Issue
	
	Block a user