mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 10:31:38 +08:00
🎉 Sync 2026-05-08 08:37:16
This commit is contained in:
parent
8ab3d7cd74
commit
dc55b8fdfe
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.5.3
|
||||
PKG_RELEASE:=115
|
||||
PKG_RELEASE:=116
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@ -465,9 +465,9 @@ function gen_config_server(node)
|
||||
|
||||
if node.protocol == "vmess" or node.protocol == "vless" then
|
||||
if node.uuid then
|
||||
local clients = {}
|
||||
local users = {}
|
||||
for i = 1, #node.uuid do
|
||||
clients[i] = {
|
||||
users[i] = {
|
||||
id = node.uuid[i],
|
||||
flow = (node.protocol == "vless"
|
||||
and (node.tls == "1" or (node.decryption and node.decryption ~= "" and node.decryption ~= "none"))
|
||||
@ -475,7 +475,7 @@ function gen_config_server(node)
|
||||
}
|
||||
end
|
||||
settings = {
|
||||
clients = clients,
|
||||
users = users,
|
||||
decryption = (node.protocol == "vless") and ((node.decryption and node.decryption ~= "") and node.decryption or "none") or nil
|
||||
}
|
||||
end
|
||||
@ -483,7 +483,7 @@ function gen_config_server(node)
|
||||
settings = {
|
||||
udp = ("1" == node.udp_forward) and true or false,
|
||||
auth = ("1" == node.auth) and "password" or "noauth",
|
||||
accounts = ("1" == node.auth) and {
|
||||
users = ("1" == node.auth) and {
|
||||
{
|
||||
user = node.username,
|
||||
pass = node.password
|
||||
@ -493,7 +493,7 @@ function gen_config_server(node)
|
||||
elseif node.protocol == "http" then
|
||||
settings = {
|
||||
allowTransparent = false,
|
||||
accounts = ("1" == node.auth) and {
|
||||
users = ("1" == node.auth) and {
|
||||
{
|
||||
user = node.username,
|
||||
pass = node.password
|
||||
@ -511,20 +511,20 @@ function gen_config_server(node)
|
||||
}
|
||||
elseif node.protocol == "trojan" then
|
||||
if node.uuid then
|
||||
local clients = {}
|
||||
local users = {}
|
||||
for i = 1, #node.uuid do
|
||||
clients[i] = {
|
||||
users[i] = {
|
||||
password = node.uuid[i],
|
||||
}
|
||||
end
|
||||
settings = {
|
||||
clients = clients
|
||||
users = users
|
||||
}
|
||||
end
|
||||
elseif node.protocol == "hysteria2" then
|
||||
settings = {
|
||||
version = 2,
|
||||
clients = node.hysteria2_auth_password and {
|
||||
users = node.hysteria2_auth_password and {
|
||||
{ auth = node.hysteria2_auth_password }
|
||||
}
|
||||
}
|
||||
@ -888,7 +888,7 @@ function gen_config(var)
|
||||
end
|
||||
if local_socks_username and local_socks_password and local_socks_username ~= "" and local_socks_password ~= "" then
|
||||
inbound.settings.auth = "password"
|
||||
inbound.settings.accounts = {
|
||||
inbound.settings.users = {
|
||||
{
|
||||
user = local_socks_username,
|
||||
pass = local_socks_password
|
||||
@ -905,7 +905,7 @@ function gen_config(var)
|
||||
settings = {allowTransparent = false}
|
||||
}
|
||||
if local_http_username and local_http_password and local_http_username ~= "" and local_http_password ~= "" then
|
||||
inbound.settings.accounts = {
|
||||
inbound.settings.users = {
|
||||
{
|
||||
user = local_http_username,
|
||||
pass = local_http_password
|
||||
@ -1963,7 +1963,7 @@ function gen_proto_config(var)
|
||||
}
|
||||
if local_socks_username and local_socks_password and local_socks_username ~= "" and local_socks_password ~= "" then
|
||||
inbound.settings.auth = "password"
|
||||
inbound.settings.accounts = {
|
||||
inbound.settings.users = {
|
||||
{
|
||||
user = local_socks_username,
|
||||
pass = local_socks_password
|
||||
@ -1983,7 +1983,7 @@ function gen_proto_config(var)
|
||||
}
|
||||
}
|
||||
if local_http_username and local_http_password and local_http_username ~= "" and local_http_password ~= "" then
|
||||
inbound.settings.accounts = {
|
||||
inbound.settings.users = {
|
||||
{
|
||||
user = local_http_username,
|
||||
pass = local_http_password
|
||||
|
||||
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mptcp
|
||||
PKG_VERSION:=6.1
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
@ -75,12 +75,17 @@ global_multipath_settings() {
|
||||
[ -z "$mptcp_syn_retrans_before_tcp_fallback" ] || sysctl -qew net.mptcp.syn_retrans_before_tcp_fallback="$mptcp_syn_retrans_before_tcp_fallback"
|
||||
[ -z "$mptcp_blackhole_timeout" ] || sysctl -qew net.mptcp.blackhole_timeout="$mptcp_blackhole_timeout"
|
||||
if [ -n "$mptcp_scheduler" ]; then
|
||||
if [ -d /usr/share/bpf/scheduler ]; then
|
||||
for scheduler in /usr/share/bpf/scheduler/*.o; do
|
||||
[ -f "$scheduler" ] && bpftool struct_ops register "$scheduler" >/dev/null 2>&1
|
||||
done
|
||||
fi
|
||||
local sched="${mptcp_scheduler#mptcp_}"; sched="${sched%.o}"
|
||||
if [ -d /usr/share/bpf/scheduler ]; then
|
||||
local pin_dir="/sys/fs/bpf/mptcp"
|
||||
mkdir -p "$pin_dir"
|
||||
# Unregister any previously pinned struct_ops to avoid conflicts
|
||||
for pin in "$pin_dir"/*; do
|
||||
[ -e "$pin" ] && bpftool struct_ops unregister pinned "$pin" >/dev/null 2>&1 && rm -f "$pin"
|
||||
done
|
||||
local obj="/usr/share/bpf/scheduler/mptcp_${sched}.o"
|
||||
[ -f "$obj" ] && bpftool struct_ops register "$obj" "$pin_dir/" >/dev/null 2>&1
|
||||
fi
|
||||
sysctl -qew net.mptcp.scheduler="$sched" >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
@ -663,6 +668,13 @@ start_service() {
|
||||
;; esac
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
local pin_dir="/sys/fs/bpf/mptcp"
|
||||
for pin in "$pin_dir"/*; do
|
||||
[ -e "$pin" ] && bpftool struct_ops unregister pinned "$pin" >/dev/null 2>&1 && rm -f "$pin"
|
||||
done
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
rc_procd start_service "$@"
|
||||
return 0
|
||||
|
||||
32
qminfo/Makefile
Normal file
32
qminfo/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright (C) 2011-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qminfo
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=QMI modeminfo
|
||||
MAINTAINER:=Konstantine Shevlakov
|
||||
DEPENDS:= +libqmi
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
QMI info
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
56
qminfo/src/Makefile
Normal file
56
qminfo/src/Makefile
Normal file
@ -0,0 +1,56 @@
|
||||
# ─────────────────────────────────────────────────────────────────
|
||||
# Makefile for qminfo
|
||||
#
|
||||
# Usage:
|
||||
# make — compile
|
||||
# make install — install /usr/local/bin
|
||||
# make uninstall — remove
|
||||
# make clean — remove build
|
||||
# make run [DEV=/dev/cdc-wdm0] — run text mode
|
||||
# make json [DEV=/dev/cdc-wdm0] — run JSON output
|
||||
# ─────────────────────────────────────────────────────────────────
|
||||
|
||||
CC := gcc
|
||||
TARGET := qminfo
|
||||
SRC := qminfo.c
|
||||
OBJ := $(SRC:.c=.o)
|
||||
|
||||
PKG := qmi-glib
|
||||
CFLAGS := $(shell pkg-config --cflags $(PKG)) -Wall -Wextra -O2
|
||||
LIBS := $(shell pkg-config --libs $(PKG)) -lm
|
||||
|
||||
PREFIX := /usr/local
|
||||
BINDIR := $(PREFIX)/bin
|
||||
DEV := /dev/cdc-wdm0
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────
|
||||
|
||||
.PHONY: all clean install uninstall run json check-pkg
|
||||
|
||||
all: check-pkg $(TARGET)
|
||||
|
||||
check-pkg:
|
||||
@pkg-config --exists $(PKG) || \
|
||||
{ echo "Error: $(PKG) not found. Install libqmi-glib-dev"; exit 1; }
|
||||
|
||||
$(OBJ): $(SRC)
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJ)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
install: $(TARGET)
|
||||
install -d $(DESTDIR)$(BINDIR)
|
||||
install -m 755 $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||
|
||||
run: $(TARGET)
|
||||
sudo ./$(TARGET) $(DEV)
|
||||
|
||||
json: $(TARGET)
|
||||
sudo ./$(TARGET) $(DEV) --json
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET)
|
||||
1124
qminfo/src/qminfo.c
Normal file
1124
qminfo/src/qminfo.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user