Skip to content

Commit

Permalink
同步上游XrayR升级修改
Browse files Browse the repository at this point in the history
  • Loading branch information
wyx2685 committed Oct 17, 2023
1 parent da3f59d commit 99ef30c
Show file tree
Hide file tree
Showing 35 changed files with 1,191 additions and 385 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ jobs:
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main


- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ jobs:
- name: Build XrayR
run: |
mkdir -p build_assets
go build -v -o build_assets/XrayR -trimpath -ldflags "-s -w -buildid=" ./main
go build -v -o build_assets/XrayR -trimpath -ldflags "-s -w -buildid="
- name: Build Mips softfloat XrayR
if: matrix.goarch == 'mips' || matrix.goarch == 'mipsle'
run: |
GOMIPS=softfloat go build -v -o build_assets/XrayR_softfloat -trimpath -ldflags "-s -w -buildid=" ./main
GOMIPS=softfloat go build -v -o build_assets/XrayR_softfloat -trimpath -ldflags "-s -w -buildid="
- name: Rename Windows XrayR
if: matrix.goos == 'windows'
run: |
Expand All @@ -143,12 +143,12 @@ jobs:
command: |
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
cp ${GITHUB_WORKSPACE}/main/dns.json ./build_assets/dns.json
cp ${GITHUB_WORKSPACE}/main/route.json ./build_assets/route.json
cp ${GITHUB_WORKSPACE}/main/custom_outbound.json ./build_assets/custom_outbound.json
cp ${GITHUB_WORKSPACE}/main/custom_inbound.json ./build_assets/custom_inbound.json
cp ${GITHUB_WORKSPACE}/main/rulelist ./build_assets/rulelist
cp ${GITHUB_WORKSPACE}/main/config.yml.example ./build_assets/config.yml
cp ${GITHUB_WORKSPACE}/release/config/dns.json ./build_assets/dns.json
cp ${GITHUB_WORKSPACE}/release/config/route.json ./build_assets/route.json
cp ${GITHUB_WORKSPACE}/release/config/custom_outbound.json ./build_assets/custom_outbound.json
cp ${GITHUB_WORKSPACE}/release/config/custom_inbound.json ./build_assets/custom_inbound.json
cp ${GITHUB_WORKSPACE}/release/config/rulelist ./build_assets/rulelist
cp ${GITHUB_WORKSPACE}/release/config/config.yml.example ./build_assets/config.yml
LIST=('geoip geoip geoip' 'domain-list-community dlc geosite')
for i in "${LIST[@]}"
do
Expand Down
38 changes: 20 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
main/main
main/XrayR
main/XrayR*
main/mytest
main/access.logo
main/error.log
api/chooseparser.go.bak
common/Inboundbuilder/.lego/
common/legocmd/.lego/
.vscode/launch.json
main/.lego
main/cert
main/config.yml
./vscode
.idea/*
.DS_Store
*.bak
go.work*
.idea
*.iml
out
gen
*.exe
*.exe~
*.dll
*.so
*.dylib
*.test
*.out
go.work
main
XrayR
XrayR*
access.log
error.log
.lego
cert
config.yml
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build go
FROM golang:1.20-alpine AS builder
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY . .
ENV CGO_ENABLED=0
RUN go mod download
RUN go build -v -o XrayR -trimpath -ldflags "-s -w -buildid=" ./main
RUN go build -v -o XrayR -trimpath -ldflags "-s -w -buildid="

# Release
FROM alpine
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ A Xray backend framework that can easily support many panels.
| [PMPanel](https://github.com/ByteInternetHK/PMPanel) ||||
| [ProxyPanel](https://github.com/ProxyPanel/ProxyPanel) ||||
| [WHMCS (V2RaySocks)](https://v2raysocks.doxtex.com/) ||||
| [GoV2Panel](https://github.com/pingProMax/gov2panel) ||||

## 软件安装

Expand Down
35 changes: 22 additions & 13 deletions api/apimodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,20 @@ type NodeInfo struct {
ServiceName string
Header json.RawMessage
NameServerConfig []*conf.NameServerConfig
EnableREALITY bool
REALITYConfig *REALITYConfig
}

type UserInfo struct {
UID int
Email string
Passwd string
Port uint32
Method string
SpeedLimit uint64 // Bps
DeviceLimit int
Protocol string
ProtocolParam string
Obfs string
ObfsParam string
UUID string
AlterID uint16
UID int
Email string
UUID string
Passwd string
Port uint32
AlterID uint16
Method string
SpeedLimit uint64 // Bps
DeviceLimit int
}

type OnlineUser struct {
Expand Down Expand Up @@ -102,3 +100,14 @@ type DetectResult struct {
UID int
RuleID int
}

type REALITYConfig struct {
Dest string
ProxyProtocolVer uint64
ServerNames []string
PrivateKey string
MinClientVer string
MaxClientVer string
MaxTimeDiff uint64
ShortIds []string
}
Loading

0 comments on commit 99ef30c

Please sign in to comment.