2 # Copyright (C) 2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
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
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/redsocks
27 TITLE
:=Redirect any TCP connection to a SOCKS or HTTPS proxy server
30 define Package
/redsocks
/conffiles
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.
41 Redsocks supports tunneling TCP connections and UDP packets. It has
42 authentication support for both, SOCKS and HTTP proxies.
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.
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/
56 $(eval $(call BuildPackage,redsocks))