mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-04 16:34:52 +03:00
Merge main into the IPv6 certificate branch
install.sh conflicted where the branch made a failed config_after_install abort the installer. Resolved to main's flow: the installer carries on and sets up fail2ban, as it did before this branch.
This commit is contained in:
@@ -92,6 +92,25 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL inbound add orphan cleanup
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/web/service -run '^TestAddInboundClient(BoundedOrphanCleanup|OrphanProbePreservesConcurrentRecreation)Postgres$' -count=1 -v | tee /tmp/postgres-add-orphans.log
|
||||
passed=$(grep -c -- '^--- PASS: TestAddInboundClient' /tmp/postgres-add-orphans.log || true)
|
||||
if [ "$passed" -ne 2 ]; then
|
||||
echo "expected both PostgreSQL inbound add orphan cleanup tests to pass, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL client traffic lifecycle edits
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/web/service -run '^TestClientTrafficLifecyclePostgres$' -count=1 -v | tee /tmp/postgres-client-traffic-lifecycle.log
|
||||
if ! grep -q -- '^--- PASS: TestClientTrafficLifecyclePostgres ' /tmp/postgres-client-traffic-lifecycle.log; then
|
||||
echo "expected the PostgreSQL client traffic lifecycle suite to pass" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL batched stats identities
|
||||
run: |
|
||||
set -o pipefail
|
||||
@@ -112,6 +131,16 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL Xray traffic retry
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test -p=1 ./internal/web/job ./internal/web/service -run '^TestXrayTraffic(PollRetriesRolledBackSample|BatchSurvivesFullQueueAndWriterRestart|BatchRetriesDeferredCommitFailure)Postgres$' -count=1 -v | tee /tmp/postgres-xray-traffic-retry.log
|
||||
passed=$(grep -c -- '^--- PASS: TestXrayTraffic' /tmp/postgres-xray-traffic-retry.log || true)
|
||||
if [ "$passed" -ne 3 ]; then
|
||||
echo "expected 3 passing PostgreSQL Xray traffic retry tests, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL global-traffic heartbeat regressions
|
||||
run: |
|
||||
set -o pipefail
|
||||
@@ -122,25 +151,55 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL deferred-commit test
|
||||
- name: PostgreSQL node client reconciliation rollback
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/web/service/outbound -run '^TestAddTrafficReturnsDeferredCommitFailure$' -count=1 -v | tee /tmp/postgres-outbound.log
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-outbound.log || true)
|
||||
if [ "$passed" -lt 1 ]; then
|
||||
echo "expected at least 1 passing deferred-commit test, got $passed" >&2
|
||||
go test ./internal/web/service -run '^TestNode(ClientReconcileRollback|RefusedFirstAdoptionKeepsNodeSettings)Postgres$' -count=1 -v | tee /tmp/postgres-node-client-rollback.log
|
||||
passed=$(grep -c -- '^--- PASS: TestNode' /tmp/postgres-node-client-rollback.log || true)
|
||||
if [ "$passed" -ne 2 ]; then
|
||||
echo "expected both PostgreSQL node client reconciliation rollback tests to pass, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL client usage history
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/web/service -run '^TestClientUsageHistoryPostgres$' -count=1 -v | tee /tmp/postgres-usage-history.log
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-usage-history.log || true)
|
||||
if [ "$passed" -ne 1 ]; then
|
||||
echo "expected 1 passing PostgreSQL client usage history test, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL attach candidate selection
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/web/service -run '^Test(AttachCandidatesSelection|FrozenAttachSelectionFollowsFilter)Postgres$' -count=1 -v | tee /tmp/postgres-attach-selection.log
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-attach-selection.log || true)
|
||||
if [ "$passed" -ne 2 ]; then
|
||||
echo "expected 2 passing PostgreSQL attach selection tests, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL depletion query regressions
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/web/service -run '^TestDepletionQuery(Semantics|FreshnessAndReset|ConcurrentCommit|Renewals)$' -count=1 -v | tee /tmp/postgres-depletion-query.log
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-depletion-query.log || true)
|
||||
if [ "$passed" -ne 4 ]; then
|
||||
echo "expected 4 passing PostgreSQL depletion tests, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: PostgreSQL schema and migration tests
|
||||
run: |
|
||||
set -o pipefail
|
||||
go test ./internal/database -run '^(TestHostAutoMigrateCreatesColumns_Postgres|TestMigrate_Postgres|TestClientWeeklyRenewMigration_Postgres|TestMigrate_LegacyBooleanVerifyPeerCertByNameIsBlanked_Postgres|TestClientKeepAlivePostgresMigrationPreservesLegacyScalars|TestPostgresModelSettled_TracksSchemaPresence)$' -count=1 -v | tee /tmp/postgres-schema.log
|
||||
go test ./internal/database -run '^(TestHostAutoMigrateCreatesColumns_Postgres|TestMigrate_Postgres|TestClientWeeklyRenewMigration_Postgres|TestMigrate_LegacyBooleanVerifyPeerCertByNameIsBlanked_Postgres|TestClientKeepAlivePostgresMigrationPreservesLegacyScalars|TestPostgresModelSettled_TracksSchemaPresence|TestEnsureClientGroupRows_Postgres)$' -count=1 -v | tee /tmp/postgres-schema.log
|
||||
# All must pass. Counting, not SKIP-matching: renaming a test would
|
||||
# otherwise leave this step green while testing nothing.
|
||||
passed=$(grep -c -- '^--- PASS' /tmp/postgres-schema.log || true)
|
||||
if [ "$passed" -lt 6 ]; then
|
||||
echo "expected at least 6 passing PostgreSQL schema tests, got $passed" >&2
|
||||
if [ "$passed" -lt 7 ]; then
|
||||
echo "expected at least 7 passing PostgreSQL schema tests, got $passed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -280,6 +339,22 @@ jobs:
|
||||
make node-e2e 2>&1 | tee /tmp/node-e2e.log
|
||||
if grep -q -- '--- SKIP' /tmp/node-e2e.log; then echo "node-e2e skipped"; exit 1; fi
|
||||
|
||||
# The core pinned in go.mod as a real child process, driven over its gRPC API.
|
||||
# A skip naming the binary means it was never handed over, so it fails the job.
|
||||
xray-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- name: Real core end to end
|
||||
run: |
|
||||
set -o pipefail
|
||||
make xray-e2e 2>&1 | tee /tmp/xray-e2e.log
|
||||
if grep -q -- '_test.go:[0-9]*: .*XRAY_E2E_BINARY' /tmp/xray-e2e.log; then echo "a real-core test skipped"; exit 1; fi
|
||||
|
||||
# Brief native-fuzz smoke on the security-/parser-critical decoders. Each runs the
|
||||
# generated corpus plus 30s of exploration; a crash here is a real input-handling bug.
|
||||
fuzz-smoke:
|
||||
@@ -383,6 +458,15 @@ jobs:
|
||||
- name: Build Storybook
|
||||
run: npm run build-storybook
|
||||
working-directory: frontend
|
||||
- name: Inbound keyboard and accessibility tree
|
||||
working-directory: frontend
|
||||
run: |
|
||||
set -euo pipefail
|
||||
./node_modules/.bin/vite preview --outDir storybook-static --host 127.0.0.1 --port 6006 > /tmp/inbound-preview.log 2>&1 &
|
||||
preview_pid=$!
|
||||
trap 'kill "$preview_pid" 2>/dev/null || true' EXIT
|
||||
curl --retry 30 --retry-connrefused --retry-delay 1 --retry-max-time 45 -fsS http://127.0.0.1:6006/iframe.html > /dev/null
|
||||
node tools/check-inbound-keyboard.mjs http://127.0.0.1:6006
|
||||
- name: Audit
|
||||
run: npm run audit
|
||||
working-directory: frontend
|
||||
|
||||
@@ -143,6 +143,9 @@ jobs:
|
||||
# Only a fork author lacks write access; an `@claude review` requester passes
|
||||
# the action's own check, so the bypass stays off for it.
|
||||
allowed_non_write_users: ${{ github.event_name == 'pull_request_target' && '*' || '' }}
|
||||
# Since v1.0.288 the action skips fork pull requests unless told otherwise; the
|
||||
# head is only ever read from pr-head/ at the pinned SHA, with a read-only token.
|
||||
allow_fork_prs: "true"
|
||||
# Claude Code loads a CLAUDE.md or .claude/rules/ file the moment a file
|
||||
# beside it is read, so a fork's copy under pr-head/ would brief its own review.
|
||||
settings: '{"claudeMdExcludes": ["**/pr-head/**"]}'
|
||||
|
||||
@@ -7,12 +7,14 @@ on:
|
||||
- 'docs/**'
|
||||
- 'frontend/public/openapi.json'
|
||||
- 'frontend/src/pages/api-docs/endpoints.ts'
|
||||
- 'internal/sub/default.json'
|
||||
- '.github/workflows/docs-ci.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
- 'frontend/public/openapi.json'
|
||||
- 'frontend/src/pages/api-docs/endpoints.ts'
|
||||
- 'internal/sub/default.json'
|
||||
- '.github/workflows/docs-ci.yml'
|
||||
|
||||
permissions:
|
||||
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
cd x-ui/bin
|
||||
|
||||
# Download dependencies
|
||||
Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v26.10.31/"
|
||||
Xray_URL="https://github.com/XTLS/Xray-core/releases/download/v26.11.9/"
|
||||
if [ "${{ matrix.platform }}" == "amd64" ]; then
|
||||
fetch ${Xray_URL}Xray-linux-64.zip
|
||||
unzip Xray-linux-64.zip
|
||||
@@ -283,7 +283,7 @@ jobs:
|
||||
cd x-ui\bin
|
||||
|
||||
# Download Xray for Windows
|
||||
$Xray_URL = "https://github.com/XTLS/Xray-core/releases/download/v26.10.31/"
|
||||
$Xray_URL = "https://github.com/XTLS/Xray-core/releases/download/v26.11.9/"
|
||||
Invoke-WebRequest @retry -Uri "${Xray_URL}Xray-windows-64.zip" -OutFile "Xray-windows-64.zip"
|
||||
Expand-Archive -Path "Xray-windows-64.zip" -DestinationPath .
|
||||
Remove-Item "Xray-windows-64.zip"
|
||||
|
||||
Reference in New Issue
Block a user