Add httptunnel UCI config and init script from #2886
git-svn-id: svn://svn.openwrt.org/openwrt/packages@10085 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
72c91d1d6a
commit
daed372bde
@ -24,7 +24,7 @@ define Package/httptunnel
|
|||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:=+libopenssl
|
DEPENDS:=+libopenssl
|
||||||
TITLE:=bidirectional virtual data connection tunnelled in HTTP requests
|
TITLE:=bidirectional tunnel in HTTP requests
|
||||||
URL:=http://www.nocrew.org/software/httptunnel.html
|
URL:=http://www.nocrew.org/software/httptunnel.html
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -37,6 +37,10 @@ define Package/httptunnel/install
|
|||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hts $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hts $(1)/usr/sbin/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/htc $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/htc $(1)/usr/sbin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/httptunnel.init $(1)/etc/init.d/httptunnel
|
||||||
|
$(INSTALL_DIR) $(1)/etc/config
|
||||||
|
$(INSTALL_DATA) ./files/httptunnel.conf $(1)/etc/config/httptunnel
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,httptunnel))
|
$(eval $(call BuildPackage,httptunnel))
|
||||||
|
4
net/httptunnel/files/httptunnel.conf
Normal file
4
net/httptunnel/files/httptunnel.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
config httptunnel
|
||||||
|
option destination 'localhost:443'
|
||||||
|
option sourceport '80'
|
||||||
|
|
27
net/httptunnel/files/httptunnel.init
Normal file
27
net/httptunnel/files/httptunnel.init
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2007 OpenWrt.org
|
||||||
|
START=70
|
||||||
|
BIN=hts
|
||||||
|
|
||||||
|
start_httptunnel() {
|
||||||
|
local section="$1"
|
||||||
|
|
||||||
|
config_get destination "$section" destination
|
||||||
|
config_get sourceport "$section" sourceport
|
||||||
|
|
||||||
|
echo start httptunnel: dest: "$destination", src: "$sourceport"
|
||||||
|
|
||||||
|
$BIN --forward-port "$destination" "$sourceport"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
start() {
|
||||||
|
config_load httptunnel
|
||||||
|
config_foreach start_httptunnel httptunnel
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ps aux | grep hts | awk '{print }' | \
|
||||||
|
xargs kill 2> /dev/null
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user