├── Makefile └── README.md /Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/rules.mk 2 | 3 | PKG_NAME:=ngrokc 4 | PKG_VERSION:=20160829 5 | PKG_RELEASE:=1 6 | PKG_REV:=4cce60ecd428bf8058e242fb9c38369ab75e350e 7 | 8 | PKG_SOURCE_PROTO:=git 9 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 10 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 11 | PKG_SOURCE_URL:=https://github.com/dosgo/ngrok-c.git 12 | PKG_SOURCE_VERSION:=$(PKG_REV) 13 | 14 | include $(INCLUDE_DIR)/package.mk 15 | 16 | define Package/ngrokc 17 | SECTION:=net 18 | CATEGORY:=Network 19 | SUBMENU:=Web Servers/Proxies 20 | TITLE:=Secure tunnels to localhost(C++ port) 21 | URL:=https://github.com/dosgo/ngrok-c 22 | DEPENDS:=+libc +libpthread +libopenssl +libstdcpp 23 | endef 24 | 25 | define Build/Prepare 26 | $(call Build/Prepare/Default,) 27 | $(CP) $(PKG_BUILD_DIR)/Makefile.openssl $(PKG_BUILD_DIR)/Makefile 28 | endef 29 | 30 | define Package/ngrokc/install 31 | $(INSTALL_DIR) $(1)/usr/bin 32 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/ngrokc $(1)/usr/bin 33 | endef 34 | 35 | 36 | $(eval $(call BuildPackage,ngrokc)) 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ngrok-c for OpenWrt 2 | === 3 | 版本 20160829 4 | 5 | 为编译[此固件][N]所需依赖包而写的Makefile 6 | 7 | 简介 8 | --- 9 | 10 | 软件包只包含 [ngrok-c][1] 的可执行文件,可配合[luci-app-ngrokc][M]使用 11 | 12 | 本项目是 [ngrok-c][1] 在 OpenWrt 上的移植 13 | 14 | 当前版本: 2016.8.29最后一次commit 15 | 16 | 可以修改Makefile中PKG_SOURCE_VERSION为你需要编译的commit id 17 | 18 | 依赖 19 | --- 20 | 显式依赖 `libc` `libpthread` `libopenssl` `libstdcpp` 21 | 22 | 安装位置 23 | --- 24 | ``` 25 | 客户端/ 26 | └── usr/ 27 | └── bin/ 28 | └── ngrokc // 提供内网穿透服务 29 | ``` 30 | 31 | 编译 32 | --- 33 | 34 | - 从 OpenWrt 的 [SDK][S] 编译 35 | 36 | ```bash 37 | # 以 ar71xx 平台为例 38 | tar xjf OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2 39 | cd OpenWrt-SDK-ar71xx-* 40 | # 获取 Makefile 41 | git clone https://github.com/AlexZhuo/openwrt-ngrokc.git package/ngrokc 42 | # 选择要编译的包 Network -> ngrokc 43 | make menuconfig 44 | # 开始编译 45 | make package/ngrokc/compile V=99 46 | ``` 47 | 48 | --- 49 | 50 | [1]: https://github.com/dosgo/ngrok-c 51 | [S]: http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk 52 | [N]: http://www.right.com.cn/forum/thread-198649-1-1.html 53 | [M]: https://github.com/AlexZhuo/luci-app-ngrokc 54 | --------------------------------------------------------------------------------