Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Copyright (C) 2014-2015 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. PKG_NAME:=redsocks
  9. PKG_VERSION:=0.4-20150907
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_URL:=https://github.com/darkk/redsocks.git
  15. PKG_SOURCE_VERSION:=2118c616b4970a0436eceaa57a6e3451ec98ad2b
  16. PKG_MAINTAINER:=Johannes Morgenroth <jm@m-network.de>
  17. PKG_LICENSE:=Apache-2.0
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/redsocks
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+libevent2
  23. TITLE:=Redirect any TCP connection to a SOCKS or HTTPS proxy server
  24. endef
  25. define Package/redsocks/conffiles
  26. /etc/redsocks.conf
  27. endef
  28. define Package/redsocks/description
  29. Redsocks is a daemon running on the local system, that will transparently
  30. tunnel any TCP connection via a remote SOCKS4, SOCKS5 or HTTP proxy server. It
  31. uses the system firewall's redirection facility to intercept TCP connections,
  32. thus the redirection is system-wide, with fine-grained control, and does
  33. not depend on LD_PRELOAD libraries.
  34. Redsocks supports tunneling TCP connections and UDP packets. It has
  35. authentication support for both, SOCKS and HTTP proxies.
  36. Also included is a small DNS server returning answers with the "truncated" flag
  37. set for any UDP query, forcing the resolver to use TCP.
  38. endef
  39. define Package/redsocks/install
  40. $(INSTALL_DIR) $(1)/usr/sbin/
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/redsocks $(1)/usr/sbin/
  42. $(INSTALL_DIR) $(1)/etc/init.d/
  43. $(INSTALL_BIN) files/redsocks.init $(1)/etc/init.d/redsocks
  44. $(INSTALL_CONF) files/redsocks.conf $(1)/etc/
  45. endef
  46. $(eval $(call BuildPackage,redsocks))