Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
930ffc8
Add A-side mKCP tunnel management
Jul 7, 2026
67c648a
Address tunnel review and add CI
Jul 7, 2026
03e5d4b
Scope gofmt CI to changed Go files
Jul 7, 2026
1d7c618
Add Caddyfile management page
Jul 7, 2026
22f127e
Update release workflow for linux amd64
Jul 8, 2026
fe3376a
Merge pull request #1 from qqq694637644/gpt/a-side-mkcp-tunnels
qqq694637644 Jul 8, 2026
bc3f0c9
Trigger release workflow for all tags
Jul 8, 2026
1a1b242
Document current install flow
Jul 8, 2026
746be94
Update sidebar repository link
Jul 8, 2026
b932c6f
Merge pull request #2 from qqq694637644/gpt/fix-release-all-tags
qqq694637644 Jul 8, 2026
6ceec75
Fix mKCP config for Xray 26
Jul 8, 2026
7636a30
Remove legacy mKCP header seed fields
Jul 8, 2026
0f9ab2c
Format tunnel model fields
Jul 8, 2026
ee9557f
Match gofmt for tunnel model fields
Jul 8, 2026
6ac2517
Merge pull request #3 from qqq694637644/gpt/fix-mkcp-finalmask
qqq694637644 Jul 8, 2026
00e8b96
Remove legacy inbound mKCP header seed
Jul 8, 2026
8586b3a
Enforce mkcp for Xray 26 inbound streams
Jul 8, 2026
1c39d0c
Merge pull request #4 from qqq694637644/gpt/fix-inbound-mkcp-finalmask
qqq694637644 Jul 8, 2026
2593cdf
Support FinalMask generation for mKCP UI
Jul 8, 2026
ad6dae3
Format mKCP tunnel model fields
Jul 8, 2026
899ae5e
Merge pull request #5 from qqq694637644/gpt/mkcp-finalmask-ui
qqq694637644 Jul 8, 2026
b6f0f1f
Use FinalMask-only mKCP configuration
Jul 8, 2026
1675615
Expose mKCP settings through UI
Jul 8, 2026
e9be340
Merge pull request #7 from qqq694637644/gpt/finalmask-only-mkcp
qqq694637644 Jul 8, 2026
c1475a6
Persist Caddy editor height in localStorage
Jul 8, 2026
e3bc8e4
Fix tunnels page kcp slot scope
Jul 8, 2026
a6c7937
Merge pull request #9 from qqq694637644/gpt/caddy-editor-height-local…
qqq694637644 Jul 8, 2026
5d6ac57
Merge pull request #10 from qqq694637644/gpt/fix-tunnels-blank-page
qqq694637644 Jul 8, 2026
e2c8959
Fix VMess mKCP share links with finalmask
Jul 9, 2026
c2f5868
Merge pull request #11 from qqq694637644/gpt/fix-vmess-mkcp-share
qqq694637644 Jul 9, 2026
2f0e658
Prioritize tunnel routing rules
Jul 10, 2026
a30dd5c
Merge pull request #12 from qqq694637644/gpt/tunnel-routing-priority
qqq694637644 Jul 10, 2026
3b47915
feat: add VMess mKCP portal tunnel mode
Jul 27, 2026
d3f3339
test: compare routing rules as compact JSON
Jul 27, 2026
2e5a04a
fix: harden portal startup and validation
Jul 27, 2026
545061d
fix: preserve legacy IDs and align listener semantics
Jul 27, 2026
8cee714
Merge pull request #13 from qqq694637644/gpt/portal-vmess-mkcp
qqq694637644 Jul 27, 2026
07277dc
feat: add VLESS XHTTP H1 H2 H3 support
Sep 14, 2026
d4d4a4e
fix: address XHTTP review findings [skip ci]
Sep 14, 2026
c4bd80d
fix: clear legacy VLESS flow defaults [skip ci]
Sep 14, 2026
46fac09
feat: add VLESS XHTTP H3 portal transport [skip ci]
Sep 14, 2026
92886db
chore: add tunnel timing diagnostics [skip ci]
Sep 15, 2026
7f78595
Merge pull request #14 from qqq694637644/gpt/vless-xhttp-h123
qqq694637644 Oct 6, 2026
2fc4109
docs: add endpoint subscription implementation plan
qqq694637644 Oct 6, 2026
92a3666
docs: refine endpoint rotation scope
qqq694637644 Oct 6, 2026
f78161a
feat: add managed endpoint rotation and client subscriptions
qqq694637644 Oct 6, 2026
8e1b7aa
fix: harden managed endpoint rotation
qqq694637644 Oct 6, 2026
28f5141
fix: validate endpoint probe with current Xray
qqq694637644 Oct 6, 2026
15347d5
refactor: rename connectivity check terminology
qqq694637644 Oct 6, 2026
718bd10
style: align endpoint service hooks
qqq694637644 Oct 6, 2026
3e9a059
fix endpoint takeover invariants
qqq694637644 Oct 7, 2026
313816b
style endpoint tests with gofmt
qqq694637644 Oct 7, 2026
ba9ddd0
fix managed endpoint recovery edge cases
qqq694637644 Oct 7, 2026
0a378f0
tighten managed endpoint state invariants
qqq694637644 Oct 8, 2026
e42488a
fail closed while xray restart is pending
qqq694637644 Oct 8, 2026
e472cdd
fix managed protocol lock regression test
qqq694637644 Oct 8, 2026
bb1ced3
keep managed Caddy fail-closed after rollback
qqq694637644 Oct 8, 2026
f4ab9ba
close managed endpoint recovery gaps
qqq694637644 Oct 8, 2026
31fe815
tighten managed zone and portal ownership
qqq694637644 Oct 8, 2026
5579b6d
narrow portal ownership validation
qqq694637644 Oct 8, 2026
ea6380e
tighten portal lifecycle invariants
qqq694637644 Oct 8, 2026
ca2d037
Merge pull request #15 from qqq694637644/gpt/subscription-endpoint-plan
qqq694637644 Oct 10, 2026
9834821
Document MyTRN integration into existing x-ui single Xray process
qqq694637644 Oct 10, 2026
a7809a1
Redesign MyTRN x-ui integration around existing Python A and direct G…
qqq694637644 Oct 10, 2026
9cdd491
Simplify MyTRN control to 16-character key and endpoint-only registra…
qqq694637644 Oct 10, 2026
2bbe0a2
Revert "Simplify MyTRN control to 16-character key and endpoint-only …
qqq694637644 Oct 10, 2026
46ba069
Speed up Go and pinned Xray builds with shared CI/release caches
qqq694637644 Oct 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: CI

