siit: moved to github
[packages.git] / net / redsocks / Makefile
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=redsocks
10 PKG_VERSION:=0.4
11 PKG_RELEASE=$(PKG_SOURCE_VERSION)
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=https://github.com/darkk/redsocks.git
15 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE_VERSION:=a9cfd090119385a1ef973baf94342a2db20595b9
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/redsocks
22   SECTION:=net
23   CATEGORY:=Network
24   SUBMENU:=Web Servers/Proxies
25   DEPENDS:=+libevent2
26   TITLE:=Redirect any TCP connection to a SOCKS or HTTPS proxy server
27 endef
28
29 define Package/redsocks/description
30   Redsocks is a daemon running on the local system, that will transparently
31   tunnel any TCP connection via a remote SOCKS4, SOCKS5 or HTTP proxy server. It
32   uses the system firewall's redirection facility to intercept TCP connections,
33   thus the redirection is system-wide, with fine-grained control, and does
34   not depend on LD_PRELOAD libraries.
35
36   Redsocks supports tunneling TCP connections and UDP packets. It has
37   authentication support for both, SOCKS and HTTP proxies.
38
39   Also included is a small DNS server returning answers with the "truncated" flag
40   set for any UDP query, forcing the resolver to use TCP.
41 endef
42
43 define Package/redsocks/install
44         $(INSTALL_DIR) $(1)/usr/sbin
45         $(INSTALL_BIN) $(PKG_BUILD_DIR)/redsocks $(1)/usr/sbin/
46         $(INSTALL_DIR) $(1)/etc/init.d
47         $(INSTALL_BIN) ./files/redsocks.init $(1)/etc/init.d/redsocks
48         $(INSTALL_DIR) $(1)/etc
49         $(INSTALL_CONF) $(PKG_BUILD_DIR)/redsocks.conf.example $(1)/etc/redsocks.conf
50 endef
51
52 $(eval $(call BuildPackage,redsocks))