mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
update 2024-03-01 17:13:56
This commit is contained in:
parent
1e93cb8f08
commit
58918025f0
@ -1,54 +1,48 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt-dist
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
|
||||
PKG_NAME:=redsocks2
|
||||
PKG_VERSION:=0.67
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/semigodking/redsocks.git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_DATE:=2020-05-10
|
||||
PKG_SOURCE_VERSION:=d94c245ea47859cda5b4b7373308589206b97bdc
|
||||
PKG_MIRROR_HASH:=938f859d1b55a91aa5cbcda3ddff1d04ccab292f784b0434060c73acab12c457
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=5ca32b2f849af7ebda2cab90bbe286bfd97a69de1a85dac09c8df2fbdd8c947c
|
||||
|
||||
PKG_MAINTAINER:=semigodking <semigodking@gmail.com>
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/redsocks2
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Redirect any TCP connection to a SOCKS or HTTPS proxy server
|
||||
URL:=https://github.com/semigodking/redsocks
|
||||
DEPENDS:=+libevent2 +libopenssl
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Redirect TCP connection to proxy server
|
||||
URL:=https://github.com/semigodking/redsocks
|
||||
DEPENDS:=+libevent2 +libopenssl
|
||||
endef
|
||||
|
||||
define Package/redsocks2/description
|
||||
This is a modified version of original redsocks. \
|
||||
The name is changed to be REDSOCKS2 since this release to distinguish with original redsocks. \
|
||||
This variant is useful for anti-GFW (Great Fire Wall).
|
||||
This is a modified version of original redsocks.
|
||||
Transparent redirector of any TCP/UDP connection to proxy.
|
||||
endef
|
||||
|
||||
define Package/redsocks2/conffiles
|
||||
/etc/config/redsocks2
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default,DISABLE_SHADOWSOCKS=true)
|
||||
endef
|
||||
MAKE_VARS += DISABLE_SHADOWSOCKS=true
|
||||
|
||||
define Package/redsocks2/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/redsocks2 $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/redsocks2
|
||||
$(INSTALL_DATA) ./files/redsocks2.template $(1)/etc/redsocks2/config.template
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,redsocks2))
|
||||
|
33
redsocks2/files/redsocks2.template
Normal file
33
redsocks2/files/redsocks2.template
Normal file
@ -0,0 +1,33 @@
|
||||
base {
|
||||
log_debug = off;
|
||||
redirector = iptables;
|
||||
reuseport = on;
|
||||
}
|
||||
redsocks {
|
||||
local_ip = 192.168.1.1;
|
||||
local_port = 1081;
|
||||
ip = 192.168.1.1;
|
||||
port = 9050;
|
||||
type = socks5; // I use socks5 proxy for GFW'ed IP
|
||||
autoproxy = 1; // I want autoproxy feature enabled on this section.
|
||||
// timeout is meaningful when 'autoproxy' is non-zero.
|
||||
// It specified timeout value when trying to connect to destination
|
||||
// directly. Default is 10 seconds. When it is set to 0, default
|
||||
// timeout value will be used.
|
||||
// NOTE: decreasing the timeout value may lead increase of chance for
|
||||
// normal IP to be misjudged.
|
||||
timeout = 13;
|
||||
//type = http-connect;
|
||||
//login = username;
|
||||
//password = passwd;
|
||||
}
|
||||
tcpdns {
|
||||
// Transform UDP DNS requests into TCP DNS requests.
|
||||
// You can also redirect connections to external TCP DNS server to
|
||||
// REDSOCKS transparent proxy via iptables.
|
||||
local_ip = 192.168.1.1; // Local server to act as DNS server
|
||||
local_port = 1053; // UDP port to receive UDP DNS requests
|
||||
tcpdns1 = 8.8.4.4; // DNS server that supports TCP DNS requests
|
||||
tcpdns2 = 8.8.8.8; // DNS server that supports TCP DNS requests
|
||||
timeout = 4; // Timeout value for TCP DNS requests
|
||||
}
|
Loading…
Reference in New Issue
Block a user