mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 21:23:04 +00:00
Compare commits
4 commits
6c3ee545cf
...
e4cfb115f7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4cfb115f7 | ||
|
|
d0737b1a56 | ||
|
|
d589713fd5 | ||
|
|
4550ddb14e |
5 changed files with 64 additions and 9 deletions
65
.github/workflows/build-linux.yml
vendored
65
.github/workflows/build-linux.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6.0.1
|
uses: actions/checkout@v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
@ -103,14 +103,67 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare tools (Red Hat)
|
- name: Prepare tools (Red Hat)
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
dnf repolist all
|
set -euo pipefail
|
||||||
dnf -y makecache
|
|
||||||
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
|
. /etc/os-release
|
||||||
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core rsync findutils tar gzip unzip which
|
EL_MAJOR="${VERSION_ID%%.*}"
|
||||||
|
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.1
|
uses: actions/checkout@v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
|
||||||
2
.github/workflows/build-osx.yml
vendored
2
.github/workflows/build-osx.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6.0.1
|
uses: actions/checkout@v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows-desktop.yml
vendored
2
.github/workflows/build-windows-desktop.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6.0.1
|
uses: actions/checkout@v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows.yml
vendored
2
.github/workflows/build-windows.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6.0.1
|
uses: actions/checkout@v6.0.2
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.0.1
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,9 @@ 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