on:
push:
branches:
- main
- 'gpt/**'
pull_request:
workflow_dispatch:

jobs:
go:
name: Go build and test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20.x'
cache: true

- name: Show Go version
run: go version

- name: Check gofmt
run: |
git fetch origin main
changed="$(git diff --name-only origin/main...HEAD -- '*.go')"
if [ -z "$changed" ]; then
exit 0
fi
files="$(gofmt -l $changed)"
if [ -n "$files" ]; then
echo "$files"
exit 1
fi

- name: Test
run: go test ./...

portal-smoke:
name: Actual x-ui A + b_client_xray B smoke
runs-on: ubuntu-latest

steps:
- name: Checkout x-ui
uses: actions/checkout@v4

- name: Checkout pinned b_client_xray generator
uses: actions/checkout@v4
with:
repository: qqq694637644/b_client_xray
ref: 1c33864eeeffc2c5305aab4ca8f0796586b571ae
path: .build/b_client_xray

- name: Checkout pinned Xray-core
uses: actions/checkout@v4
with:
repository: qqq694637644/Xray-core
ref: d2758a023cd7f4174a5a5fa4ff66e487d4342ba0
path: .build/xray-core-v26.3.27

- name: Set up Go
id: setup-go
uses: actions/setup-go@v5
with:
go-version: '1.26.8'
# The smoke job also compiles the pinned Xray-core repository.
# Share its Go module/build cache with release.yml (same Go version
# and dependency files). The Go 1.20 job above keeps its own cache.
cache: true
cache-dependency-path: |
go.sum
.build/xray-core-v26.3.27/go.sum

