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