mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 04:20:09 +08:00
sing-box: add package
This commit is contained in:
parent
c03cdcb3b9
commit
07ee39846d
143
net/sing-box/Makefile
Normal file
143
net/sing-box/Makefile
Normal file
@ -0,0 +1,143 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sing-box
|
||||
PKG_VERSION:=1.10.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=7ec6bfe18522f34c0c53aad7b2de2e1967f66c4091baf5674acecd78f0b81aac
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/sagernet/sing-box
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/sing-box
|
||||
GO_PKG_LDFLAGS_X:=$(GO_PKG)/constant.Version=v$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=The universal proxy platform.
|
||||
URL:=https://sing-box.sagernet.org
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) \
|
||||
+ca-bundle \
|
||||
+kmod-inet-diag \
|
||||
+kmod-netlink-diag \
|
||||
+kmod-tun
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Sing-box is a universal proxy platform which supports hysteria, SOCKS,
|
||||
Shadowsocks, ShadowTLS, Tor, trojan, VLess, VMess, WireGuard and so on.
|
||||
endef
|
||||
|
||||
GO_PKG_TARGET_VARS:=$(filter-out CGO_ENABLED=%,$(GO_PKG_TARGET_VARS)) CGO_ENABLED=1
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
menu "Customizing build tags"
|
||||
depends on PACKAGE_sing-box
|
||||
|
||||
config SING_BOX_WITH_ACME
|
||||
bool "Build with ACME TLS certificate issuer support"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_CLASH_API
|
||||
bool "Build with Clash API support (EXPERIMENTAL!!!)"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_DHCP
|
||||
bool "Build with DHCP support"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_ECH
|
||||
bool "Build with TLS ECH extension support"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_GRPC
|
||||
bool "Build with standard gRPC support"
|
||||
default n
|
||||
help
|
||||
sing-box has better performance gun-lite gRPC built-in by default.
|
||||
This standard gRPC has better compatibility but poor performance.
|
||||
|
||||
config SING_BOX_WITH_GVISOR
|
||||
bool "Build with gVisor support"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_QUIC
|
||||
bool "Build with QUIC support"
|
||||
default y
|
||||
help
|
||||
Required by HTTP3 DNS transports, Naive inbound,
|
||||
Hysteria inbound / outbound, and v2ray QUIC transport.
|
||||
|
||||
config SING_BOX_WITH_REALITY_SERVER
|
||||
bool "Build with reality TLS server support"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_UTLS
|
||||
bool "Build with uTLS support"
|
||||
default y
|
||||
|
||||
config SING_BOX_WITH_V2RAY_API
|
||||
bool "Build with V2Ray API support (EXPERIMENTAL!!!)"
|
||||
default n
|
||||
|
||||
config SING_BOX_WITH_WIREGUARD
|
||||
bool "Build with WireGuard support"
|
||||
default y
|
||||
|
||||
endmenu
|
||||
endef
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_SING_BOX_WITH_ACME \
|
||||
CONFIG_SING_BOX_WITH_CLASH_API \
|
||||
CONFIG_SING_BOX_WITH_DHCP \
|
||||
CONFIG_SING_BOX_WITH_ECH \
|
||||
CONFIG_SING_BOX_WITH_GRPC \
|
||||
CONFIG_SING_BOX_WITH_GVISOR \
|
||||
CONFIG_SING_BOX_WITH_QUIC \
|
||||
CONFIG_SING_BOX_WITH_REALITY_SERVER \
|
||||
CONFIG_SING_BOX_WITH_UTLS \
|
||||
CONFIG_SING_BOX_WITH_V2RAY_API \
|
||||
CONFIG_SING_BOX_WITH_WIREGUARD
|
||||
|
||||
GO_PKG_TAGS:=$(subst $(space),$(comma),$(strip \
|
||||
$(if $(CONFIG_SING_BOX_WITH_ACME),with_acme) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_CLASH_API),with_clash_api) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_DHCP),with_dhcp) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_ECH),with_ech) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_GRPC),with_grpc) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_GVISOR),with_gvisor) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_QUIC),with_quic) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_REALITY_SERVER),with_reality_server) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_UTLS),with_utls) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_V2RAY_API),with_v2ray_api) \
|
||||
$(if $(CONFIG_SING_BOX_WITH_WIREGUARD),with_wireguard) \
|
||||
))
|
||||
|
||||
define Package/$(PKG_NAME)/conffiles
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,sing-box))
|
||||
$(eval $(call BuildPackage,sing-box))
|
46
net/tcping/Makefile
Normal file
46
net/tcping/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt-dist
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
|
||||
PKG_NAME:=tcping
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=license.txt
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/Lienol/tcping
|
||||
PKG_MIRROR_HASH:=79414cd8e1d124422a36b8fe36a1f296b7d9bde99807b2c90ad81bbd65e200e0
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=db9101834732dac9aaa59dbb7fb9c74612dbf723
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/tcping
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=tcping measures the latency of a tcp-connection
|
||||
URL:=https://github.com/jlyo/tcping
|
||||
endef
|
||||
|
||||
define Package/tcping/description
|
||||
endef
|
||||
|
||||
define Package/tcping/conffiles
|
||||
endef
|
||||
|
||||
define Package/tcping/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcping $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tcping))
|
Loading…
Reference in New Issue
Block a user