- name: Report Go cache reuse
run: echo "Go 1.26 build/module cache hit=${{ steps.setup-go.outputs.cache-hit }}"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: .build/b_client_xray/requirements.txt

- name: Install B generator dependencies
run: python -m pip install -r .build/b_client_xray/requirements.txt

- name: Restore pinned Xray binary for smoke tests
id: xray-binary-cache
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/xray-v26.3.27
# CI-only executable cache; releases always rebuild from pinned source.
# No restore-keys: compiler flags, Go version and source must all match.
key: xray-ci-linux-amd64-go1.26.8-cgo0-strip-d2758a023cd7f4174a5a5fa4ff66e487d4342ba0-${{ hashFiles('.build/xray-core-v26.3.27/go.mod', '.build/xray-core-v26.3.27/go.sum') }}

- name: Build pinned Xray
if: steps.xray-binary-cache.outputs.cache-hit != 'true'
run: |
cd .build/xray-core-v26.3.27
# Match release.yml's build flags to maximize shared GOCACHE reuse.
time CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o "$RUNNER_TEMP/xray-v26.3.27" ./main

- name: Verify pinned Xray executable
run: |
chmod +x "$RUNNER_TEMP/xray-v26.3.27"
"$RUNNER_TEMP/xray-v26.3.27" version | tee "$RUNNER_TEMP/xray-version.txt"
grep -Fq 'Xray 26.3.27' "$RUNNER_TEMP/xray-version.txt"
grep -Fq 'd2758a0' "$RUNNER_TEMP/xray-version.txt"

- name: Validate managed endpoint health-check config with pinned Xray
env:
XUI_HEALTHCHECK_XRAY_BIN: ${{ runner.temp }}/xray-v26.3.27
run: go test ./web/service -run TestEndpointHealthCheckConfigAcceptedByConfiguredXray -count=1

- name: Generate A config with x-ui production generator
run: |
go run ./cmd/portal-fixture \
--output "$RUNNER_TEMP/xui-a.json" \
--business-port 18081 \
--portal-port 40000 \
--target-port 19090 \
--uuid my-home-xray

- name: Run actual A/B TCP/UDP Portal smoke
working-directory: .build/b_client_xray
run: |
python scripts/smoke_portal.py \
--xray "$RUNNER_TEMP/xray-v26.3.27" \
--a-config "$RUNNER_TEMP/xui-a.json" \
--uuid my-home-xray
220 changes: 86 additions & 134 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,147 +1,99 @@
name: Release X-ui
name: Release Linux AMD64

on:
push:
tags:
- 0.*
- '*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag to create or update, for example v0.3.2'
required: true
type: string
draft:
description: 'Create or update the release as a draft'
required: false
default: false
type: boolean
prerelease:
description: 'Mark the release as a prerelease'
required: false
default: false
type: boolean

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GAYHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: true
linuxamd64build:
name: build x-ui amd64 version
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: build linux amd64 version
run: |
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go
mkdir x-ui
cp xui-release x-ui/xui-release
cp x-ui.service x-ui/x-ui.service
cp x-ui.sh x-ui/x-ui.sh
cd x-ui
mv xui-release x-ui
mkdir bin
cd bin
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
unzip Xray-linux-64.zip
rm -f Xray-linux-64.zip geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
mv xray xray-linux-amd64
cd ..
cd ..
- name: package
run: tar -zcvf x-ui-linux-amd64.tar.gz x-ui
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GAYHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: x-ui-linux-amd64.tar.gz
asset_name: x-ui-linux-amd64.tar.gz
asset_content_type: application/gzip
linuxarm64build:
name: build x-ui arm64 version
needs: release
release-linux-amd64:
name: Build and publish Linux amd64
runs-on: ubuntu-latest
env:
ASSET_NAME: x-ui-linux-amd64.tar.gz
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: build linux arm64 version
run: |
sudo apt-get update
sudo apt install gcc-aarch64-linux-gnu
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o xui-release -v main.go
mkdir x-ui
cp xui-release x-ui/xui-release
cp x-ui.service x-ui/x-ui.service
cp x-ui.sh x-ui/x-ui.sh
cd x-ui
mv xui-release x-ui
mkdir bin
cd bin
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-arm64-v8a.zip
unzip Xray-linux-arm64-v8a.zip
rm -f Xray-linux-arm64-v8a.zip geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
mv xray xray-linux-arm64
cd ..
cd ..
- name: package
run: tar -zcvf x-ui-linux-arm64.tar.gz x-ui
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GAYHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4

- name: Checkout pinned Xray-core v26.3.27
uses: actions/checkout@v4
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: x-ui-linux-arm64.tar.gz
asset_name: x-ui-linux-arm64.tar.gz
asset_content_type: application/gzip
linuxs390xbuild:
name: build x-ui s390x version
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
repository: qqq694637644/Xray-core
ref: d2758a023cd7f4174a5a5fa4ff66e487d4342ba0
path: .build/xray-core-v26.3.27

- name: Set up Go
uses: actions/setup-go@v2
id: setup-go
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: build linux s390x version
go-version: '1.26.8'
cache: true
# Include BOTH modules: x-ui and the fixed Xray fork. This uses
# the same cache key as the CI portal smoke job on Go 1.26.
cache-dependency-path: |
go.sum
.build/xray-core-v26.3.27/go.sum

- name: Report Go cache reuse
run: echo "Go 1.26 build/module cache hit=${{ steps.setup-go.outputs.cache-hit }}"

- name: Build Linux amd64 package
run: |
sudo apt-get update
sudo apt install gcc-s390x-linux-gnu -y
CGO_ENABLED=1 GOOS=linux GOARCH=s390x CC=s390x-linux-gnu-gcc go build -o xui-release -v main.go
mkdir x-ui
cp xui-release x-ui/xui-release
cp x-ui.service x-ui/x-ui.service
cp x-ui.sh x-ui/x-ui.sh
cd x-ui
mv xui-release x-ui
mkdir bin
cd bin
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-s390x.zip
unzip Xray-linux-s390x.zip
rm -f Xray-linux-s390x.zip geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
mv xray xray-linux-s390x
cd ..
cd ..
- name: package
run: tar -zcvf x-ui-linux-s390x.tar.gz x-ui
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GAYHUB_TOKEN }}
set -euo pipefail

rm -rf dist "$ASSET_NAME"
mkdir -p dist/x-ui/bin

# Download unchanged release rules concurrently with compilation.
# Check BOTH exit codes before publishing; neither file is optional.
curl -fL --retry 3 -o dist/x-ui/bin/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat &
geoip_pid=$!
curl -fL --retry 3 -o dist/x-ui/bin/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat &
geosite_pid=$!

CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o dist/x-ui/x-ui main.go

(
cd .build/xray-core-v26.3.27
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o "$GITHUB_WORKSPACE/dist/x-ui/bin/xray-linux-amd64" ./main
)

cp x-ui.service dist/x-ui/x-ui.service
cp x-ui.sh dist/x-ui/x-ui.sh

wait "$geoip_pid"
wait "$geosite_pid"

chmod +x dist/x-ui/x-ui dist/x-ui/x-ui.sh dist/x-ui/bin/xray-linux-amd64
tar -C dist -zcf "$ASSET_NAME" x-ui

- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: x-ui-linux-s390x.tar.gz
asset_name: x-ui-linux-s390x.tar.gz
asset_content_type: application/gzip
tag_name: ${{ env.RELEASE_TAG }}
target_commitish: ${{ github.sha }}
name: ${{ env.RELEASE_TAG }}
draft: ${{ github.event_name == 'workflow_dispatch' && inputs.draft || false }}
prerelease: ${{ github.event_name == 'workflow_dispatch' && inputs.prerelease || false }}
files: ${{ env.ASSET_NAME }}
fail_on_unmatched_files: true
Loading