You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.8 KiB

  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_MIRROR_HASH:=30ced050c58cbdd39732921a794b053127e9c45ebdcdd4a6023bdc5e434607da
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_URL:=https://github.com/darkk/redsocks.git
  16. PKG_SOURCE_VERSION:=2118c616b4970a0436eceaa57a6e3451ec98ad2b
  17. PKG_MAINTAINER:=Johannes Morgenroth <jm@m-network.de>
  18. PKG_LICENSE:=Apache-2.0
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/redsocks
  21. SECTION:=net
  22. CATEGORY:=Network
  23. DEPENDS:=+libevent2
  24. TITLE:=Redirect any TCP connection to a SOCKS or HTTPS proxy server
  25. endef
  26. define Package/redsocks/conffiles
  27. /etc/redsocks.conf
  28. endef
  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. Redsocks supports tunneling TCP connections and UDP packets. It has
  36. authentication support for both, SOCKS and HTTP proxies.
  37. Also included is a small DNS server returning answers with the "truncated" flag
  38. set for any UDP query, forcing the resolver to use TCP.
  39. endef
  40. define Package/redsocks/install
  41. $(INSTALL_DIR) $(1)/usr/sbin/
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/redsocks $(1)/usr/sbin/
  43. $(INSTALL_DIR) $(1)/etc/init.d/
  44. $(INSTALL_BIN) files/redsocks.init $(1)/etc/init.d/redsocks
  45. $(INSTALL_CONF) files/redsocks.conf $(1)/etc/
  46. endef
  47. $(eval $(call BuildPackage,redsocks))