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.

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