mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-31 20:35:13 +08:00
update 2026-05-27 19:55:46
This commit is contained in:
1 parent
762a95b5ae
commit
84f707b52b
758 files changed
-362299
No files matched your search
@@ -1,56 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gost
|
||||
PKG_VERSION:=3.2.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/go-gost/gost/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=79874354530b899576dd4866d3b1400651d0b17c1e7a90ad30c44686a0642600
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
GO_PKG:=github.com/go-gost/gost
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/gost
|
||||
GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include ../../lang/golang/golang-package.mk
|
||||
|
||||
define Package/gost
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=GO Simple Tunnel
|
||||
URL:=https://gost.run/
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
USERID:=gost:gost
|
||||
endef
|
||||
|
||||
define Package/gost/conffiles
|
||||
/etc/config/gost
|
||||
/etc/gost/
|
||||
endef
|
||||
|
||||
define Package/gost/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(CURDIR)/files/gost.config $(1)/etc/config/gost
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(CURDIR)/files/gost.init $(1)/etc/init.d/gost
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(CURDIR)/files/gost.uci $(1)/etc/uci-defaults/99-gost-migrate
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,gost))
|
||||
$(eval $(call BuildPackage,gost))
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
config gost 'config'
|
||||
option enabled '0'
|
||||
option config_file ''
|
||||
#list arguments ''
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
USE_PROCD=1
|
||||
START=99
|
||||
|
||||
CONF="gost"
|
||||
PROG="/usr/bin/gost"
|
||||
|
||||
start_service() {
|
||||
local enabled
|
||||
|
||||
config_load "gost"
|
||||
config_get_bool enabled "config" "enabled" 0
|
||||
[ "$enabled" -eq 1 ] || return 1
|
||||
|
||||
local config_file arguments
|
||||
config_get config_file "config" "config_file"
|
||||
config_get arguments "config" "arguments"
|
||||
|
||||
procd_open_instance
|
||||
|
||||
procd_set_param command "$PROG"
|
||||
if [ -n "$config_file" ]; then
|
||||
procd_append_param command -C "$config_file"
|
||||
procd_set_param file "$config_file"
|
||||
fi
|
||||
if [ -n "$arguments" ]; then
|
||||
set -- $arguments
|
||||
procd_append_param command "$@"
|
||||
fi
|
||||
|
||||
procd_set_param user gost
|
||||
procd_set_param group gost
|
||||
|
||||
procd_set_param limits core="unlimited"
|
||||
procd_set_param limits nofile="1000000 1000000"
|
||||
procd_set_param stderr 1
|
||||
|
||||
procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "$CONF"
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
grep -q "config gost$" "/etc/config/gost" || exit 0
|
||||
|
||||
sed -e "s,config gost,config gost 'config'," \
|
||||
-e "s,option enable ,option enabled ," \
|
||||
-e "s,option run_command,list arguments," \
|
||||
-i "/etc/config/gost"
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user