mirror of
https://github.com/2dust/v2rayN.git
synced 2026-03-07 16:43:26 +00:00
Compare commits
2 commits
e4cfb115f7
...
6c3ee545cf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c3ee545cf | ||
|
|
b4f9598ae7 |
2 changed files with 4 additions and 59 deletions
61
.github/workflows/build-linux.yml
vendored
61
.github/workflows/build-linux.yml
vendored
|
|
@ -103,64 +103,11 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare tools (Red Hat)
|
- name: Prepare tools (Red Hat)
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
dnf repolist all
|
||||||
|
dnf -y makecache
|
||||||
. /etc/os-release
|
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
|
||||||
EL_MAJOR="${VERSION_ID%%.*}"
|
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core rsync findutils tar gzip unzip which
|
||||||
echo "EL_MAJOR=${EL_MAJOR}"
|
|
||||||
|
|
||||||
dnf -y makecache || true
|
|
||||||
command -v curl >/dev/null || dnf -y install curl ca-certificates
|
|
||||||
|
|
||||||
ARCH="$(uname -m)"
|
|
||||||
case "$ARCH" in x86_64|aarch64) ;; *) echo "Unsupported arch: $ARCH"; exit 1 ;; esac
|
|
||||||
|
|
||||||
install_epel_from_dir() {
|
|
||||||
local base="$1" rpm
|
|
||||||
echo "Try: $base"
|
|
||||||
|
|
||||||
rpm="$(
|
|
||||||
{
|
|
||||||
curl -fsSL "$base/Packages/" 2>/dev/null
|
|
||||||
curl -fsSL "$base/Packages/e/" 2>/dev/null | sed 's|href="|href="e/|'
|
|
||||||
} |
|
|
||||||
sed -n 's/.*href="\([^"]*epel-release-[^"]*\.noarch\.rpm\)".*/\1/p' |
|
|
||||||
sort -V | tail -n1
|
|
||||||
)" || true
|
|
||||||
|
|
||||||
if [[ -n "$rpm" ]]; then
|
|
||||||
dnf -y install "$base/Packages/$rpm"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
FEDORA="https://dl.fedoraproject.org/pub/epel/epel-release-latest-${EL_MAJOR}.noarch.rpm"
|
|
||||||
echo "Try Fedora: $FEDORA"
|
|
||||||
|
|
||||||
if curl -fsSLI "$FEDORA" >/dev/null; then
|
|
||||||
dnf -y install "$FEDORA"
|
|
||||||
else
|
|
||||||
ROCKY="https://dl.rockylinux.org/pub/rocky/${EL_MAJOR}/extras/${ARCH}/os"
|
|
||||||
if install_epel_from_dir "$ROCKY"; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ALMA="https://repo.almalinux.org/almalinux/${EL_MAJOR}/extras/${ARCH}/os"
|
|
||||||
if install_epel_from_dir "$ALMA"; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
echo "EPEL bootstrap failed (Fedora/Rocky/Alma)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core \
|
|
||||||
rsync findutils tar gzip unzip which
|
|
||||||
|
|
||||||
dnf repolist | grep -i epel || true
|
|
||||||
|
|
||||||
- name: Checkout repo (for scripts)
|
- name: Checkout repo (for scripts)
|
||||||
uses: actions/checkout@v6.0.2
|
uses: actions/checkout@v6.0.2
|
||||||
|
|
|
||||||
|
|
@ -281,9 +281,7 @@ public partial class CoreConfigSingboxService
|
||||||
if (_config.TunModeItem.EnableTun && item.Process?.Count > 0)
|
if (_config.TunModeItem.EnableTun && item.Process?.Count > 0)
|
||||||
{
|
{
|
||||||
var ruleProcName = JsonUtils.DeepCopy(rule3);
|
var ruleProcName = JsonUtils.DeepCopy(rule3);
|
||||||
ruleProcName.process_name ??= [];
|
|
||||||
var ruleProcPath = JsonUtils.DeepCopy(rule3);
|
var ruleProcPath = JsonUtils.DeepCopy(rule3);
|
||||||
ruleProcPath.process_path ??= [];
|
|
||||||
foreach (var process in item.Process)
|
foreach (var process in item.Process)
|
||||||
{
|
{
|
||||||
// sing-box doesn't support this, fall back to process name match
|
// sing-box doesn't support this, fall back to process name match
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue