Showing preview only (1,933K chars total). Download the full file or copy to clipboard to get everything.
Repository: sing-web/x-ui
Branch: main
Commit: 0cd2536025dd
Files: 121
Total size: 74.2 MB
Directory structure:
gitextract_66_3d683/
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── docker.yaml
│ └── release.yaml
├── .gitignore
├── Dockerfile
├── LICENSE
├── README.md
├── README_CN.md
├── bin/
│ ├── xray-linux-amd64
│ ├── xray-linux-arm64
│ └── xray-linux-s390x
├── config/
│ ├── config.go
│ ├── name
│ └── version
├── database/
│ ├── db.go
│ └── model/
│ └── model.go
├── go.mod
├── go.sum
├── install.sh
├── install_CN.sh
├── logger/
│ └── logger.go
├── main.go
├── util/
│ ├── common/
│ │ ├── err.go
│ │ ├── format.go
│ │ ├── multi_error.go
│ │ ├── network.go
│ │ └── stringUtil.go
│ ├── context.go
│ ├── json_util/
│ │ └── json.go
│ ├── random/
│ │ └── random.go
│ ├── reflect_util/
│ │ └── reflect.go
│ └── sys/
│ ├── a.s
│ ├── psutil.go
│ ├── sys_darwin.go
│ └── sys_linux.go
├── web/
│ ├── assets/
│ │ ├── ant-design-vue@1.7.2/
│ │ │ └── antd.less
│ │ ├── css/
│ │ │ └── custom.css
│ │ ├── element-ui@2.15.0/
│ │ │ └── theme-chalk/
│ │ │ └── display.css
│ │ ├── js/
│ │ │ ├── axios-init.js
│ │ │ ├── model/
│ │ │ │ ├── models.js
│ │ │ │ └── xray.js
│ │ │ └── util/
│ │ │ ├── common.js
│ │ │ ├── date-util.js
│ │ │ └── utils.js
│ │ └── vue@2.6.12/
│ │ ├── vue.common.dev.js
│ │ ├── vue.common.js
│ │ ├── vue.common.prod.js
│ │ ├── vue.esm.js
│ │ ├── vue.runtime.common.dev.js
│ │ ├── vue.runtime.common.js
│ │ ├── vue.runtime.common.prod.js
│ │ ├── vue.runtime.esm.js
│ │ └── vue.runtime.js
│ ├── controller/
│ │ ├── base.go
│ │ ├── inbound.go
│ │ ├── index.go
│ │ ├── server.go
│ │ ├── setting.go
│ │ ├── util.go
│ │ └── xui.go
│ ├── entity/
│ │ └── entity.go
│ ├── global/
│ │ └── global.go
│ ├── html/
│ │ ├── common/
│ │ │ ├── head.html
│ │ │ ├── js.html
│ │ │ ├── prompt_modal.html
│ │ │ ├── qrcode_modal.html
│ │ │ └── text_modal.html
│ │ ├── login.html
│ │ └── xui/
│ │ ├── common_sider.html
│ │ ├── component/
│ │ │ ├── inbound_info.html
│ │ │ └── setting.html
│ │ ├── form/
│ │ │ ├── inbound.html
│ │ │ ├── protocol/
│ │ │ │ ├── dokodemo.html
│ │ │ │ ├── http.html
│ │ │ │ ├── shadowsocks.html
│ │ │ │ ├── socks.html
│ │ │ │ ├── trojan.html
│ │ │ │ ├── vless.html
│ │ │ │ └── vmess.html
│ │ │ ├── reality_settings.html
│ │ │ ├── sniffing.html
│ │ │ ├── stream/
│ │ │ │ ├── stream_grpc.html
│ │ │ │ ├── stream_http.html
│ │ │ │ ├── stream_kcp.html
│ │ │ │ ├── stream_quic.html
│ │ │ │ ├── stream_settings.html
│ │ │ │ ├── stream_tcp.html
│ │ │ │ └── stream_ws.html
│ │ │ ├── stream_sockopt.html
│ │ │ └── tls_settings.html
│ │ ├── inbound_info_modal.html
│ │ ├── inbound_modal.html
│ │ ├── inbounds.html
│ │ ├── index.html
│ │ └── setting.html
│ ├── job/
│ │ ├── check_inbound_job.go
│ │ ├── check_xray_running_job.go
│ │ ├── stats_notify_job.go
│ │ └── xray_traffic_job.go
│ ├── network/
│ │ ├── auto_https_listener.go
│ │ └── autp_https_conn.go
│ ├── service/
│ │ ├── config.json
│ │ ├── inbound.go
│ │ ├── panel.go
│ │ ├── server.go
│ │ ├── setting.go
│ │ ├── telegram.go
│ │ ├── user.go
│ │ └── xray.go
│ ├── session/
│ │ └── session.go
│ ├── translation/
│ │ ├── translate.en_US.toml
│ │ ├── translate.zh_Hans.toml
│ │ └── translate.zh_Hant.toml
│ └── web.go
├── x-ui.service
├── x-ui.sh
├── x-ui_CN.sh
└── xray/
├── config.go
├── inbound.go
├── process.go
└── traffic.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
target-branch: "dev"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
================================================
FILE: .github/workflows/docker.yaml
================================================
name: "Build and push images"
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
Building:
runs-on: ubuntu-latest
name: "Build images"
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERHUB_REPOSITORY: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }}:latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Login to DockerHub
uses: docker/login-action@v3.0.0
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Build and push images to Docker hub
uses: docker/build-push-action@v5.1.0
with:
push: true
platforms: linux/amd64, linux/arm64, linux/s390x
tags: ${{ env.DOCKERHUB_REPOSITORY }}
================================================
FILE: .github/workflows/release.yaml
================================================
name: Release x-ui
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
container: docker.io/ubuntu:18.04
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.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
linux386build:
name: build x-ui 386 version
needs: release
runs-on: ubuntu-latest
container: docker.io/ubuntu:18.04
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: build linux 386 version
run: |
apt-get update
apt install -y sudo curl wget unzip ca-certificates build-essential gcc-multilib
CGO_ENABLED=1 GOOS=linux GOARCH=386 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-32.zip
unzip Xray-linux-32.zip
rm -f Xray-linux-32.zip
mv xray xray-linux-386
rm -f 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
cd ..
cd ..
- name: package
run: tar -zcvf x-ui-linux-386.tar.gz x-ui
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: x-ui-linux-386.tar.gz
asset_name: x-ui-linux-386.tar.gz
asset_content_type: application/gzip
linuxamd64build:
name: build x-ui amd64 version
needs: release
runs-on: ubuntu-latest
container: docker.io/ubuntu:18.04
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: build linux amd64 version
run: |
apt-get update
apt install -y sudo curl wget unzip ca-certificates build-essential
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
mv xray xray-linux-amd64
rm -f 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
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.GITHUB_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
runs-on: ubuntu-latest
container: docker.io/ubuntu:18.04
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: build linux arm64 version
run: |
apt-get update
apt install -y sudo curl wget unzip ca-certificates 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
mv xray xray-linux-arm64
rm -f 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
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.GITHUB_TOKEN }}
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
container: docker.io/ubuntu:18.04
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: build linux s390x version
run: |
apt-get update
apt install -y sudo curl wget unzip ca-certificates gcc-s390x-linux-gnu
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.GITHUB_TOKEN }}
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
================================================
FILE: .gitignore
================================================
.idea
tmp
dist/
x-ui/
release.sh
.sync*
bin/config.json
oryxBuildBinary
================================================
FILE: Dockerfile
================================================
FROM golang:latest AS builder
WORKDIR /root
COPY . .
RUN go build main.go
FROM debian:12-slim
RUN apt-get update && apt-get install -y --no-install-recommends -y ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /root
COPY --from=builder /root/main /root/x-ui
COPY bin/. /root/bin/.
VOLUME [ "/etc/x-ui" ]
CMD [ "./x-ui" ]
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
# x-ui
Multi-protocol, multi-user xray panel support
> [中文文档请点击这里进行查看](./README_CN.md)
# Features
- System status monitoring
- Support multi-user multi-protocol, multi-user on same port, web visualization operation
- Supported protocols: vmess, vless, trojan, shadowsocks, dokodemo-door, socks, http
- Support vless / trojan reality
- Support for configuring more transport configurations
- Traffic statistics, limit traffic, limit expiration time
- Customizable xray configuration templates
- Support https access panel (self-provided domain + ssl certificate)
- Support one-click SSL certificate application and automatic renewal
- More advanced configuration items, see panel for details
# Installation & Upgrade
```
bash <(wget -qO- https://raw.githubusercontent.com/sing-web/x-ui/main/install.sh)
```
## Manual installation & upgrade
1. First download the latest tarball from the project, usually choose the `amd64` architecture
2. Then upload the tarball to the `/root/` directory on the server and login to the server with the `root` user
> If your server cpu architecture is not `amd64`, replace `amd64` in the command with another architecture
```
cd /root/
rm x-ui/ /usr/local/x-ui/ /usr/bin/x-ui -rf
tar zxvf x-ui-linux-amd64.tar.gz
chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh
cp x-ui/x-ui.sh /usr/bin/x-ui
cp -f x-ui/x-ui.service /etc/systemd/system/
mv x-ui/ /usr/local/
systemctl daemon-reload
systemctl enable x-ui
systemctl restart x-ui
```
## Installing with docker
> This docker tutorial and docker image is provided by [Chasing66](https://github.com/Chasing66)
1. Installing docker
```shell
curl -fsSL https://get.docker.com | sh
```
2. install x-ui
```shell
mkdir x-ui && cd x-ui
docker run -itd --network=host \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
--name x-ui --restart=unless-stopped \
misakablog/x-ui:latest
```
> Build your own image
```shell
docker build -t x-ui .
```
## TG bot usage
> This feature and tutorial is provided by [FranzKafkaYu](https://github.com/FranzKafkaYu)
X-UI supports daily traffic notification and panel login reminder via Tg bot.
The specific application tutorial can be found in [blog link](https://coderfan.net/how-to-use-telegram-bot-to-alarm-you-when-someone-login-into-your-vps.html)
Instructions:Set the bot-related parameters in the background of the panel, including
- Tg Bot Token
- Tg Bot ChatId
- Tg Bot cycle running time, using crontab syntax
Reference syntax:
- 30 * * * * * * //notify on the 30ths of every minute
- @hourly // hourly notification
- @daily //daily notification (at 00:00 am sharp)
- @every 8h //notify every 8 hours
TG notification content:
- Node traffic usage
- Panel login reminder
- Node expiration reminder
- Traffic alert reminder
More features are being planned...
## Recommended Systems
- CentOS 7+
- Ubuntu 16+
- Debian 8+
## Credits
* vaxilu's x-ui project: https://github.com/vaxilu/x-ui
* qist's xray-ui project: https://github.com/qist/xray-ui
* MHSanaei's 3x-ui project: https://github.com/MHSanaei/3x-ui
## Sponsorship
afdian (for China mainland): https://afdian.net/a/Misaka-blog

## Disclaimer
* This program is for learning and understanding only, not for profit, please delete within 24 hours after downloading, not for any commercial use, text, data and images are copyrighted, if reproduced, please indicate the source.
* Use of this program is subject to the deployment disclaimer. Use of this program is subject to the laws and regulations of the country where the server is deployed and the country where the user is located, and the author of the program is not responsible for any misconduct of the user.
================================================
FILE: README_CN.md
================================================
# x-ui
支持多协议多用户的 xray 面板
# 功能介绍
- 系统状态监控
- 支持多用户多协议,单端口多用户,网页可视化操作
- 支持的协议:vmess、vless、trojan、shadowsocks、dokodemo-door、socks、http
- 支持 vless / trojan reality
- 支持配置更多传输配置
- 流量统计,限制流量,限制到期时间
- 可自定义 xray 配置模板
- 支持 https 访问面板(自备域名 + ssl 证书)
- 支持一键SSL证书申请且自动续签
- 更多高级配置项,详见面板
# 安装 & 升级
```
bash <(wget -qO- https://raw.githubusercontent.com/sing-web/x-ui/main/install_CN.sh)
```
## 手动安装&升级
1. 首先从项目中下载最新的压缩包,一般选择 `amd64`架构
2. 然后将这个压缩包上传到服务器的 `/root/`目录下,并使用 `root`用户登录服务器
> 如果你的服务器 cpu 架构不是 `amd64`,自行将命令中的 `amd64`替换为其他架构
```
cd /root/
rm x-ui/ /usr/local/x-ui/ /usr/bin/x-ui -rf
tar zxvf x-ui-linux-amd64.tar.gz
chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh
cp x-ui/x-ui.sh /usr/bin/x-ui
cp -f x-ui/x-ui.service /etc/systemd/system/
mv x-ui/ /usr/local/
systemctl daemon-reload
systemctl enable x-ui
systemctl restart x-ui
```
## 使用docker安装
> 此 docker 教程与 docker 镜像由[Chasing66](https://github.com/Chasing66)提供
1. 安装docker
```shell
curl -fsSL https://get.docker.com | sh
```
2. 安装x-ui
```shell
mkdir x-ui && cd x-ui
docker run -itd --network=host \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
--name x-ui --restart=unless-stopped \
misakablog/x-ui:latest
```
> Build 自己的镜像
```shell
docker build -t x-ui .
```
## TG 机器人使用
> 此功能与教程由[FranzKafkaYu](https://github.com/FranzKafkaYu)提供
X-UI支持通过Tg机器人实现每日流量通知,面板登录提醒等功能,使用Tg机器人,需要自行申请
具体申请教程可以参考[博客链接](https://coderfan.net/how-to-use-telegram-bot-to-alarm-you-when-someone-login-into-your-vps.html)
使用说明:在面板后台设置机器人相关参数,具体包括
- Tg机器人Token
- Tg机器人ChatId
- Tg机器人周期运行时间,采用crontab语法
参考语法:
- 30 * * * * * //每一分的第30s进行通知
- @hourly //每小时通知
- @daily //每天通知(凌晨零点整)
- @every 8h //每8小时通知
TG通知内容:
- 节点流量使用
- 面板登录提醒
- 节点到期提醒
- 流量预警提醒
更多功能规划中...
## 建议系统
- CentOS 7+
- Ubuntu 16+
- Debian 8+
## 鸣谢
* vaxilu 的 x-ui 项目:https://github.com/vaxilu/x-ui
* qist 的 xray-ui 项目:https://github.com/qist/xray-ui
* MHSanaei 的 3x-ui 项目:https://github.com/MHSanaei/3x-ui
## 赞助
爱发电:https://afdian.net/a/Misaka-blog

## 免责声明
* 本程序仅供学习了解, 非盈利目的,请于下载后 24 小时内删除, 不得用作任何商业用途, 文字、数据及图片均有所属版权, 如转载须注明来源。
* 使用本程序必循遵守部署免责声明。使用本程序必循遵守部署服务器所在地、所在国家和用户所在国家的法律法规, 程序作者不对使用者任何不当行为负责.
================================================
FILE: bin/xray-linux-amd64
================================================
[File too large to display: 23.8 MB]
================================================
FILE: bin/xray-linux-arm64
================================================
[File too large to display: 23.0 MB]
================================================
FILE: bin/xray-linux-s390x
================================================
[File too large to display: 25.6 MB]
================================================
FILE: config/config.go
================================================
package config
import (
_ "embed"
"fmt"
"os"
"strings"
)
//go:embed version
var version string
//go:embed name
var name string
type LogLevel string
const (
Debug LogLevel = "debug"
Info LogLevel = "info"
Warn LogLevel = "warn"
Error LogLevel = "error"
)
func GetVersion() string {
return strings.TrimSpace(version)
}
func GetName() string {
return strings.TrimSpace(name)
}
func GetLogLevel() LogLevel {
if IsDebug() {
return Debug
}
logLevel := os.Getenv("XUI_LOG_LEVEL")
if logLevel == "" {
return Info
}
return LogLevel(logLevel)
}
func IsDebug() bool {
return os.Getenv("XUI_DEBUG") == "true"
}
func GetBinFolderPath() string {
binFolderPath := os.Getenv("XUI_BIN_FOLDER")
if binFolderPath == "" {
binFolderPath = "bin"
}
return binFolderPath
}
func GetDBFolderPath() string {
dbFolderPath := os.Getenv("XUI_DB_FOLDER")
if dbFolderPath == "" {
dbFolderPath = "/etc/x-ui"
}
return dbFolderPath
}
func GetDBPath() string {
return fmt.Sprintf("/etc/%s/%s.db", GetName(), GetName())
}
================================================
FILE: config/name
================================================
x-ui
================================================
FILE: config/version
================================================
v0.3.3.14
================================================
FILE: database/db.go
================================================
package database
import (
"bytes"
"io"
"io/fs"
"os"
"path"
"x-ui/config"
"x-ui/database/model"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"gorm.io/gorm/logger"
)
var db *gorm.DB
func initUser() error {
err := db.AutoMigrate(&model.User{})
if err != nil {
return err
}
var count int64
err = db.Model(&model.User{}).Count(&count).Error
if err != nil {
return err
}
if count == 0 {
user := &model.User{
Username: "admin",
Password: "admin",
}
return db.Create(user).Error
}
return nil
}
func initInbound() error {
return db.AutoMigrate(&model.Inbound{})
}
func initSetting() error {
return db.AutoMigrate(&model.Setting{})
}
func InitDB(dbPath string) error {
dir := path.Dir(dbPath)
err := os.MkdirAll(dir, fs.ModeDir)
if err != nil {
return err
}
var gormLogger logger.Interface
if config.IsDebug() {
gormLogger = logger.Default
} else {
gormLogger = logger.Discard
}
c := &gorm.Config{
Logger: gormLogger,
}
db, err = gorm.Open(sqlite.Open(dbPath), c)
if err != nil {
return err
}
err = initUser()
if err != nil {
return err
}
err = initInbound()
if err != nil {
return err
}
err = initSetting()
if err != nil {
return err
}
return nil
}
func GetDB() *gorm.DB {
return db
}
func IsNotFound(err error) bool {
return err == gorm.ErrRecordNotFound
}
func IsSQLiteDB(file io.Reader) (bool, error) {
signature := []byte("SQLite format 3\x00")
buf := make([]byte, len(signature))
_, err := file.Read(buf)
if err != nil {
return false, err
}
return bytes.Equal(buf, signature), nil
}
================================================
FILE: database/model/model.go
================================================
package model
import (
"fmt"
"x-ui/util/json_util"
"x-ui/xray"
)
type Protocol string
const (
VMess Protocol = "vmess"
VLESS Protocol = "vless"
Dokodemo Protocol = "Dokodemo-door"
Http Protocol = "http"
Trojan Protocol = "trojan"
Shadowsocks Protocol = "shadowsocks"
)
type User struct {
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
Username string `json:"username"`
Password string `json:"password"`
}
type Inbound struct {
Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
UserId int `json:"-"`
Up int64 `json:"up" form:"up"`
Down int64 `json:"down" form:"down"`
Total int64 `json:"total" form:"total"`
Remark string `json:"remark" form:"remark"`
Enable bool `json:"enable" form:"enable"`
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
// config part
Listen string `json:"listen" form:"listen"`
Port int `json:"port" form:"port" gorm:"unique"`
Protocol Protocol `json:"protocol" form:"protocol"`
Settings string `json:"settings" form:"settings"`
StreamSettings string `json:"streamSettings" form:"streamSettings"`
Tag string `json:"tag" form:"tag" gorm:"unique"`
Sniffing string `json:"sniffing" form:"sniffing"`
}
func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {
listen := i.Listen
if listen != "" {
listen = fmt.Sprintf("\"%v\"", listen)
}
return &xray.InboundConfig{
Listen: json_util.RawMessage(listen),
Port: i.Port,
Protocol: string(i.Protocol),
Settings: json_util.RawMessage(i.Settings),
StreamSettings: json_util.RawMessage(i.StreamSettings),
Tag: i.Tag,
Sniffing: json_util.RawMessage(i.Sniffing),
}
}
type Setting struct {
Id int `json:"id" form:"id" gorm:"primaryKey;autoIncrement"`
Key string `json:"key" form:"key"`
Value string `json:"value" form:"value"`
}
================================================
FILE: go.mod
================================================
module x-ui
go 1.20
require (
github.com/BurntSushi/toml v1.3.2
github.com/Workiva/go-datastructures v1.1.0
github.com/gin-contrib/sessions v0.0.4
github.com/gin-gonic/gin v1.9.1
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1
github.com/nicksnyder/go-i18n/v2 v2.2.1
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v3 v3.23.6
github.com/xtls/xray-core v1.8.3
go.uber.org/atomic v1.11.0
golang.org/x/text v0.11.0
google.golang.org/grpc v1.56.2
gorm.io/driver/sqlite v1.5.2
gorm.io/gorm v1.25.2
)
require (
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/sessions v1.2.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pires/go-proxyproto v0.7.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/sagernet/sing v0.2.5 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/sys v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
================================================
FILE: go.sum
================================================
github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Workiva/go-datastructures v1.1.0 h1:hu20UpgZneBhQ3ZvwiOGlqJSKIosin2Rd5wAKUHEO/k=
github.com/Workiva/go-datastructures v1.1.0/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/antonlindstrom/pgstore v0.0.0-20200229204646-b08ebf1105e0/go.mod h1:2Ti6VUHVxpC0VSmTZzEvpzysnaGAfGBOoMIz5ykPyyw=
github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff/go.mod h1:+RTT1BOk5P97fT2CiHkbFQwkK3mjsFAP6zCYV2aXtjw=
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414f458e1/go.mod h1:dkChI7Tbtx7H1Tj7TqGSZMOeGpMP5gLHtjroHd4agiI=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 h1:y7y0Oa6UawqTFPCDw9JG6pdKt4F9pAhHv0B7FMGaGD0=
github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/gaukas/godicttls v0.0.3 h1:YNDIf0d9adcxOijiLrEzpfZGAkNwLRzPaG6OjU7EITk=
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 h1:Arcl6UOIS/kgO2nW3A65HN+7CMjSDP/gofXL4CZt1V4=
github.com/gin-contrib/sessions v0.0.4 h1:gq4fNa1Zmp564iHP5G6EBuktilEos8VKhe2sza1KMgo=
github.com/gin-contrib/sessions v0.0.4/go.mod h1:pQ3sIyviBBGcxgyR8mkeJuXbeV3h3NYmhJADQTq5+Vo=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 h1:wG8n/XJQ07TmjbITcGiUaOtXxdrINDz1b0J1w0SzqDc=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1/go.mod h1:A2S0CWkNylc2phvKXWBBdD3K0iGnDBGbzRpISP2zBl8=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kidstuff/mongostore v0.0.0-20181113001930-e650cd85ee4b/go.mod h1:g2nVr8KZVXJSS97Jo8pJ0jgq29P6H7dG0oplUA86MQw=
github.com/klauspost/compress v1.16.6 h1:91SKEy4K37vkp255cJ8QesJhjyRO0hn9i9G0GoUwLsk=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQSZpBSPIMUQSmmSHvuXc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/nicksnyder/go-i18n/v2 v2.2.1 h1:aOzRCdwsJuoExfZhoiXHy4bjruwCMdt5otbYojM/PaA=
github.com/nicksnyder/go-i18n/v2 v2.2.1/go.mod h1:fF2++lPHlo+/kPaj3nB0uxtPwzlPm+BlgwGX7MkeGj0=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs=
github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/quasoft/memstore v0.0.0-20191010062613-2bce066d2b0b/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg=
github.com/quic-go/qtls-go1-19 v0.3.2 h1:tFxjCFcTQzK+oMxG6Zcvp4Dq8dx4yD3dDiIiyc86Z5U=
github.com/quic-go/qtls-go1-20 v0.2.2 h1:WLOPx6OY/hxtTxKV1Zrq20FtXtDEkeY00CGQm8GEa3E=
github.com/quic-go/quic-go v0.35.1 h1:b0kzj6b/cQAf05cT0CkQubHM31wiA+xH3IBkxP62poo=
github.com/refraction-networking/utls v1.3.2 h1:o+AkWB57mkcoW36ET7uJ002CpBWHu0KPxi6vzxvPnv8=
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 h1:f/FNXud6gA3MNr8meMVVGxhp+QBTqY91tM8HjEuMjGg=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/sagernet/sing v0.2.5 h1:N8sUluR8GZvR9DqUiH3FA3vBb4m/EDdOVTYUrDzJvmY=
github.com/sagernet/sing v0.2.5/go.mod h1:Ta8nHnDLAwqySzKhGoKk4ZIB+vJ3GTKj7UPrWYvM+4w=
github.com/sagernet/sing-shadowsocks v0.2.2 h1:ezSdVhrmIcwDXmCZF3bOJVMuVtTQWpda+1Op+Ie2TA4=
github.com/sagernet/wireguard-go v0.0.0-20221116151939-c99467f53f2c h1:vK2wyt9aWYHHvNLWniwijBu/n4pySypiKRhN32u/JGo=
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb h1:XfLJSPIOUX+osiMraVgIrMR27uMXnRJWGm1+GL8/63U=
github.com/shirou/gopsutil/v3 v3.23.6 h1:5y46WPI9QBKBbK7EEccUPNXpJpNrvPuTD0O2zHEHT08=
github.com/shirou/gopsutil/v3 v3.23.6/go.mod h1:j7QX50DrXYggrpN30W0Mo+I4/8U2UUIQrnrhqUeWrAU=
github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=
github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=
github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI=
github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms=
github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4=
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e h1:5QefA066A1tF8gHIiADmOVOV5LS43gt3ONnlEl3xkwI=
github.com/xtls/reality v0.0.0-20230613075828-e07c3b04b983 h1:AMyzgjkh54WocjQSlCnT1LhDc/BKiUqtNOv40AkpURs=
github.com/xtls/xray-core v1.8.3 h1:lxaVklPjLKqUU4ua4qH8SBaRcAaNHlH+LmXOx0U/Ejg=
github.com/xtls/xray-core v1.8.3/go.mod h1:i7t4JFnq828P2+XK0XjGQ8W9x78iu+EJ7jI4l3sonIw=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI=
google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/sqlite v1.5.2 h1:TpQ+/dqCY4uCigCFyrfnrJnrW9zjpelWVoEVNy5qJkc=
gorm.io/driver/sqlite v1.5.2/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4=
gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho=
gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gvisor.dev/gvisor v0.0.0-20220901235040-6ca97ef2ce1c h1:m5lcgWnL3OElQNVyp3qcncItJ2c0sQlSGjYK2+nJTA4=
lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
================================================
FILE: install.sh
================================================
#!/bin/bash
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
plain='\033[0m'
cur_dir=$(pwd)
# check root
[[ $EUID -ne 0 ]] && echo -e "${red} error: ${plain} Must run this script with root user!\n" && exit 1
# check os
if [[ -f /etc/redhat-release ]]; then
release="centos"
elif cat /etc/issue | grep -Eqi "debian"; then
release="debian"
elif cat /etc/issue | grep -Eqi "ubuntu"; then
release="ubuntu"
elif cat /etc/issue | grep -Eqi "centos|red hat|redhat"; then
release="centos"
elif cat /proc/version | grep -Eqi "debian"; then
release="debian"
elif cat /proc/version | grep -Eqi "ubuntu"; then
release="ubuntu"
elif cat /proc/version | grep -Eqi "centos|red hat|redhat"; then
release="centos"
else
echo -e "${red}No system version detected, please contact the script author!${plain}\n" && exit 1
fi
arch=$(arch)
if [[ $arch == "i386" || $arch == "i686" ]]; then
arch="386"
elif [[ $arch == "x86_64" || $arch == "x64" || $arch == "amd64" ]]; then
arch="amd64"
elif [[ $arch == "aarch64" || $arch == "arm64" ]]; then
arch="arm64"
elif [[ $arch == "s390x" ]]; then
arch="s390x"
else
arch="amd64"
echo -e "${red}Failed to detect architecture, use default architecture: ${arch}${plain}"
fi
echo "Arch: ${arch}"
os_version=""
# os version
if [[ -f /etc/os-release ]]; then
os_version=$(awk -F'[= ."]' '/VERSION_ID/{print $3}' /etc/os-release)
fi
if [[ -z "$os_version" && -f /etc/lsb-release ]]; then
os_version=$(awk -F'[= ."]+' '/DISTRIB_RELEASE/{print $2}' /etc/lsb-release)
fi
if [[ x"${release}" == x"centos" ]]; then
if [[ ${os_version} -le 6 ]]; then
echo -e "${red}Please use CentOS 7 or higher!${plain}\n" && exit 1
fi
elif [[ x"${release}" == x"ubuntu" ]]; then
if [[ ${os_version} -lt 16 ]]; then
echo -e "${red}Please use Ubuntu 16 or higher!${plain}\n" && exit 1
fi
elif [[ x"${release}" == x"debian" ]]; then
if [[ ${os_version} -lt 8 ]]; then
echo -e "${red}Please use Debian 8 or higher!${plain}\n" && exit 1
fi
fi
install_base() {
if [[ x"${release}" == x"centos" ]]; then
yum install wget curl tar -y
else
apt-get update
apt install wget curl tar -y
fi
}
# This function will be called when user installed x-ui out of sercurity
config_after_install() {
echo -e "${yellow}For security reasons, you need to force a port and account password change after the installation/update is complete ${plain}"
read -p "Confirmation to continue? [y/n]: " config_confirm
if [[ x"${config_confirm}" == x"y" || x"${config_confirm}" == x"Y" ]]; then
read -p "Please set your account name (8 random characters if not filled in): " config_account
[[ -z $config_account ]] && config_account=$(date +%s%N | md5sum | cut -c 1-8)
echo -e "${yellow} your account name will be set to: ${config_account}${plain}"
read -p "Please set your account password (8 random characters if not filled in): " config_password
[[ -z $config_password ]] && config_password=$(date +%s%N | md5sum | cut -c 1-8)
echo -e "${yellow} your account password will be set to:${config_password}${plain}"
read -p "Please set the panel access port (or random port number if not filled in): " config_port
[[ -z $config_port ]] && config_port=$(shuf -i 2000-65535 -n 1)
until [[ -z $(ss -ntlp | awk '{print $4}' | sed 's/.*://g' | grep -w "$port") ]]; do
if [[ -n $(ss -ntlp | awk '{print $4}' | sed 's/.*://g' | grep -w "$port") ]]; then
echo -e "${red} $config_port ${plain} The port is already occupied by another program, please change the panel port number"
read -p "Please set the panel access port (or random port number if not filled in): " config_port
[[ -z $config_port ]] && config_port=$(shuf -i 2000-65535 -n 1)
fi
done
echo -e "${yellow} your panel access port will be set to:${config_port}${plain}"
echo -e "${yellow}Confirm setting, setting in ${plain}"
/usr/local/x-ui/x-ui setting -username ${config_account} -password ${config_password}
echo -e "${yellow} account password setting complete ${plain}"
/usr/local/x-ui/x-ui setting -port ${config_port}
echo -e "${yellow} panel port setting complete ${plain}"
else
config_port=$(/usr/local/x-ui/x-ui setting -show | sed -n 4p | awk -F ": " '{print $2}')
echo -e "${red}Account setting got cancelled, all settings are default, please change it as soon as possible!${plain}"
fi
}
install_x-ui() {
systemctl stop x-ui
cd /usr/local/
if [ $# == 0 ]; then
last_version=$(curl -Ls "https://api.github.com/repos/sing-web/x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$last_version" ]]; then
echo -e "${red}Failed to detect x-ui version, may be out of Github API limit, please try again later, or manually specify x-ui version to install${plain}"
exit 1
fi
echo -e "The latest version of x-ui is detected: ${last_version}, start installation"
wget -N --no-check-certificate -O /usr/local/x-ui-linux-${arch}.tar.gz https://github.com/sing-web/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz
if [[ $? -ne 0 ]]; then
echo -e "${red}Downloading x-ui failed, please make sure your server can download the Github file${plain}"
exit 1
fi
else
last_version=$1
url="https://github.com/sing-web/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz"
echo -e "Start installing x-ui $1"
wget -N --no-check-certificate -O /usr/local/x-ui-linux-${arch}.tar.gz ${url}
if [[ $? -ne 0 ]]; then
echo -e "${red}Downloading x-ui v$1 failed, please make sure this version exists${plain}"
exit 1
fi
fi
if [[ -e /usr/local/x-ui/ ]]; then
rm /usr/local/x-ui/ -rf
fi
tar zxvf x-ui-linux-${arch}.tar.gz
rm x-ui-linux-${arch}.tar.gz -f
cd x-ui
chmod +x x-ui bin/xray-linux-${arch}
cp -f x-ui.service /etc/systemd/system/
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/sing-web/x-ui/main/x-ui.sh
chmod +x /usr/local/x-ui/x-ui.sh
chmod +x /usr/bin/x-ui
config_after_install
#echo -e "如果是全新安装,默认网页端口为 ${green}54321${plain},用户名和密码默认都是 ${green}admin${plain}"
#echo -e "请自行确保此端口没有被其他程序占用,${yellow}并且确保 54321 端口已放行${plain}"
# echo -e "若想将 54321 修改为其它端口,输入 x-ui 命令进行修改,同样也要确保你修改的端口也是放行的"
#echo -e ""
#echo -e "如果是更新面板,则按你之前的方式访问面板"
#echo -e ""
systemctl daemon-reload
systemctl enable x-ui
systemctl start x-ui
systemctl stop warp-go >/dev/null 2>&1
wg-quick down wgcf >/dev/null 2>&1
ipv4=$(curl -s4m8 ip.p3terx.com -k | sed -n 1p)
ipv6=$(curl -s6m8 ip.p3terx.com -k | sed -n 1p)
systemctl start warp-go >/dev/null 2>&1
wg-quick up wgcf >/dev/null 2>&1
echo -e "${green}x-ui ${last_version}${plain} Installation completed, panel started"
echo -e ""
echo -e "How to use the x-ui administration script: "
echo -e "----------------------------------------------"
echo -e "x-ui - Show admin menu (more features)"
echo -e "x-ui start - Start x-ui panel"
echo -e "x-ui stop - stop the x-ui panel"
echo -e "x-ui restart - restart the x-ui panel"
echo -e "x-ui status - check x-ui status"
echo -e "x-ui enable - set x-ui to start on its own"
echo -e "x-ui disable - disable x-ui boot-up"
echo -e "x-ui log - View x-ui logs"
echo -e "x-ui update - Update the x-ui panel"
echo -e "x-ui install - Install the x-ui panel"
echo -e "x-ui uninstall - uninstall the x-ui panel"
echo -e "----------------------------------------------"
echo ""
if [[ -n $ipv4 ]]; then
echo -e "${yellow}The panel IPv4 access address is:${plain} ${green}http://$ipv4:$config_port ${plain}"
fi
if [[ -n $ipv6 ]]; then
echo -e "${yellow}The panel IPv6 access address is:${plain} ${green}http://[$ipv6]:$config_port ${plain}"
fi
echo -e "Please make sure that this port is not occupied by another application, ${yellow} and that the ${plain} ${red} $config_port ${plain} ${yellow} port is released ${plain}"
}
echo -e "${green}Begin installation${plain}"
install_base
install_x-ui $1
================================================
FILE: install_CN.sh
================================================
#!/bin/bash
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
plain='\033[0m'
cur_dir=$(pwd)
# check root
[[ $EUID -ne 0 ]] && echo -e "${red}错误:${plain} 必须使用root用户运行此脚本!\n" && exit 1
# check os
if [[ -f /etc/redhat-release ]]; then
release="centos"
elif cat /etc/issue | grep -Eqi "debian"; then
release="debian"
elif cat /etc/issue | grep -Eqi "ubuntu"; then
release="ubuntu"
elif cat /etc/issue | grep -Eqi "centos|red hat|redhat"; then
release="centos"
elif cat /proc/version | grep -Eqi "debian"; then
release="debian"
elif cat /proc/version | grep -Eqi "ubuntu"; then
release="ubuntu"
elif cat /proc/version | grep -Eqi "centos|red hat|redhat"; then
release="centos"
else
echo -e "${red}未检测到系统版本,请联系脚本作者!${plain}\n" && exit 1
fi
arch=$(arch)
if [[ $arch == "i386" || $arch == "i686" ]]; then
arch="386"
elif [[ $arch == "x86_64" || $arch == "x64" || $arch == "amd64" ]]; then
arch="amd64"
elif [[ $arch == "aarch64" || $arch == "arm64" ]]; then
arch="arm64"
elif [[ $arch == "s390x" ]]; then
arch="s390x"
else
arch="amd64"
echo -e "${red}检测架构失败,使用默认架构: ${arch}${plain}"
fi
echo "架构: ${arch}"
if [ $(getconf WORD_BIT) != '32' ] && [ $(getconf LONG_BIT) != '64' ]; then
echo "本软件不支持 32 位系统(x86),请使用 64 位系统(x86_64),如果检测有误,请联系作者"
exit -1
fi
os_version=""
# os version
if [[ -f /etc/os-release ]]; then
os_version=$(awk -F'[= ."]' '/VERSION_ID/{print $3}' /etc/os-release)
fi
if [[ -z "$os_version" && -f /etc/lsb-release ]]; then
os_version=$(awk -F'[= ."]+' '/DISTRIB_RELEASE/{print $2}' /etc/lsb-release)
fi
if [[ x"${release}" == x"centos" ]]; then
if [[ ${os_version} -le 6 ]]; then
echo -e "${red}请使用 CentOS 7 或更高版本的系统!${plain}\n" && exit 1
fi
elif [[ x"${release}" == x"ubuntu" ]]; then
if [[ ${os_version} -lt 16 ]]; then
echo -e "${red}请使用 Ubuntu 16 或更高版本的系统!${plain}\n" && exit 1
fi
elif [[ x"${release}" == x"debian" ]]; then
if [[ ${os_version} -lt 8 ]]; then
echo -e "${red}请使用 Debian 8 或更高版本的系统!${plain}\n" && exit 1
fi
fi
install_base() {
if [[ x"${release}" == x"centos" ]]; then
yum install wget curl tar -y
else
apt-get update
apt install wget curl tar -y
fi
}
#This function will be called when user installed x-ui out of sercurity
config_after_install() {
echo -e "${yellow}出于安全考虑,安装/更新完成后需要强制修改端口与账户密码${plain}"
read -p "确认是否继续? [y/n]: " config_confirm
if [[ x"${config_confirm}" == x"y" || x"${config_confirm}" == x"Y" ]]; then
read -p "请设置您的账户名(如未填写则随机8位字符): " config_account
[[ -z $config_account ]] && config_account=$(date +%s%N | md5sum | cut -c 1-8)
echo -e "${yellow}您的账户名将设定为:${config_account}${plain}"
read -p "请设置您的账户密码(如未填写则随机8位字符): " config_password
[[ -z $config_password ]] && config_password=$(date +%s%N | md5sum | cut -c 1-8)
echo -e "${yellow}您的账户密码将设定为:${config_password}${plain}"
read -p "请设置面板访问端口(如未填写则随机端口号): " config_port
[[ -z $config_port ]] && config_port=$(shuf -i 2000-65535 -n 1)
until [[ -z $(ss -ntlp | awk '{print $4}' | sed 's/.*://g' | grep -w "$port") ]]; do
if [[ -n $(ss -ntlp | awk '{print $4}' | sed 's/.*://g' | grep -w "$port") ]]; then
echo -e "${red} $config_port ${plain} 端口已经其他程序占用,请更换面板端口号"
read -p "请设置面板访问端口(如未填写则随机端口号): " config_port
[[ -z $config_port ]] && config_port=$(shuf -i 2000-65535 -n 1)
fi
done
echo -e "${yellow}您的面板访问端口将设定为:${config_port}${plain}"
echo -e "${yellow}确认设定,设定中${plain}"
/usr/local/x-ui/x-ui setting -username ${config_account} -password ${config_password}
echo -e "${yellow}账户密码设定完成${plain}"
/usr/local/x-ui/x-ui setting -port ${config_port}
echo -e "${yellow}面板端口设定完成${plain}"
else
config_port=$(/usr/local/x-ui/x-ui setting -show | sed -n 4p | awk -F ": " '{print $2}')
echo -e "${red}已取消, 所有设置项均为默认设置, 请及时修改${plain}"
fi
}
install_x-ui() {
systemctl stop x-ui
cd /usr/local/
if [ $# == 0 ]; then
last_version=$(curl -Ls "https://api.github.com/repos/sing-web/x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$last_version" ]]; then
echo -e "${red}检测 x-ui 版本失败,可能是超出 Github API 限制,请稍后再试,或手动指定 x-ui 版本安装${plain}"
exit 1
fi
echo -e "检测到 x-ui 最新版本:${last_version},开始安装"
wget -N --no-check-certificate -O /usr/local/x-ui-linux-${arch}.tar.gz https://github.com/sing-web/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz
if [[ $? -ne 0 ]]; then
echo -e "${red}下载 x-ui 失败,请确保你的服务器能够下载 Github 的文件${plain}"
exit 1
fi
else
last_version=$1
url="https://github.com/sing-web/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz"
echo -e "开始安装 x-ui $1"
wget -N --no-check-certificate -O /usr/local/x-ui-linux-${arch}.tar.gz ${url}
if [[ $? -ne 0 ]]; then
echo -e "${red}下载 x-ui $1 失败,请确保此版本存在${plain}"
exit 1
fi
fi
if [[ -e /usr/local/x-ui/ ]]; then
rm /usr/local/x-ui/ -rf
fi
tar zxvf x-ui-linux-${arch}.tar.gz
rm x-ui-linux-${arch}.tar.gz -f
cd x-ui
chmod +x x-ui bin/xray-linux-${arch}
cp -f x-ui.service /etc/systemd/system/
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/sing-web/x-ui/main/x-ui_CN.sh
chmod +x /usr/local/x-ui/x-ui.sh
chmod +x /usr/bin/x-ui
config_after_install
#echo -e "如果是全新安装,默认网页端口为 ${green}54321${plain},用户名和密码默认都是 ${green}admin${plain}"
#echo -e "请自行确保此端口没有被其他程序占用,${yellow}并且确保 54321 端口已放行${plain}"
# echo -e "若想将 54321 修改为其它端口,输入 x-ui 命令进行修改,同样也要确保你修改的端口也是放行的"
#echo -e ""
#echo -e "如果是更新面板,则按你之前的方式访问面板"
#echo -e ""
systemctl daemon-reload
systemctl enable x-ui
systemctl start x-ui
systemctl stop warp-go >/dev/null 2>&1
wg-quick down wgcf >/dev/null 2>&1
ipv4=$(curl -s4m8 ip.p3terx.com -k | sed -n 1p)
ipv6=$(curl -s6m8 ip.p3terx.com -k | sed -n 1p)
systemctl start warp-go >/dev/null 2>&1
wg-quick up wgcf >/dev/null 2>&1
echo -e "${green}x-ui ${last_version}${plain} 安装完成,面板已启动"
echo -e ""
echo -e "x-ui 管理脚本使用方法: "
echo -e "----------------------------------------------"
echo -e "x-ui - 显示管理菜单 (功能更多)"
echo -e "x-ui start - 启动 x-ui 面板"
echo -e "x-ui stop - 停止 x-ui 面板"
echo -e "x-ui restart - 重启 x-ui 面板"
echo -e "x-ui status - 查看 x-ui 状态"
echo -e "x-ui enable - 设置 x-ui 开机自启"
echo -e "x-ui disable - 取消 x-ui 开机自启"
echo -e "x-ui log - 查看 x-ui 日志"
echo -e "x-ui update - 更新 x-ui 面板"
echo -e "x-ui install - 安装 x-ui 面板"
echo -e "x-ui uninstall - 卸载 x-ui 面板"
echo -e "----------------------------------------------"
echo ""
if [[ -n $ipv4 ]]; then
echo -e "${yellow}面板IPv4访问地址为:${plain} ${green}http://$ipv4:$config_port ${plain}"
fi
if [[ -n $ipv6 ]]; then
echo -e "${yellow}面板IPv6访问地址为:${plain} ${green}http://[$ipv6]:$config_port ${plain}"
fi
echo -e "请自行确保此端口没有被其他程序占用,${yellow}并且确保${plain} ${red} $config_port ${plain} ${yellow}端口已放行${plain}"
}
echo -e "${green}开始安装${plain}"
install_base
install_x-ui $1
================================================
FILE: logger/logger.go
================================================
package logger
import (
"github.com/op/go-logging"
"os"
)
var logger *logging.Logger
func init() {
InitLogger(logging.INFO)
}
func InitLogger(level logging.Level) {
format := logging.MustStringFormatter(
`%{time:2006/01/02 15:04:05} %{level} - %{message}`,
)
newLogger := logging.MustGetLogger("x-ui")
backend := logging.NewLogBackend(os.Stderr, "", 0)
backendFormatter := logging.NewBackendFormatter(backend, format)
backendLeveled := logging.AddModuleLevel(backendFormatter)
backendLeveled.SetLevel(level, "")
newLogger.SetBackend(backendLeveled)
logger = newLogger
}
func Debug(args ...interface{}) {
logger.Debug(args...)
}
func Debugf(format string, args ...interface{}) {
logger.Debugf(format, args...)
}
func Info(args ...interface{}) {
logger.Info(args...)
}
func Infof(format string, args ...interface{}) {
logger.Infof(format, args...)
}
func Warning(args ...interface{}) {
logger.Warning(args...)
}
func Warningf(format string, args ...interface{}) {
logger.Warningf(format, args...)
}
func Error(args ...interface{}) {
logger.Error(args...)
}
func Errorf(format string, args ...interface{}) {
logger.Errorf(format, args...)
}
================================================
FILE: main.go
================================================
package main
import (
"flag"
"fmt"
"log"
"os"
"os/signal"
"syscall"
_ "unsafe"
"x-ui/config"
"x-ui/database"
"x-ui/logger"
"x-ui/web"
"x-ui/web/global"
"x-ui/web/service"
"github.com/op/go-logging"
)
func runWebServer() {
log.Printf("%v %v", config.GetName(), config.GetVersion())
switch config.GetLogLevel() {
case config.Debug:
logger.InitLogger(logging.DEBUG)
case config.Info:
logger.InitLogger(logging.INFO)
case config.Warn:
logger.InitLogger(logging.WARNING)
case config.Error:
logger.InitLogger(logging.ERROR)
default:
log.Fatal("unknown log level:", config.GetLogLevel())
}
err := database.InitDB(config.GetDBPath())
if err != nil {
log.Fatal(err)
}
var server *web.Server
server = web.NewServer()
global.SetWebServer(server)
err = server.Start()
if err != nil {
log.Println(err)
return
}
sigCh := make(chan os.Signal, 1)
//信号量捕获处理
signal.Notify(sigCh, syscall.SIGHUP, syscall.SIGTERM, syscall.SIGKILL)
for {
sig := <-sigCh
switch sig {
case syscall.SIGHUP:
err := server.Stop()
if err != nil {
logger.Warning("stop server err:", err)
}
server = web.NewServer()
global.SetWebServer(server)
err = server.Start()
if err != nil {
log.Println(err)
return
}
default:
server.Stop()
return
}
}
}
func resetSetting() {
err := database.InitDB(config.GetDBPath())
if err != nil {
fmt.Println(err)
return
}
settingService := service.SettingService{}
err = settingService.ResetSettings()
if err != nil {
fmt.Println("reset setting failed:", err)
} else {
fmt.Println("reset setting success")
}
}
func showSetting(show bool) {
if show {
settingService := service.SettingService{}
port, err := settingService.GetPort()
if err != nil {
fmt.Println("get current port fialed,error info:", err)
}
userService := service.UserService{}
userModel, err := userService.GetFirstUser()
if err != nil {
fmt.Println("get current user info failed,error info:", err)
}
username := userModel.Username
userpasswd := userModel.Password
if (username == "") || (userpasswd == "") {
fmt.Println("current username or password is empty")
}
fmt.Println("当前面板信息设置如下:")
fmt.Println("用户名:", username)
fmt.Println("密码:", userpasswd)
fmt.Println("端口:", port)
}
}
func updateTgbotEnableSts(status bool) {
settingService := service.SettingService{}
currentTgSts, err := settingService.GetTgbotenabled()
if err != nil {
fmt.Println(err)
return
}
logger.Infof("current enabletgbot status[%v],need update to status[%v]", currentTgSts, status)
if currentTgSts != status {
err := settingService.SetTgbotenabled(status)
if err != nil {
fmt.Println(err)
return
} else {
logger.Infof("SetTgbotenabled[%v] success", status)
}
}
return
}
func updateTgbotSetting(tgBotToken string, tgBotChatid int, tgBotRuntime string) {
err := database.InitDB(config.GetDBPath())
if err != nil {
fmt.Println(err)
return
}
settingService := service.SettingService{}
if tgBotToken != "" {
err := settingService.SetTgBotToken(tgBotToken)
if err != nil {
fmt.Println(err)
return
} else {
logger.Info("updateTgbotSetting tgBotToken success")
}
}
if tgBotRuntime != "" {
err := settingService.SetTgbotRuntime(tgBotRuntime)
if err != nil {
fmt.Println(err)
return
} else {
logger.Infof("updateTgbotSetting tgBotRuntime[%s] success", tgBotRuntime)
}
}
if tgBotChatid != 0 {
err := settingService.SetTgBotChatId(tgBotChatid)
if err != nil {
fmt.Println(err)
return
} else {
logger.Info("updateTgbotSetting tgBotChatid success")
}
}
}
func updateSetting(port int, username string, password string, listen string) {
err := database.InitDB(config.GetDBPath())
if err != nil {
fmt.Println(err)
return
}
settingService := service.SettingService{}
if port > 0 {
err := settingService.SetPort(port)
if err != nil {
fmt.Println("set port failed:", err)
} else {
fmt.Printf("set port %v success", port)
}
}
if listen != "" {
err := settingService.SetListen(listen)
if err != nil {
fmt.Println("set listen failed:", err)
} else {
fmt.Printf("set listen %v success", listen)
}
}
if username != "" || password != "" {
userService := service.UserService{}
err := userService.UpdateFirstUser(username, password)
if err != nil {
fmt.Println("set username and password failed:", err)
} else {
fmt.Println("set username and password success")
}
}
}
func main() {
if len(os.Args) < 2 {
runWebServer()
return
}
var showVersion bool
flag.BoolVar(&showVersion, "v", false, "show version")
runCmd := flag.NewFlagSet("run", flag.ExitOnError)
settingCmd := flag.NewFlagSet("setting", flag.ExitOnError)
var port int
var listen string
var username string
var password string
var tgbottoken string
var tgbotchatid int
var enabletgbot bool
var tgbotRuntime string
var reset bool
var show bool
settingCmd.BoolVar(&reset, "reset", false, "reset all settings")
settingCmd.BoolVar(&show, "show", false, "show current settings")
settingCmd.IntVar(&port, "port", 0, "set panel port")
settingCmd.StringVar(&listen, "listen", "", "set panel listen")
settingCmd.StringVar(&username, "username", "", "set login username")
settingCmd.StringVar(&password, "password", "", "set login password")
settingCmd.StringVar(&tgbottoken, "tgbottoken", "", "set telegrame bot token")
settingCmd.StringVar(&tgbotRuntime, "tgbotRuntime", "", "set telegrame bot cron time")
settingCmd.IntVar(&tgbotchatid, "tgbotchatid", 0, "set telegrame bot chat id")
settingCmd.BoolVar(&enabletgbot, "enabletgbot", false, "enable telegram bot notify")
oldUsage := flag.Usage
flag.Usage = func() {
oldUsage()
fmt.Println()
fmt.Println("Commands:")
fmt.Println(" run run web panel")
fmt.Println(" setting set settings")
}
flag.Parse()
if showVersion {
fmt.Println(config.GetVersion())
return
}
switch os.Args[1] {
case "run":
err := runCmd.Parse(os.Args[2:])
if err != nil {
fmt.Println(err)
return
}
runWebServer()
case "setting":
err := settingCmd.Parse(os.Args[2:])
if err != nil {
fmt.Println(err)
return
}
if reset {
resetSetting()
} else {
updateSetting(port, username, password, listen)
}
if show {
showSetting(show)
}
if (tgbottoken != "") || (tgbotchatid != 0) || (tgbotRuntime != "") {
updateTgbotSetting(tgbottoken, tgbotchatid, tgbotRuntime)
}
default:
fmt.Println("except 'run' or 'setting' subcommands")
fmt.Println()
runCmd.Usage()
fmt.Println()
fmt.Println()
settingCmd.Usage()
}
}
================================================
FILE: util/common/err.go
================================================
package common
import (
"errors"
"fmt"
"x-ui/logger"
)
var CtxDone = errors.New("context done")
func NewErrorf(format string, a ...interface{}) error {
msg := fmt.Sprintf(format, a...)
return errors.New(msg)
}
func NewError(a ...interface{}) error {
msg := fmt.Sprintln(a...)
return errors.New(msg)
}
func Recover(msg string) interface{} {
panicErr := recover()
if panicErr != nil {
if msg != "" {
logger.Error(msg, "panic:", panicErr)
}
}
return panicErr
}
================================================
FILE: util/common/format.go
================================================
package common
import (
"fmt"
)
func FormatTraffic(trafficBytes int64) (size string) {
if trafficBytes < 1024 {
return fmt.Sprintf("%.2fB", float64(trafficBytes)/float64(1))
} else if trafficBytes < (1024 * 1024) {
return fmt.Sprintf("%.2fKB", float64(trafficBytes)/float64(1024))
} else if trafficBytes < (1024 * 1024 * 1024) {
return fmt.Sprintf("%.2fMB", float64(trafficBytes)/float64(1024*1024))
} else if trafficBytes < (1024 * 1024 * 1024 * 1024) {
return fmt.Sprintf("%.2fGB", float64(trafficBytes)/float64(1024*1024*1024))
} else if trafficBytes < (1024 * 1024 * 1024 * 1024 * 1024) {
return fmt.Sprintf("%.2fTB", float64(trafficBytes)/float64(1024*1024*1024*1024))
} else {
return fmt.Sprintf("%.2fEB", float64(trafficBytes)/float64(1024*1024*1024*1024*1024))
}
}
func FormatTime(timeseconds uint64) (timeStr string) {
if timeseconds < 60 {
return fmt.Sprintf("%d seconds", timeseconds)
} else if timeseconds < 60*60 {
return fmt.Sprintf("%d minutes", timeseconds/(60))
} else if timeseconds < 60*60*24 {
return fmt.Sprintf("%d hours", timeseconds/(60*60))
} else {
return fmt.Sprintf("%d days", timeseconds/(60*60*24))
}
}
================================================
FILE: util/common/multi_error.go
================================================
package common
import (
"strings"
)
type multiError []error
func (e multiError) Error() string {
var r strings.Builder
r.WriteString("multierr: ")
for _, err := range e {
r.WriteString(err.Error())
r.WriteString(" | ")
}
return r.String()
}
func Combine(maybeError ...error) error {
var errs multiError
for _, err := range maybeError {
if err != nil {
errs = append(errs, err)
}
}
if len(errs) == 0 {
return nil
}
return errs
}
================================================
FILE: util/common/network.go
================================================
package common
import (
"io/ioutil"
"net/http"
)
func GetMyIpAddr() string {
resp, err := http.Get("https://api.ipify.org")
if err != nil {
resp, _ = http.Get("https://api64.ipify.org")
}
defer resp.Body.Close()
s, _ := ioutil.ReadAll(resp.Body)
return string(s)
}
================================================
FILE: util/common/stringUtil.go
================================================
package common
import (
"bytes"
"sort"
)
func IsSubString(target string, str_array []string) bool {
sort.Strings(str_array)
index := sort.SearchStrings(str_array, target)
return index < len(str_array) && str_array[index] == target
}
func ByteToString(p []byte) string {
for i := 0; i < len(p); i++ {
if p[i] == '\n' {
return string(p[0:i])
}
}
return string(p)
}
/*
* if some byte slice have the '\n' we need clear these special characters
* to get a standard string
*/
func ByteToStringWithOutNewLine(p []byte) string {
return string(bytes.Replace(p, []byte("\n"), []byte(""), 1))
}
================================================
FILE: util/context.go
================================================
package util
import "context"
func IsDone(ctx context.Context) bool {
select {
case <-ctx.Done():
return true
default:
return false
}
}
================================================
FILE: util/json_util/json.go
================================================
package json_util
import (
"errors"
)
type RawMessage []byte
// MarshalJSON 自定义 json.RawMessage 默认行为
func (m RawMessage) MarshalJSON() ([]byte, error) {
if len(m) == 0 {
return []byte("null"), nil
}
return m, nil
}
// UnmarshalJSON sets *m to a copy of data.
func (m *RawMessage) UnmarshalJSON(data []byte) error {
if m == nil {
return errors.New("json.RawMessage: UnmarshalJSON on nil pointer")
}
*m = append((*m)[0:0], data...)
return nil
}
================================================
FILE: util/random/random.go
================================================
package random
import (
"math/rand"
"time"
)
var numSeq [10]rune
var lowerSeq [26]rune
var upperSeq [26]rune
var numLowerSeq [36]rune
var numUpperSeq [36]rune
var allSeq [62]rune
func init() {
rand.Seed(time.Now().UnixNano())
for i := 0; i < 10; i++ {
numSeq[i] = rune('0' + i)
}
for i := 0; i < 26; i++ {
lowerSeq[i] = rune('a' + i)
upperSeq[i] = rune('A' + i)
}
copy(numLowerSeq[:], numSeq[:])
copy(numLowerSeq[len(numSeq):], lowerSeq[:])
copy(numUpperSeq[:], numSeq[:])
copy(numUpperSeq[len(numSeq):], upperSeq[:])
copy(allSeq[:], numSeq[:])
copy(allSeq[len(numSeq):], lowerSeq[:])
copy(allSeq[len(numSeq)+len(lowerSeq):], upperSeq[:])
}
func Seq(n int) string {
runes := make([]rune, n)
for i := 0; i < n; i++ {
runes[i] = allSeq[rand.Intn(len(allSeq))]
}
return string(runes)
}
================================================
FILE: util/reflect_util/reflect.go
================================================
package reflect_util
import "reflect"
func GetFields(t reflect.Type) []reflect.StructField {
num := t.NumField()
fields := make([]reflect.StructField, 0, num)
for i := 0; i < num; i++ {
fields = append(fields, t.Field(i))
}
return fields
}
func GetFieldValues(v reflect.Value) []reflect.Value {
num := v.NumField()
fields := make([]reflect.Value, 0, num)
for i := 0; i < num; i++ {
fields = append(fields, v.Field(i))
}
return fields
}
================================================
FILE: util/sys/a.s
================================================
================================================
FILE: util/sys/psutil.go
================================================
package sys
import (
_ "unsafe"
)
//go:linkname HostProc github.com/shirou/gopsutil/v3/internal/common.HostProc
func HostProc(combineWith ...string) string
================================================
FILE: util/sys/sys_darwin.go
================================================
//go:build darwin
// +build darwin
package sys
import (
"github.com/shirou/gopsutil/v3/net"
)
func GetTCPCount() (int, error) {
stats, err := net.Connections("tcp")
if err != nil {
return 0, err
}
return len(stats), nil
}
func GetUDPCount() (int, error) {
stats, err := net.Connections("udp")
if err != nil {
return 0, err
}
return len(stats), nil
}
================================================
FILE: util/sys/sys_linux.go
================================================
// +build linux
package sys
import (
"bytes"
"fmt"
"io"
"os"
)
func getLinesNum(filename string) (int, error) {
file, err := os.Open(filename)
if err != nil {
return 0, err
}
defer file.Close()
sum := 0
buf := make([]byte, 8192)
for {
n, err := file.Read(buf)
var buffPosition int
for {
i := bytes.IndexByte(buf[buffPosition:], '\n')
if i < 0 || n == buffPosition {
break
}
buffPosition += i + 1
sum++
}
if err == io.EOF {
return sum, nil
} else if err != nil {
return sum, err
}
}
}
func GetTCPCount() (int, error) {
root := HostProc()
tcp4, err := getLinesNum(fmt.Sprintf("%v/net/tcp", root))
if err != nil {
return tcp4, err
}
tcp6, err := getLinesNum(fmt.Sprintf("%v/net/tcp6", root))
if err != nil {
return tcp4 + tcp6, nil
}
return tcp4 + tcp6, nil
}
func GetUDPCount() (int, error) {
root := HostProc()
udp4, err := getLinesNum(fmt.Sprintf("%v/net/udp", root))
if err != nil {
return udp4, err
}
udp6, err := getLinesNum(fmt.Sprintf("%v/net/udp6", root))
if err != nil {
return udp4 + udp6, nil
}
return udp4 + udp6, nil
}
================================================
FILE: web/assets/ant-design-vue@1.7.2/antd.less
================================================
@import "../lib/style/index.less";
@import "../lib/style/components.less";
================================================
FILE: web/assets/css/custom.css
================================================
#app {
height: 100%;
}
.ant-space {
width: 100%;
}
.ant-layout-sider-zero-width-trigger {
display: none;
}
.ant-card {
border-radius: 30px;
}
.ant-card-hoverable {
cursor: auto;
}
.ant-card+.ant-card {
margin-top: 20px;
}
.drawer-handle {
position: absolute;
top: 72px;
width: 41px;
height: 40px;
cursor: pointer;
z-index: 0;
text-align: center;
line-height: 40px;
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
background: #fff;
right: -40px;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
border-radius: 0 4px 4px 0;
}
@media (min-width: 769px) {
.drawer-handle {
display: none;
}
}
.fade-in-enter, .fade-in-leave-active, .fade-in-linear-enter, .fade-in-linear-leave, .fade-in-linear-leave-active, .fade-in-linear-enter, .fade-in-linear-leave, .fade-in-linear-leave-active {
opacity: 0
}
.fade-in-linear-enter-active, .fade-in-linear-leave-active {
-webkit-transition: opacity .2s linear;
transition: opacity .2s linear
}
.fade-in-linear-enter-active, .fade-in-linear-leave-active {
-webkit-transition: opacity .2s linear;
transition: opacity .2s linear
}
.fade-in-enter-active, .fade-in-leave-active {
-webkit-transition: all .3s cubic-bezier(.55, 0, .1, 1);
transition: all .3s cubic-bezier(.55, 0, .1, 1)
}
.zoom-in-center-enter-active, .zoom-in-center-leave-active {
-webkit-transition: all .3s cubic-bezier(.55, 0, .1, 1);
transition: all .3s cubic-bezier(.55, 0, .1, 1)
}
.zoom-in-center-enter, .zoom-in-center-leave-active {
opacity: 0;
-webkit-transform: scaleX(0);
transform: scaleX(0)
}
.zoom-in-top-enter-active, .zoom-in-top-leave-active {
opacity: 1;
-webkit-transform: scaleY(1);
transform: scaleY(1);
-webkit-transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1);
transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
-webkit-transform-origin: center top;
transform-origin: center top
}
.zoom-in-top-enter, .zoom-in-top-leave-active {
opacity: 0;
-webkit-transform: scaleY(0);
transform: scaleY(0)
}
.zoom-in-bottom-enter-active, .zoom-in-bottom-leave-active {
opacity: 1;
-webkit-transform: scaleY(1);
transform: scaleY(1);
-webkit-transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1);
transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
-webkit-transform-origin: center bottom;
transform-origin: center bottom
}
.zoom-in-bottom-enter, .zoom-in-bottom-leave-active {
opacity: 0;
-webkit-transform: scaleY(0);
transform: scaleY(0)
}
.zoom-in-left-enter-active, .zoom-in-left-leave-active {
opacity: 1;
-webkit-transform: scale(1, 1);
transform: scale(1, 1);
-webkit-transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
transition: opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1);
transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), -webkit-transform .3s cubic-bezier(.23, 1, .32, 1);
-webkit-transform-origin: top left;
transform-origin: top left
}
.zoom-in-left-enter, .zoom-in-left-leave-active {
opacity: 0;
-webkit-transform: scale(.45, .45);
transform: scale(.45, .45)
}
.list-enter-active, .list-leave-active {
-webkit-transition: all .3s;
transition: all .3s
}
.list-enter, .list-leave-active {
opacity: 0;
-webkit-transform: translateY(-30px);
transform: translateY(-30px)
}
.ant-progress-inner {
background-color: #EBEEF5;
}
================================================
FILE: web/assets/element-ui@2.15.0/theme-chalk/display.css
================================================
@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px){.hidden-sm-and-up{display:none!important}}@media only screen and (min-width:768px) and (max-width:991px){.hidden-sm-only{display:none!important}}@media only screen and (max-width:991px){.hidden-sm-and-down{display:none!important}}@media only screen and (min-width:992px){.hidden-md-and-up{display:none!important}}@media only screen and (min-width:992px) and (max-width:1199px){.hidden-md-only{display:none!important}}@media only screen and (max-width:1199px){.hidden-md-and-down{display:none!important}}@media only screen and (min-width:1200px){.hidden-lg-and-up{display:none!important}}@media only screen and (min-width:1200px) and (max-width:1919px){.hidden-lg-only{display:none!important}}@media only screen and (max-width:1919px){.hidden-lg-and-down{display:none!important}}@media only screen and (min-width:1920px){.hidden-xl-only{display:none!important}}
================================================
FILE: web/assets/js/axios-init.js
================================================
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
axios.interceptors.request.use(
config => {
config.data = Qs.stringify(config.data, {
arrayFormat: 'repeat'
});
return config;
},
error => Promise.reject(error)
);
================================================
FILE: web/assets/js/model/models.js
================================================
class User {
constructor() {
this.username = "";
this.password = "";
}
}
class Msg {
constructor(success, msg, obj) {
this.success = false;
this.msg = "";
this.obj = null;
if (success != null) {
this.success = success;
}
if (msg != null) {
this.msg = msg;
}
if (obj != null) {
this.obj = obj;
}
}
}
class DBInbound {
constructor(data) {
this.id = 0;
this.userId = 0;
this.up = 0;
this.down = 0;
this.total = 0;
this.remark = "";
this.enable = true;
this.expiryTime = 0;
this.listen = "";
this.port = 0;
this.protocol = "";
this.settings = "";
this.streamSettings = "";
this.tag = "";
this.sniffing = "";
if (data == null) {
return;
}
ObjectUtil.cloneProps(this, data);
}
get totalGB() {
return toFixed(this.total / ONE_GB, 2);
}
set totalGB(gb) {
this.total = toFixed(gb * ONE_GB, 0);
}
get isVMess() {
return this.protocol === Protocols.VMESS;
}
get isVLess() {
return this.protocol === Protocols.VLESS;
}
get isTrojan() {
return this.protocol === Protocols.TROJAN;
}
get isSS() {
return this.protocol === Protocols.SHADOWSOCKS;
}
get isSocks() {
return this.protocol === Protocols.SOCKS;
}
get isHTTP() {
return this.protocol === Protocols.HTTP;
}
get address() {
let address = location.hostname;
if (!ObjectUtil.isEmpty(this.listen) && this.listen !== "0.0.0.0") {
address = this.listen;
}
return address;
}
get _expiryTime() {
if (this.expiryTime === 0) {
return null;
}
return moment(this.expiryTime);
}
set _expiryTime(t) {
if (t == null) {
this.expiryTime = 0;
} else {
this.expiryTime = t.valueOf();
}
}
get isExpiry() {
return this.expiryTime < new Date().getTime();
}
toInbound() {
let settings = {};
if (!ObjectUtil.isEmpty(this.settings)) {
settings = JSON.parse(this.settings);
}
let streamSettings = {};
if (!ObjectUtil.isEmpty(this.streamSettings)) {
streamSettings = JSON.parse(this.streamSettings);
}
let sniffing = {};
if (!ObjectUtil.isEmpty(this.sniffing)) {
sniffing = JSON.parse(this.sniffing);
}
const config = {
port: this.port,
listen: this.listen,
protocol: this.protocol,
settings: settings,
streamSettings: streamSettings,
tag: this.tag,
sniffing: sniffing,
};
return Inbound.fromJson(config);
}
hasLink() {
switch (this.protocol) {
case Protocols.VMESS:
case Protocols.VLESS:
case Protocols.TROJAN:
case Protocols.SHADOWSOCKS:
return true;
default:
return false;
}
}
genLink() {
const inbound = this.toInbound();
return inbound.genLink(this.address, this.remark);
}
}
class AllSetting {
constructor(data) {
this.webListen = "";
this.webPort = 54321;
this.webCertFile = "";
this.webKeyFile = "";
this.webBasePath = "/";
this.tgBotEnable = false;
this.tgBotToken = "";
this.tgBotChatId = 0;
this.tgRunTime = "";
this.xrayTemplateConfig = "";
this.timeLocation = "Asia/Shanghai";
if (data == null) {
return
}
ObjectUtil.cloneProps(this, data);
}
equals(other) {
return ObjectUtil.equals(this, other);
}
}
================================================
FILE: web/assets/js/model/xray.js
================================================
const Protocols = {
VMESS: 'vmess',
VLESS: 'vless',
TROJAN: 'trojan',
SHADOWSOCKS: 'shadowsocks',
DOKODEMO: 'dokodemo-door',
SOCKS: 'socks',
HTTP: 'http',
};
const VmessMethods = {
AES_128_GCM: 'aes-128-gcm',
CHACHA20_POLY1305: 'chacha20-poly1305',
AUTO: 'auto',
NONE: 'none',
};
const SSMethods = {
// AES_256_CFB: 'aes-256-cfb',
// AES_128_CFB: 'aes-128-cfb',
// CHACHA20: 'chacha20',
// CHACHA20_IETF: 'chacha20-ietf',
CHACHA20_POLY1305: 'chacha20-poly1305',
AES_256_GCM: 'aes-256-gcm',
AES_128_GCM: 'aes-128-gcm',
BLAKE3_AES_128_GCM: '2022-blake3-aes-128-gcm',
BLAKE3_AES_256_GCM: '2022-blake3-aes-256-gcm',
BLAKE3_CHACHA20_POLY1305: '2022-blake3-chacha20-poly1305',
};
const RULE_IP = {
PRIVATE: 'geoip:private',
CN: 'geoip:cn',
};
const RULE_DOMAIN = {
ADS: 'geosite:category-ads',
ADS_ALL: 'geosite:category-ads-all',
CN: 'geosite:cn',
GOOGLE: 'geosite:google',
FACEBOOK: 'geosite:facebook',
SPEEDTEST: 'geosite:speedtest',
};
const FLOW_VISION = {
RPRXVISION: "xtls-rprx-vision"
};
const TLS_VERSION_OPTION = {
TLS10: "1.0",
TLS11: "1.1",
TLS12: "1.2",
TLS13: "1.3",
};
const TLS_CIPHER_OPTION = {
AES_128_GCM: "TLS_AES_128_GCM_SHA256",
AES_256_GCM: "TLS_AES_256_GCM_SHA384",
CHACHA20_POLY1305: "TLS_CHACHA20_POLY1305_SHA256",
ECDHE_ECDSA_AES_128_CBC: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
ECDHE_ECDSA_AES_256_CBC: "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
ECDHE_ECDSA_AES_128_GCM: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
ECDHE_ECDSA_AES_256_GCM: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
ECDHE_RSA_AES_128_GCM: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
ECDHE_RSA_AES_256_GCM: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
ECDHE_ECDSA_CHACHA20_POLY1305: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
ECDHE_RSA_CHACHA20_POLY1305: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
};
const UTLS_FINGERPRINT = {
UTLS_CHROME: "chrome",
UTLS_FIREFOX: "firefox",
UTLS_SAFARI: "safari",
UTLS_IOS: "ios",
UTLS_android: "android",
UTLS_EDGE: "edge",
UTLS_360: "360",
UTLS_QQ: "qq",
UTLS_RANDOM: "random",
UTLS_RANDOMIZED: "randomized",
};
const SNIFFING_OPTION = {
HTTP: "http",
TLS: "tls",
QUIC: "quic",
};
const ALPN_OPTION = {
H3: "h3",
H2: "h2",
HTTP1: "http/1.1",
};
const TCP_CONGESTION = {
bbr: "bbr",
cubic: "cubic",
reno: "reno",
};
const DOMAIN_STRATEGY = {
AsIs: "AsIs",
UseIP: "UseIP",
UseIPv4: "UseIPv4",
UseIPv6: "UseIPv6",
};
const bytesToHex = e => Array.from(e).map(e => e.toString(16).padStart(2, 0)).join('');
const hexToBytes = e => new Uint8Array(e.match(/[0-9a-f]{2}/gi).map(e => parseInt(e, 16)));
Object.freeze(Protocols);
Object.freeze(VmessMethods);
Object.freeze(SSMethods);
Object.freeze(RULE_IP);
Object.freeze(RULE_DOMAIN);
Object.freeze(FLOW_VISION);
Object.freeze(TLS_VERSION_OPTION);
Object.freeze(TLS_CIPHER_OPTION);
Object.freeze(ALPN_OPTION);
Object.freeze(SNIFFING_OPTION);
Object.freeze(TCP_CONGESTION);
Object.freeze(DOMAIN_STRATEGY);
class XrayCommonClass {
static toJsonArray(arr) {
return arr.map(obj => obj.toJson());
}
static fromJson() {
return new XrayCommonClass();
}
toJson() {
return this;
}
toString(format = true) {
return format ? JSON.stringify(this.toJson(), null, 2) : JSON.stringify(this.toJson());
}
static toHeaders(v2Headers) {
let newHeaders = [];
if (v2Headers) {
Object.keys(v2Headers).forEach(key => {
let values = v2Headers[key];
if (typeof (values) === 'string') {
newHeaders.push({ name: key, value: values });
} else {
for (let i = 0; i < values.length; ++i) {
newHeaders.push({ name: key, value: values[i] });
}
}
});
}
return newHeaders;
}
static toV2Headers(headers, arr = true) {
let v2Headers = {};
for (let i = 0; i < headers.length; ++i) {
let name = headers[i].name;
let value = headers[i].value;
if (ObjectUtil.isEmpty(name) || ObjectUtil.isEmpty(value)) {
continue;
}
if (!(name in v2Headers)) {
v2Headers[name] = arr ? [value] : value;
} else {
if (arr) {
v2Headers[name].push(value);
} else {
v2Headers[name] = value;
}
}
}
return v2Headers;
}
}
class TcpStreamSettings extends XrayCommonClass {
constructor(type = 'none',
request = new TcpStreamSettings.TcpRequest(),
response = new TcpStreamSettings.TcpResponse(),
) {
super();
this.type = type;
this.request = request;
this.response = response;
}
static fromJson(json = {}) {
let header = json.header;
if (!header) {
header = {};
}
return new TcpStreamSettings(
header.type,
TcpStreamSettings.TcpRequest.fromJson(header.request),
TcpStreamSettings.TcpResponse.fromJson(header.response),
);
}
toJson() {
return {
header: {
type: this.type,
request: this.type === 'http' ? this.request.toJson() : undefined,
response: this.type === 'http' ? this.response.toJson() : undefined,
},
};
}
}
TcpStreamSettings.TcpRequest = class extends XrayCommonClass {
constructor(version = '1.1',
method = 'GET',
path = ['/'],
headers = [],
) {
super();
this.version = version;
this.method = method;
this.path = path.length === 0 ? ['/'] : path;
this.headers = headers;
}
addPath(path) {
this.path.push(path);
}
removePath(index) {
this.path.splice(index, 1);
}
addHeader(name, value) {
this.headers.push({ name: name, value: value });
}
getHeader(name) {
for (const header of this.headers) {
if (header.name.toLowerCase() === name.toLowerCase()) {
return header.value;
}
}
return null;
}
removeHeader(index) {
this.headers.splice(index, 1);
}
static fromJson(json = {}) {
return new TcpStreamSettings.TcpRequest(
json.version,
json.method,
json.path,
XrayCommonClass.toHeaders(json.headers),
);
}
toJson() {
return {
method: this.method,
path: ObjectUtil.clone(this.path),
headers: XrayCommonClass.toV2Headers(this.headers),
};
}
};
TcpStreamSettings.TcpResponse = class extends XrayCommonClass {
constructor(version = '1.1',
status = '200',
reason = 'OK',
headers = [],
) {
super();
this.version = version;
this.status = status;
this.reason = reason;
this.headers = headers;
}
addHeader(name, value) {
this.headers.push({ name: name, value: value });
}
removeHeader(index) {
this.headers.splice(index, 1);
}
static fromJson(json = {}) {
return new TcpStreamSettings.TcpResponse(
json.version,
json.status,
json.reason,
XrayCommonClass.toHeaders(json.headers),
);
}
toJson() {
return {
version: this.version,
status: this.status,
reason: this.reason,
headers: XrayCommonClass.toV2Headers(this.headers),
};
}
};
class KcpStreamSettings extends XrayCommonClass {
constructor(mtu = 1350, tti = 20,
uplinkCapacity = 5,
downlinkCapacity = 20,
congestion = false,
readBufferSize = 2,
writeBufferSize = 2,
type = 'none',
seed = RandomUtil.randomSeq(10),
) {
super();
this.mtu = mtu;
this.tti = tti;
this.upCap = uplinkCapacity;
this.downCap = downlinkCapacity;
this.congestion = congestion;
this.readBuffer = readBufferSize;
this.writeBuffer = writeBufferSize;
this.type = type;
this.seed = seed;
}
static fromJson(json = {}) {
return new KcpStreamSettings(
json.mtu,
json.tti,
json.uplinkCapacity,
json.downlinkCapacity,
json.congestion,
json.readBufferSize,
json.writeBufferSize,
ObjectUtil.isEmpty(json.header) ? 'none' : json.header.type,
json.seed,
);
}
toJson() {
return {
mtu: this.mtu,
tti: this.tti,
uplinkCapacity: this.upCap,
downlinkCapacity: this.downCap,
congestion: this.congestion,
readBufferSize: this.readBuffer,
writeBufferSize: this.writeBuffer,
header: {
type: this.type,
},
seed: this.seed,
};
}
}
class WsStreamSettings extends XrayCommonClass {
constructor(path = '/', headers = []) {
super();
this.path = path;
this.headers = headers;
}
addHeader(name, value) {
this.headers.push({ name: name, value: value });
}
getHeader(name) {
for (const header of this.headers) {
if (header.name.toLowerCase() === name.toLowerCase()) {
return header.value;
}
}
return null;
}
removeHeader(index) {
this.headers.splice(index, 1);
}
static fromJson(json = {}) {
return new WsStreamSettings(
json.path,
XrayCommonClass.toHeaders(json.headers),
);
}
toJson() {
return {
path: this.path,
headers: XrayCommonClass.toV2Headers(this.headers, false),
};
}
}
class HttpStreamSettings extends XrayCommonClass {
constructor(path = '/', host = ['']) {
super();
this.path = path;
this.host = host.length === 0 ? [''] : host;
}
addHost(host) {
this.host.push(host);
}
removeHost(index) {
this.host.splice(index, 1);
}
static fromJson(json = {}) {
return new HttpStreamSettings(json.path, json.host);
}
toJson() {
let host = [];
for (let i = 0; i < this.host.length; ++i) {
if (!ObjectUtil.isEmpty(this.host[i])) {
host.push(this.host[i]);
}
}
return {
path: this.path,
host: host,
}
}
}
class QuicStreamSettings extends XrayCommonClass {
constructor(security = VmessMethods.NONE,
key = '', type = 'none',) {
super();
this.security = security;
this.key = key;
this.type = type;
}
static fromJson(json = {}) {
return new QuicStreamSettings(
json.security,
json.key,
json.header ? json.header.type : 'none',
);
}
toJson() {
return {
security: this.security,
key: this.key,
header: {
type: this.type,
}
}
}
}
class GrpcStreamSettings extends XrayCommonClass {
constructor(serviceName = "") {
super();
this.serviceName = serviceName;
}
static fromJson(json = {}) {
return new GrpcStreamSettings(json.serviceName);
}
toJson() {
return {
serviceName: this.serviceName,
}
}
}
class TlsStreamSettings extends XrayCommonClass {
constructor(serverName = '',
rejectUnknownSni = false,
minVersion = TLS_VERSION_OPTION.TLS12,
maxVersion = TLS_VERSION_OPTION.TLS13,
cipherSuites = '',
allowInsecure = false,
fingerprint = UTLS_FINGERPRINT.UTLS_RANDOM,
certificates = [new TlsStreamSettings.Cert()], alpn = ['']) {
super();
this.server = serverName;
this.rejectUnknownSni = rejectUnknownSni;
this.minVersion = minVersion;
this.maxVersion = maxVersion;
this.cipherSuites = cipherSuites;
this.allowInsecure = allowInsecure;
this.fingerprint = fingerprint;
this.certs = certificates;
this.alpn = alpn;
}
addCert(cert) {
this.certs.push(cert);
}
removeCert(index) {
this.certs.splice(index, 1);
}
static fromJson(json = {}) {
let certs;
if (!ObjectUtil.isEmpty(json.certificates)) {
certs = json.certificates.map(cert => TlsStreamSettings.Cert.fromJson(cert));
}
return new TlsStreamSettings(
json.serverName,
json.rejectUnknownSni,
json.minVersion,
json.maxVersion,
json.cipherSuites,
json.allowInsecure,
json.fingerprint,
certs,
json.alpn,
);
}
toJson() {
return {
serverName: this.server,
rejectUnknownSni: this.rejectUnknownSni,
minVersion: this.minVersion,
maxVersion: this.maxVersion,
cipherSuites: this.cipherSuites instanceof Array ? this.cipherSuites.join(':') : this.cipherSuites,
allowInsecure: this.allowInsecure,
fingerprint: this.fingerprint,
certificates: TlsStreamSettings.toJsonArray(this.certs),
alpn: this.alpn,
};
}
}
TlsStreamSettings.Cert = class extends XrayCommonClass {
constructor(useFile = true, ocspStapling = 3600, certificateFile = '', keyFile = '', certificate = '', key = '') {
super();
this.useFile = useFile;
this.ocspStapling = ocspStapling;
this.certFile = certificateFile;
this.keyFile = keyFile;
this.cert = certificate instanceof Array ? certificate.join('\n') : certificate;
this.key = key instanceof Array ? key.join('\n') : key;
}
static fromJson(json = {}) {
if ('certificateFile' in json && 'keyFile' in json) {
return new TlsStreamSettings.Cert(
true,
json.ocspStapling,
json.certificateFile,
json.keyFile,
);
} else {
return new TlsStreamSettings.Cert(
false,
json.ocspStapling,
'', '',
json.certificate.join('\n'),
json.key.join('\n'),
);
}
}
toJson() {
if (this.useFile) {
return {
ocspStapling: this.ocspStapling,
certificateFile: this.certFile,
keyFile: this.keyFile,
};
} else {
return {
ocspStapling: this.ocspStapling,
certificate: this.cert.split('\n'),
key: this.key.split('\n'),
};
}
}
};
class RealityStreamSettings extends XrayCommonClass {
constructor(
show = false,
dest = "www.sega.com:443",
xver = 0,
fingerprint = UTLS_FINGERPRINT.UTLS_RANDOM,
serverNames = 'www.sega.com',
privateKey = RandomUtil.randomX25519PrivateKey(),
publicKey = '',
minClientVer = "",
maxClientVer = "",
maxTimeDiff = 0,
shortIds = RandomUtil.randowShortId()
) {
super();
this.show = show;
this.dest = dest;
this.xver = xver;
this.fingerprint = fingerprint;
this.serverNames = serverNames instanceof Array ? serverNames.join('\n') : serverNames;
this.privateKey = privateKey;
this.publicKey = RandomUtil.randomX25519PublicKey(this.privateKey);
this.minClientVer = minClientVer;
this.maxClientVer = maxClientVer;
this.maxTimeDiff = maxTimeDiff;
this.shortIds = shortIds instanceof Array ? shortIds.join('\n') : shortIds;
}
static fromJson(json = {}) {
return new RealityStreamSettings(
json.show,
json.dest,
json.xver,
json.fingerprint,
json.serverNames,
json.privateKey,
json.publicKey,
json.minClientVer,
json.maxClientVer,
json.maxTimeDiff,
json.shortIds,
);
}
toJson() {
return {
show: this.show,
dest: this.dest,
xver: this.xver,
fingerprint: this.fingerprint,
serverNames: this.serverNames.split(/,|,|\s+/),
privateKey: this.privateKey,
publicKey: this.publicKey,
minClientVer: this.minClientVer,
maxClientVer: this.maxClientVer,
maxTimeDiff: this.maxTimeDiff,
shortIds: this.shortIds.split(/,|,|\s+/),
}
}
}
class SockoptStreamSettings extends XrayCommonClass {
constructor(tcpMaxSeg = 1440,
tcpFastOpen = false,
domainStrategy = DOMAIN_STRATEGY.AsIs,
tcpcongestion = '',
acceptProxyProtocol = false,
tcpKeepAliveIdle = 0,
tcpKeepAliveInterval = 0,
tcpUserTimeout = 10000,
_interface = "",
) {
super();
this.tcpMaxSeg = tcpMaxSeg;
this.tcpFastOpen = tcpFastOpen;
this.domainStrategy = domainStrategy;
this.tcpcongestion = tcpcongestion;
this.acceptProxyProtocol = acceptProxyProtocol;
this.tcpKeepAliveIdle = tcpKeepAliveIdle;
this.tcpKeepAliveInterval = tcpKeepAliveInterval;
this.tcpUserTimeout = tcpUserTimeout;
this.tcpcongestion = tcpcongestion;
this.interface = _interface instanceof Array ? this.interface : _interface;
}
static fromJson(json = {}) {
return new SockoptStreamSettings(
json.tcpMaxSeg,
json.tcpFastOpen,
json.domainStrategy,
json.tcpcongestion,
json.acceptProxyProtocol,
json.tcpKeepAliveIdle,
json.tcpKeepAliveInterval,
json.tcpUserTimeout,
json.tcpcongestion,
json.interface,
);
}
toJson() {
return {
tcpMaxSeg: this.tcpMaxSeg,
tcpFastOpen: this.tcpFastOpen,
domainStrategy: this.domainStrategy,
tcpcongestion: this.tcpcongestion,
acceptProxyProtocol: this.acceptProxyProtocol,
tcpKeepAliveIdle: this.tcpKeepAliveIdle,
tcpKeepAliveInterval: this.tcpKeepAliveInterval,
tcpUserTimeout: this.tcpUserTimeout,
tcpcongestion: this.tcpcongestion,
interface: this.interface,
};
}
}
class StreamSettings extends XrayCommonClass {
constructor(network = 'tcp',
security = 'none',
tlsSettings = new TlsStreamSettings(),
realitySettings = new RealityStreamSettings(),
tcpSettings = new TcpStreamSettings(),
kcpSettings = new KcpStreamSettings(),
wsSettings = new WsStreamSettings(),
httpSettings = new HttpStreamSettings(),
quicSettings = new QuicStreamSettings(),
grpcSettings = new GrpcStreamSettings(),
sockopt = new SockoptStreamSettings(),
) {
super();
this.network = network;
this.security = security;
this.tls = tlsSettings;
this.reality = realitySettings;
this.tcp = tcpSettings;
this.kcp = kcpSettings;
this.ws = wsSettings;
this.http = httpSettings;
this.quic = quicSettings;
this.grpc = grpcSettings;
this.sockopt = sockopt;
}
get isTls() {
return this.security === 'tls';
}
set isTls(isTls) {
if (isTls) {
this.security = 'tls';
} else {
this.security = 'none';
}
}
get isReality() {
return this.security === "reality";
}
set isReality(isReality) {
if (isReality) {
this.security = 'reality';
} else {
this.security = 'none';
}
}
get isSockopt() {
return ['tcp', 'http', 'grpc', 'ws'].indexOf(this.network) !== -1;
}
set isSockopt(isSockopt) {
if (isSockopt) {
return ['tcp', 'http', 'grpc', 'ws'].indexOf(this.network) !== -1;
}
}
static fromJson(json = {}) {
return new StreamSettings(
json.network,
json.security,
TlsStreamSettings.fromJson(json.tlsSettings),
RealityStreamSettings.fromJson(json.realitySettings),
TcpStreamSettings.fromJson(json.tcpSettings),
KcpStreamSettings.fromJson(json.kcpSettings),
WsStreamSettings.fromJson(json.wsSettings),
HttpStreamSettings.fromJson(json.httpSettings),
QuicStreamSettings.fromJson(json.quicSettings),
GrpcStreamSettings.fromJson(json.grpcSettings),
SockoptStreamSettings.fromJson(json.sockopt),
);
}
toJson() {
const network = this.network;
return {
network: network,
security: this.security,
tlsSettings: this.isTls ? this.tls.toJson() : undefined,
realitySettings: this.isReality ? this.reality.toJson() : undefined,
tcpSettings: network === 'tcp' ? this.tcp.toJson() : undefined,
kcpSettings: network === 'kcp' ? this.kcp.toJson() : undefined,
wsSettings: network === 'ws' ? this.ws.toJson() : undefined,
httpSettings: network === 'http' ? this.http.toJson() : undefined,
quicSettings: network === 'quic' ? this.quic.toJson() : undefined,
grpcSettings: network === 'grpc' ? this.grpc.toJson() : undefined,
sockopt: this.isSockopt ? this.sockopt.toJson() : undefined,
};
}
}
class Sniffing extends XrayCommonClass {
constructor(enabled = true, destOverride = ['http', 'tls', 'quic']) {
super();
this.enabled = enabled;
this.destOverride = destOverride;
}
static fromJson(json = {}) {
let destOverride = ObjectUtil.clone(json.destOverride);
if (!ObjectUtil.isEmpty(destOverride) && !ObjectUtil.isArrEmpty(destOverride)) {
if (ObjectUtil.isEmpty(destOverride[0])) {
destOverride = ['http', 'tls', 'quic'];
}
}
return new Sniffing(
!!json.enabled,
destOverride,
);
}
}
class Inbound extends XrayCommonClass {
constructor(port = RandomUtil.randomIntRange(10000, 60000),
listen = '',
protocol = Protocols.VMESS,
settings = null,
streamSettings = new StreamSettings(),
tag = '',
sniffing = new Sniffing(),
) {
super();
this.port = port;
this.listen = listen;
this._protocol = protocol;
this.settings = ObjectUtil.isEmpty(settings) ? Inbound.Settings.getSettings(protocol) : settings;
this.stream = streamSettings;
this.tag = tag;
this.sniffing = sniffing;
}
get protocol() {
return this._protocol;
}
set protocol(protocol) {
this._protocol = protocol;
this.settings = Inbound.Settings.getSettings(protocol);
if (protocol === Protocols.TROJAN) {
if (this.network === "tcp") {
this.tls = true;
}
}
}
get tls() {
return this.stream.security === 'tls';
}
set tls(isTls) {
if (isTls) {
this.stream.security = 'tls';
} else {
this.stream.security = 'none';
}
}
get reality() {
return this.stream.security === 'reality';
}
set reality(isReality) {
if (isReality) {
this.stream.security = 'reality';
} else {
this.stream.security = 'none';
}
}
get network() {
return this.stream.network;
}
set network(network) {
this.stream.network = network;
}
get isTcp() {
return this.network === "tcp";
}
get isWs() {
return this.network === "ws";
}
get isKcp() {
return this.network === "kcp";
}
get isQuic() {
return this.network === "quic"
}
get isGrpc() {
return this.network === "grpc";
}
get isH2() {
return this.network === "http";
}
// VMess & VLess
get uuid() {
switch (this.protocol) {
case Protocols.VMESS:
return this.settings.vmesses[0].id;
case Protocols.VLESS:
return this.settings.vlesses[0].id;
default:
return "";
}
}
// VLess & Trojan
get flow() {
switch (this.protocol) {
case Protocols.VLESS:
return this.settings.vlesses[0].flow;
case Protocols.TROJAN:
return this.settings.clients[0].flow;
default:
return "";
}
}
// Socks & HTTP
get username() {
switch (this.protocol) {
case Protocols.SOCKS:
case Protocols.HTTP:
return this.settings.accounts[0].user;
default:
return "";
}
}
// Trojan & Shadowsocks & Socks & HTTP
get password() {
switch (this.protocol) {
case Protocols.TROJAN:
return this.settings.clients[0].password;
case Protocols.SHADOWSOCKS:
return this.settings.password;
case Protocols.SOCKS:
case Protocols.HTTP:
return this.settings.accounts[0].pass;
default:
return "";
}
}
// Shadowsocks
get method() {
switch (this.protocol) {
case Protocols.SHADOWSOCKS:
return this.settings.method;
default:
return "";
}
}
get serverName() {
if (this.stream.isTls) {
return this.stream.tls.server;
}
return "";
}
get host() {
if (this.isTcp) {
return this.stream.tcp.request.getHeader("Host");
} else if (this.isWs) {
return this.stream.ws.getHeader("Host");
} else if (this.isH2) {
return this.stream.http.host[0];
}
return null;
}
get path() {
if (this.isTcp) {
return this.stream.tcp.request.path[0];
} else if (this.isWs) {
return this.stream.ws.path;
} else if (this.isH2) {
return this.stream.http.path[0];
}
return null;
}
get quicSecurity() {
return this.stream.quic.security;
}
get quicKey() {
return this.stream.quic.key;
}
get quicType() {
return this.stream.quic.type;
}
get kcpType() {
return this.stream.kcp.type;
}
get kcpSeed() {
return this.stream.kcp.seed;
}
get serviceName() {
return this.stream.grpc.serviceName;
}
canEnableTls() {
switch (this.protocol) {
case Protocols.VMESS:
case Protocols.VLESS:
case Protocols.TROJAN:
case Protocols.SHADOWSOCKS:
break;
default:
return false;
}
switch (this.network) {
case "tcp":
case "ws":
case "http":
case "quic":
case "grpc":
return true;
default:
return false;
}
}
canSetTls() {
return this.canEnableTls();
}
canEnableReality() {
switch (this.protocol) {
case Protocols.VLESS:
case Protocols.TROJAN:
break;
default:
return false;
}
return ['tcp', 'http', 'grpc'].indexOf(this.network) !== -1;
//return this.network === "tcp";
}
canSockopt() {
switch (this.protocol) {
case Protocols.VLESS:
case Protocols.TROJAN:
case Protocols.SHADOWSOCKS:
case Protocols.VMESS:
break;
default:
return false;
}
return ['tcp', 'http', 'grpc', 'ws'].indexOf(this.network) !== -1;
//return this.network === "tcp";
}
canEnableStream() {
switch (this.protocol) {
case Protocols.VMESS:
case Protocols.VLESS:
case Protocols.SHADOWSOCKS:
case Protocols.TROJAN:
return true;
default:
return false;
}
}
canSniffing() {
switch (this.protocol) {
case Protocols.VMESS:
case Protocols.VLESS:
case Protocols.TROJAN:
case Protocols.SHADOWSOCKS:
return true;
default:
return false;
}
}
reset() {
this.port = RandomUtil.randomIntRange(10000, 60000);
this.listen = '';
this.protocol = Protocols.VMESS;
this.settings = Inbound.Settings.getSettings(Protocols.VMESS);
this.stream = new StreamSettings();
this.tag = '';
this.sniffing = new Sniffing();
}
genVmessLink(address = '', remark = '') {
if (this.protocol !== Protocols.VMESS) {
return '';
}
let network = this.stream.network;
let type = 'none';
let host = '';
let path = '';
let fingerprint = '';
if (network === 'tcp') {
let tcp = this.stream.tcp;
type = tcp.type;
if (type === 'http') {
let request = tcp.request;
path = request.path.join(',');
let index = request.headers.findIndex(header => header.name.toLowerCase() === 'host');
if (index >= 0) {
host = request.headers[index].value;
}
}
} else if (network === 'kcp') {
let kcp = this.stream.kcp;
type = kcp.type;
path = kcp.seed;
} else if (network === 'ws') {
let ws = this.stream.ws;
path = ws.path;
let index = ws.headers.findIndex(header => header.name.toLowerCase() === 'host');
if (index >= 0) {
host = ws.headers[index].value;
}
} else if (network === 'http') {
network = 'h2';
path = this.stream.http.path;
host = this.stream.http.host.join(',');
} else if (network === 'quic') {
type = this.stream.quic.type;
host = this.stream.quic.security;
path = this.stream.quic.key;
} else if (network === 'grpc') {
path = this.stream.grpc.serviceName;
}
if (this.stream.security === 'tls') {
if (!ObjectUtil.isEmpty(this.stream.tls.server)) {
address = this.stream.tls.server;
}
if (this.stream.tls.fingerprint != "") {
fingerprint = this.stream.reality.fingerprint
}
}
let obj = {
v: '2',
ps: remark,
add: address,
port: this.port,
id: this.settings.vmesses[0].id,
aid: 0,
net: network,
type: type,
host: host,
path: path,
tls: this.stream.security,
sni: host,
alpn: this.stream.tls.alpn.join(','),
allowInsecure: this.stream.tls.allowInsecure,
fp: fingerprint,
};
return 'vmess://' + base64(JSON.stringify(obj, null, 2));
}
genVLESSLink(address = '', remark = '') {
const settings = this.settings;
const uuid = settings.vlesses[0].id;
const port = this.port;
const type = this.stream.network;
const params = new Map();
params.set("type", this.stream.network);
if (this.reality) {
params.set("security", "reality");
} else {
params.set("security", this.stream.security);
}
switch (type) {
case "tcp":
const tcp = this.stream.tcp;
if (tcp.type === 'http') {
const request = tcp.request;
params.set("path", request.path.join(','));
const index = request.headers.findIndex(header => header.name.toLowerCase() === 'host');
if (index >= 0) {
const host = request.headers[index].value;
params.set("host", host);
}
}
break;
case "kcp":
const kcp = this.stream.kcp;
params.set("headerType", kcp.type);
params.set("seed", kcp.seed);
break;
case "ws":
const ws = this.stream.ws;
params.set("path", ws.path);
const index = ws.headers.findIndex(header => header.name.toLowerCase() === 'host');
if (index >= 0) {
const host = ws.headers[index].value;
params.set("host", host);
}
break;
case "http":
const http = this.stream.http;
params.set("path", http.path);
params.set("host", http.host);
break;
case "quic":
const quic = this.stream.quic;
params.set("quicSecurity", quic.security);
params.set("key", quic.key);
params.set("headerType", quic.type);
break;
case "grpc":
const grpc = this.stream.grpc;
params.set("serviceName", grpc.serviceName);
break;
}
if (this.stream.security === 'tls') {
params.set("alpn", this.stream.tls.alpn);
if (this.stream.tls.allowInsecure) {
params.set("allowInsecure", "1");
}
if (!ObjectUtil.isEmpty(this.stream.tls.server)) {
address = this.stream.tls.server;
params.set("sni", address);
params.set("flow", this.settings.vlesses[0].flow);
}
if (this.stream.tls.fingerprint != "") {
params.set("fp", this.stream.tls.fingerprint);
}
}
if (this.stream.security === 'reality') {
if (this.stream.network === 'tcp') {
params.set("flow", this.settings.vlesses[0].flow);
}
if (!ObjectUtil.isArrEmpty(this.stream.reality.serverNames)) {
params.set("sni", this.stream.reality.serverNames.split(/,|,|\s+/)[0]);
}
if (this.stream.reality.publicKey != "") {
params.set("pbk", this.stream.reality.publicKey);
}
if (this.stream.reality.shortIds != "") {
params.set("sid", this.stream.reality.shortIds);
}
if (this.stream.reality.fingerprint != "") {
params.set("fp", this.stream.reality.fingerprint);
}
}
const link = `vless://${uuid}@${address}:${port}`;
const url = new URL(link);
for (const [key, value] of params) {
url.searchParams.set(key, value)
}
url.hash = encodeURIComponent(remark);
return url.toString();
}
genSSLink(address = '', remark = '') {
let settings = this.settings;
const server = this.stream.tls.server;
if (!ObjectUtil.isEmpty(server)) {
address = server;
}
if (settings.method == SSMethods.BLAKE3_AES_128_GCM || settings.method == SSMethods.BLAKE3_AES_256_GCM || settings.method == SSMethods.BLAKE3_CHACHA20_POLY1305) {
return `ss://${settings.method}:${settings.password}@${address}:${this.port}#${encodeURIComponent(remark)}`;
} else {
return 'ss://' + safeBase64(settings.method + ':' + settings.password + '@' + address + ':' + this.port) + '#' + encodeURIComponent(remark);
}
}
genTrojanLink(address = '', remark = '') {
let settings = this.settings;
const port = this.port;
const type = this.stream.network;
const params = new Map();
params.set("type", this.stream.network);
if (this.reality) {
params.set("security", "reality");
} else {
params.set("security", this.stream.security);
}
switch (type) {
case "tcp":
const tcp = this.stream.tcp;
if (tcp.type === 'http') {
const request = tcp.request;
params.set("path", request.path.join(','));
const index = request.headers.findIndex(header => header.name.toLowerCase() === 'host');
if (index >= 0) {
const host = request.headers[index].value;
params.set("host", host);
}
}
break;
case "kcp":
const kcp = this.stream.kcp;
params.set("headerType", kcp.type);
params.set("seed", kcp.seed);
break;
case "ws":
const ws = this.stream.ws;
params.set("path", ws.path);
const index = ws.headers.findIndex(header => header.name.toLowerCase() === 'host');
if (index >= 0) {
const host = ws.headers[index].value;
params.set("host", host);
}
break;
case "http":
const http = this.stream.http;
params.set("path", http.path);
params.set("host", http.host);
break;
case "quic":
const quic = this.stream.quic;
params.set("quicSecurity", quic.security);
params.set("key", quic.key);
params.set("headerType", quic.type);
break;
case "grpc":
const grpc = this.stream.grpc;
params.set("serviceName", grpc.serviceName);
break;
}
if (this.stream.security === 'tls') {
params.set("alpn", this.stream.tls.alpn);
if (this.stream.tls.allowInsecure) {
params.set("allowInsecure", "1");
}
if (!ObjectUtil.isEmpty(this.stream.tls.server)) {
address = this.stream.tls.server;
params.set("sni", address);
}
if (this.stream.tls.fingerprint != "") {
params.set("fp", this.stream.tls.fingerprint);
}
}
if (this.stream.security === 'reality') {
if (!ObjectUtil.isArrEmpty(this.stream.reality.serverNames)) {
params.set("sni", this.stream.reality.serverNames.split(/,|,|\s+/)[0]);
}
if (this.stream.reality.publicKey != "") {
params.set("pbk", this.stream.reality.publicKey);
}
if (this.stream.reality.shortIds != "") {
params.set("sid", this.stream.reality.shortIds);
}
if (this.stream.reality.fingerprint != "") {
params.set("fp", this.stream.reality.fingerprint);
}
}
const link = `trojan://${settings.clients[0].password}@${address}:${port}`;
const url = new URL(link);
for (const [key, value] of params) {
url.searchParams.set(key, value)
}
url.hash = encodeURIComponent(remark);
return url.toString();
}
genLink(address = '', remark = '') {
switch (this.protocol) {
case Protocols.VMESS: return this.genVmessLink(address, remark);
case Protocols.VLESS: return this.genVLESSLink(address, remark);
case Protocols.SHADOWSOCKS: return this.genSSLink(address, remark);
case Protocols.TROJAN: return this.genTrojanLink(address, remark);
default: return '';
}
}
static fromJson(json = {}) {
return new Inbound(
json.port,
json.listen,
json.protocol,
Inbound.Settings.fromJson(json.protocol, json.settings),
StreamSettings.fromJson(json.streamSettings),
json.tag,
Sniffing.fromJson(json.sniffing),
)
}
toJson() {
let streamSettings;
if (this.canEnableStream() || this.protocol === Protocols.TROJAN) {
streamSettings = this.stream.toJson();
}
return {
port: this.port,
listen: this.listen,
protocol: this.protocol,
settings: this.settings instanceof XrayCommonClass ? this.settings.toJson() : this.settings,
streamSettings: streamSettings,
tag: this.tag,
sniffing: this.sniffing.toJson(),
};
}
}
Inbound.Settings = class extends XrayCommonClass {
constructor(protocol) {
super();
this.protocol = protocol;
}
static getSettings(protocol) {
switch (protocol) {
case Protocols.VMESS: return new Inbound.VmessSettings(protocol);
case Protocols.VLESS: return new Inbound.VLESSSettings(protocol);
case Protocols.TROJAN: return new Inbound.TrojanSettings(protocol);
case Protocols.SHADOWSOCKS: return new Inbound.ShadowsocksSettings(protocol);
case Protocols.DOKODEMO: return new Inbound.DokodemoSettings(protocol);
case Protocols.SOCKS: return new Inbound.SocksSettings(protocol);
case Protocols.HTTP: return new Inbound.HttpSettings(protocol);
default: return null;
}
}
static fromJson(protocol, json) {
switch (protocol) {
case Protocols.VMESS: return Inbound.VmessSettings.fromJson(json);
case Protocols.VLESS: return Inbound.VLESSSettings.fromJson(json);
case Protocols.TROJAN: return Inbound.TrojanSettings.fromJson(json);
case Protocols.SHADOWSOCKS: return Inbound.ShadowsocksSettings.fromJson(json);
case Protocols.DOKODEMO: return Inbound.DokodemoSettings.fromJson(json);
case Protocols.SOCKS: return Inbound.SocksSettings.fromJson(json);
case Protocols.HTTP: return Inbound.HttpSettings.fromJson(json);
default: return null;
}
}
toJson() {
return {};
}
};
Inbound.VmessSettings = class extends Inbound.Settings {
constructor(protocol,
vmesses = [new Inbound.VmessSettings.Vmess()],
disableInsecureEncryption = false) {
super(protocol);
this.vmesses = vmesses;
this.disableInsecure = disableInsecureEncryption;
}
indexOfVmessById(id) {
return this.vmesses.findIndex(vmess => vmess.id === id);
}
addVmess() {
this.vmesses.push(new Inbound.VmessSettings.Vmess());
}
delVmess(index) {
this.vmesses.splice(index, 1);
}
static fromJson(json = {}) {
return new Inbound.VmessSettings(
Protocols.VMESS,
json.clients.map(client => Inbound.VmessSettings.Vmess.fromJson(client)),
ObjectUtil.isEmpty(json.disableInsecureEncryption) ? false : json.disableInsecureEncryption,
);
}
toJson() {
return {
clients: Inbound.VmessSettings.toJsonArray(this.vmesses),
disableInsecureEncryption: this.disableInsecure,
};
}
};
Inbound.VmessSettings.Vmess = class extends XrayCommonClass {
constructor(id = RandomUtil.randomUUID()) {
super();
this.id = id;
}
static fromJson(json = {}) {
return new Inbound.VmessSettings.Vmess(
json.id,
);
}
};
Inbound.VLESSSettings = class extends Inbound.Settings {
constructor(protocol,
vlesses = [new Inbound.VLESSSettings.VLESS()],
decryption = 'none',
fallbacks = [],) {
super(protocol);
this.vlesses = vlesses;
this.decryption = decryption;
this.fallbacks = fallbacks;
}
addVLESS() {
this.vlesses.push(new Inbound.VLESSSettings.VLESS());
}
delVLESS(index) {
this.vlesses.splice(index, 1);
}
addFallback() {
this.fallbacks.push(new Inbound.VLESSSettings.Fallback());
}
delFallback(index) {
this.fallbacks.splice(index, 1);
}
static fromJson(json = {}) {
return new Inbound.VLESSSettings(
Protocols.VLESS,
json.clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)),
json.decryption,
Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks),
);
}
toJson() {
return {
clients: Inbound.VLESSSettings.toJsonArray(this.vlesses),
decryption: this.decryption,
fallbacks: Inbound.VLESSSettings.toJsonArray(this.fallbacks),
};
}
};
Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
constructor(id = RandomUtil.randomUUID(), flow = "") {
super();
this.id = id;
this.flow = flow;
}
static fromJson(json = {}) {
return new Inbound.VLESSSettings.VLESS(
json.id,
json.flow,
);
}
};
Inbound.VLESSSettings.Fallback = class extends XrayCommonClass {
constructor(name = "", alpn = '', path = '', dest = '', xver = 0) {
super();
this.name = name;
this.alpn = alpn;
this.path = path;
this.dest = dest;
this.xver = xver;
}
toJson() {
let xver = this.xver;
if (!Number.isInteger(xver)) {
xver = 0;
}
return {
name: this.name,
alpn: this.alpn,
path: this.path,
dest: this.dest,
xver: xver,
}
}
static fromJson(json = []) {
const fallbacks = [];
for (let fallback of json) {
fallbacks.push(new Inbound.VLESSSettings.Fallback(
fallback.name,
fallback.alpn,
fallback.path,
fallback.dest,
fallback.xver,
))
}
return fallbacks;
}
};
Inbound.TrojanSettings = class extends Inbound.Settings {
constructor(protocol,
clients = [new Inbound.TrojanSettings.Client()],
fallbacks = [],) {
super(protocol);
this.clients = clients;
this.fallbacks = fallbacks;
}
addTrojan() {
this.clients.push(new Inbound.TrojanSettings.Client());
}
delTrojan(index) {
this.clients.splice(index, 1);
}
addTrojanFallback() {
this.fallbacks.push(new Inbound.TrojanSettings.Fallback());
}
delTrojanFallback(index) {
this.fallbacks.splice(index, 1);
}
toJson() {
return {
clients: Inbound.TrojanSettings.toJsonArray(this.clients),
fallbacks: Inbound.TrojanSettings.toJsonArray(this.fallbacks),
};
}
static fromJson(json = {}) {
const clients = [];
for (const c of json.clients) {
clients.push(Inbound.TrojanSettings.Client.fromJson(c));
}
return new Inbound.TrojanSettings(
Protocols.TROJAN,
clients,
Inbound.TrojanSettings.Fallback.fromJson(json.fallbacks));
}
};
Inbound.TrojanSettings.Client = class extends XrayCommonClass {
constructor(password = RandomUtil.randomSeq(10)) {
super();
this.password = password;
//this.flow = flow;
}
toJson() {
return {
password: this.password,
// flow: this.flow,
};
}
static fromJson(json = {}) {
return new Inbound.TrojanSettings.Client(
json.password,
// json.flow,
);
}
};
Inbound.TrojanSettings.Fallback = class extends XrayCommonClass {
constructor(name = "", alpn = '', path = '', dest = '', xver = 0) {
super();
this.name = name;
this.alpn = alpn;
this.path = path;
this.dest = dest;
this.xver = xver;
}
toJson() {
let xver = this.xver;
if (!Number.isInteger(xver)) {
xver = 0;
}
return {
name: this.name,
alpn: this.alpn,
path: this.path,
dest: this.dest,
xver: xver,
}
}
static fromJson(json = []) {
const fallbacks = [];
for (let fallback of json) {
fallbacks.push(new Inbound.TrojanSettings.Fallback(
fallback.name,
fallback.alpn,
fallback.path,
fallback.dest,
fallback.xver,
))
}
return fallbacks;
}
};
Inbound.ShadowsocksSettings = class extends Inbound.Settings {
constructor(protocol,
method = SSMethods.AES_256_GCM,
password = btoa(RandomUtil.randomSeq(64)),
network = 'tcp,udp'
) {
super(protocol);
this.method = method;
this.password = password;
this.network = network;
}
static fromJson(json = {}) {
return new Inbound.ShadowsocksSettings(
Protocols.SHADOWSOCKS,
json.method,
json.password,
json.network,
);
}
toJson() {
return {
method: this.method,
password: this.password,
network: this.network,
};
}
};
Inbound.DokodemoSettings = class extends Inbound.Settings {
constructor(protocol, address, port, network = 'tcp,udp') {
super(protocol);
this.address = address;
this.port = port;
this.network = network;
}
static fromJson(json = {}) {
return new Inbound.DokodemoSettings(
Protocols.DOKODEMO,
json.address,
json.port,
json.network,
);
}
toJson() {
return {
address: this.address,
port: this.port,
network: this.network,
};
}
};
Inbound.SocksSettings = class extends Inbound.Settings {
constructor(protocol, auth = 'password', accounts = [new Inbound.SocksSettings.SocksAccount()], udp = false, ip = '127.0.0.1') {
super(protocol);
this.auth = auth;
this.accounts = accounts;
this.udp = udp;
this.ip = ip;
}
addAccount(account) {
this.accounts.push(account);
}
delAccount(index) {
this.accounts.splice(index, 1);
}
static fromJson(json = {}) {
let accounts;
if (json.auth === 'password') {
accounts = json.accounts.map(
account => Inbound.SocksSettings.SocksAccount.fromJson(account)
)
}
return new Inbound.SocksSettings(
Protocols.SOCKS,
json.auth,
accounts,
json.udp,
json.ip,
);
}
toJson() {
return {
auth: this.auth,
accounts: this.auth === 'password' ? this.accounts.map(account => account.toJson()) : undefined,
udp: this.udp,
ip: this.ip,
};
}
};
Inbound.SocksSettings.SocksAccount = class extends XrayCommonClass {
constructor(user = RandomUtil.randomSeq(10), pass = RandomUtil.randomSeq(10)) {
super();
this.user = user;
this.pass = pass;
}
static fromJson(json = {}) {
return new Inbound.SocksSettings.SocksAccount(json.user, json.pass);
}
};
Inbound.HttpSettings = class extends Inbound.Settings {
constructor(protocol, accounts = [new Inbound.HttpSettings.HttpAccount()]) {
super(protocol);
this.accounts = accounts;
}
addAccount(account) {
this.accounts.push(account);
}
delAccount(index) {
this.accounts.splice(index, 1);
}
static fromJson(json = {}) {
return new Inbound.HttpSettings(
Protocols.HTTP,
json.accounts.map(account => Inbound.HttpSettings.HttpAccount.fromJson(account)),
);
}
toJson() {
return {
accounts: Inbound.HttpSettings.toJsonArray(this.accounts),
};
}
};
Inbound.HttpSettings.HttpAccount = class extends XrayCommonClass {
constructor(user = RandomUtil.randomSeq(10), pass = RandomUtil.randomSeq(10)) {
super();
this.user = user;
this.pass = pass;
}
static fromJson(json = {}) {
return new Inbound.HttpSettings.HttpAccount(json.user, json.pass);
}
};
================================================
FILE: web/assets/js/util/common.js
================================================
const ONE_KB = 1024;
const ONE_MB = ONE_KB * 1024;
const ONE_GB = ONE_MB * 1024;
const ONE_TB = ONE_GB * 1024;
const ONE_PB = ONE_TB * 1024;
function sizeFormat(size) {
if (size < ONE_KB) {
return size.toFixed(0) + " B";
} else if (size < ONE_MB) {
return (size / ONE_KB).toFixed(2) + " KB";
} else if (size < ONE_GB) {
return (size / ONE_MB).toFixed(2) + " MB";
} else if (size < ONE_TB) {
return (size / ONE_GB).toFixed(2) + " GB";
} else if (size < ONE_PB) {
return (size / ONE_TB).toFixed(2) + " TB";
} else {
return (size / ONE_PB).toFixed(2) + " PB";
}
}
function base64(str) {
return Base64.encode(str);
}
function safeBase64(str) {
return base64(str)
.replace(/\+/g, '-')
.replace(/=/g, '')
.replace(/\//g, '_');
}
function formatSecond(second) {
if (second < 60) {
return second.toFixed(0) + ' 秒';
} else if (second < 3600) {
return (second / 60).toFixed(0) + ' 分钟';
} else if (second < 3600 * 24) {
return (second / 3600).toFixed(0) + ' 小时';
} else {
return (second / 3600 / 24).toFixed(0) + ' 天';
}
}
function addZero(num) {
if (num < 10) {
return "0" + num;
} else {
return num;
}
}
function toFixed(num, n) {
n = Math.pow(10, n);
return Math.round(num * n) / n;
}
================================================
FILE: web/assets/js/util/date-util.js
================================================
const oneMinute = 1000 * 60; // 一分钟的毫秒数
const oneHour = oneMinute * 60; // 一小时的毫秒数
const oneDay = oneHour * 24; // 一天的毫秒数
const oneWeek = oneDay * 7; // 一星期的毫秒数
const oneMonth = oneDay * 30; // 一个月的毫秒数
/**
* 按天数减少
*
* @param days 要减少的天数
*/
Date.prototype.minusDays = function (days) {
return this.minusMillis(oneDay * days);
};
/**
* 按天数增加
*
* @param days 要增加的天数
*/
Date.prototype.plusDays = function (days) {
return this.plusMillis(oneDay * days);
};
/**
* 按小时减少
*
* @param hours 要减少的小时数
*/
Date.prototype.minusHours = function (hours) {
return this.minusMillis(oneHour * hours);
};
/**
* 按小时增加
*
* @param hours 要增加的小时数
*/
Date.prototype.plusHours = function (hours) {
return this.plusMillis(oneHour * hours);
};
/**
* 按分钟减少
*
* @param minutes 要减少的分钟数
*/
Date.prototype.minusMinutes = function (minutes) {
return this.minusMillis(oneMinute * minutes);
};
/**
* 按分钟增加
*
* @param minutes 要增加的分钟数
*/
Date.prototype.plusMinutes = function (minutes) {
return this.plusMillis(oneMinute * minutes);
};
/**
* 按毫秒减少
*
* @param millis 要减少的毫秒数
*/
Date.prototype.minusMillis = function(millis) {
let time = this.getTime() - millis;
let newDate = new Date();
newDate.setTime(time);
return newDate;
};
/**
* 按毫秒增加
*
* @param millis 要增加的毫秒数
*/
Date.prototype.plusMillis = function(millis) {
let time = this.getTime() + millis;
let newDate = new Date();
newDate.setTime(time);
return newDate;
};
/**
* 设置时间为当天的 00:00:00.000
*/
Date.prototype.setMinTime = function () {
this.setHours(0);
this.setMinutes(0);
this.setSeconds(0);
this.setMilliseconds(0);
return this;
};
/**
* 设置时间为当天的 23:59:59.999
*/
Date.prototype.setMaxTime = function () {
this.setHours(23);
this.setMinutes(59);
this.setSeconds(59);
this.setMilliseconds(999);
return this;
};
/**
* 格式化日期
*/
Date.prototype.formatDate = function () {
return this.getFullYear() + "-" + addZero(this.getMonth() + 1) + "-" + addZero(this.getDate());
};
/**
* 格式化时间
*/
Date.prototype.formatTime = function () {
return addZero(this.getHours()) + ":" + addZero(this.getMinutes()) + ":" + addZero(this.getSeconds());
};
/**
* 格式化日期加时间
*
* @param split 日期和时间之间的分隔符,默认是一个空格
*/
Date.prototype.formatDateTime = function (split = ' ') {
return this.formatDate() + split + this.formatTime();
};
class DateUtil {
// 字符串转 Date 对象
static parseDate(str) {
return new Date(str.replace(/-/g, '/'));
}
static formatMillis(millis) {
return moment(millis).format('YYYY-M-D H:m:s')
}
static firstDayOfMonth() {
const date = new Date();
date.setDate(1);
date.setMinTime();
return date;
}
}
================================================
FILE: web/assets/js/util/utils.js
================================================
class HttpUtil {
static _handleMsg(msg) {
if (!(msg instanceof Msg)) {
return;
}
if (msg.msg === "") {
return;
}
if (msg.success) {
Vue.prototype.$message.success(msg.msg);
} else {
Vue.prototype.$message.error(msg.msg);
}
}
static _respToMsg(resp) {
const data = resp.data;
if (data == null) {
return new Msg(true);
} else if (typeof data === 'object') {
if (data.hasOwnProperty('success')) {
return new Msg(data.success, data.msg, data.obj);
} else {
return data;
}
} else {
return new Msg(false, 'unknown data:', data);
}
}
static async get(url, data, options) {
let msg;
try {
const resp = await axios.get(url, data, options);
msg = this._respToMsg(resp);
} catch (e) {
msg = new Msg(false, e.toString());
}
this._handleMsg(msg);
return msg;
}
static async post(url, data, options) {
let msg;
try {
const resp = await axios.post(url, data, options);
msg = this._respToMsg(resp);
} catch (e) {
msg = new Msg(false, e.toString());
}
this._handleMsg(msg);
return msg;
}
static async postWithModal(url, data, modal) {
if (modal) {
modal.loading(true);
}
const msg = await this.post(url, data);
if (modal) {
modal.loading(false);
if (msg instanceof Msg && msg.success) {
modal.close();
}
}
return msg;
}
}
class PromiseUtil {
static async sleep(timeout) {
await new Promise(resolve => {
setTimeout(resolve, timeout)
});
}
}
const seq = [
'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z'
];
const shortIdSeq = [
'a', 'b', 'c', 'd', 'e', 'f',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
];
const x25519Map = new Map(
[
['EH2FWe-Ij_FFAa2u9__-aiErLvVIneP601GOCdlyPWw', "goY3OtfaA4UYbiz7Hn0NysI5QJrK0VT_Chg6RLgUPQU"],
['cKI_6DoMSP1IepeWWXrG3G9nkehl94KYBhagU50g2U0', "VigpKFbSLnHLzBWobZaS1IBmw--giJ51w92y723ajnU"],
['qM2SNyK3NyHB6deWpEP3ITyCGKQFRTna_mlKP0w1QH0', "HYyIGuyNFslmcnNT7mrDdmuXwn4cm7smE_FZbYguKHQ"],
['qCWg5GMEDFd3n1nxDswlIpOHoPUXMLuMOIiLUVzubkI', "rJFC3dUjJxMnVZiUGzmf_LFsJUwFWY-CU5RQgFOHCWM"],
['4NOBxDrEsOhNI3Y3EnVIy_TN-uyBoAjQw6QM0YsOi0s', "CbcY9qc4YuMDJDyyL0OITlU824TBg1O84ClPy27e2RM"],
['eBvFb0M4HpSOwWjtXV8zliiEs_hg56zX4a2LpuuqpEI', "CjulQ2qVIky7ImIfysgQhNX7s_drGLheCGSkVHcLZhc"],
['yEpOzQV04NNcycWVeWtRNTzv5TS-ynTuKRacZCH-6U8', "O9RSr5gSdok2K_tobQnf_scyKVqnCx6C4Jrl7_rCZEQ"],
['CNt6TAUVCwqM6xIBHyni0K3Zqbn2htKQLvLb6XDgh0s', "d9cGLVBrDFS02L2OvkqyqwFZ1Ux3AHs28ehl4Rwiyl0"],
['EInKw-6Wr0rAHXlxxDuZU5mByIzcD3Z-_iWPzXlUL1k', "LlYD2nNVAvyjNvjZGZh4R8PkMIwkc6EycPTvR2LE0nQ"],
['GKIKo7rcXVyle-EUHtGIDtYnDsI6osQmOUl3DTJRAGc', "VcqHivYGGoBkcxOI6cSSjQmneltstkb2OhvO53dyhEM"],
['-FVDzv68IC17fJVlNDlhrrgX44WeBfbhwjWpCQVXGHE', "PGG2EYOvsFt2lAQTD7lqHeRxz2KxvllEDKcUrtizPBU"],
['0H3OJEYEu6XW7woqy7cKh2vzg6YHkbF_xSDTHKyrsn4', "mzevpYbS8kXengBY5p7tt56QE4tS3lwlwRemmkcQeyc"],
['8F8XywN6ci44ES6em2Z0fYYxyptB9uaXY9Hc1WSSPE4', "qCZUdWQZ2H33vWXnOkG8NpxBeq3qn5QWXlfCOWBNkkc"],
['IN0dqfkC10dj-ifRHrg2PmmOrzYs697ajGMwcLbu-1g', "2UW_EO3r7uczPGUUlpJBnMDpDmWUHE2yDzCmXS4sckE"],
['uIcmks5rAhvBe4dRaJOdeSqgxLGGMZhsGk4J4PEKL2s', "F9WJV_74IZp0Ide4hWjiJXk9FRtBUBkUr3mzU-q1lzk"],
]
);
class RandomUtil {
static randomIntRange(min, max) {
return parseInt(Math.random() * (max - min) + min, 10);
}
static randomShortIdSeq(count) {
let str = '';
for (let i = 0; i < count; ++i) {
str += shortIdSeq[this.randomInt(16)];
}
return str;
}
static randomInt(n) {
return this.randomIntRange(0, n);
}
static randomSeq(count) {
let str = '';
for (let i = 0; i < count; ++i) {
str += seq[this.randomInt(62)];
}
return str;
}
static randomLowerAndNum(count) {
let str = '';
for (let i = 0; i < count; ++i) {
str += seq[this.randomInt(36)];
}
return str;
}
static randomMTSecret() {
let str = '';
for (let i = 0; i < 32; ++i) {
let index = this.randomInt(16);
if (index <= 9) {
str += index;
} else {
str += seq[index - 10];
}
}
return str;
}
static randomUUID() {
let d = new Date().getTime();
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
let r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);
});
}
static randowShortId() {
let str = '';
str += this.randomShortIdSeq(8)
return str;
}
static randomX25519PrivateKey() {
let num = x25519Map.size;
let index = this.randomInt(num);
let cntr = 0;
for (let key of x25519Map.keys()) {
if (cntr++ === index) {
return key;
}
}
}
static randomX25519PublicKey(key) {
return x25519Map.get(key)
}
}
class ObjectUtil {
static getPropIgnoreCase(obj, prop) {
for (const name in obj) {
if (!obj.hasOwnProperty(name)) {
continue;
}
if (name.toLowerCase() === prop.toLowerCase()) {
return obj[name];
}
}
return undefined;
}
static deepSearch(obj, key) {
if (obj instanceof Array) {
for (let i = 0; i < obj.length; ++i) {
if (this.deepSearch(obj[i], key)) {
return true;
}
}
} else if (obj instanceof Object) {
for (let name in obj) {
if (!obj.hasOwnProperty(name)) {
continue;
}
if (this.deepSearch(obj[name], key)) {
return true;
}
}
} else {
return obj.toString().indexOf(key) >= 0;
}
return false;
}
static isEmpty(obj) {
return obj === null || obj === undefined || obj === '';
}
static isArrEmpty(arr) {
return !this.isEmpty(arr) && arr.length === 0;
}
static copyArr(dest, src) {
dest.splice(0);
for (const item of src) {
dest.push(item);
}
}
static clone(obj) {
let newObj;
if (obj instanceof Array) {
newObj = [];
this.copyArr(newObj, obj);
} else if (obj instanceof Object) {
newObj = {};
for (const key of Object.keys(obj)) {
newObj[key] = obj[key];
}
} else {
newObj = obj;
}
return newObj;
}
static deepClone(obj) {
let newObj;
if (obj instanceof Array) {
newObj = [];
for (const item of obj) {
newObj.push(this.deepClone(item));
}
} else if (obj instanceof Object) {
newObj = {};
for (const key of Object.keys(obj)) {
newObj[key] = this.deepClone(obj[key]);
}
} else {
newObj = obj;
}
return newObj;
}
static cloneProps(dest, src, ...ignoreProps) {
if (dest == null || src == null) {
return;
}
const ignoreEmpty = this.isArrEmpty(ignoreProps);
for (const key of Object.keys(src)) {
if (!src.hasOwnProperty(key)) {
continue;
} else if (!dest.hasOwnProperty(key)) {
continue;
} else if (src[key] === undefined) {
continue;
}
if (ignoreEmpty) {
dest[key] = src[key];
} else {
let ignore = false;
for (let i = 0; i < ignoreProps.length; ++i) {
if (key === ignoreProps[i]) {
ignore = true;
break;
}
}
if (!ignore) {
dest[key] = src[key];
}
}
}
}
static delProps(obj, ...props) {
for (const prop of props) {
if (prop in obj) {
delete obj[prop];
}
}
}
static execute(func, ...args) {
if (!this.isEmpty(func) && typeof func === 'function') {
func(...args);
}
}
static orDefault(obj, defaultValue) {
if (obj == null) {
return defaultValue;
}
return obj;
}
static equals(a, b) {
for (const key in a) {
if (!a.hasOwnProperty(key)) {
continue;
}
if (!b.hasOwnProperty(key)) {
return false;
} else if (a[key] !== b[key]) {
return false;
}
}
return true;
}
}
================================================
FILE: web/assets/vue@2.6.12/vue.common.dev.js
================================================
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Released under the MIT License.
*/
'use strict';
/* */
var emptyObject = Object.freeze({});
// These helpers produce better VM code in JS engines due to their
// explicitness and function inlining.
function isUndef (v) {
return v === undefined || v === null
}
function isDef (v) {
return v !== undefined && v !== null
}
function isTrue (v) {
return v === true
}
function isFalse (v) {
return v === false
}
/**
* Check if value is primitive.
*/
function isPrimitive (value) {
return (
typeof value === 'string' ||
typeof value === 'number' ||
// $flow-disable-line
typeof value === 'symbol' ||
typeof value === 'boolean'
)
}
/**
* Quick object check - this is primarily used to tell
* Objects from primitive values when we know the value
* is a JSON-compliant type.
*/
function isObject (obj) {
return obj !== null && typeof obj === 'object'
}
/**
* Get the raw type string of a value, e.g., [object Object].
*/
var _toString = Object.prototype.toString;
function toRawType (value) {
return _toString.call(value).slice(8, -1)
}
/**
* Strict object type check. Only returns true
* for plain JavaScript objects.
*/
function isPlainObject (obj) {
return _toString.call(obj) === '[object Object]'
}
function isRegExp (v) {
return _toString.call(v) === '[object RegExp]'
}
/**
* Check if val is a valid array index.
*/
function isValidArrayIndex (val) {
var n = parseFloat(String(val));
return n >= 0 && Math.floor(n) === n && isFinite(val)
}
function isPromise (val) {
return (
isDef(val) &&
typeof val.then === 'function' &&
typeof val.catch === 'function'
)
}
/**
* Convert a value to a string that is actually rendered.
*/
function toString (val) {
return val == null
? ''
: Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
? JSON.stringify(val, null, 2)
: String(val)
}
/**
* Convert an input value to a number for persistence.
* If the conversion fails, return original string.
*/
function toNumber (val) {
var n = parseFloat(val);
return isNaN(n) ? val : n
}
/**
* Make a map and return a function for checking if a key
* is in that map.
*/
function makeMap (
str,
expectsLowerCase
) {
var map = Object.create(null);
var list = str.split(',');
for (var i = 0; i < list.length; i++) {
map[list[i]] = true;
}
return expectsLowerCase
? function (val) { return map[val.toLowerCase()]; }
: function (val) { return map[val]; }
}
/**
* Check if a tag is a built-in tag.
*/
var isBuiltInTag = makeMap('slot,component', true);
/**
* Check if an attribute is a reserved attribute.
*/
var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
/**
* Remove an item from an array.
*/
function remove (arr, item) {
if (arr.length) {
var index = arr.indexOf(item);
if (index > -1) {
return arr.splice(index, 1)
}
}
}
/**
* Check whether an object has the property.
*/
var hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn (obj, key) {
return hasOwnProperty.call(obj, key)
}
/**
* Create a cached version of a pure function.
*/
function cached (fn) {
var cache = Object.create(null);
return (function cachedFn (str) {
var hit = cache[str];
return hit || (cache[str] = fn(str))
})
}
/**
* Camelize a hyphen-delimited string.
*/
var camelizeRE = /-(\w)/g;
var camelize = cached(function (str) {
return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
});
/**
* Capitalize a string.
*/
var capitalize = cached(function (str) {
return str.charAt(0).toUpperCase() + str.slice(1)
});
/**
* Hyphenate a camelCase string.
*/
var hyphenateRE = /\B([A-Z])/g;
var hyphenate = cached(function (str) {
return str.replace(hyphenateRE, '-$1').toLowerCase()
});
/**
* Simple bind polyfill for environments that do not support it,
* e.g., PhantomJS 1.x. Technically, we don't need this anymore
* since native bind is now performant enough in most browsers.
* But removing it would mean breaking code that was able to run in
* PhantomJS 1.x, so this must be kept for backward compatibility.
*/
/* istanbul ignore next */
function polyfillBind (fn, ctx) {
function boundFn (a) {
var l = arguments.length;
return l
? l > 1
? fn.apply(ctx, arguments)
: fn.call(ctx, a)
: fn.call(ctx)
}
boundFn._length = fn.length;
return boundFn
}
function nativeBind (fn, ctx) {
return fn.bind(ctx)
}
var bind = Function.prototype.bind
? nativeBind
: polyfillBind;
/**
* Convert an Array-like object to a real Array.
*/
function toArray (list, start) {
start = start || 0;
var i = list.length - start;
var ret = new Array(i);
while (i--) {
ret[i] = list[i + start];
}
return ret
}
/**
* Mix properties into target object.
*/
function extend (to, _from) {
for (var key in _from) {
to[key] = _from[key];
}
return to
}
/**
* Merge an Array of Objects into a single Object.
*/
function toObject
gitextract_66_3d683/
├── .github/
│ ├── dependabot.yml
│ └── workflows/
│ ├── docker.yaml
│ └── release.yaml
├── .gitignore
├── Dockerfile
├── LICENSE
├── README.md
├── README_CN.md
├── bin/
│ ├── xray-linux-amd64
│ ├── xray-linux-arm64
│ └── xray-linux-s390x
├── config/
│ ├── config.go
│ ├── name
│ └── version
├── database/
│ ├── db.go
│ └── model/
│ └── model.go
├── go.mod
├── go.sum
├── install.sh
├── install_CN.sh
├── logger/
│ └── logger.go
├── main.go
├── util/
│ ├── common/
│ │ ├── err.go
│ │ ├── format.go
│ │ ├── multi_error.go
│ │ ├── network.go
│ │ └── stringUtil.go
│ ├── context.go
│ ├── json_util/
│ │ └── json.go
│ ├── random/
│ │ └── random.go
│ ├── reflect_util/
│ │ └── reflect.go
│ └── sys/
│ ├── a.s
│ ├── psutil.go
│ ├── sys_darwin.go
│ └── sys_linux.go
├── web/
│ ├── assets/
│ │ ├── ant-design-vue@1.7.2/
│ │ │ └── antd.less
│ │ ├── css/
│ │ │ └── custom.css
│ │ ├── element-ui@2.15.0/
│ │ │ └── theme-chalk/
│ │ │ └── display.css
│ │ ├── js/
│ │ │ ├── axios-init.js
│ │ │ ├── model/
│ │ │ │ ├── models.js
│ │ │ │ └── xray.js
│ │ │ └── util/
│ │ │ ├── common.js
│ │ │ ├── date-util.js
│ │ │ └── utils.js
│ │ └── vue@2.6.12/
│ │ ├── vue.common.dev.js
│ │ ├── vue.common.js
│ │ ├── vue.common.prod.js
│ │ ├── vue.esm.js
│ │ ├── vue.runtime.common.dev.js
│ │ ├── vue.runtime.common.js
│ │ ├── vue.runtime.common.prod.js
│ │ ├── vue.runtime.esm.js
│ │ └── vue.runtime.js
│ ├── controller/
│ │ ├── base.go
│ │ ├── inbound.go
│ │ ├── index.go
│ │ ├── server.go
│ │ ├── setting.go
│ │ ├── util.go
│ │ └── xui.go
│ ├── entity/
│ │ └── entity.go
│ ├── global/
│ │ └── global.go
│ ├── html/
│ │ ├── common/
│ │ │ ├── head.html
│ │ │ ├── js.html
│ │ │ ├── prompt_modal.html
│ │ │ ├── qrcode_modal.html
│ │ │ └── text_modal.html
│ │ ├── login.html
│ │ └── xui/
│ │ ├── common_sider.html
│ │ ├── component/
│ │ │ ├── inbound_info.html
│ │ │ └── setting.html
│ │ ├── form/
│ │ │ ├── inbound.html
│ │ │ ├── protocol/
│ │ │ │ ├── dokodemo.html
│ │ │ │ ├── http.html
│ │ │ │ ├── shadowsocks.html
│ │ │ │ ├── socks.html
│ │ │ │ ├── trojan.html
│ │ │ │ ├── vless.html
│ │ │ │ └── vmess.html
│ │ │ ├── reality_settings.html
│ │ │ ├── sniffing.html
│ │ │ ├── stream/
│ │ │ │ ├── stream_grpc.html
│ │ │ │ ├── stream_http.html
│ │ │ │ ├── stream_kcp.html
│ │ │ │ ├── stream_quic.html
│ │ │ │ ├── stream_settings.html
│ │ │ │ ├── stream_tcp.html
│ │ │ │ └── stream_ws.html
│ │ │ ├── stream_sockopt.html
│ │ │ └── tls_settings.html
│ │ ├── inbound_info_modal.html
│ │ ├── inbound_modal.html
│ │ ├── inbounds.html
│ │ ├── index.html
│ │ └── setting.html
│ ├── job/
│ │ ├── check_inbound_job.go
│ │ ├── check_xray_running_job.go
│ │ ├── stats_notify_job.go
│ │ └── xray_traffic_job.go
│ ├── network/
│ │ ├── auto_https_listener.go
│ │ └── autp_https_conn.go
│ ├── service/
│ │ ├── config.json
│ │ ├── inbound.go
│ │ ├── panel.go
│ │ ├── server.go
│ │ ├── setting.go
│ │ ├── telegram.go
│ │ ├── user.go
│ │ └── xray.go
│ ├── session/
│ │ └── session.go
│ ├── translation/
│ │ ├── translate.en_US.toml
│ │ ├── translate.zh_Hans.toml
│ │ └── translate.zh_Hant.toml
│ └── web.go
├── x-ui.service
├── x-ui.sh
├── x-ui_CN.sh
└── xray/
├── config.go
├── inbound.go
├── process.go
└── traffic.go
SYMBOL INDEX (2501 symbols across 57 files)
FILE: config/config.go
type LogLevel (line 16) | type LogLevel
constant Debug (line 19) | Debug LogLevel = "debug"
constant Info (line 20) | Info LogLevel = "info"
constant Warn (line 21) | Warn LogLevel = "warn"
constant Error (line 22) | Error LogLevel = "error"
function GetVersion (line 25) | func GetVersion() string {
function GetName (line 29) | func GetName() string {
function GetLogLevel (line 33) | func GetLogLevel() LogLevel {
function IsDebug (line 44) | func IsDebug() bool {
function GetBinFolderPath (line 48) | func GetBinFolderPath() string {
function GetDBFolderPath (line 56) | func GetDBFolderPath() string {
function GetDBPath (line 64) | func GetDBPath() string {
FILE: database/db.go
function initUser (line 19) | func initUser() error {
function initInbound (line 39) | func initInbound() error {
function initSetting (line 43) | func initSetting() error {
function InitDB (line 47) | func InitDB(dbPath string) error {
function GetDB (line 86) | func GetDB() *gorm.DB {
function IsNotFound (line 90) | func IsNotFound(err error) bool {
function IsSQLiteDB (line 94) | func IsSQLiteDB(file io.Reader) (bool, error) {
FILE: database/model/model.go
type Protocol (line 9) | type Protocol
constant VMess (line 12) | VMess Protocol = "vmess"
constant VLESS (line 13) | VLESS Protocol = "vless"
constant Dokodemo (line 14) | Dokodemo Protocol = "Dokodemo-door"
constant Http (line 15) | Http Protocol = "http"
constant Trojan (line 16) | Trojan Protocol = "trojan"
constant Shadowsocks (line 17) | Shadowsocks Protocol = "shadowsocks"
type User (line 20) | type User struct
type Inbound (line 26) | type Inbound struct
method GenXrayInboundConfig (line 46) | func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {
type Setting (line 62) | type Setting struct
FILE: logger/logger.go
function init (line 10) | func init() {
function InitLogger (line 14) | func InitLogger(level logging.Level) {
function Debug (line 28) | func Debug(args ...interface{}) {
function Debugf (line 32) | func Debugf(format string, args ...interface{}) {
function Info (line 36) | func Info(args ...interface{}) {
function Infof (line 40) | func Infof(format string, args ...interface{}) {
function Warning (line 44) | func Warning(args ...interface{}) {
function Warningf (line 48) | func Warningf(format string, args ...interface{}) {
function Error (line 52) | func Error(args ...interface{}) {
function Errorf (line 56) | func Errorf(format string, args ...interface{}) {
FILE: main.go
function runWebServer (line 21) | func runWebServer() {
function resetSetting (line 78) | func resetSetting() {
function showSetting (line 94) | func showSetting(show bool) {
function updateTgbotEnableSts (line 118) | func updateTgbotEnableSts(status bool) {
function updateTgbotSetting (line 138) | func updateTgbotSetting(tgBotToken string, tgBotChatid int, tgBotRuntime...
function updateSetting (line 178) | func updateSetting(port int, username string, password string, listen st...
function main (line 216) | func main() {
FILE: util/common/err.go
function NewErrorf (line 11) | func NewErrorf(format string, a ...interface{}) error {
function NewError (line 16) | func NewError(a ...interface{}) error {
function Recover (line 21) | func Recover(msg string) interface{} {
FILE: util/common/format.go
function FormatTraffic (line 7) | func FormatTraffic(trafficBytes int64) (size string) {
function FormatTime (line 23) | func FormatTime(timeseconds uint64) (timeStr string) {
FILE: util/common/multi_error.go
type multiError (line 7) | type multiError
method Error (line 9) | func (e multiError) Error() string {
function Combine (line 19) | func Combine(maybeError ...error) error {
FILE: util/common/network.go
function GetMyIpAddr (line 8) | func GetMyIpAddr() string {
FILE: util/common/stringUtil.go
function IsSubString (line 8) | func IsSubString(target string, str_array []string) bool {
function ByteToString (line 14) | func ByteToString(p []byte) string {
function ByteToStringWithOutNewLine (line 27) | func ByteToStringWithOutNewLine(p []byte) string {
FILE: util/context.go
function IsDone (line 5) | func IsDone(ctx context.Context) bool {
FILE: util/json_util/json.go
type RawMessage (line 7) | type RawMessage
method MarshalJSON (line 10) | func (m RawMessage) MarshalJSON() ([]byte, error) {
method UnmarshalJSON (line 18) | func (m *RawMessage) UnmarshalJSON(data []byte) error {
FILE: util/random/random.go
function init (line 15) | func init() {
function Seq (line 37) | func Seq(n int) string {
FILE: util/reflect_util/reflect.go
function GetFields (line 5) | func GetFields(t reflect.Type) []reflect.StructField {
function GetFieldValues (line 14) | func GetFieldValues(v reflect.Value) []reflect.Value {
FILE: util/sys/psutil.go
function HostProc (line 8) | func HostProc(combineWith ...string) string
FILE: util/sys/sys_darwin.go
function GetTCPCount (line 10) | func GetTCPCount() (int, error) {
function GetUDPCount (line 18) | func GetUDPCount() (int, error) {
FILE: util/sys/sys_linux.go
function getLinesNum (line 12) | func getLinesNum(filename string) (int, error) {
function GetTCPCount (line 42) | func GetTCPCount() (int, error) {
function GetUDPCount (line 57) | func GetUDPCount() (int, error) {
FILE: web/assets/js/model/models.js
class User (line 1) | class User {
method constructor (line 2) | constructor() {
class Msg (line 8) | class Msg {
method constructor (line 10) | constructor(success, msg, obj) {
class DBInbound (line 27) | class DBInbound {
method constructor (line 29) | constructor(data) {
method totalGB (line 53) | get totalGB() {
method totalGB (line 57) | set totalGB(gb) {
method isVMess (line 61) | get isVMess() {
method isVLess (line 65) | get isVLess() {
method isTrojan (line 69) | get isTrojan() {
method isSS (line 73) | get isSS() {
method isSocks (line 77) | get isSocks() {
method isHTTP (line 81) | get isHTTP() {
method address (line 85) | get address() {
method _expiryTime (line 93) | get _expiryTime() {
method _expiryTime (line 100) | set _expiryTime(t) {
method isExpiry (line 108) | get isExpiry() {
method toInbound (line 112) | toInbound() {
method hasLink (line 139) | hasLink() {
method genLink (line 151) | genLink() {
class AllSetting (line 157) | class AllSetting {
method constructor (line 159) | constructor(data) {
method equals (line 179) | equals(other) {
FILE: web/assets/js/model/xray.js
constant RULE_IP (line 31) | const RULE_IP = {
constant RULE_DOMAIN (line 36) | const RULE_DOMAIN = {
constant FLOW_VISION (line 45) | const FLOW_VISION = {
constant TLS_VERSION_OPTION (line 49) | const TLS_VERSION_OPTION = {
constant TLS_CIPHER_OPTION (line 56) | const TLS_CIPHER_OPTION = {
constant UTLS_FINGERPRINT (line 70) | const UTLS_FINGERPRINT = {
constant SNIFFING_OPTION (line 83) | const SNIFFING_OPTION = {
constant ALPN_OPTION (line 89) | const ALPN_OPTION = {
constant TCP_CONGESTION (line 95) | const TCP_CONGESTION = {
constant DOMAIN_STRATEGY (line 101) | const DOMAIN_STRATEGY = {
class XrayCommonClass (line 124) | class XrayCommonClass {
method toJsonArray (line 126) | static toJsonArray(arr) {
method fromJson (line 130) | static fromJson() {
method toJson (line 134) | toJson() {
method toString (line 138) | toString(format = true) {
method toHeaders (line 142) | static toHeaders(v2Headers) {
method toV2Headers (line 159) | static toV2Headers(headers, arr = true) {
class TcpStreamSettings (line 182) | class TcpStreamSettings extends XrayCommonClass {
method constructor (line 183) | constructor(type = 'none',
method fromJson (line 193) | static fromJson(json = {}) {
method toJson (line 205) | toJson() {
method constructor (line 218) | constructor(version = '1.1',
method addPath (line 230) | addPath(path) {
method removePath (line 234) | removePath(index) {
method addHeader (line 238) | addHeader(name, value) {
method getHeader (line 242) | getHeader(name) {
method removeHeader (line 251) | removeHeader(index) {
method fromJson (line 255) | static fromJson(json = {}) {
method toJson (line 264) | toJson() {
method constructor (line 274) | constructor(version = '1.1',
method addHeader (line 286) | addHeader(name, value) {
method removeHeader (line 290) | removeHeader(index) {
method fromJson (line 294) | static fromJson(json = {}) {
method toJson (line 303) | toJson() {
class KcpStreamSettings (line 313) | class KcpStreamSettings extends XrayCommonClass {
method constructor (line 314) | constructor(mtu = 1350, tti = 20,
method fromJson (line 335) | static fromJson(json = {}) {
method toJson (line 349) | toJson() {
class WsStreamSettings (line 366) | class WsStreamSettings extends XrayCommonClass {
method constructor (line 367) | constructor(path = '/', headers = []) {
method addHeader (line 373) | addHeader(name, value) {
method getHeader (line 377) | getHeader(name) {
method removeHeader (line 386) | removeHeader(index) {
method fromJson (line 390) | static fromJson(json = {}) {
method toJson (line 397) | toJson() {
class HttpStreamSettings (line 405) | class HttpStreamSettings extends XrayCommonClass {
method constructor (line 406) | constructor(path = '/', host = ['']) {
method addHost (line 412) | addHost(host) {
method removeHost (line 416) | removeHost(index) {
method fromJson (line 420) | static fromJson(json = {}) {
method toJson (line 424) | toJson() {
class QuicStreamSettings (line 439) | class QuicStreamSettings extends XrayCommonClass {
method constructor (line 440) | constructor(security = VmessMethods.NONE,
method fromJson (line 448) | static fromJson(json = {}) {
method toJson (line 456) | toJson() {
class GrpcStreamSettings (line 467) | class GrpcStreamSettings extends XrayCommonClass {
method constructor (line 468) | constructor(serviceName = "") {
method fromJson (line 473) | static fromJson(json = {}) {
method toJson (line 477) | toJson() {
class TlsStreamSettings (line 485) | class TlsStreamSettings extends XrayCommonClass {
method constructor (line 486) | constructor(serverName = '',
method addCert (line 506) | addCert(cert) {
method removeCert (line 510) | removeCert(index) {
method fromJson (line 514) | static fromJson(json = {}) {
method toJson (line 532) | toJson() {
method constructor (line 548) | constructor(useFile = true, ocspStapling = 3600, certificateFile = '', k...
method fromJson (line 558) | static fromJson(json = {}) {
method toJson (line 577) | toJson() {
class RealityStreamSettings (line 594) | class RealityStreamSettings extends XrayCommonClass {
method constructor (line 595) | constructor(
method fromJson (line 622) | static fromJson(json = {}) {
method toJson (line 638) | toJson() {
class SockoptStreamSettings (line 655) | class SockoptStreamSettings extends XrayCommonClass {
method constructor (line 656) | constructor(tcpMaxSeg = 1440,
method fromJson (line 679) | static fromJson(json = {}) {
method toJson (line 694) | toJson() {
class StreamSettings (line 710) | class StreamSettings extends XrayCommonClass {
method constructor (line 711) | constructor(network = 'tcp',
method isTls (line 737) | get isTls() {
method isTls (line 741) | set isTls(isTls) {
method isReality (line 749) | get isReality() {
method isReality (line 753) | set isReality(isReality) {
method isSockopt (line 761) | get isSockopt() {
method isSockopt (line 765) | set isSockopt(isSockopt) {
method fromJson (line 771) | static fromJson(json = {}) {
method toJson (line 787) | toJson() {
class Sniffing (line 805) | class Sniffing extends XrayCommonClass {
method constructor (line 806) | constructor(enabled = true, destOverride = ['http', 'tls', 'quic']) {
method fromJson (line 812) | static fromJson(json = {}) {
class Inbound (line 826) | class Inbound extends XrayCommonClass {
method constructor (line 827) | constructor(port = RandomUtil.randomIntRange(10000, 60000),
method protocol (line 845) | get protocol() {
method protocol (line 849) | set protocol(protocol) {
method tls (line 859) | get tls() {
method tls (line 863) | set tls(isTls) {
method reality (line 872) | get reality() {
method reality (line 876) | set reality(isReality) {
method network (line 885) | get network() {
method network (line 889) | set network(network) {
method isTcp (line 893) | get isTcp() {
method isWs (line 897) | get isWs() {
method isKcp (line 901) | get isKcp() {
method isQuic (line 905) | get isQuic() {
method isGrpc (line 909) | get isGrpc() {
method isH2 (line 913) | get isH2() {
method uuid (line 918) | get uuid() {
method flow (line 930) | get flow() {
method username (line 942) | get username() {
method password (line 953) | get password() {
method method (line 968) | get method() {
method serverName (line 977) | get serverName() {
method host (line 984) | get host() {
method path (line 995) | get path() {
method quicSecurity (line 1006) | get quicSecurity() {
method quicKey (line 1010) | get quicKey() {
method quicType (line 1014) | get quicType() {
method kcpType (line 1018) | get kcpType() {
method kcpSeed (line 1022) | get kcpSeed() {
method serviceName (line 1026) | get serviceName() {
method canEnableTls (line 1030) | canEnableTls() {
method canSetTls (line 1053) | canSetTls() {
method canEnableReality (line 1057) | canEnableReality() {
method canSockopt (line 1069) | canSockopt() {
method canEnableStream (line 1083) | canEnableStream() {
method canSniffing (line 1095) | canSniffing() {
method reset (line 1107) | reset() {
method genVmessLink (line 1117) | genVmessLink(address = '', remark = '') {
method genVLESSLink (line 1189) | genVLESSLink(address = '', remark = '') {
method genSSLink (line 1288) | genSSLink(address = '', remark = '') {
method genTrojanLink (line 1301) | genTrojanLink(address = '', remark = '') {
method genLink (line 1392) | genLink(address = '', remark = '') {
method fromJson (line 1402) | static fromJson(json = {}) {
method toJson (line 1414) | toJson() {
method constructor (line 1432) | constructor(protocol) {
method getSettings (line 1437) | static getSettings(protocol) {
method fromJson (line 1450) | static fromJson(protocol, json) {
method toJson (line 1463) | toJson() {
method constructor (line 1469) | constructor(protocol,
method indexOfVmessById (line 1477) | indexOfVmessById(id) {
method addVmess (line 1481) | addVmess() {
method delVmess (line 1485) | delVmess(index) {
method fromJson (line 1489) | static fromJson(json = {}) {
method toJson (line 1497) | toJson() {
method constructor (line 1505) | constructor(id = RandomUtil.randomUUID()) {
method fromJson (line 1510) | static fromJson(json = {}) {
method constructor (line 1518) | constructor(protocol,
method addVLESS (line 1528) | addVLESS() {
method delVLESS (line 1532) | delVLESS(index) {
method addFallback (line 1536) | addFallback() {
method delFallback (line 1540) | delFallback(index) {
method fromJson (line 1544) | static fromJson(json = {}) {
method toJson (line 1553) | toJson() {
method constructor (line 1564) | constructor(id = RandomUtil.randomUUID(), flow = "") {
method fromJson (line 1570) | static fromJson(json = {}) {
method constructor (line 1578) | constructor(name = "", alpn = '', path = '', dest = '', xver = 0) {
method toJson (line 1587) | toJson() {
method fromJson (line 1601) | static fromJson(json = []) {
method constructor (line 1617) | constructor(protocol,
method addTrojan (line 1625) | addTrojan() {
method delTrojan (line 1629) | delTrojan(index) {
method addTrojanFallback (line 1633) | addTrojanFallback() {
method delTrojanFallback (line 1637) | delTrojanFallback(index) {
method toJson (line 1641) | toJson() {
method fromJson (line 1648) | static fromJson(json = {}) {
method constructor (line 1660) | constructor(password = RandomUtil.randomSeq(10)) {
method toJson (line 1666) | toJson() {
method fromJson (line 1673) | static fromJson(json = {}) {
method constructor (line 1683) | constructor(name = "", alpn = '', path = '', dest = '', xver = 0) {
method toJson (line 1692) | toJson() {
method fromJson (line 1706) | static fromJson(json = []) {
method constructor (line 1722) | constructor(protocol,
method fromJson (line 1733) | static fromJson(json = {}) {
method toJson (line 1742) | toJson() {
method constructor (line 1752) | constructor(protocol, address, port, network = 'tcp,udp') {
method fromJson (line 1759) | static fromJson(json = {}) {
method toJson (line 1768) | toJson() {
method constructor (line 1778) | constructor(protocol, auth = 'password', accounts = [new Inbound.SocksSe...
method addAccount (line 1786) | addAccount(account) {
method delAccount (line 1790) | delAccount(index) {
method fromJson (line 1794) | static fromJson(json = {}) {
method toJson (line 1810) | toJson() {
method constructor (line 1820) | constructor(user = RandomUtil.randomSeq(10), pass = RandomUtil.randomSeq...
method fromJson (line 1826) | static fromJson(json = {}) {
method constructor (line 1832) | constructor(protocol, accounts = [new Inbound.HttpSettings.HttpAccount()...
method addAccount (line 1837) | addAccount(account) {
method delAccount (line 1841) | delAccount(index) {
method fromJson (line 1845) | static fromJson(json = {}) {
method toJson (line 1852) | toJson() {
method constructor (line 1860) | constructor(user = RandomUtil.randomSeq(10), pass = RandomUtil.randomSeq...
method fromJson (line 1866) | static fromJson(json = {}) {
FILE: web/assets/js/util/common.js
constant ONE_KB (line 1) | const ONE_KB = 1024;
constant ONE_MB (line 2) | const ONE_MB = ONE_KB * 1024;
constant ONE_GB (line 3) | const ONE_GB = ONE_MB * 1024;
constant ONE_TB (line 4) | const ONE_TB = ONE_GB * 1024;
constant ONE_PB (line 5) | const ONE_PB = ONE_TB * 1024;
function sizeFormat (line 7) | function sizeFormat(size) {
function base64 (line 23) | function base64(str) {
function safeBase64 (line 27) | function safeBase64(str) {
function formatSecond (line 34) | function formatSecond(second) {
function addZero (line 46) | function addZero(num) {
function toFixed (line 54) | function toFixed(num, n) {
FILE: web/assets/js/util/date-util.js
class DateUtil (line 130) | class DateUtil {
method parseDate (line 133) | static parseDate(str) {
method formatMillis (line 137) | static formatMillis(millis) {
method firstDayOfMonth (line 141) | static firstDayOfMonth() {
FILE: web/assets/js/util/utils.js
class HttpUtil (line 1) | class HttpUtil {
method _handleMsg (line 2) | static _handleMsg(msg) {
method _respToMsg (line 16) | static _respToMsg(resp) {
method get (line 31) | static async get(url, data, options) {
method post (line 43) | static async post(url, data, options) {
method postWithModal (line 55) | static async postWithModal(url, data, modal) {
class PromiseUtil (line 70) | class PromiseUtil {
method sleep (line 72) | static async sleep(timeout) {
class RandomUtil (line 118) | class RandomUtil {
method randomIntRange (line 120) | static randomIntRange(min, max) {
method randomShortIdSeq (line 124) | static randomShortIdSeq(count) {
method randomInt (line 132) | static randomInt(n) {
method randomSeq (line 136) | static randomSeq(count) {
method randomLowerAndNum (line 144) | static randomLowerAndNum(count) {
method randomMTSecret (line 152) | static randomMTSecret() {
method randomUUID (line 165) | static randomUUID() {
method randowShortId (line 174) | static randowShortId() {
method randomX25519PrivateKey (line 180) | static randomX25519PrivateKey() {
method randomX25519PublicKey (line 191) | static randomX25519PublicKey(key) {
class ObjectUtil (line 196) | class ObjectUtil {
method getPropIgnoreCase (line 198) | static getPropIgnoreCase(obj, prop) {
method deepSearch (line 210) | static deepSearch(obj, key) {
method isEmpty (line 232) | static isEmpty(obj) {
method isArrEmpty (line 236) | static isArrEmpty(arr) {
method copyArr (line 240) | static copyArr(dest, src) {
method clone (line 247) | static clone(obj) {
method deepClone (line 263) | static deepClone(obj) {
method cloneProps (line 281) | static cloneProps(dest, src, ...ignoreProps) {
method delProps (line 311) | static delProps(obj, ...props) {
method execute (line 319) | static execute(func, ...args) {
method orDefault (line 325) | static orDefault(obj, defaultValue) {
method equals (line 332) | static equals(a, b) {
FILE: web/assets/vue@2.6.12/vue.common.dev.js
function isUndef (line 14) | function isUndef (v) {
function isDef (line 18) | function isDef (v) {
function isTrue (line 22) | function isTrue (v) {
function isFalse (line 26) | function isFalse (v) {
function isPrimitive (line 33) | function isPrimitive (value) {
function isObject (line 48) | function isObject (obj) {
function toRawType (line 57) | function toRawType (value) {
function isPlainObject (line 65) | function isPlainObject (obj) {
function isRegExp (line 69) | function isRegExp (v) {
function isValidArrayIndex (line 76) | function isValidArrayIndex (val) {
function isPromise (line 81) | function isPromise (val) {
function toString (line 92) | function toString (val) {
function toNumber (line 104) | function toNumber (val) {
function makeMap (line 113) | function makeMap (
function remove (line 140) | function remove (arr, item) {
function hasOwn (line 153) | function hasOwn (obj, key) {
function cached (line 160) | function cached (fn) {
function polyfillBind (line 200) | function polyfillBind (fn, ctx) {
function nativeBind (line 214) | function nativeBind (fn, ctx) {
function toArray (line 225) | function toArray (list, start) {
function extend (line 238) | function extend (to, _from) {
function toObject (line 248) | function toObject (arr) {
function noop (line 265) | function noop (a, b, c) {}
function genStaticKeys (line 282) | function genStaticKeys (modules) {
function looseEqual (line 292) | function looseEqual (a, b) {
function looseIndexOf (line 332) | function looseIndexOf (arr, val) {
function once (line 342) | function once (fn) {
function isReserved (line 485) | function isReserved (str) {
function def (line 493) | function def (obj, key, val, enumerable) {
function parsePath (line 506) | function parsePath (path) {
function isNative (line 577) | function isNative (Ctor) {
function Set (line 593) | function Set () {
function pushTarget (line 751) | function pushTarget (target) {
function popTarget (line 756) | function popTarget () {
function createTextVNode (line 817) | function createTextVNode (val) {
function cloneVNode (line 825) | function cloneVNode (vnode) {
function toggleObserving (line 908) | function toggleObserving (value) {
function protoAugment (line 962) | function protoAugment (target, src) {
function copyAugment (line 973) | function copyAugment (target, src, keys) {
function observe (line 985) | function observe (value, asRootData) {
function defineReactive$$1 (line 1010) | function defineReactive$$1 (
function set (line 1076) | function set (target, key, val) {
function del (line 1110) | function del (target, key) {
function dependArray (line 1141) | function dependArray (value) {
function mergeData (line 1178) | function mergeData (to, from) {
function mergeDataOrFn (line 1208) | function mergeDataOrFn (
function mergeHook (line 1275) | function mergeHook (
function dedupeHooks (line 1291) | function dedupeHooks (hooks) {
function mergeAssets (line 1312) | function mergeAssets (
function checkComponents (line 1402) | function checkComponents (options) {
function validateComponentName (line 1408) | function validateComponentName (name) {
function normalizeProps (line 1427) | function normalizeProps (options, vm) {
function normalizeInject (line 1464) | function normalizeInject (options, vm) {
function normalizeDirectives (line 1491) | function normalizeDirectives (options) {
function assertObjectType (line 1503) | function assertObjectType (name, value, vm) {
function mergeOptions (line 1517) | function mergeOptions (
function resolveAsset (line 1571) | function resolveAsset (
function validateProp (line 1603) | function validateProp (
function getPropDefaultValue (line 1645) | function getPropDefaultValue (vm, prop, key) {
function assertProp (line 1678) | function assertProp (
function assertType (line 1729) | function assertType (value, type) {
function getType (line 1757) | function getType (fn) {
function isSameType (line 1762) | function isSameType (a, b) {
function getTypeIndex (line 1766) | function getTypeIndex (type, expectedTypes) {
function getInvalidTypeMessage (line 1778) | function getInvalidTypeMessage (name, value, expectedTypes) {
function styleValue (line 1799) | function styleValue (value, type) {
function isExplicable (line 1809) | function isExplicable (value) {
function isBoolean (line 1814) | function isBoolean () {
function handleError (line 1823) | function handleError (err, vm, info) {
function invokeWithErrorHandling (line 1850) | function invokeWithErrorHandling (
function globalHandleError (line 1872) | function globalHandleError (err, vm, info) {
function logError (line 1887) | function logError (err, vm, info) {
function flushCallbacks (line 1906) | function flushCallbacks () {
function nextTick (line 1980) | function nextTick (cb, ctx) {
function traverse (line 2127) | function traverse (val) {
function _traverse (line 2132) | function _traverse (val, seen) {
function createFnInvoker (line 2172) | function createFnInvoker (fns, vm) {
function updateListeners (line 2191) | function updateListeners (
function mergeVNodeHook (line 2232) | function mergeVNodeHook (def, hookKey, hook) {
function extractPropsFromVNodeData (line 2267) | function extractPropsFromVNodeData (
function checkProp (line 2308) | function checkProp (
function simpleNormalizeChildren (line 2347) | function simpleNormalizeChildren (children) {
function normalizeChildren (line 2360) | function normalizeChildren (children) {
function isTextNode (line 2368) | function isTextNode (node) {
function normalizeArrayChildren (line 2372) | function normalizeArrayChildren (children, nestedIndex) {
function initProvide (line 2422) | function initProvide (vm) {
function initInjections (line 2431) | function initInjections (vm) {
function resolveInject (line 2452) | function resolveInject (inject, vm) {
function resolveSlots (line 2495) | function resolveSlots (
function isWhitespace (line 2535) | function isWhitespace (node) {
function normalizeScopedSlots (line 2541) | function normalizeScopedSlots (
function normalizeScopedSlot (line 2591) | function normalizeScopedSlot(normalSlots, key, fn) {
function proxyNormalSlot (line 2616) | function proxyNormalSlot(slots, key) {
function renderList (line 2625) | function renderList (
function renderSlot (line 2670) | function renderSlot (
function resolveFilter (line 2707) | function resolveFilter (id) {
function isKeyNotMatch (line 2713) | function isKeyNotMatch (expect, actual) {
function checkKeyCodes (line 2726) | function checkKeyCodes (
function bindObjectProps (line 2748) | function bindObjectProps (
function renderStatic (line 2804) | function renderStatic (
function markOnce (line 2829) | function markOnce (
function markStatic (line 2838) | function markStatic (
function markStaticNode (line 2854) | function markStaticNode (node, key, isOnce) {
function bindObjectListeners (line 2862) | function bindObjectListeners (data, value) {
function resolveScopedSlots (line 2883) | function resolveScopedSlots (
function bindDynamicKeys (line 2911) | function bindDynamicKeys (baseObj, values) {
function prependModifier (line 2930) | function prependModifier (value, symbol) {
function installRenderHelpers (line 2936) | function installRenderHelpers (target) {
function FunctionalRenderContext (line 2958) | function FunctionalRenderContext (
function createFunctionalComponent (line 3034) | function createFunctionalComponent (
function cloneAndMarkFunctionalResult (line 3075) | function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, ...
function mergeProps (line 3091) | function mergeProps (to, from) {
function createComponent (line 3172) | function createComponent (
function createComponentInstanceForVnode (line 3271) | function createComponentInstanceForVnode (
function installComponentHooks (line 3289) | function installComponentHooks (data) {
function mergeHook$1 (line 3301) | function mergeHook$1 (f1, f2) {
function transformModel (line 3313) | function transformModel (options, data) {
function createElement (line 3340) | function createElement (
function _createElement (line 3359) | function _createElement (
function applyNS (line 3449) | function applyNS (vnode, ns, force) {
function registerDeepBindings (line 3470) | function registerDeepBindings (data) {
function initRender (line 3481) | function initRender (vm) {
function renderMixin (line 3515) | function renderMixin (Vue) {
function ensureCtor (line 3589) | function ensureCtor (comp, base) {
function createAsyncPlaceholder (line 3601) | function createAsyncPlaceholder (
function resolveAsyncComponent (line 3614) | function resolveAsyncComponent (
function isAsyncPlaceholder (line 3738) | function isAsyncPlaceholder (node) {
function getFirstComponentChild (line 3744) | function getFirstComponentChild (children) {
function initEvents (line 3759) | function initEvents (vm) {
function add (line 3771) | function add (event, fn) {
function remove$1 (line 3775) | function remove$1 (event, fn) {
function createOnceHandler (line 3779) | function createOnceHandler (event, fn) {
function updateComponentListeners (line 3789) | function updateComponentListeners (
function eventsMixin (line 3799) | function eventsMixin (Vue) {
function setActiveInstance (line 3897) | function setActiveInstance(vm) {
function initLifecycle (line 3905) | function initLifecycle (vm) {
function lifecycleMixin (line 3931) | function lifecycleMixin (Vue) {
function mountComponent (line 4014) | function mountComponent (
function updateChildComponent (line 4088) | function updateChildComponent (
function isInInactiveTree (line 4168) | function isInInactiveTree (vm) {
function activateChildComponent (line 4175) | function activateChildComponent (vm, direct) {
function deactivateChildComponent (line 4193) | function deactivateChildComponent (vm, direct) {
function callHook (line 4209) | function callHook (vm, hook) {
function resetSchedulerState (line 4240) | function resetSchedulerState () {
function flushSchedulerQueue (line 4283) | function flushSchedulerQueue () {
function callUpdatedHooks (line 4342) | function callUpdatedHooks (queue) {
function queueActivatedComponent (line 4357) | function queueActivatedComponent (vm) {
function callActivatedHooks (line 4364) | function callActivatedHooks (queue) {
function queueWatcher (line 4376) | function queueWatcher (watcher) {
function proxy (line 4621) | function proxy (target, sourceKey, key) {
function initState (line 4631) | function initState (vm) {
function initProps (line 4647) | function initProps (vm, propsOptions) {
function initData (line 4695) | function initData (vm) {
function getData (line 4737) | function getData (data, vm) {
function initComputed (line 4752) | function initComputed (vm, computed) {
function defineComputed (line 4793) | function defineComputed (
function createComputedGetter (line 4823) | function createComputedGetter (key) {
function createGetterInvoker (line 4838) | function createGetterInvoker(fn) {
function initMethods (line 4844) | function initMethods (vm, methods) {
function initWatch (line 4872) | function initWatch (vm, watch) {
function createWatcher (line 4885) | function createWatcher (
function stateMixin (line 4901) | function stateMixin (Vue) {
function initMixin (line 4956) | function initMixin (Vue) {
function initInternalComponent (line 5013) | function initInternalComponent (vm, options) {
function resolveConstructorOptions (line 5032) | function resolveConstructorOptions (Ctor) {
function resolveModifiedOptions (line 5056) | function resolveModifiedOptions (Ctor) {
function Vue (line 5069) | function Vue (options) {
function initUse (line 5085) | function initUse (Vue) {
function initMixin$1 (line 5107) | function initMixin$1 (Vue) {
function initExtend (line 5116) | function initExtend (Vue) {
function initProps$1 (line 5192) | function initProps$1 (Comp) {
function initComputed$1 (line 5199) | function initComputed$1 (Comp) {
function initAssetRegisters (line 5208) | function initAssetRegisters (Vue) {
function getComponentName (line 5242) | function getComponentName (opts) {
function matches (line 5246) | function matches (pattern, name) {
function pruneCache (line 5258) | function pruneCache (keepAliveInstance, filter) {
function pruneCacheEntry (line 5273) | function pruneCacheEntry (
function initGlobalAPI (line 5374) | function initGlobalAPI (Vue) {
function genClassForVnode (line 5499) | function genClassForVnode (vnode) {
function mergeClassData (line 5517) | function mergeClassData (child, parent) {
function renderClass (line 5526) | function renderClass (
function concat (line 5537) | function concat (a, b) {
function stringifyClass (line 5541) | function stringifyClass (value) {
function stringifyArray (line 5555) | function stringifyArray (value) {
function stringifyObject (line 5567) | function stringifyObject (value) {
function getTagNamespace (line 5614) | function getTagNamespace (tag) {
function isUnknownElement (line 5626) | function isUnknownElement (tag) {
function query (line 5658) | function query (el) {
function createElement$1 (line 5675) | function createElement$1 (tagName, vnode) {
function createElementNS (line 5687) | function createElementNS (namespace, tagName) {
function createTextNode (line 5691) | function createTextNode (text) {
function createComment (line 5695) | function createComment (text) {
function insertBefore (line 5699) | function insertBefore (parentNode, newNode, referenceNode) {
function removeChild (line 5703) | function removeChild (node, child) {
function appendChild (line 5707) | function appendChild (node, child) {
function parentNode (line 5711) | function parentNode (node) {
function nextSibling (line 5715) | function nextSibling (node) {
function tagName (line 5719) | function tagName (node) {
function setTextContent (line 5723) | function setTextContent (node, text) {
function setStyleScope (line 5727) | function setStyleScope (node, scopeId) {
function registerRef (line 5763) | function registerRef (vnode, isRemoval) {
function sameVnode (line 5806) | function sameVnode (a, b) {
function sameInputType (line 5823) | function sameInputType (a, b) {
function createKeyToOldIdx (line 5831) | function createKeyToOldIdx (children, beginIdx, endIdx) {
function createPatchFunction (line 5841) | function createPatchFunction (backend) {
function updateDirectives (line 6569) | function updateDirectives (oldVnode, vnode) {
function _update (line 6575) | function _update (oldVnode, vnode) {
function normalizeDirectives$1 (line 6638) | function normalizeDirectives$1 (
function getRawDirName (line 6661) | function getRawDirName (dir) {
function callHook$1 (line 6665) | function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
function updateAttrs (line 6683) | function updateAttrs (oldVnode, vnode) {
function setAttr (line 6724) | function setAttr (el, key, value) {
function baseSetAttr (line 6753) | function baseSetAttr (el, key, value) {
function updateClass (line 6785) | function updateClass (oldVnode, vnode) {
function parseFilters (line 6825) | function parseFilters (exp) {
function wrapFilter (line 6907) | function wrapFilter (exp, filter) {
function baseWarn (line 6924) | function baseWarn (msg, range) {
function pluckModuleFunction (line 6929) | function pluckModuleFunction (
function addProp (line 6938) | function addProp (el, name, value, range, dynamic) {
function addAttr (line 6943) | function addAttr (el, name, value, range, dynamic) {
function addRawAttr (line 6952) | function addRawAttr (el, name, value, range) {
function addDirective (line 6957) | function addDirective (
function prependModifierMarker (line 6978) | function prependModifierMarker (symbol, name, dynamic) {
function addHandler (line 6984) | function addHandler (
function getRawBindingAttr (line 7067) | function getRawBindingAttr (
function getBindingAttr (line 7076) | function getBindingAttr (
function getAndRemoveAttr (line 7098) | function getAndRemoveAttr (
function getAndRemoveAttrByRegex (line 7119) | function getAndRemoveAttrByRegex (
function rangeSetItem (line 7133) | function rangeSetItem (
function genComponentModel (line 7153) | function genComponentModel (
function genAssignmentCode (line 7185) | function genAssignmentCode (
function parseModel (line 7216) | function parseModel (val) {
function next (line 7256) | function next () {
function eof (line 7260) | function eof () {
function isStringStart (line 7264) | function isStringStart (chr) {
function parseBracket (line 7268) | function parseBracket (chr) {
function parseString (line 7286) | function parseString (chr) {
function model (line 7305) | function model (
function genCheckboxModel (line 7358) | function genCheckboxModel (
function genRadioModel (line 7389) | function genRadioModel (
function genSelect (line 7401) | function genSelect (
function genDefaultModel (line 7418) | function genDefaultModel (
function normalizeEvents (line 7477) | function normalizeEvents (on) {
function createOnceHandler$1 (line 7496) | function createOnceHandler$1 (event, handler, capture) {
function add$1 (line 7511) | function add$1 (
function remove$2 (line 7556) | function remove$2 (
function updateDOMListeners (line 7569) | function updateDOMListeners (oldVnode, vnode) {
function updateDOMProps (line 7590) | function updateDOMProps (oldVnode, vnode) {
function shouldUpdateValue (line 7663) | function shouldUpdateValue (elm, checkVal) {
function isNotInFocusAndDirty (line 7671) | function isNotInFocusAndDirty (elm, checkVal) {
function isDirtyWithModifiers (line 7681) | function isDirtyWithModifiers (elm, newVal) {
function normalizeStyleData (line 7716) | function normalizeStyleData (data) {
function normalizeStyleBinding (line 7726) | function normalizeStyleBinding (bindingStyle) {
function getStyle (line 7740) | function getStyle (vnode, checkChild) {
function updateStyle (line 7813) | function updateStyle (oldVnode, vnode) {
function addClass (line 7869) | function addClass (el, cls) {
function removeClass (line 7894) | function removeClass (el, cls) {
function resolveTransition (line 7927) | function resolveTransition (def$$1) {
function nextFrame (line 7987) | function nextFrame (fn) {
function addTransitionClass (line 7993) | function addTransitionClass (el, cls) {
function removeTransitionClass (line 8001) | function removeTransitionClass (el, cls) {
function whenTransitionEnds (line 8008) | function whenTransitionEnds (
function getTransitionInfo (line 8041) | function getTransitionInfo (el, expectedType) {
function getTimeout (line 8091) | function getTimeout (delays, durations) {
function toMs (line 8106) | function toMs (s) {
function enter (line 8112) | function enter (vnode, toggleDisplay) {
function leave (line 8263) | function leave (vnode, rm) {
function checkDuration (line 8368) | function checkDuration (val, name, vnode) {
function isValidDuration (line 8384) | function isValidDuration (val) {
function getHookArgumentsLength (line 8394) | function getHookArgumentsLength (fn) {
function _enter (line 8411) | function _enter (_, vnode) {
function setSelected (line 8516) | function setSelected (el, binding, vm) {
function actuallySetSelected (line 8526) | function actuallySetSelected (el, binding, vm) {
function hasNoMatchingOption (line 8559) | function hasNoMatchingOption (value, options) {
function getValue (line 8563) | function getValue (option) {
function onCompositionStart (line 8569) | function onCompositionStart (e) {
function onCompositionEnd (line 8573) | function onCompositionEnd (e) {
function trigger (line 8580) | function trigger (el, type) {
function locateNode (line 8589) | function locateNode (vnode) {
function getRealChild (line 8677) | function getRealChild (vnode) {
function extractTransitionData (line 8686) | function extractTransitionData (comp) {
function placeholder (line 8702) | function placeholder (h, rawChild) {
function hasParentTransition (line 8710) | function hasParentTransition (vnode) {
function isSameChild (line 8718) | function isSameChild (child, oldChild) {
function callPendingCbs (line 8985) | function callPendingCbs (c) {
function recordPosition (line 8996) | function recordPosition (c) {
function applyTranslation (line 9000) | function applyTranslation (c) {
function parseText (line 9082) | function parseText (
function transformNode (line 9119) | function transformNode (el, options) {
function genData (line 9143) | function genData (el) {
function transformNode$1 (line 9162) | function transformNode$1 (el, options) {
function genData$1 (line 9188) | function genData$1 (el) {
function decodeAttr (line 9277) | function decodeAttr (value, shouldDecodeNewlines) {
function parseHTML (line 9282) | function parseHTML (html, options) {
function createASTElement (line 9570) | function createASTElement (
function parse (line 9589) | function parse (
function processPre (line 9912) | function processPre (el) {
function processRawAttrs (line 9918) | function processRawAttrs (el) {
function processElement (line 9939) | function processElement (
function processKey (line 9964) | function processKey (el) {
function processRef (line 9991) | function processRef (el) {
function processFor (line 9999) | function processFor (el) {
function parseFor (line 10016) | function parseFor (exp) {
function processIf (line 10035) | function processIf (el) {
function processIfConditions (line 10054) | function processIfConditions (el, parent) {
function findPrevElement (line 10070) | function findPrevElement (children) {
function addIfCondition (line 10088) | function addIfCondition (el, condition) {
function processOnce (line 10095) | function processOnce (el) {
function processSlotContent (line 10104) | function processSlotContent (el) {
function getSlotName (line 10223) | function getSlotName (binding) {
function processSlotOutlet (line 10243) | function processSlotOutlet (el) {
function processComponent (line 10257) | function processComponent (el) {
function processAttrs (line 10267) | function processAttrs (el) {
function checkInFor (line 10400) | function checkInFor (el) {
function parseModifiers (line 10411) | function parseModifiers (name) {
function makeAttrsMap (line 10420) | function makeAttrsMap (attrs) {
function isTextTag (line 10434) | function isTextTag (el) {
function isForbiddenTag (line 10438) | function isForbiddenTag (el) {
function guardIESVGBug (line 10452) | function guardIESVGBug (attrs) {
function checkForAliasModel (line 10464) | function checkForAliasModel (el, value) {
function preTransformNode (line 10483) | function preTransformNode (el, options) {
function cloneASTElement (line 10545) | function cloneASTElement (el) {
function text (line 10561) | function text (el, dir) {
function html (line 10569) | function html (el, dir) {
function optimize (line 10614) | function optimize (root, options) {
function genStaticKeys$1 (line 10624) | function genStaticKeys$1 (keys) {
function markStatic$1 (line 10631) | function markStatic$1 (node) {
function markStaticRoots (line 10663) | function markStaticRoots (node, isInFor) {
function isStatic (line 10693) | function isStatic (node) {
function isDirectChildOfTemplateFor (line 10710) | function isDirectChildOfTemplateFor (node) {
function genHandlers (line 10777) | function genHandlers (
function genHandler (line 10800) | function genHandler (handler) {
function genKeyFilter (line 10859) | function genKeyFilter (keys) {
function genFilterCode (line 10869) | function genFilterCode (key) {
function on (line 10888) | function on (el, dir) {
function bind$1 (line 10897) | function bind$1 (el, dir) {
function generate (line 10932) | function generate (
function genElement (line 10944) | function genElement (el, state) {
function genStatic (line 10984) | function genStatic (el, state) {
function genOnce (line 10999) | function genOnce (el, state) {
function genIf (line 11026) | function genIf (
function genIfConditions (line 11036) | function genIfConditions (
function genFor (line 11063) | function genFor (
function genData$2 (line 11095) | function genData$2 (el, state) {
function genDirectives (line 11179) | function genDirectives (el, state) {
function genInlineTemplate (line 11204) | function genInlineTemplate (el, state) {
function genScopedSlots (line 11218) | function genScopedSlots (
function hash (line 11272) | function hash(str) {
function containsSlotChild (line 11281) | function containsSlotChild (el) {
function genScopedSlot (line 11291) | function genScopedSlot (
function genChildren (line 11316) | function genChildren (
function getNormalizationType (line 11349) | function getNormalizationType (
function needsNormalization (line 11372) | function needsNormalization (el) {
function genNode (line 11376) | function genNode (node, state) {
function genText (line 11386) | function genText (text) {
function genComment (line 11392) | function genComment (comment) {
function genSlot (line 11396) | function genSlot (el, state) {
function genComponent (line 11422) | function genComponent (
function genProps (line 11431) | function genProps (props) {
function transformSpecialNewlines (line 11452) | function transformSpecialNewlines (text) {
function detectErrors (line 11479) | function detectErrors (ast, warn) {
function checkNode (line 11485) | function checkNode (node, warn) {
function checkEvent (line 11514) | function checkEvent (exp, text, warn, range) {
function checkFor (line 11527) | function checkFor (node, text, warn, range) {
function checkIdentifier (line 11534) | function checkIdentifier (
function checkExpression (line 11550) | function checkExpression (exp, text, warn, range) {
function checkFunctionParameterExpression (line 11572) | function checkFunctionParameterExpression (exp, text, warn, range) {
function generateCodeFrame (line 11589) | function generateCodeFrame (
function repeat$1 (line 11626) | function repeat$1 (str, n) {
function createFunction (line 11643) | function createFunction (code, errors) {
function createCompileToFunctionFn (line 11652) | function createCompileToFunctionFn (compile) {
function createCompilerCreator (line 11754) | function createCompilerCreator (baseCompile) {
function getShouldDecode (line 11855) | function getShouldDecode (href) {
function getOuterHTML (line 11947) | function getOuterHTML (el) {
FILE: web/assets/vue@2.6.12/vue.common.prod.js
function t (line 6) | function t(e){return null==e}
function n (line 6) | function n(e){return null!=e}
function r (line 6) | function r(e){return!0===e}
function i (line 6) | function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==ty...
function o (line 6) | function o(e){return null!==e&&"object"==typeof e}
function s (line 6) | function s(e){return"[object Object]"===a.call(e)}
function c (line 6) | function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t...
function u (line 6) | function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof...
function l (line 6) | function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?J...
function f (line 6) | function f(e){var t=parseFloat(e);return isNaN(t)?e:t}
function p (line 6) | function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.len...
function h (line 6) | function h(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(...
function y (line 6) | function y(e,t){return m.call(e,t)}
function g (line 6) | function g(e){var t=Object.create(null);return function(n){return t[n]||...
function n (line 6) | function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e...
function k (line 6) | function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n...
function A (line 6) | function A(e,t){for(var n in t)e[n]=t[n];return e}
function O (line 6) | function O(e){for(var t={},n=0;n<e.length;n++)e[n]&&A(t,e[n]);return t}
function S (line 6) | function S(e,t,n){}
function N (line 6) | function N(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&...
function j (line 6) | function j(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}
function D (line 6) | function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments...
function R (line 6) | function R(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,wr...
function re (line 6) | function re(e){return"function"==typeof e&&/native code/.test(e.toString...
function e (line 6) | function e(){this.set=Object.create(null)}
function le (line 6) | function le(e){ue.push(e),ce.target=e}
function fe (line 6) | function fe(){ue.pop(),ce.target=ue[ue.length-1]}
function he (line 6) | function he(e){return new pe(void 0,void 0,void 0,String(e))}
function me (line 6) | function me(e){var t=new pe(e.tag,e.data,e.children&&e.children.slice(),...
function $e (line 6) | function $e(e){be=e}
function Ce (line 6) | function Ce(e,t){var n;if(o(e)&&!(e instanceof pe))return y(e,"__ob__")&...
function xe (line 6) | function xe(e,t,n,r,i){var o=new ce,a=Object.getOwnPropertyDescriptor(e,...
function ke (line 6) | function ke(e,t,n){if(Array.isArray(e)&&c(t))return e.length=Math.max(e....
function Ae (line 6) | function Ae(e,t){if(Array.isArray(e)&&c(t))e.splice(t,1);else{var n=e.__...
function Se (line 6) | function Se(e,t){if(!t)return e;for(var n,r,i,o=oe?Reflect.ownKeys(t):Ob...
function Te (line 6) | function Te(e,t,n){return n?function(){var r="function"==typeof t?t.call...
function Ee (line 6) | function Ee(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n...
function Ne (line 6) | function Ne(e,t,n,r){var i=Object.create(e||null);return t?A(i,t):i}
function De (line 6) | function De(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){...
function Le (line 6) | function Le(e,t,n,r){if("string"==typeof n){var i=e[t];if(y(i,n))return ...
function Me (line 6) | function Me(e,t,n,r){var i=t[e],o=!y(n,e),a=n[e],s=Pe(Boolean,i.type);if...
function Ie (line 6) | function Ie(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return ...
function Fe (line 6) | function Fe(e,t){return Ie(e)===Ie(t)}
function Pe (line 6) | function Pe(e,t){if(!Array.isArray(t))return Fe(t,e)?0:-1;for(var n=0,r=...
function Re (line 6) | function Re(e,t,n){le();try{if(t)for(var r=t;r=r.$parent;){var i=r.$opti...
function He (line 6) | function He(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue...
function Be (line 6) | function Be(e,t,n){if(F.errorHandler)try{return F.errorHandler.call(null...
function Ue (line 6) | function Ue(e,t,n){if(!z&&!V||"undefined"==typeof console)throw e;consol...
function qe (line 6) | function qe(){Je=!1;var e=Ke.slice(0);Ke.length=0;for(var t=0;t<e.length...
function Ye (line 6) | function Ye(e,t){var n;if(Ke.push(function(){if(e)try{e.call(t)}catch(e)...
function et (line 6) | function et(e){!function e(t,n){var r,i;var a=Array.isArray(t);if(!a&&!o...
function nt (line 6) | function nt(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(...
function rt (line 6) | function rt(e,n,i,o,a,s){var c,u,l,f;for(c in e)u=e[c],l=n[c],f=tt(c),t(...
function it (line 6) | function it(e,i,o){var a;e instanceof pe&&(e=e.data.hook||(e.data.hook={...
function ot (line 6) | function ot(e,t,r,i,o){if(n(t)){if(y(t,r))return e[r]=t[r],o||delete t[r...
function at (line 6) | function at(e){return i(e)?[he(e)]:Array.isArray(e)?function e(o,a){var ...
function st (line 6) | function st(e){return n(e)&&n(e.text)&&!1===e.isComment}
function ct (line 6) | function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKey...
function ut (line 6) | function ut(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r...
function lt (line 6) | function lt(e){return e.isComment&&!e.asyncFactory||" "===e.text}
function ft (line 6) | function ft(t,n,r){var i,o=Object.keys(n).length>0,a=t?!!t.$stable:!o,s=...
function pt (line 6) | function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,...
function dt (line 6) | function dt(e,t){return function(){return e[t]}}
function vt (line 6) | function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)f...
function ht (line 6) | function ht(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=A(A({...
function mt (line 6) | function mt(e){return Le(this.$options,"filters",e)||E}
function yt (line 6) | function yt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}
function gt (line 6) | function gt(e,t,n,r,i){var o=F.keyCodes[t]||n;return i&&r&&!F.keyCodes[t...
function _t (line 6) | function _t(e,t,n,r,i){if(n)if(o(n)){var a;Array.isArray(n)&&(n=O(n));va...
function bt (line 6) | function bt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];...
function $t (line 6) | function $t(e,t,n){return wt(e,"__once__"+t+(n?"_"+n:""),!0),e}
function wt (line 6) | function wt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&...
function Ct (line 6) | function Ct(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}
function xt (line 6) | function xt(e,t){if(t)if(s(t)){var n=e.on=e.on?A({},e.on):{};for(var r i...
function kt (line 6) | function kt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o...
function At (line 6) | function At(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeo...
function Ot (line 6) | function Ot(e,t){return"string"==typeof e?t+e:e}
function St (line 6) | function St(e){e._o=$t,e._n=f,e._s=l,e._l=vt,e._t=ht,e._q=N,e._i=j,e._m=...
function Tt (line 6) | function Tt(t,n,i,o,a){var s,c=this,u=a.options;y(o,"_uid")?(s=Object.cr...
function Et (line 6) | function Et(e,t,n,r,i){var o=me(e);return o.fnContext=n,o.fnOptions=r,t....
function Nt (line 6) | function Nt(e,t){for(var n in t)e[b(n)]=t[n]}
function Lt (line 6) | function Lt(i,a,s,c,l){if(!t(i)){var f=s.$options._base;if(o(i)&&(i=f.ex...
function Mt (line 6) | function Mt(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}
function Pt (line 6) | function Pt(e,a,s,c,u,l){return(Array.isArray(s)||i(s))&&(u=c,c=s,s=void...
function Bt (line 6) | function Bt(e,t){return(e.__esModule||oe&&"Module"===e[Symbol.toStringTa...
function Ut (line 6) | function Ut(e){return e.isComment&&e.asyncFactory}
function zt (line 6) | function zt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var r=e[t...
function Vt (line 6) | function Vt(e,t){Rt.$on(e,t)}
function Kt (line 6) | function Kt(e,t){Rt.$off(e,t)}
function Jt (line 6) | function Jt(e,t){var n=Rt;return function r(){null!==t.apply(null,argume...
function qt (line 6) | function qt(e,t,n){Rt=e,rt(t,n||{},Vt,Kt,Jt,e),Rt=void 0}
function Zt (line 6) | function Zt(e){var t=Wt;return Wt=e,function(){Wt=t}}
function Gt (line 6) | function Gt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}
function Xt (line 6) | function Xt(e,t){if(t){if(e._directInactive=!1,Gt(e))return}else if(e._d...
function Yt (line 6) | function Yt(e,t){le();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o...
function un (line 6) | function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.i...
function dn (line 6) | function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(...
function vn (line 6) | function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){va...
function mn (line 6) | function mn(e,t,n){var r=!te();"function"==typeof n?(pn.get=r?yn(t):gn(n...
function yn (line 6) | function yn(e){return function(){var t=this._computedWatchers&&this._com...
function gn (line 6) | function gn(e){return function(){return e.call(this,this)}}
function _n (line 6) | function _n(e,t,n,r){return s(n)&&(r=n,n=n.handler),"string"==typeof n&&...
function $n (line 6) | function $n(e){var t=e.options;if(e.super){var n=$n(e.super);if(n!==e.su...
function wn (line 6) | function wn(e){this._init(e)}
function Cn (line 6) | function Cn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r...
function xn (line 6) | function xn(e){return e&&(e.Ctor.options.name||e.tag)}
function kn (line 6) | function kn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeo...
function An (line 6) | function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a...
function On (line 6) | function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstanc...
function r (line 6) | function r(){n.$off(e,r),t.apply(n,arguments)}
function Bn (line 6) | function Bn(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.com...
function Un (line 6) | function Un(e,t){return{staticClass:zn(e.staticClass,t.staticClass),clas...
function zn (line 6) | function zn(e,t){return e?t?e+" "+t:e:t||""}
function Vn (line 6) | function Vn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=...
function Zn (line 6) | function Zn(e){return qn(e)?"svg":"math"===e?"math":void 0}
function Yn (line 6) | function Yn(e){if("string"==typeof e){var t=document.querySelector(e);re...
function tr (line 6) | function tr(e,t){var r=e.data.ref;if(n(r)){var i=e.context,o=e.component...
function ir (line 6) | function ir(e,i){return e.key===i.key&&(e.tag===i.tag&&e.isComment===i.i...
function or (line 6) | function or(e,t,r){var i,o,a={};for(i=t;i<=r;++i)n(o=e[i].key)&&(a[o]=i)...
function sr (line 6) | function sr(e,t){(e.data.directives||t.data.directives)&&function(e,t){v...
function ur (line 6) | function ur(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<...
function lr (line 6) | function lr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{})...
function fr (line 6) | function fr(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}c...
function dr (line 6) | function dr(e,r){var i=r.componentOptions;if(!(n(i)&&!1===i.Ctor.options...
function vr (line 6) | function vr(e,t,n){e.tagName.indexOf("-")>-1?hr(e,t,n):In(t)?Hn(n)?e.rem...
function hr (line 6) | function hr(e,t,n){if(Hn(n))e.removeAttribute(t);else{if(q&&!W&&"TEXTARE...
function yr (line 6) | function yr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(...
function Ar (line 6) | function Ar(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0...
function Or (line 6) | function Or(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";...
function Sr (line 6) | function Sr(e,t){console.error("[Vue compiler]: "+e)}
function Tr (line 6) | function Tr(e,t){return e?e.map(function(e){return e[t]}).filter(functio...
function Er (line 6) | function Er(e,t,n,r,i){(e.props||(e.props=[])).push(Rr({name:t,value:n,d...
function Nr (line 6) | function Nr(e,t,n,r,i){(i?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(...
function jr (line 6) | function jr(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(Rr({name:t,value:n...
function Dr (line 6) | function Dr(e,t,n,r,i,o,a,s){(e.directives||(e.directives=[])).push(Rr({...
function Lr (line 6) | function Lr(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}
function Mr (line 6) | function Mr(t,n,r,i,o,a,s,c){var u;(i=i||e).right?c?n="("+n+")==='click'...
function Ir (line 6) | function Ir(e,t,n){var r=Fr(e,":"+t)||Fr(e,"v-bind:"+t);if(null!=r)retur...
function Fr (line 6) | function Fr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsLis...
function Pr (line 6) | function Pr(e,t){for(var n=e.attrsList,r=0,i=n.length;r<i;r++){var o=n[r...
function Rr (line 6) | function Rr(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end...
function Hr (line 6) | function Hr(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$...
function Br (line 6) | function Br(e,t){var n=function(e){if(e=e.trim(),gr=e.length,e.indexOf("...
function Ur (line 6) | function Ur(){return _r.charCodeAt(++$r)}
function zr (line 6) | function zr(){return $r>=gr}
function Vr (line 6) | function Vr(e){return 34===e||39===e}
function Kr (line 6) | function Kr(e){var t=1;for(wr=$r;!zr();)if(Vr(e=Ur()))Jr(e);else if(91==...
function Jr (line 6) | function Jr(e){for(var t=e;!zr()&&(e=Ur())!==t;);}
function Gr (line 6) | function Gr(e,t,n){var r=qr;return function i(){null!==t.apply(null,argu...
function Yr (line 6) | function Yr(e,t,n,r){if(Xr){var i=an,o=t;t=o._wrapper=function(e){if(e.t...
function Qr (line 6) | function Qr(e,t,n,r){(r||qr).removeEventListener(e,t._wrapper||t,n)}
function ei (line 6) | function ei(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=...
function ri (line 6) | function ri(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=...
function ii (line 6) | function ii(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t...
function si (line 6) | function si(e){var t=ci(e.style);return e.staticStyle?A(e.staticStyle,t):t}
function ci (line 6) | function ci(e){return Array.isArray(e)?O(e):"string"==typeof e?ai(e):e}
function hi (line 6) | function hi(e,r){var i=r.data,o=e.data;if(!(t(i.staticStyle)&&t(i.style)...
function gi (line 6) | function gi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.s...
function _i (line 6) | function _i(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.s...
function bi (line 6) | function bi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&A...
function Ei (line 6) | function Ei(e){Ti(function(){Ti(e)})}
function Ni (line 6) | function Ni(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n...
function ji (line 6) | function ji(e,t){e._transitionClasses&&h(e._transitionClasses,t),_i(e,t)}
function Di (line 6) | function Di(e,t,n){var r=Mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!...
function Mi (line 6) | function Mi(e,t){var n,r=window.getComputedStyle(e),i=(r[ki+"Delay"]||""...
function Ii (line 6) | function Ii(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.a...
function Fi (line 6) | function Fi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}
function Pi (line 6) | function Pi(e,r){var i=e.elm;n(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._...
function Ri (line 6) | function Ri(e,r){var i=e.elm;n(i._enterCb)&&(i._enterCb.cancelled=!0,i._...
function Hi (line 6) | function Hi(e){return"number"==typeof e&&!isNaN(e)}
function Bi (line 6) | function Bi(e){if(t(e))return!1;var r=e.fns;return n(r)?Bi(Array.isArray...
function Ui (line 6) | function Ui(e,t){!0!==t.data.show&&Pi(t)}
function l (line 6) | function l(e){var t=u.parentNode(e);n(t)&&u.removeChild(t,e)}
function f (line 6) | function f(e,t,i,o,a,c,l){if(n(e.elm)&&n(c)&&(e=c[l]=me(e)),e.isRootInse...
function d (line 6) | function d(e,t){n(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingI...
function v (line 6) | function v(e,t,r){n(e)&&(n(r)?u.parentNode(r)===e&&u.insertBefore(e,t,r)...
function h (line 6) | function h(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)f(t[r],...
function m (line 6) | function m(e){for(;e.componentInstance;)e=e.componentInstance._vnode;ret...
function y (line 6) | function y(e,t){for(var r=0;r<s.create.length;++r)s.create[r](nr,e);n(o=...
function g (line 6) | function g(e){var t;if(n(t=e.fnScopeId))u.setStyleScope(e.elm,t);else fo...
function _ (line 6) | function _(e,t,n,r,i,o){for(;r<=i;++r)f(n[r],o,e,t,!1,n,r)}
function b (line 6) | function b(e){var t,r,i=e.data;if(n(i))for(n(t=i.hook)&&n(t=t.destroy)&&...
function $ (line 6) | function $(e,t,r){for(;t<=r;++t){var i=e[t];n(i)&&(n(i.tag)?(w(i),b(i)):...
function w (line 6) | function w(e,t){if(n(t)||n(e.data)){var r,i=s.remove.length+1;for(n(t)?t...
function C (line 6) | function C(e,t,r,i){for(var o=r;o<i;o++){var a=t[o];if(n(a)&&ir(e,a))ret...
function x (line 6) | function x(e,i,o,a,c,l){if(e!==i){n(i.elm)&&n(a)&&(i=a[c]=me(i));var p=i...
function k (line 6) | function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;els...
function O (line 6) | function O(e,t,i,o){var a,s=t.tag,c=t.data,u=t.children;if(o=o||c&&c.pre...
function Ki (line 6) | function Ki(e,t,n){Ji(e,t,n),(q||Z)&&setTimeout(function(){Ji(e,t,n)},0)}
function Ji (line 6) | function Ji(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){f...
function qi (line 6) | function qi(e,t){return t.every(function(t){return!N(t,e)})}
function Wi (line 6) | function Wi(e){return"_value"in e?e._value:e.value}
function Zi (line 6) | function Zi(e){e.target.composing=!0}
function Gi (line 6) | function Gi(e){e.target.composing&&(e.target.composing=!1,Xi(e.target,"i...
function Xi (line 6) | function Xi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,...
function Yi (line 6) | function Yi(e){return!e.componentInstance||e.data&&e.data.transition?e:Y...
function to (line 6) | function to(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abst...
function no (line 6) | function no(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];...
function ro (line 6) | function ro(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{...
function co (line 6) | function co(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._ent...
function uo (line 6) | function uo(e){e.data.newPos=e.elm.getBoundingClientRect()}
function lo (line 6) | function lo(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-...
function Ho (line 6) | function Ho(e,t){var n=t?Fo:Io;return e.replace(n,function(e){return Mo[...
function ua (line 6) | function ua(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ma(t),rawAtt...
function la (line 6) | function la(e,t){Bo=t.warn||Sr,Jo=t.isPreTag||T,qo=t.mustUseProp||T,Wo=t...
function fa (line 6) | function fa(e,t){var n,r;(r=Ir(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e...
function pa (line 6) | function pa(e){var t;if(t=Fr(e,"v-for")){var n=function(e){var t=e.match...
function da (line 6) | function da(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push...
function va (line 6) | function va(e){var t=e.name.replace(ia,"");return t||"#"!==e.name[0]&&(t...
function ha (line 6) | function ha(e){var t=e.match(ra);if(t){var n={};return t.forEach(functio...
function ma (line 6) | function ma(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].val...
function _a (line 6) | function _a(e){return ua(e.tag,e.attrsList.slice(),e.parent)}
function ka (line 6) | function ka(e,t){e&&($a=xa(t.staticKeys||""),wa=t.isReservedTag||T,funct...
function Da (line 6) | function Da(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var...
function La (line 6) | function La(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+...
function Ma (line 6) | function Ma(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var...
function Pa (line 6) | function Pa(e,t){var n=new Fa(t);return{render:"with(this){return "+(e?R...
function Ra (line 6) | function Ra(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&...
function Ha (line 6) | function Ha(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e...
function Ba (line 6) | function Ba(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Ua(e,...
function Ua (line 6) | function Ua(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.l...
function za (line 6) | function za(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1...
function Va (line 6) | function Va(e,t){var n="{",r=function(e,t){var n=e.directives;if(!n)retu...
function Ka (line 6) | function Ka(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ka))}
function Ja (line 6) | function Ja(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&...
function qa (line 6) | function qa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o...
function Wa (line 6) | function Wa(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}
function Za (line 6) | function Za(e,t){return 1===e.type?Ra(e,t):3===e.type&&e.isComment?(r=e,...
function Ga (line 6) | function Ga(e){for(var t="",n="",r=0;r<e.length;r++){var i=e[r],o=Xa(i.v...
function Xa (line 6) | function Xa(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"...
function Ya (line 6) | function Ya(e,t){try{return new Function(e)}catch(n){return t.push({err:...
function Qa (line 6) | function Qa(e){var t=Object.create(null);return function(n,r,i){(r=A({},...
function t (line 6) | function t(t,n){var r=Object.create(e),i=[],o=[];if(n)for(var a in n.mod...
function is (line 6) | function is(e){return(ts=ts||document.createElement("div")).innerHTML=e?...
FILE: web/assets/vue@2.6.12/vue.esm.js
function isUndef (line 12) | function isUndef (v) {
function isDef (line 16) | function isDef (v) {
function isTrue (line 20) | function isTrue (v) {
function isFalse (line 24) | function isFalse (v) {
function isPrimitive (line 31) | function isPrimitive (value) {
function isObject (line 46) | function isObject (obj) {
function toRawType (line 55) | function toRawType (value) {
function isPlainObject (line 63) | function isPlainObject (obj) {
function isRegExp (line 67) | function isRegExp (v) {
function isValidArrayIndex (line 74) | function isValidArrayIndex (val) {
function isPromise (line 79) | function isPromise (val) {
function toString (line 90) | function toString (val) {
function toNumber (line 102) | function toNumber (val) {
function makeMap (line 111) | function makeMap (
function remove (line 138) | function remove (arr, item) {
function hasOwn (line 151) | function hasOwn (obj, key) {
function cached (line 158) | function cached (fn) {
function polyfillBind (line 198) | function polyfillBind (fn, ctx) {
function nativeBind (line 212) | function nativeBind (fn, ctx) {
function toArray (line 223) | function toArray (list, start) {
function extend (line 236) | function extend (to, _from) {
function toObject (line 246) | function toObject (arr) {
function noop (line 263) | function noop (a, b, c) {}
function genStaticKeys (line 280) | function genStaticKeys (modules) {
function looseEqual (line 290) | function looseEqual (a, b) {
function looseIndexOf (line 330) | function looseIndexOf (arr, val) {
function once (line 340) | function once (fn) {
function isReserved (line 483) | function isReserved (str) {
function def (line 491) | function def (obj, key, val, enumerable) {
function parsePath (line 504) | function parsePath (path) {
function isNative (line 575) | function isNative (Ctor) {
function Set (line 591) | function Set () {
function pushTarget (line 749) | function pushTarget (target) {
function popTarget (line 754) | function popTarget () {
function createTextVNode (line 815) | function createTextVNode (val) {
function cloneVNode (line 823) | function cloneVNode (vnode) {
function toggleObserving (line 906) | function toggleObserving (value) {
function protoAugment (line 960) | function protoAugment (target, src) {
function copyAugment (line 971) | function copyAugment (target, src, keys) {
function observe (line 983) | function observe (value, asRootData) {
function defineReactive$$1 (line 1008) | function defineReactive$$1 (
function set (line 1074) | function set (target, key, val) {
function del (line 1109) | function del (target, key) {
function dependArray (line 1141) | function dependArray (value) {
function mergeData (line 1178) | function mergeData (to, from) {
function mergeDataOrFn (line 1208) | function mergeDataOrFn (
function mergeHook (line 1275) | function mergeHook (
function dedupeHooks (line 1291) | function dedupeHooks (hooks) {
function mergeAssets (line 1312) | function mergeAssets (
function checkComponents (line 1402) | function checkComponents (options) {
function validateComponentName (line 1408) | function validateComponentName (name) {
function normalizeProps (line 1427) | function normalizeProps (options, vm) {
function normalizeInject (line 1464) | function normalizeInject (options, vm) {
function normalizeDirectives (line 1491) | function normalizeDirectives (options) {
function assertObjectType (line 1503) | function assertObjectType (name, value, vm) {
function mergeOptions (line 1517) | function mergeOptions (
function resolveAsset (line 1571) | function resolveAsset (
function validateProp (line 1603) | function validateProp (
function getPropDefaultValue (line 1649) | function getPropDefaultValue (vm, prop, key) {
function assertProp (line 1682) | function assertProp (
function assertType (line 1733) | function assertType (value, type) {
function getType (line 1761) | function getType (fn) {
function isSameType (line 1766) | function isSameType (a, b) {
function getTypeIndex (line 1770) | function getTypeIndex (type, expectedTypes) {
function getInvalidTypeMessage (line 1782) | function getInvalidTypeMessage (name, value, expectedTypes) {
function styleValue (line 1803) | function styleValue (value, type) {
function isExplicable (line 1813) | function isExplicable (value) {
function isBoolean (line 1818) | function isBoolean () {
function handleError (line 1827) | function handleError (err, vm, info) {
function invokeWithErrorHandling (line 1854) | function invokeWithErrorHandling (
function globalHandleError (line 1876) | function globalHandleError (err, vm, info) {
function logError (line 1891) | function logError (err, vm, info) {
function flushCallbacks (line 1910) | function flushCallbacks () {
function nextTick (line 1984) | function nextTick (cb, ctx) {
function traverse (line 2131) | function traverse (val) {
function _traverse (line 2136) | function _traverse (val, seen) {
function createFnInvoker (line 2176) | function createFnInvoker (fns, vm) {
function updateListeners (line 2195) | function updateListeners (
function mergeVNodeHook (line 2236) | function mergeVNodeHook (def, hookKey, hook) {
function extractPropsFromVNodeData (line 2271) | function extractPropsFromVNodeData (
function checkProp (line 2312) | function checkProp (
function simpleNormalizeChildren (line 2351) | function simpleNormalizeChildren (children) {
function normalizeChildren (line 2364) | function normalizeChildren (children) {
function isTextNode (line 2372) | function isTextNode (node) {
function normalizeArrayChildren (line 2376) | function normalizeArrayChildren (children, nestedIndex) {
function initProvide (line 2426) | function initProvide (vm) {
function initInjections (line 2435) | function initInjections (vm) {
function resolveInject (line 2458) | function resolveInject (inject, vm) {
function resolveSlots (line 2501) | function resolveSlots (
function isWhitespace (line 2541) | function isWhitespace (node) {
function normalizeScopedSlots (line 2547) | function normalizeScopedSlots (
function normalizeScopedSlot (line 2597) | function normalizeScopedSlot(normalSlots, key, fn) {
function proxyNormalSlot (line 2622) | function proxyNormalSlot(slots, key) {
function renderList (line 2631) | function renderList (
function renderSlot (line 2676) | function renderSlot (
function resolveFilter (line 2713) | function resolveFilter (id) {
function isKeyNotMatch (line 2719) | function isKeyNotMatch (expect, actual) {
function checkKeyCodes (line 2732) | function checkKeyCodes (
function bindObjectProps (line 2754) | function bindObjectProps (
function renderStatic (line 2810) | function renderStatic (
function markOnce (line 2835) | function markOnce (
function markStatic (line 2844) | function markStatic (
function markStaticNode (line 2860) | function markStaticNode (node, key, isOnce) {
function bindObjectListeners (line 2868) | function bindObjectListeners (data, value) {
function resolveScopedSlots (line 2889) | function resolveScopedSlots (
function bindDynamicKeys (line 2917) | function bindDynamicKeys (baseObj, values) {
function prependModifier (line 2936) | function prependModifier (value, symbol) {
function installRenderHelpers (line 2942) | function installRenderHelpers (target) {
function FunctionalRenderContext (line 2964) | function FunctionalRenderContext (
function createFunctionalComponent (line 3040) | function createFunctionalComponent (
function cloneAndMarkFunctionalResult (line 3081) | function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, ...
function mergeProps (line 3097) | function mergeProps (to, from) {
function createComponent (line 3178) | function createComponent (
function createComponentInstanceForVnode (line 3277) | function createComponentInstanceForVnode (
function installComponentHooks (line 3295) | function installComponentHooks (data) {
function mergeHook$1 (line 3307) | function mergeHook$1 (f1, f2) {
function transformModel (line 3319) | function transformModel (options, data) {
function createElement (line 3346) | function createElement (
function _createElement (line 3365) | function _createElement (
function applyNS (line 3456) | function applyNS (vnode, ns, force) {
function registerDeepBindings (line 3477) | function registerDeepBindings (data) {
function initRender (line 3488) | function initRender (vm) {
function renderMixin (line 3525) | function renderMixin (Vue) {
function ensureCtor (line 3599) | function ensureCtor (comp, base) {
function createAsyncPlaceholder (line 3611) | function createAsyncPlaceholder (
function resolveAsyncComponent (line 3624) | function resolveAsyncComponent (
function isAsyncPlaceholder (line 3750) | function isAsyncPlaceholder (node) {
function getFirstComponentChild (line 3756) | function getFirstComponentChild (children) {
function initEvents (line 3771) | function initEvents (vm) {
function add (line 3783) | function add (event, fn) {
function remove$1 (line 3787) | function remove$1 (event, fn) {
function createOnceHandler (line 3791) | function createOnceHandler (event, fn) {
function updateComponentListeners (line 3801) | function updateComponentListeners (
function eventsMixin (line 3811) | function eventsMixin (Vue) {
function setActiveInstance (line 3909) | function setActiveInstance(vm) {
function initLifecycle (line 3917) | function initLifecycle (vm) {
function lifecycleMixin (line 3943) | function lifecycleMixin (Vue) {
function mountComponent (line 4026) | function mountComponent (
function updateChildComponent (line 4100) | function updateChildComponent (
function isInInactiveTree (line 4180) | function isInInactiveTree (vm) {
function activateChildComponent (line 4187) | function activateChildComponent (vm, direct) {
function deactivateChildComponent (line 4205) | function deactivateChildComponent (vm, direct) {
function callHook (line 4221) | function callHook (vm, hook) {
function resetSchedulerState (line 4252) | function resetSchedulerState () {
function flushSchedulerQueue (line 4295) | function flushSchedulerQueue () {
function callUpdatedHooks (line 4354) | function callUpdatedHooks (queue) {
function queueActivatedComponent (line 4369) | function queueActivatedComponent (vm) {
function callActivatedHooks (line 4376) | function callActivatedHooks (queue) {
function queueWatcher (line 4388) | function queueWatcher (watcher) {
function proxy (line 4635) | function proxy (target, sourceKey, key) {
function initState (line 4645) | function initState (vm) {
function initProps (line 4661) | function initProps (vm, propsOptions) {
function initData (line 4711) | function initData (vm) {
function getData (line 4753) | function getData (data, vm) {
function initComputed (line 4768) | function initComputed (vm, computed) {
function defineComputed (line 4809) | function defineComputed (
function createComputedGetter (line 4840) | function createComputedGetter (key) {
function createGetterInvoker (line 4855) | function createGetterInvoker(fn) {
function initMethods (line 4861) | function initMethods (vm, methods) {
function initWatch (line 4889) | function initWatch (vm, watch) {
function createWatcher (line 4902) | function createWatcher (
function stateMixin (line 4918) | function stateMixin (Vue) {
function initMixin (line 4973) | function initMixin (Vue) {
function initInternalComponent (line 5032) | function initInternalComponent (vm, options) {
function resolveConstructorOptions (line 5051) | function resolveConstructorOptions (Ctor) {
function resolveModifiedOptions (line 5075) | function resolveModifiedOptions (Ctor) {
function Vue (line 5088) | function Vue (options) {
function initUse (line 5105) | function initUse (Vue) {
function initMixin$1 (line 5127) | function initMixin$1 (Vue) {
function initExtend (line 5136) | function initExtend (Vue) {
function initProps$1 (line 5212) | function initProps$1 (Comp) {
function initComputed$1 (line 5219) | function initComputed$1 (Comp) {
function initAssetRegisters (line 5228) | function initAssetRegisters (Vue) {
function getComponentName (line 5262) | function getComponentName (opts) {
function matches (line 5266) | function matches (pattern, name) {
function pruneCache (line 5278) | function pruneCache (keepAliveInstance, filter) {
function pruneCacheEntry (line 5293) | function pruneCacheEntry (
function initGlobalAPI (line 5394) | function initGlobalAPI (Vue) {
function genClassForVnode (line 5519) | function genClassForVnode (vnode) {
function mergeClassData (line 5537) | function mergeClassData (child, parent) {
function renderClass (line 5546) | function renderClass (
function concat (line 5557) | function concat (a, b) {
function stringifyClass (line 5561) | function stringifyClass (value) {
function stringifyArray (line 5575) | function stringifyArray (value) {
function stringifyObject (line 5587) | function stringifyObject (value) {
function getTagNamespace (line 5634) | function getTagNamespace (tag) {
function isUnknownElement (line 5646) | function isUnknownElement (tag) {
function query (line 5678) | function query (el) {
function createElement$1 (line 5695) | function createElement$1 (tagName, vnode) {
function createElementNS (line 5707) | function createElementNS (namespace, tagName) {
function createTextNode (line 5711) | function createTextNode (text) {
function createComment (line 5715) | function createComment (text) {
function insertBefore (line 5719) | function insertBefore (parentNode, newNode, referenceNode) {
function removeChild (line 5723) | function removeChild (node, child) {
function appendChild (line 5727) | function appendChild (node, child) {
function parentNode (line 5731) | function parentNode (node) {
function nextSibling (line 5735) | function nextSibling (node) {
function tagName (line 5739) | function tagName (node) {
function setTextContent (line 5743) | function setTextContent (node, text) {
function setStyleScope (line 5747) | function setStyleScope (node, scopeId) {
function registerRef (line 5783) | function registerRef (vnode, isRemoval) {
function sameVnode (line 5826) | function sameVnode (a, b) {
function sameInputType (line 5843) | function sameInputType (a, b) {
function createKeyToOldIdx (line 5851) | function createKeyToOldIdx (children, beginIdx, endIdx) {
function createPatchFunction (line 5861) | function createPatchFunction (backend) {
function updateDirectives (line 6591) | function updateDirectives (oldVnode, vnode) {
function _update (line 6597) | function _update (oldVnode, vnode) {
function normalizeDirectives$1 (line 6660) | function normalizeDirectives$1 (
function getRawDirName (line 6683) | function getRawDirName (dir) {
function callHook$1 (line 6687) | function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
function updateAttrs (line 6705) | function updateAttrs (oldVnode, vnode) {
function setAttr (line 6746) | function setAttr (el, key, value) {
function baseSetAttr (line 6775) | function baseSetAttr (el, key, value) {
function updateClass (line 6807) | function updateClass (oldVnode, vnode) {
function parseFilters (line 6847) | function parseFilters (exp) {
function wrapFilter (line 6929) | function wrapFilter (exp, filter) {
function baseWarn (line 6946) | function baseWarn (msg, range) {
function pluckModuleFunction (line 6951) | function pluckModuleFunction (
function addProp (line 6960) | function addProp (el, name, value, range, dynamic) {
function addAttr (line 6965) | function addAttr (el, name, value, range, dynamic) {
function addRawAttr (line 6974) | function addRawAttr (el, name, value, range) {
function addDirective (line 6979) | function addDirective (
function prependModifierMarker (line 7000) | function prependModifierMarker (symbol, name, dynamic) {
function addHandler (line 7006) | function addHandler (
function getRawBindingAttr (line 7089) | function getRawBindingAttr (
function getBindingAttr (line 7098) | function getBindingAttr (
function getAndRemoveAttr (line 7120) | function getAndRemoveAttr (
function getAndRemoveAttrByRegex (line 7141) | function getAndRemoveAttrByRegex (
function rangeSetItem (line 7155) | function rangeSetItem (
function genComponentModel (line 7175) | function genComponentModel (
function genAssignmentCode (line 7207) | function genAssignmentCode (
function parseModel (line 7238) | function parseModel (val) {
function next (line 7278) | function next () {
function eof (line 7282) | function eof () {
function isStringStart (line 7286) | function isStringStart (chr) {
function parseBracket (line 7290) | function parseBracket (chr) {
function parseString (line 7308) | function parseString (chr) {
function model (line 7327) | function model (
function genCheckboxModel (line 7380) | function genCheckboxModel (
function genRadioModel (line 7411) | function genRadioModel (
function genSelect (line 7423) | function genSelect (
function genDefaultModel (line 7440) | function genDefaultModel (
function normalizeEvents (line 7499) | function normalizeEvents (on) {
function createOnceHandler$1 (line 7518) | function createOnceHandler$1 (event, handler, capture) {
function add$1 (line 7533) | function add$1 (
function remove$2 (line 7578) | function remove$2 (
function updateDOMListeners (line 7591) | function updateDOMListeners (oldVnode, vnode) {
function updateDOMProps (line 7612) | function updateDOMProps (oldVnode, vnode) {
function shouldUpdateValue (line 7685) | function shouldUpdateValue (elm, checkVal) {
function isNotInFocusAndDirty (line 7693) | function isNotInFocusAndDirty (elm, checkVal) {
function isDirtyWithModifiers (line 7703) | function isDirtyWithModifiers (elm, newVal) {
function normalizeStyleData (line 7738) | function normalizeStyleData (data) {
function normalizeStyleBinding (line 7748) | function normalizeStyleBinding (bindingStyle) {
function getStyle (line 7762) | function getStyle (vnode, checkChild) {
function updateStyle (line 7835) | function updateStyle (oldVnode, vnode) {
function addClass (line 7891) | function addClass (el, cls) {
function removeClass (line 7916) | function removeClass (el, cls) {
function resolveTransition (line 7949) | function resolveTransition (def$$1) {
function nextFrame (line 8009) | function nextFrame (fn) {
function addTransitionClass (line 8015) | function addTransitionClass (el, cls) {
function removeTransitionClass (line 8023) | function removeTransitionClass (el, cls) {
function whenTransitionEnds (line 8030) | function whenTransitionEnds (
function getTransitionInfo (line 8063) | function getTransitionInfo (el, expectedType) {
function getTimeout (line 8113) | function getTimeout (delays, durations) {
function toMs (line 8128) | function toMs (s) {
function enter (line 8134) | function enter (vnode, toggleDisplay) {
function leave (line 8285) | function leave (vnode, rm) {
function checkDuration (line 8390) | function checkDuration (val, name, vnode) {
function isValidDuration (line 8406) | function isValidDuration (val) {
function getHookArgumentsLength (line 8416) | function getHookArgumentsLength (fn) {
function _enter (line 8433) | function _enter (_, vnode) {
function setSelected (line 8538) | function setSelected (el, binding, vm) {
function actuallySetSelected (line 8548) | function actuallySetSelected (el, binding, vm) {
function hasNoMatchingOption (line 8581) | function hasNoMatchingOption (value, options) {
function getValue (line 8585) | function getValue (option) {
function onCompositionStart (line 8591) | function onCompositionStart (e) {
function onCompositionEnd (line 8595) | function onCompositionEnd (e) {
function trigger (line 8602) | function trigger (el, type) {
function locateNode (line 8611) | function locateNode (vnode) {
function getRealChild (line 8699) | function getRealChild (vnode) {
function extractTransitionData (line 8708) | function extractTransitionData (comp) {
function placeholder (line 8724) | function placeholder (h, rawChild) {
function hasParentTransition (line 8732) | function hasParentTransition (vnode) {
function isSameChild (line 8740) | function isSameChild (child, oldChild) {
function callPendingCbs (line 9008) | function callPendingCbs (c) {
function recordPosition (line 9019) | function recordPosition (c) {
function applyTranslation (line 9023) | function applyTranslation (c) {
function parseText (line 9110) | function parseText (
function transformNode (line 9147) | function transformNode (el, options) {
function genData (line 9171) | function genData (el) {
function transformNode$1 (line 9190) | function transformNode$1 (el, options) {
function genData$1 (line 9216) | function genData$1 (el) {
function decodeAttr (line 9305) | function decodeAttr (value, shouldDecodeNewlines) {
function parseHTML (line 9310) | function parseHTML (html, options) {
function createASTElement (line 9599) | function createASTElement (
function parse (line 9618) | function parse (
function processPre (line 9941) | function processPre (el) {
function processRawAttrs (line 9947) | function processRawAttrs (el) {
function processElement (line 9968) | function processElement (
function processKey (line 9993) | function processKey (el) {
function processRef (line 10020) | function processRef (el) {
function processFor (line 10028) | function processFor (el) {
function parseFor (line 10045) | function parseFor (exp) {
function processIf (line 10064) | function processIf (el) {
function processIfConditions (line 10083) | function processIfConditions (el, parent) {
function findPrevElement (line 10099) | function findPrevElement (children) {
function addIfCondition (line 10117) | function addIfCondition (el, condition) {
function processOnce (line 10124) | function processOnce (el) {
function processSlotContent (line 10133) | function processSlotContent (el) {
function getSlotName (line 10252) | function getSlotName (binding) {
function processSlotOutlet (line 10272) | function processSlotOutlet (el) {
function processComponent (line 10286) | function processComponent (el) {
function processAttrs (line 10296) | function processAttrs (el) {
function checkInFor (line 10430) | function checkInFor (el) {
function parseModifiers (line 10441) | function parseModifiers (name) {
function makeAttrsMap (line 10450) | function makeAttrsMap (attrs) {
function isTextTag (line 10465) | function isTextTag (el) {
function isForbiddenTag (line 10469) | function isForbiddenTag (el) {
function guardIESVGBug (line 10483) | function guardIESVGBug (attrs) {
function checkForAliasModel (line 10495) | function checkForAliasModel (el, value) {
function preTransformNode (line 10514) | function preTransformNode (el, options) {
function cloneASTElement (line 10576) | function cloneASTElement (el) {
function text (line 10592) | function text (el, dir) {
function html (line 10600) | function html (el, dir) {
function optimize (line 10645) | function optimize (root, options) {
function genStaticKeys$1 (line 10655) | function genStaticKeys$1 (keys) {
function markStatic$1 (line 10662) | function markStatic$1 (node) {
function markStaticRoots (line 10694) | function markStaticRoots (node, isInFor) {
function isStatic (line 10724) | function isStatic (node) {
function isDirectChildOfTemplateFor (line 10741) | function isDirectChildOfTemplateFor (node) {
function genHandlers (line 10808) | function genHandlers (
function genHandler (line 10831) | function genHandler (handler) {
function genKeyFilter (line 10890) | function genKeyFilter (keys) {
function genFilterCode (line 10900) | function genFilterCode (key) {
function on (line 10919) | function on (el, dir) {
function bind$1 (line 10928) | function bind$1 (el, dir) {
function generate (line 10963) | function generate (
function genElement (line 10975) | function genElement (el, state) {
function genStatic (line 11015) | function genStatic (el, state) {
function genOnce (line 11030) | function genOnce (el, state) {
function genIf (line 11057) | function genIf (
function genIfConditions (line 11067) | function genIfConditions (
function genFor (line 11094) | function genFor (
function genData$2 (line 11127) | function genData$2 (el, state) {
function genDirectives (line 11211) | function genDirectives (el, state) {
function genInlineTemplate (line 11236) | function genInlineTemplate (el, state) {
function genScopedSlots (line 11252) | function genScopedSlots (
function hash (line 11306) | function hash(str) {
function containsSlotChild (line 11315) | function containsSlotChild (el) {
function genScopedSlot (line 11325) | function genScopedSlot (
function genChildren (line 11350) | function genChildren (
function getNormalizationType (line 11383) | function getNormalizationType (
function needsNormalization (line 11406) | function needsNormalization (el) {
function genNode (line 11410) | function genNode (node, state) {
function genText (line 11420) | function genText (text) {
function genComment (line 11426) | function genComment (comment) {
function genSlot (line 11430) | function genSlot (el, state) {
function genComponent (line 11456) | function genComponent (
function genProps (line 11465) | function genProps (props) {
function transformSpecialNewlines (line 11486) | function transformSpecialNewlines (text) {
function detectErrors (line 11513) | function detectErrors (ast, warn) {
function checkNode (line 11519) | function checkNode (node, warn) {
function checkEvent (line 11548) | function checkEvent (exp, text, warn, range) {
function checkFor (line 11561) | function checkFor (node, text, warn, range) {
function checkIdentifier (line 11568) | function checkIdentifier (
function checkExpression (line 11584) | function checkExpression (exp, text, warn, range) {
function checkFunctionParameterExpression (line 11606) | function checkFunctionParameterExpression (exp, text, warn, range) {
function generateCodeFrame (line 11623) | function generateCodeFrame (
function repeat$1 (line 11660) | function repeat$1 (str, n) {
function createFunction (line 11677) | function createFunction (code, errors) {
function createCompileToFunctionFn (line 11686) | function createCompileToFunctionFn (compile) {
function createCompilerCreator (line 11788) | function createCompilerCreator (baseCompile) {
function getShouldDecode (line 11889) | function getShouldDecode (href) {
function getOuterHTML (line 11981) | function getOuterHTML (el) {
FILE: web/assets/vue@2.6.12/vue.runtime.common.dev.js
function isUndef (line 14) | function isUndef (v) {
function isDef (line 18) | function isDef (v) {
function isTrue (line 22) | function isTrue (v) {
function isFalse (line 26) | function isFalse (v) {
function isPrimitive (line 33) | function isPrimitive (value) {
function isObject (line 48) | function isObject (obj) {
function toRawType (line 57) | function toRawType (value) {
function isPlainObject (line 65) | function isPlainObject (obj) {
function isRegExp (line 69) | function isRegExp (v) {
function isValidArrayIndex (line 76) | function isValidArrayIndex (val) {
function isPromise (line 81) | function isPromise (val) {
function toString (line 92) | function toString (val) {
function toNumber (line 104) | function toNumber (val) {
function makeMap (line 113) | function makeMap (
function remove (line 140) | function remove (arr, item) {
function hasOwn (line 153) | function hasOwn (obj, key) {
function cached (line 160) | function cached (fn) {
function polyfillBind (line 200) | function polyfillBind (fn, ctx) {
function nativeBind (line 214) | function nativeBind (fn, ctx) {
function toArray (line 225) | function toArray (list, start) {
function extend (line 238) | function extend (to, _from) {
function toObject (line 248) | function toObject (arr) {
function noop (line 265) | function noop (a, b, c) {}
function looseEqual (line 283) | function looseEqual (a, b) {
function looseIndexOf (line 323) | function looseIndexOf (arr, val) {
function once (line 333) | function once (fn) {
function isReserved (line 476) | function isReserved (str) {
function def (line 484) | function def (obj, key, val, enumerable) {
function parsePath (line 497) | function parsePath (path) {
function isNative (line 568) | function isNative (Ctor) {
function Set (line 584) | function Set () {
function pushTarget (line 742) | function pushTarget (target) {
function popTarget (line 747) | function popTarget () {
function createTextVNode (line 808) | function createTextVNode (val) {
function cloneVNode (line 816) | function cloneVNode (vnode) {
function toggleObserving (line 899) | function toggleObserving (value) {
function protoAugment (line 953) | function protoAugment (target, src) {
function copyAugment (line 964) | function copyAugment (target, src, keys) {
function observe (line 976) | function observe (value, asRootData) {
function defineReactive$$1 (line 1001) | function defineReactive$$1 (
function set (line 1067) | function set (target, key, val) {
function del (line 1101) | function del (target, key) {
function dependArray (line 1132) | function dependArray (value) {
function mergeData (line 1169) | function mergeData (to, from) {
function mergeDataOrFn (line 1199) | function mergeDataOrFn (
function mergeHook (line 1266) | function mergeHook (
function dedupeHooks (line 1282) | function dedupeHooks (hooks) {
function mergeAssets (line 1303) | function mergeAssets (
function checkComponents (line 1393) | function checkComponents (options) {
function validateComponentName (line 1399) | function validateComponentName (name) {
function normalizeProps (line 1418) | function normalizeProps (options, vm) {
function normalizeInject (line 1455) | function normalizeInject (options, vm) {
function normalizeDirectives (line 1482) | function normalizeDirectives (options) {
function assertObjectType (line 1494) | function assertObjectType (name, value, vm) {
function mergeOptions (line 1508) | function mergeOptions (
function resolveAsset (line 1562) | function resolveAsset (
function validateProp (line 1594) | function validateProp (
function getPropDefaultValue (line 1636) | function getPropDefaultValue (vm, prop, key) {
function assertProp (line 1669) | function assertProp (
function assertType (line 1720) | function assertType (value, type) {
function getType (line 1748) | function getType (fn) {
function isSameType (line 1753) | function isSameType (a, b) {
function getTypeIndex (line 1757) | function getTypeIndex (type, expectedTypes) {
function getInvalidTypeMessage (line 1769) | function getInvalidTypeMessage (name, value, expectedTypes) {
function styleValue (line 1790) | function styleValue (value, type) {
function isExplicable (line 1800) | function isExplicable (value) {
function isBoolean (line 1805) | function isBoolean () {
function handleError (line 1814) | function handleError (err, vm, info) {
function invokeWithErrorHandling (line 1841) | function invokeWithErrorHandling (
function globalHandleError (line 1863) | function globalHandleError (err, vm, info) {
function logError (line 1878) | function logError (err, vm, info) {
function flushCallbacks (line 1897) | function flushCallbacks () {
function nextTick (line 1971) | function nextTick (cb, ctx) {
function traverse (line 2095) | function traverse (val) {
function _traverse (line 2100) | function _traverse (val, seen) {
function createFnInvoker (line 2163) | function createFnInvoker (fns, vm) {
function updateListeners (line 2182) | function updateListeners (
function mergeVNodeHook (line 2223) | function mergeVNodeHook (def, hookKey, hook) {
function extractPropsFromVNodeData (line 2258) | function extractPropsFromVNodeData (
function checkProp (line 2299) | function checkProp (
function simpleNormalizeChildren (line 2338) | function simpleNormalizeChildren (children) {
function normalizeChildren (line 2351) | function normalizeChildren (children) {
function isTextNode (line 2359) | function isTextNode (node) {
function normalizeArrayChildren (line 2363) | function normalizeArrayChildren (children, nestedIndex) {
function initProvide (line 2413) | function initProvide (vm) {
function initInjections (line 2422) | function initInjections (vm) {
function resolveInject (line 2443) | function resolveInject (inject, vm) {
function resolveSlots (line 2486) | function resolveSlots (
function isWhitespace (line 2526) | function isWhitespace (node) {
function normalizeScopedSlots (line 2532) | function normalizeScopedSlots (
function normalizeScopedSlot (line 2582) | function normalizeScopedSlot(normalSlots, key, fn) {
function proxyNormalSlot (line 2607) | function proxyNormalSlot(slots, key) {
function renderList (line 2616) | function renderList (
function renderSlot (line 2661) | function renderSlot (
function resolveFilter (line 2698) | function resolveFilter (id) {
function isKeyNotMatch (line 2704) | function isKeyNotMatch (expect, actual) {
function checkKeyCodes (line 2717) | function checkKeyCodes (
function bindObjectProps (line 2739) | function bindObjectProps (
function renderStatic (line 2795) | function renderStatic (
function markOnce (line 2820) | function markOnce (
function markStatic (line 2829) | function markStatic (
function markStaticNode (line 2845) | function markStaticNode (node, key, isOnce) {
function bindObjectListeners (line 2853) | function bindObjectListeners (data, value) {
function resolveScopedSlots (line 2874) | function resolveScopedSlots (
function bindDynamicKeys (line 2902) | function bindDynamicKeys (baseObj, values) {
function prependModifier (line 2921) | function prependModifier (value, symbol) {
function installRenderHelpers (line 2927) | function installRenderHelpers (target) {
function FunctionalRenderContext (line 2949) | function FunctionalRenderContext (
function createFunctionalComponent (line 3025) | function createFunctionalComponent (
function cloneAndMarkFunctionalResult (line 3066) | function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, ...
function mergeProps (line 3082) | function mergeProps (to, from) {
function createComponent (line 3163) | function createComponent (
function createComponentInstanceForVnode (line 3262) | function createComponentInstanceForVnode (
function installComponentHooks (line 3280) | function installComponentHooks (data) {
function mergeHook$1 (line 3292) | function mergeHook$1 (f1, f2) {
function transformModel (line 3304) | function transformModel (options, data) {
function createElement (line 3331) | function createElement (
function _createElement (line 3350) | function _createElement (
function applyNS (line 3440) | function applyNS (vnode, ns, force) {
function registerDeepBindings (line 3461) | function registerDeepBindings (data) {
function initRender (line 3472) | function initRender (vm) {
function renderMixin (line 3506) | function renderMixin (Vue) {
function ensureCtor (line 3580) | function ensureCtor (comp, base) {
function createAsyncPlaceholder (line 3592) | function createAsyncPlaceholder (
function resolveAsyncComponent (line 3605) | function resolveAsyncComponent (
function isAsyncPlaceholder (line 3729) | function isAsyncPlaceholder (node) {
function getFirstComponentChild (line 3735) | function getFirstComponentChild (children) {
function initEvents (line 3750) | function initEvents (vm) {
function add (line 3762) | function add (event, fn) {
function remove$1 (line 3766) | function remove$1 (event, fn) {
function createOnceHandler (line 3770) | function createOnceHandler (event, fn) {
function updateComponentListeners (line 3780) | function updateComponentListeners (
function eventsMixin (line 3790) | function eventsMixin (Vue) {
function setActiveInstance (line 3888) | function setActiveInstance(vm) {
function initLifecycle (line 3896) | function initLifecycle (vm) {
function lifecycleMixin (line 3922) | function lifecycleMixin (Vue) {
function mountComponent (line 4005) | function mountComponent (
function updateChildComponent (line 4079) | function updateChildComponent (
function isInInactiveTree (line 4159) | function isInInactiveTree (vm) {
function activateChildComponent (line 4166) | function activateChildComponent (vm, direct) {
function deactivateChildComponent (line 4184) | function deactivateChildComponent (vm, direct) {
function callHook (line 4200) | function callHook (vm, hook) {
function resetSchedulerState (line 4231) | function resetSchedulerState () {
function flushSchedulerQueue (line 4274) | function flushSchedulerQueue () {
function callUpdatedHooks (line 4333) | function callUpdatedHooks (queue) {
function queueActivatedComponent (line 4348) | function queueActivatedComponent (vm) {
function callActivatedHooks (line 4355) | function callActivatedHooks (queue) {
function queueWatcher (line 4367) | function queueWatcher (watcher) {
function proxy (line 4612) | function proxy (target, sourceKey, key) {
function initState (line 4622) | function initState (vm) {
function initProps (line 4638) | function initProps (vm, propsOptions) {
function initData (line 4686) | function initData (vm) {
function getData (line 4728) | function getData (data, vm) {
function initComputed (line 4743) | function initComputed (vm, computed) {
function defineComputed (line 4784) | function defineComputed (
function createComputedGetter (line 4814) | function createComputedGetter (key) {
function createGetterInvoker (line 4829) | function createGetterInvoker(fn) {
function initMethods (line 4835) | function initMethods (vm, methods) {
function initWatch (line 4863) | function initWatch (vm, watch) {
function createWatcher (line 4876) | function createWatcher (
function stateMixin (line 4892) | function stateMixin (Vue) {
function initMixin (line 4947) | function initMixin (Vue) {
function initInternalComponent (line 5004) | function initInternalComponent (vm, options) {
function resolveConstructorOptions (line 5023) | function resolveConstructorOptions (Ctor) {
function resolveModifiedOptions (line 5047) | function resolveModifiedOptions (Ctor) {
function Vue (line 5060) | function Vue (options) {
function initUse (line 5076) | function initUse (Vue) {
function initMixin$1 (line 5098) | function initMixin$1 (Vue) {
function initExtend (line 5107) | function initExtend (Vue) {
function initProps$1 (line 5183) | function initProps$1 (Comp) {
function initComputed$1 (line 5190) | function initComputed$1 (Comp) {
function initAssetRegisters (line 5199) | function initAssetRegisters (Vue) {
function getComponentName (line 5233) | function getComponentName (opts) {
function matches (line 5237) | function matches (pattern, name) {
function pruneCache (line 5249) | function pruneCache (keepAliveInstance, filter) {
function pruneCacheEntry (line 5264) | function pruneCacheEntry (
function initGlobalAPI (line 5365) | function initGlobalAPI (Vue) {
function genClassForVnode (line 5490) | function genClassForVnode (vnode) {
function mergeClassData (line 5508) | function mergeClassData (child, parent) {
function renderClass (line 5517) | function renderClass (
function concat (line 5528) | function concat (a, b) {
function stringifyClass (line 5532) | function stringifyClass (value) {
function stringifyArray (line 5546) | function stringifyArray (value) {
function stringifyObject (line 5558) | function stringifyObject (value) {
function getTagNamespace (line 5603) | function getTagNamespace (tag) {
function isUnknownElement (line 5615) | function isUnknownElement (tag) {
function query (line 5647) | function query (el) {
function createElement$1 (line 5664) | function createElement$1 (tagName, vnode) {
function createElementNS (line 5676) | function createElementNS (namespace, tagName) {
function createTextNode (line 5680) | function createTextNode (text) {
function createComment (line 5684) | function createComment (text) {
function insertBefore (line 5688) | function insertBefore (parentNode, newNode, referenceNode) {
function removeChild (line 5692) | function removeChild (node, child) {
function appendChild (line 5696) | function appendChild (node, child) {
function parentNode (line 5700) | function parentNode (node) {
function nextSibling (line 5704) | function nextSibling (node) {
function tagName (line 5708) | function tagName (node) {
function setTextContent (line 5712) | function setTextContent (node, text) {
function setStyleScope (line 5716) | function setStyleScope (node, scopeId) {
function registerRef (line 5752) | function registerRef (vnode, isRemoval) {
function sameVnode (line 5795) | function sameVnode (a, b) {
function sameInputType (line 5812) | function sameInputType (a, b) {
function createKeyToOldIdx (line 5820) | function createKeyToOldIdx (children, beginIdx, endIdx) {
function createPatchFunction (line 5830) | function createPatchFunction (backend) {
function updateDirectives (line 6558) | function updateDirectives (oldVnode, vnode) {
function _update (line 6564) | function _update (oldVnode, vnode) {
function normalizeDirectives$1 (line 6627) | function normalizeDirectives$1 (
function getRawDirName (line 6650) | function getRawDirName (dir) {
function callHook$1 (line 6654) | function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
function updateAttrs (line 6672) | function updateAttrs (oldVnode, vnode) {
function setAttr (line 6713) | function setAttr (el, key, value) {
function baseSetAttr (line 6742) | function baseSetAttr (el, key, value) {
function updateClass (line 6774) | function updateClass (oldVnode, vnode) {
function normalizeEvents (line 6829) | function normalizeEvents (on) {
function createOnceHandler$1 (line 6848) | function createOnceHandler$1 (event, handler, capture) {
function add$1 (line 6863) | function add$1 (
function remove$2 (line 6908) | function remove$2 (
function updateDOMListeners (line 6921) | function updateDOMListeners (oldVnode, vnode) {
function updateDOMProps (line 6942) | function updateDOMProps (oldVnode, vnode) {
function shouldUpdateValue (line 7015) | function shouldUpdateValue (elm, checkVal) {
function isNotInFocusAndDirty (line 7023) | function isNotInFocusAndDirty (elm, checkVal) {
function isDirtyWithModifiers (line 7033) | function isDirtyWithModifiers (elm, newVal) {
function normalizeStyleData (line 7068) | function normalizeStyleData (data) {
function normalizeStyleBinding (line 7078) | function normalizeStyleBinding (bindingStyle) {
function getStyle (line 7092) | function getStyle (vnode, checkChild) {
function updateStyle (line 7165) | function updateStyle (oldVnode, vnode) {
function addClass (line 7221) | function addClass (el, cls) {
function removeClass (line 7246) | function removeClass (el, cls) {
function resolveTransition (line 7279) | function resolveTransition (def$$1) {
function nextFrame (line 7339) | function nextFrame (fn) {
function addTransitionClass (line 7345) | function addTransitionClass (el, cls) {
function removeTransitionClass (line 7353) | function removeTransitionClass (el, cls) {
function whenTransitionEnds (line 7360) | function whenTransitionEnds (
function getTransitionInfo (line 7393) | function getTransitionInfo (el, expectedType) {
function getTimeout (line 7443) | function getTimeout (delays, durations) {
function toMs (line 7458) | function toMs (s) {
function enter (line 7464) | function enter (vnode, toggleDisplay) {
function leave (line 7615) | function leave (vnode, rm) {
function checkDuration (line 7720) | function checkDuration (val, name, vnode) {
function isValidDuration (line 7736) | function isValidDuration (val) {
function getHookArgumentsLength (line 7746) | function getHookArgumentsLength (fn) {
function _enter (line 7763) | function _enter (_, vnode) {
function setSelected (line 7868) | function setSelected (el, binding, vm) {
function actuallySetSelected (line 7878) | function actuallySetSelected (el, binding, vm) {
function hasNoMatchingOption (line 7911) | function hasNoMatchingOption (value, options) {
function getValue (line 7915) | function getValue (option) {
function onCompositionStart (line 7921) | function onCompositionStart (e) {
function onCompositionEnd (line 7925) | function onCompositionEnd (e) {
function trigger (line 7932) | function trigger (el, type) {
function locateNode (line 7941) | function locateNode (vnode) {
function getRealChild (line 8029) | function getRealChild (vnode) {
function extractTransitionData (line 8038) | function extractTransitionData (comp) {
function placeholder (line 8054) | function placeholder (h, rawChild) {
function hasParentTransition (line 8062) | function hasParentTransition (vnode) {
function isSameChild (line 8070) | function isSameChild (child, oldChild) {
function callPendingCbs (line 8337) | function callPendingCbs (c) {
function recordPosition (line 8348) | function recordPosition (c) {
function applyTranslation (line 8352) | function applyTranslation (c) {
FILE: web/assets/vue@2.6.12/vue.runtime.common.prod.js
function e (line 6) | function e(t){return null==t}
function n (line 6) | function n(t){return null!=t}
function r (line 6) | function r(t){return!0===t}
function o (line 6) | function o(t){return"string"==typeof t||"number"==typeof t||"symbol"==ty...
function i (line 6) | function i(t){return null!==t&&"object"==typeof t}
function s (line 6) | function s(t){return"[object Object]"===a.call(t)}
function c (line 6) | function c(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e...
function u (line 6) | function u(t){return n(t)&&"function"==typeof t.then&&"function"==typeof...
function l (line 6) | function l(t){return null==t?"":Array.isArray(t)||s(t)&&t.toString===a?J...
function f (line 6) | function f(t){var e=parseFloat(t);return isNaN(e)?t:e}
function p (line 6) | function p(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.len...
function v (line 6) | function v(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(...
function m (line 6) | function m(t,e){return h.call(t,e)}
function y (line 6) | function y(t){var e=Object.create(null);return function(n){return e[n]||...
function n (line 6) | function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t...
function A (line 6) | function A(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n...
function x (line 6) | function x(t,e){for(var n in e)t[n]=e[n];return t}
function O (line 6) | function O(t){for(var e={},n=0;n<t.length;n++)t[n]&&x(e,t[n]);return e}
function k (line 6) | function k(t,e,n){}
function j (line 6) | function j(t,e){if(t===e)return!0;var n=i(t),r=i(e);if(!n||!r)return!n&&...
function T (line 6) | function T(t,e){for(var n=0;n<t.length;n++)if(j(t[n],e))return n;return-1}
function I (line 6) | function I(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments...
function M (line 6) | function M(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,wr...
function et (line 6) | function et(t){return"function"==typeof t&&/native code/.test(t.toString...
function t (line 6) | function t(){this.set=Object.create(null)}
function ct (line 6) | function ct(t){st.push(t),at.target=t}
function ut (line 6) | function ut(){st.pop(),at.target=st[st.length-1]}
function dt (line 6) | function dt(t){return new lt(void 0,void 0,void 0,String(t))}
function vt (line 6) | function vt(t){var e=new lt(t.tag,t.data,t.children&&t.children.slice(),...
function _t (line 6) | function _t(t){gt=t}
function Ct (line 6) | function Ct(t,e){var n;if(i(t)&&!(t instanceof lt))return m(t,"__ob__")&...
function $t (line 6) | function $t(t,e,n,r,o){var i=new at,a=Object.getOwnPropertyDescriptor(t,...
function wt (line 6) | function wt(t,e,n){if(Array.isArray(t)&&c(e))return t.length=Math.max(t....
function At (line 6) | function At(t,e){if(Array.isArray(t)&&c(e))t.splice(e,1);else{var n=t.__...
function Ot (line 6) | function Ot(t,e){if(!e)return t;for(var n,r,o,i=rt?Reflect.ownKeys(e):Ob...
function kt (line 6) | function kt(t,e,n){return n?function(){var r="function"==typeof e?e.call...
function St (line 6) | function St(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n...
function Et (line 6) | function Et(t,e,n,r){var o=Object.create(t||null);return e?x(o,e):o}
function Tt (line 6) | function Tt(t,e,n){if("function"==typeof e&&(e=e.options),function(t,e){...
function It (line 6) | function It(t,e,n,r){if("string"==typeof n){var o=t[e];if(m(o,n))return ...
function Dt (line 6) | function Dt(t,e,n,r){var o=e[t],i=!m(n,t),a=n[t],s=Lt(Boolean,o.type);if...
function Nt (line 6) | function Nt(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return ...
function Pt (line 6) | function Pt(t,e){return Nt(t)===Nt(e)}
function Lt (line 6) | function Lt(t,e){if(!Array.isArray(e))return Pt(e,t)?0:-1;for(var n=0,r=...
function Mt (line 6) | function Mt(t,e,n){ct();try{if(e)for(var r=e;r=r.$parent;){var o=r.$opti...
function Ft (line 6) | function Ft(t,e,n,r,o){var i;try{(i=n?t.apply(e,n):t.call(e))&&!i._isVue...
function Rt (line 6) | function Rt(t,e,n){if(L.errorHandler)try{return L.errorHandler.call(null...
function Ut (line 6) | function Ut(t,e,n){if(!H&&!B||"undefined"==typeof console)throw t;consol...
function Wt (line 6) | function Wt(){zt=!1;var t=Vt.slice(0);Vt.length=0;for(var e=0;e<t.length...
function Zt (line 6) | function Zt(t,e){var n;if(Vt.push(function(){if(t)try{t.call(e)}catch(t)...
function Qt (line 6) | function Qt(t){!function t(e,n){var r,o;var a=Array.isArray(e);if(!a&&!i...
function te (line 6) | function te(t,e){function n(){var t=arguments,r=n.fns;if(!Array.isArray(...
function ee (line 6) | function ee(t,n,o,i,a,s){var c,u,l,f;for(c in t)u=t[c],l=n[c],f=Yt(c),e(...
function ne (line 6) | function ne(t,o,i){var a;t instanceof lt&&(t=t.data.hook||(t.data.hook={...
function re (line 6) | function re(t,e,r,o,i){if(n(e)){if(m(e,r))return t[r]=e[r],i||delete e[r...
function oe (line 6) | function oe(t){return o(t)?[dt(t)]:Array.isArray(t)?function t(i,a){var ...
function ie (line 6) | function ie(t){return n(t)&&n(t.text)&&!1===t.isComment}
function ae (line 6) | function ae(t,e){if(t){for(var n=Object.create(null),r=rt?Reflect.ownKey...
function se (line 6) | function se(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r...
function ce (line 6) | function ce(t){return t.isComment&&!t.asyncFactory||" "===t.text}
function ue (line 6) | function ue(e,n,r){var o,i=Object.keys(n).length>0,a=e?!!e.$stable:!i,s=...
function le (line 6) | function le(t,e,n){var r=function(){var t=arguments.length?n.apply(null,...
function fe (line 6) | function fe(t,e){return function(){return t[e]}}
function pe (line 6) | function pe(t,e){var r,o,a,s,c;if(Array.isArray(t)||"string"==typeof t)f...
function de (line 6) | function de(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=x(x({...
function ve (line 6) | function ve(t){return It(this.$options,"filters",t)||E}
function he (line 6) | function he(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}
function me (line 6) | function me(t,e,n,r,o){var i=L.keyCodes[e]||n;return o&&r&&!L.keyCodes[e...
function ye (line 6) | function ye(t,e,n,r,o){if(n)if(i(n)){var a;Array.isArray(n)&&(n=O(n));va...
function ge (line 6) | function ge(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];...
function _e (line 6) | function _e(t,e,n){return be(t,"__once__"+e+(n?"_"+n:""),!0),t}
function be (line 6) | function be(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&...
function Ce (line 6) | function Ce(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}
function $e (line 6) | function $e(t,e){if(e)if(s(e)){var n=t.on=t.on?x({},t.on):{};for(var r i...
function we (line 6) | function we(t,e,n,r){e=e||{$stable:!n};for(var o=0;o<t.length;o++){var i...
function Ae (line 6) | function Ae(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeo...
function xe (line 6) | function xe(t,e){return"string"==typeof t?e+t:t}
function Oe (line 6) | function Oe(t){t._o=_e,t._n=f,t._s=l,t._l=pe,t._t=de,t._q=j,t._i=T,t._m=...
function ke (line 6) | function ke(e,n,o,i,a){var s,c=this,u=a.options;m(i,"_uid")?(s=Object.cr...
function Se (line 6) | function Se(t,e,n,r,o){var i=vt(t);return i.fnContext=n,i.fnOptions=r,e....
function Ee (line 6) | function Ee(t,e){for(var n in e)t[_(n)]=e[n]}
function Ie (line 6) | function Ie(o,a,s,c,l){if(!e(o)){var f=s.$options._base;if(i(o)&&(o=f.ex...
function De (line 6) | function De(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}
function Le (line 6) | function Le(t,a,s,c,u,l){return(Array.isArray(s)||o(s))&&(u=c,c=s,s=void...
function Re (line 6) | function Re(t,e){return(t.__esModule||rt&&"Module"===t[Symbol.toStringTa...
function Ue (line 6) | function Ue(t){return t.isComment&&t.asyncFactory}
function He (line 6) | function He(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var r=t[e...
function Be (line 6) | function Be(t,e){Me.$on(t,e)}
function Ve (line 6) | function Ve(t,e){Me.$off(t,e)}
function ze (line 6) | function ze(t,e){var n=Me;return function r(){null!==e.apply(null,argume...
function We (line 6) | function We(t,e,n){Me=t,ee(e,n||{},Be,Ve,ze,t),Me=void 0}
function Ke (line 6) | function Ke(t){var e=qe;return qe=t,function(){qe=e}}
function Xe (line 6) | function Xe(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}
function Ge (line 6) | function Ge(t,e){if(e){if(t._directInactive=!1,Xe(t))return}else if(t._d...
function Ze (line 6) | function Ze(t,e){ct();var n=t.$options[e],r=e+" hook";if(n)for(var o=0,i...
function sn (line 6) | function sn(){var t,e;for(rn=on(),en=!0,Je.sort(function(t,e){return t.i...
function fn (line 6) | function fn(t,e,n){ln.get=function(){return this[e][n]},ln.set=function(...
function pn (line 6) | function pn(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){va...
function vn (line 6) | function vn(t,e,n){var r=!Y();"function"==typeof n?(ln.get=r?hn(e):mn(n)...
function hn (line 6) | function hn(t){return function(){var e=this._computedWatchers&&this._com...
function mn (line 6) | function mn(t){return function(){return t.call(this,this)}}
function yn (line 6) | function yn(t,e,n,r){return s(n)&&(r=n,n=n.handler),"string"==typeof n&&...
function _n (line 6) | function _n(t){var e=t.options;if(t.super){var n=_n(t.super);if(n!==t.su...
function bn (line 6) | function bn(t){this._init(t)}
function Cn (line 6) | function Cn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r...
function $n (line 6) | function $n(t){return t&&(t.Ctor.options.name||t.tag)}
function wn (line 6) | function wn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeo...
function An (line 6) | function An(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a...
function xn (line 6) | function xn(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstanc...
function r (line 6) | function r(){n.$off(t,r),e.apply(n,arguments)}
function Fn (line 6) | function Fn(t){for(var e=t.data,r=t,o=t;n(o.componentInstance);)(o=o.com...
function Rn (line 6) | function Rn(t,e){return{staticClass:Un(t.staticClass,e.staticClass),clas...
function Un (line 6) | function Un(t,e){return t?e?t+" "+e:t:e||""}
function Hn (line 6) | function Hn(t){return Array.isArray(t)?function(t){for(var e,r="",o=0,i=...
function Zn (line 6) | function Zn(t,e){var r=t.data.ref;if(n(r)){var o=t.context,i=t.component...
function Yn (line 6) | function Yn(t,o){return t.key===o.key&&(t.tag===o.tag&&t.isComment===o.i...
function tr (line 6) | function tr(t,e,r){var o,i,a={};for(o=e;o<=r;++o)n(i=t[o].key)&&(a[i]=o)...
function nr (line 6) | function nr(t,e){(t.data.directives||e.data.directives)&&function(t,e){v...
function or (line 6) | function or(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<...
function ir (line 6) | function ir(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{})...
function ar (line 6) | function ar(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}c...
function cr (line 6) | function cr(t,r){var o=r.componentOptions;if(!(n(o)&&!1===o.Ctor.options...
function ur (line 6) | function ur(t,e,n){t.tagName.indexOf("-")>-1?lr(t,e,n):Dn(e)?Mn(n)?t.rem...
function lr (line 6) | function lr(t,e,n){if(Mn(n))t.removeAttribute(e);else{if(W&&!q&&"TEXTARE...
function pr (line 6) | function pr(t,r){var o=r.elm,i=r.data,a=t.data;if(!(e(i.staticClass)&&e(...
function yr (line 6) | function yr(t,e,n){var r=dr;return function o(){null!==e.apply(null,argu...
function _r (line 6) | function _r(t,e,n,r){if(gr){var o=rn,i=e;e=i._wrapper=function(t){if(t.t...
function br (line 6) | function br(t,e,n,r){(r||dr).removeEventListener(t,e._wrapper||e,n)}
function Cr (line 6) | function Cr(t,r){if(!e(t.data.on)||!e(r.data.on)){var o=r.data.on||{},i=...
function Ar (line 6) | function Ar(t,r){if(!e(t.data.domProps)||!e(r.data.domProps)){var o,i,a=...
function xr (line 6) | function xr(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e...
function Sr (line 6) | function Sr(t){var e=Er(t.style);return t.staticStyle?x(t.staticStyle,e):e}
function Er (line 6) | function Er(t){return Array.isArray(t)?O(t):"string"==typeof t?kr(t):t}
function Lr (line 6) | function Lr(t,r){var o=r.data,i=t.data;if(!(e(o.staticStyle)&&e(o.style)...
function Rr (line 6) | function Rr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.s...
function Ur (line 6) | function Ur(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.s...
function Hr (line 6) | function Hr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&x...
function Jr (line 6) | function Jr(t){Zr(function(){Zr(t)})}
function Qr (line 6) | function Qr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n...
function Yr (line 6) | function Yr(t,e){t._transitionClasses&&v(t._transitionClasses,e),Ur(t,e)}
function to (line 6) | function to(t,e,n){var r=no(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!...
function no (line 6) | function no(t,e){var n,r=window.getComputedStyle(t),o=(r[qr+"Delay"]||""...
function ro (line 6) | function ro(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.a...
function oo (line 6) | function oo(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}
function io (line 6) | function io(t,r){var o=t.elm;n(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._...
function ao (line 6) | function ao(t,r){var o=t.elm;n(o._enterCb)&&(o._enterCb.cancelled=!0,o._...
function so (line 6) | function so(t){return"number"==typeof t&&!isNaN(t)}
function co (line 6) | function co(t){if(e(t))return!1;var r=t.fns;return n(r)?co(Array.isArray...
function uo (line 6) | function uo(t,e){!0!==e.data.show&&io(e)}
function l (line 6) | function l(t){var e=u.parentNode(t);n(e)&&u.removeChild(e,t)}
function f (line 6) | function f(t,e,o,i,a,c,l){if(n(t.elm)&&n(c)&&(t=c[l]=vt(t)),t.isRootInse...
function d (line 6) | function d(t,e){n(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingI...
function v (line 6) | function v(t,e,r){n(t)&&(n(r)?u.parentNode(r)===t&&u.insertBefore(t,e,r)...
function h (line 6) | function h(t,e,n){if(Array.isArray(e))for(var r=0;r<e.length;++r)f(e[r],...
function m (line 6) | function m(t){for(;t.componentInstance;)t=t.componentInstance._vnode;ret...
function y (line 6) | function y(t,e){for(var r=0;r<s.create.length;++r)s.create[r](Jn,t);n(i=...
function g (line 6) | function g(t){var e;if(n(e=t.fnScopeId))u.setStyleScope(t.elm,e);else fo...
function _ (line 6) | function _(t,e,n,r,o,i){for(;r<=o;++r)f(n[r],i,t,e,!1,n,r)}
function b (line 6) | function b(t){var e,r,o=t.data;if(n(o))for(n(e=o.hook)&&n(e=e.destroy)&&...
function C (line 6) | function C(t,e,r){for(;e<=r;++e){var o=t[e];n(o)&&(n(o.tag)?($(o),b(o)):...
function $ (line 6) | function $(t,e){if(n(e)||n(t.data)){var r,o=s.remove.length+1;for(n(e)?e...
function w (line 6) | function w(t,e,r,o){for(var i=r;i<o;i++){var a=e[i];if(n(a)&&Yn(t,a))ret...
function A (line 6) | function A(t,o,i,a,c,l){if(t!==o){n(o.elm)&&n(a)&&(o=a[c]=vt(o));var p=o...
function x (line 6) | function x(t,e,o){if(r(o)&&n(t.parent))t.parent.data.pendingInsert=e;els...
function k (line 6) | function k(t,e,o,i){var a,s=e.tag,c=e.data,u=e.children;if(i=i||c&&c.pre...
function po (line 6) | function po(t,e,n){vo(t,e,n),(W||K)&&setTimeout(function(){vo(t,e,n)},0)}
function vo (line 6) | function vo(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){f...
function ho (line 6) | function ho(t,e){return e.every(function(e){return!j(e,t)})}
function mo (line 6) | function mo(t){return"_value"in t?t._value:t.value}
function yo (line 6) | function yo(t){t.target.composing=!0}
function go (line 6) | function go(t){t.target.composing&&(t.target.composing=!1,_o(t.target,"i...
function _o (line 6) | function _o(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,...
function bo (line 6) | function bo(t){return!t.componentInstance||t.data&&t.data.transition?t:b...
function wo (line 6) | function wo(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abst...
function Ao (line 6) | function Ao(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];...
function xo (line 6) | function xo(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{...
function jo (line 6) | function jo(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._ent...
function To (line 6) | function To(t){t.data.newPos=t.elm.getBoundingClientRect()}
function Io (line 6) | function Io(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-...
FILE: web/assets/vue@2.6.12/vue.runtime.esm.js
function isUndef (line 12) | function isUndef (v) {
function isDef (line 16) | function isDef (v) {
function isTrue (line 20) | function isTrue (v) {
function isFalse (line 24) | function isFalse (v) {
function isPrimitive (line 31) | function isPrimitive (value) {
function isObject (line 46) | function isObject (obj) {
function toRawType (line 55) | function toRawType (value) {
function isPlainObject (line 63) | function isPlainObject (obj) {
function isRegExp (line 67) | function isRegExp (v) {
function isValidArrayIndex (line 74) | function isValidArrayIndex (val) {
function isPromise (line 79) | function isPromise (val) {
function toString (line 90) | function toString (val) {
function toNumber (line 102) | function toNumber (val) {
function makeMap (line 111) | function makeMap (
function remove (line 138) | function remove (arr, item) {
function hasOwn (line 151) | function hasOwn (obj, key) {
function cached (line 158) | function cached (fn) {
function polyfillBind (line 198) | function polyfillBind (fn, ctx) {
function nativeBind (line 212) | function nativeBind (fn, ctx) {
function toArray (line 223) | function toArray (list, start) {
function extend (line 236) | function extend (to, _from) {
function toObject (line 246) | function toObject (arr) {
function noop (line 263) | function noop (a, b, c) {}
function looseEqual (line 281) | function looseEqual (a, b) {
function looseIndexOf (line 321) | function looseIndexOf (arr, val) {
function once (line 331) | function once (fn) {
function isReserved (line 474) | function isReserved (str) {
function def (line 482) | function def (obj, key, val, enumerable) {
function parsePath (line 495) | function parsePath (path) {
function isNative (line 566) | function isNative (Ctor) {
function Set (line 582) | function Set () {
function pushTarget (line 740) | function pushTarget (target) {
function popTarget (line 745) | function popTarget () {
function createTextVNode (line 806) | function createTextVNode (val) {
function cloneVNode (line 814) | function cloneVNode (vnode) {
function toggleObserving (line 897) | function toggleObserving (value) {
function protoAugment (line 951) | function protoAugment (target, src) {
function copyAugment (line 962) | function copyAugment (target, src, keys) {
function observe (line 974) | function observe (value, asRootData) {
function defineReactive$$1 (line 999) | function defineReactive$$1 (
function set (line 1065) | function set (target, key, val) {
function del (line 1100) | function del (target, key) {
function dependArray (line 1132) | function dependArray (value) {
function mergeData (line 1169) | function mergeData (to, from) {
function mergeDataOrFn (line 1199) | function mergeDataOrFn (
function mergeHook (line 1266) | function mergeHook (
function dedupeHooks (line 1282) | function dedupeHooks (hooks) {
function mergeAssets (line 1303) | function mergeAssets (
function checkComponents (line 1393) | function checkComponents (options) {
function validateComponentName (line 1399) | function validateComponentName (name) {
function normalizeProps (line 1418) | function normalizeProps (options, vm) {
function normalizeInject (line 1455) | function normalizeInject (options, vm) {
function normalizeDirectives (line 1482) | function normalizeDirectives (options) {
function assertObjectType (line 1494) | function assertObjectType (name, value, vm) {
function mergeOptions (line 1508) | function mergeOptions (
function resolveAsset (line 1562) | function resolveAsset (
function validateProp (line 1594) | function validateProp (
function getPropDefaultValue (line 1640) | function getPropDefaultValue (vm, prop, key) {
function assertProp (line 1673) | function assertProp (
function assertType (line 1724) | function assertType (value, type) {
function getType (line 1752) | function getType (fn) {
function isSameType (line 1757) | function isSameType (a, b) {
function getTypeIndex (line 1761) | function getTypeIndex (type, expectedTypes) {
function getInvalidTypeMessage (line 1773) | function getInvalidTypeMessage (name, value, expectedTypes) {
function styleValue (line 1794) | function styleValue (value, type) {
function isExplicable (line 1804) | function isExplicable (value) {
function isBoolean (line 1809) | function isBoolean () {
function handleError (line 1818) | function handleError (err, vm, info) {
function invokeWithErrorHandling (line 1845) | function invokeWithErrorHandling (
function globalHandleError (line 1867) | function globalHandleError (err, vm, info) {
function logError (line 1882) | function logError (err, vm, info) {
function flushCallbacks (line 1901) | function flushCallbacks () {
function nextTick (line 1975) | function nextTick (cb, ctx) {
function traverse (line 2099) | function traverse (val) {
function _traverse (line 2104) | function _traverse (val, seen) {
function createFnInvoker (line 2167) | function createFnInvoker (fns, vm) {
function updateListeners (line 2186) | function updateListeners (
function mergeVNodeHook (line 2227) | function mergeVNodeHook (def, hookKey, hook) {
function extractPropsFromVNodeData (line 2262) | function extractPropsFromVNodeData (
function checkProp (line 2303) | function checkProp (
function simpleNormalizeChildren (line 2342) | function simpleNormalizeChildren (children) {
function normalizeChildren (line 2355) | function normalizeChildren (children) {
function isTextNode (line 2363) | function isTextNode (node) {
function normalizeArrayChildren (line 2367) | function normalizeArrayChildren (children, nestedIndex) {
function initProvide (line 2417) | function initProvide (vm) {
function initInjections (line 2426) | function initInjections (vm) {
function resolveInject (line 2449) | function resolveInject (inject, vm) {
function resolveSlots (line 2492) | function resolveSlots (
function isWhitespace (line 2532) | function isWhitespace (node) {
function normalizeScopedSlots (line 2538) | function normalizeScopedSlots (
function normalizeScopedSlot (line 2588) | function normalizeScopedSlot(normalSlots, key, fn) {
function proxyNormalSlot (line 2613) | function proxyNormalSlot(slots, key) {
function renderList (line 2622) | function renderList (
function renderSlot (line 2667) | function renderSlot (
function resolveFilter (line 2704) | function resolveFilter (id) {
function isKeyNotMatch (line 2710) | function isKeyNotMatch (expect, actual) {
function checkKeyCodes (line 2723) | function checkKeyCodes (
function bindObjectProps (line 2745) | function bindObjectProps (
function renderStatic (line 2801) | function renderStatic (
function markOnce (line 2826) | function markOnce (
function markStatic (line 2835) | function markStatic (
function markStaticNode (line 2851) | function markStaticNode (node, key, isOnce) {
function bindObjectListeners (line 2859) | function bindObjectListeners (data, value) {
function resolveScopedSlots (line 2880) | function resolveScopedSlots (
function bindDynamicKeys (line 2908) | function bindDynamicKeys (baseObj, values) {
function prependModifier (line 2927) | function prependModifier (value, symbol) {
function installRenderHelpers (line 2933) | function installRenderHelpers (target) {
function FunctionalRenderContext (line 2955) | function FunctionalRenderContext (
function createFunctionalComponent (line 3031) | function createFunctionalComponent (
function cloneAndMarkFunctionalResult (line 3072) | function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, ...
function mergeProps (line 3088) | function mergeProps (to, from) {
function createComponent (line 3169) | function createComponent (
function createComponentInstanceForVnode (line 3268) | function createComponentInstanceForVnode (
function installComponentHooks (line 3286) | function installComponentHooks (data) {
function mergeHook$1 (line 3298) | function mergeHook$1 (f1, f2) {
function transformModel (line 3310) | function transformModel (options, data) {
function createElement (line 3337) | function createElement (
function _createElement (line 3356) | function _createElement (
function applyNS (line 3447) | function applyNS (vnode, ns, force) {
function registerDeepBindings (line 3468) | function registerDeepBindings (data) {
function initRender (line 3479) | function initRender (vm) {
function renderMixin (line 3516) | function renderMixin (Vue) {
function ensureCtor (line 3590) | function ensureCtor (comp, base) {
function createAsyncPlaceholder (line 3602) | function createAsyncPlaceholder (
function resolveAsyncComponent (line 3615) | function resolveAsyncComponent (
function isAsyncPlaceholder (line 3741) | function isAsyncPlaceholder (node) {
function getFirstComponentChild (line 3747) | function getFirstComponentChild (children) {
function initEvents (line 3762) | function initEvents (vm) {
function add (line 3774) | function add (event, fn) {
function remove$1 (line 3778) | function remove$1 (event, fn) {
function createOnceHandler (line 3782) | function createOnceHandler (event, fn) {
function updateComponentListeners (line 3792) | function updateComponentListeners (
function eventsMixin (line 3802) | function eventsMixin (Vue) {
function setActiveInstance (line 3900) | function setActiveInstance(vm) {
function initLifecycle (line 3908) | function initLifecycle (vm) {
function lifecycleMixin (line 3934) | function lifecycleMixin (Vue) {
function mountComponent (line 4017) | function mountComponent (
function updateChildComponent (line 4091) | function updateChildComponent (
function isInInactiveTree (line 4171) | function isInInactiveTree (vm) {
function activateChildComponent (line 4178) | function activateChildComponent (vm, direct) {
function deactivateChildComponent (line 4196) | function deactivateChildComponent (vm, direct) {
function callHook (line 4212) | function callHook (vm, hook) {
function resetSchedulerState (line 4243) | function resetSchedulerState () {
function flushSchedulerQueue (line 4286) | function flushSchedulerQueue () {
function callUpdatedHooks (line 4345) | function callUpdatedHooks (queue) {
function queueActivatedComponent (line 4360) | function queueActivatedComponent (vm) {
function callActivatedHooks (line 4367) | function callActivatedHooks (queue) {
function queueWatcher (line 4379) | function queueWatcher (watcher) {
function proxy (line 4626) | function proxy (target, sourceKey, key) {
function initState (line 4636) | function initState (vm) {
function initProps (line 4652) | function initProps (vm, propsOptions) {
function initData (line 4702) | function initData (vm) {
function getData (line 4744) | function getData (data, vm) {
function initComputed (line 4759) | function initComputed (vm, computed) {
function defineComputed (line 4800) | function defineComputed (
function createComputedGetter (line 4831) | function createComputedGetter (key) {
function createGetterInvoker (line 4846) | function createGetterInvoker(fn) {
function initMethods (line 4852) | function initMethods (vm, methods) {
function initWatch (line 4880) | function initWatch (vm, watch) {
function createWatcher (line 4893) | function createWatcher (
function stateMixin (line 4909) | function stateMixin (Vue) {
function initMixin (line 4964) | function initMixin (Vue) {
function initInternalComponent (line 5023) | function initInternalComponent (vm, options) {
function resolveConstructorOptions (line 5042) | function resolveConstructorOptions (Ctor) {
function resolveModifiedOptions (line 5066) | function resolveModifiedOptions (Ctor) {
function Vue (line 5079) | function Vue (options) {
function initUse (line 5096) | function initUse (Vue) {
function initMixin$1 (line 5118) | function initMixin$1 (Vue) {
function initExtend (line 5127) | function initExtend (Vue) {
function initProps$1 (line 5203) | function initProps$1 (Comp) {
function initComputed$1 (line 5210) | function initComputed$1 (Comp) {
function initAssetRegisters (line 5219) | function initAssetRegisters (Vue) {
function getComponentName (line 5253) | function getComponentName (opts) {
function matches (line 5257) | function matches (pattern, name) {
function pruneCache (line 5269) | function pruneCache (keepAliveInstance, filter) {
function pruneCacheEntry (line 5284) | function pruneCacheEntry (
function initGlobalAPI (line 5385) | function initGlobalAPI (Vue) {
function genClassForVnode (line 5510) | function genClassForVnode (vnode) {
function mergeClassData (line 5528) | function mergeClassData (child, parent) {
function renderClass (line 5537) | function renderClass (
function concat (line 5548) | function concat (a, b) {
function stringifyClass (line 5552) | function stringifyClass (value) {
function stringifyArray (line 5566) | function stringifyArray (value) {
function stringifyObject (line 5578) | function stringifyObject (value) {
function getTagNamespace (line 5623) | function getTagNamespace (tag) {
function isUnknownElement (line 5635) | function isUnknownElement (tag) {
function query (line 5667) | function query (el) {
function createElement$1 (line 5684) | function createElement$1 (tagName, vnode) {
function createElementNS (line 5696) | function createElementNS (namespace, tagName) {
function createTextNode (line 5700) | function createTextNode (text) {
function createComment (line 5704) | function createComment (text) {
function insertBefore (line 5708) | function insertBefore (parentNode, newNode, referenceNode) {
function removeChild (line 5712) | function removeChild (node, child) {
function appendChild (line 5716) | function appendChild (node, child) {
function parentNode (line 5720) | function parentNode (node) {
function nextSibling (line 5724) | function nextSibling (node) {
function tagName (line 5728) | function tagName (node) {
function setTextContent (line 5732) | function setTextContent (node, text) {
function setStyleScope (line 5736) | function setStyleScope (node, scopeId) {
function registerRef (line 5772) | function registerRef (vnode, isRemoval) {
function sameVnode (line 5815) | function sameVnode (a, b) {
function sameInputType (line 5832) | function sameInputType (a, b) {
function createKeyToOldIdx (line 5840) | function createKeyToOldIdx (children, beginIdx, endIdx) {
function createPatchFunction (line 5850) | function createPatchFunction (backend) {
function updateDirectives (line 6580) | function updateDirectives (oldVnode, vnode) {
function _update (line 6586) | function _update (oldVnode, vnode) {
function normalizeDirectives$1 (line 6649) | function normalizeDirectives$1 (
function getRawDirName (line 6672) | function getRawDirName (dir) {
function callHook$1 (line 6676) | function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
function updateAttrs (line 6694) | function updateAttrs (oldVnode, vnode) {
function setAttr (line 6735) | function setAttr (el, key, value) {
function baseSetAttr (line 6764) | function baseSetAttr (el, key, value) {
function updateClass (line 6796) | function updateClass (oldVnode, vnode) {
function normalizeEvents (line 6851) | function normalizeEvents (on) {
function createOnceHandler$1 (line 6870) | function createOnceHandler$1 (event, handler, capture) {
function add$1 (line 6885) | function add$1 (
function remove$2 (line 6930) | function remove$2 (
function updateDOMListeners (line 6943) | function updateDOMListeners (oldVnode, vnode) {
function updateDOMProps (line 6964) | function updateDOMProps (oldVnode, vnode) {
function shouldUpdateValue (line 7037) | function shouldUpdateValue (elm, checkVal) {
function isNotInFocusAndDirty (line 7045) | function isNotInFocusAndDirty (elm, checkVal) {
function isDirtyWithModifiers (line 7055) | function isDirtyWithModifiers (elm, newVal) {
function normalizeStyleData (line 7090) | function normalizeStyleData (data) {
function normalizeStyleBinding (line 7100) | function normalizeStyleBinding (bindingStyle) {
function getStyle (line 7114) | function getStyle (vnode, checkChild) {
function updateStyle (line 7187) | function updateStyle (oldVnode, vnode) {
function addClass (line 7243) | function addClass (el, cls) {
function removeClass (line 7268) | function removeClass (el, cls) {
function resolveTransition (line 7301) | function resolveTransition (def$$1) {
function nextFrame (line 7361) | function nextFrame (fn) {
function addTransitionClass (line 7367) | function addTransitionClass (el, cls) {
function removeTransitionClass (line 7375) | function removeTransitionClass (el, cls) {
function whenTransitionEnds (line 7382) | function whenTransitionEnds (
function getTransitionInfo (line 7415) | function getTransitionInfo (el, expectedType) {
function getTimeout (line 7465) | function getTimeout (delays, durations) {
function toMs (line 7480) | function toMs (s) {
function enter (line 7486) | function enter (vnode, toggleDisplay) {
function leave (line 7637) | function leave (vnode, rm) {
function checkDuration (line 7742) | function checkDuration (val, name, vnode) {
function isValidDuration (line 7758) | function isValidDuration (val) {
function getHookArgumentsLength (line 7768) | function getHookArgumentsLength (fn) {
function _enter (line 7785) | function _enter (_, vnode) {
function setSelected (line 7890) | function setSelected (el, binding, vm) {
function actuallySetSelected (line 7900) | function actuallySetSelected (el, binding, vm) {
function hasNoMatchingOption (line 7933) | function hasNoMatchingOption (value, options) {
function getValue (line 7937) | function getValue (option) {
function onCompositionStart (line 7943) | function onCompositionStart (e) {
function onCompositionEnd (line 7947) | function onCompositionEnd (e) {
function trigger (line 7954) | function trigger (el, type) {
function locateNode (line 7963) | function locateNode (vnode) {
function getRealChild (line 8051) | function getRealChild (vnode) {
function extractTransitionData (line 8060) | function extractTransitionData (comp) {
function placeholder (line 8076) | function placeholder (h, rawChild) {
function hasParentTransition (line 8084) | function hasParentTransition (vnode) {
function isSameChild (line 8092) | function isSameChild (child, oldChild) {
function callPendingCbs (line 8360) | function callPendingCbs (c) {
function recordPosition (line 8371) | function recordPosition (c) {
function applyTranslation (line 8375) | function applyTranslation (c) {
FILE: web/assets/vue@2.6.12/vue.runtime.js
function isUndef (line 18) | function isUndef (v) {
function isDef (line 22) | function isDef (v) {
function isTrue (line 26) | function isTrue (v) {
function isFalse (line 30) | function isFalse (v) {
function isPrimitive (line 37) | function isPrimitive (value) {
function isObject (line 52) | function isObject (obj) {
function toRawType (line 61) | function toRawType (value) {
function isPlainObject (line 69) | function isPlainObject (obj) {
function isRegExp (line 73) | function isRegExp (v) {
function isValidArrayIndex (line 80) | function isValidArrayIndex (val) {
function isPromise (line 85) | function isPromise (val) {
function toString (line 96) | function toString (val) {
function toNumber (line 108) | function toNumber (val) {
function makeMap (line 117) | function makeMap (
function remove (line 144) | function remove (arr, item) {
function hasOwn (line 157) | function hasOwn (obj, key) {
function cached (line 164) | function cached (fn) {
function polyfillBind (line 204) | function polyfillBind (fn, ctx) {
function nativeBind (line 218) | function nativeBind (fn, ctx) {
function toArray (line 229) | function toArray (list, start) {
function extend (line 242) | function extend (to, _from) {
function toObject (line 252) | function toObject (arr) {
function noop (line 269) | function noop (a, b, c) {}
function looseEqual (line 287) | function looseEqual (a, b) {
function looseIndexOf (line 327) | function looseIndexOf (arr, val) {
function once (line 337) | function once (fn) {
function isReserved (line 480) | function isReserved (str) {
function def (line 488) | function def (obj, key, val, enumerable) {
function parsePath (line 501) | function parsePath (path) {
function isNative (line 572) | function isNative (Ctor) {
function Set (line 588) | function Set () {
function pushTarget (line 746) | function pushTarget (target) {
function popTarget (line 751) | function popTarget () {
function createTextVNode (line 812) | function createTextVNode (val) {
function cloneVNode (line 820) | function cloneVNode (vnode) {
function toggleObserving (line 903) | function toggleObserving (value) {
function protoAugment (line 957) | function protoAugment (target, src) {
function copyAugment (line 968) | function copyAugment (target, src, keys) {
function observe (line 980) | function observe (value, asRootData) {
function defineReactive$$1 (line 1005) | function defineReactive$$1 (
function set (line 1071) | function set (target, key, val) {
function del (line 1105) | function del (target, key) {
function dependArray (line 1136) | function dependArray (value) {
function mergeData (line 1173) | function mergeData (to, from) {
function mergeDataOrFn (line 1203) | function mergeDataOrFn (
function mergeHook (line 1270) | function mergeHook (
function dedupeHooks (line 1286) | function dedupeHooks (hooks) {
function mergeAssets (line 1307) | function mergeAssets (
function checkComponents (line 1397) | function checkComponents (options) {
function validateComponentName (line 1403) | function validateComponentName (name) {
function normalizeProps (line 1422) | function normalizeProps (options, vm) {
function normalizeInject (line 1459) | function normalizeInject (options, vm) {
function normalizeDirectives (line 1486) | function normalizeDirectives (options) {
function assertObjectType (line 1498) | function assertObjectType (name, value, vm) {
function mergeOptions (line 1512) | function mergeOptions (
function resolveAsset (line 1566) | function resolveAsset (
function validateProp (line 1598) | function validateProp (
function getPropDefaultValue (line 1640) | function getPropDefaultValue (vm, prop, key) {
function assertProp (line 1673) | function assertProp (
function assertType (line 1724) | function assertType (value, type) {
function getType (line 1752) | function getType (fn) {
function isSameType (line 1757) | function isSameType (a, b) {
function getTypeIndex (line 1761) | function getTypeIndex (type, expectedTypes) {
function getInvalidTypeMessage (line 1773) | function getInvalidTypeMessage (name, value, expectedTypes) {
function styleValue (line 1794) | function styleValue (value, type) {
function isExplicable (line 1804) | function isExplicable (value) {
function isBoolean (line 1809) | function isBoolean () {
function handleError (line 1818) | function handleError (err, vm, info) {
function invokeWithErrorHandling (line 1845) | function invokeWithErrorHandling (
function globalHandleError (line 1867) | function globalHandleError (err, vm, info) {
function logError (line 1882) | function logError (err, vm, info) {
function flushCallbacks (line 1901) | function flushCallbacks () {
function nextTick (line 1975) | function nextTick (cb, ctx) {
function traverse (line 2099) | function traverse (val) {
function _traverse (line 2104) | function _traverse (val, seen) {
function createFnInvoker (line 2167) | function createFnInvoker (fns, vm) {
function updateListeners (line 2186) | function updateListeners (
function mergeVNodeHook (line 2227) | function mergeVNodeHook (def, hookKey, hook) {
function extractPropsFromVNodeData (line 2262) | function extractPropsFromVNodeData (
function checkProp (line 2303) | function checkProp (
function simpleNormalizeChildren (line 2342) | function simpleNormalizeChildren (children) {
function normalizeChildren (line 2355) | function normalizeChildren (children) {
function isTextNode (line 2363) | function isTextNode (node) {
function normalizeArrayChildren (line 2367) | function normalizeArrayChildren (children, nestedIndex) {
function initProvide (line 2417) | function initProvide (vm) {
function initInjections (line 2426) | function initInjections (vm) {
function resolveInject (line 2447) | function resolveInject (inject, vm) {
function resolveSlots (line 2490) | function resolveSlots (
function isWhitespace (line 2530) | function isWhitespace (node) {
function normalizeScopedSlots (line 2536) | function normalizeScopedSlots (
function normalizeScopedSlot (line 2586) | function normalizeScopedSlot(normalSlots, key, fn) {
function proxyNormalSlot (line 2611) | function proxyNormalSlot(slots, key) {
function renderList (line 2620) | function renderList (
function renderSlot (line 2665) | function renderSlot (
function resolveFilter (line 2702) | function resolveFilter (id) {
function isKeyNotMatch (line 2708) | function isKeyNotMatch (expect, actual) {
function checkKeyCodes (line 2721) | function checkKeyCodes (
function bindObjectProps (line 2743) | function bindObjectProps (
function renderStatic (line 2799) | function renderStatic (
function markOnce (line 2824) | function markOnce (
function markStatic (line 2833) | function markStatic (
function markStaticNode (line 2849) | function markStaticNode (node, key, isOnce) {
function bindObjectListeners (line 2857) | function bindObjectListeners (data, value) {
function resolveScopedSlots (line 2878) | function resolveScopedSlots (
function bindDynamicKeys (line 2906) | function bindDynamicKeys (baseObj, values) {
function prependModifier (line 2925) | function prependModifier (value, symbol) {
function installRenderHelpers (line 2931) | function installRenderHelpers (target) {
function FunctionalRenderContext (line 2953) | function FunctionalRenderContext (
function createFunctionalComponent (line 3029) | function createFunctionalComponent (
function cloneAndMarkFunctionalResult (line 3070) | function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, ...
function mergeProps (line 3086) | function mergeProps (to, from) {
function createComponent (line 3167) | function createComponent (
function createComponentInstanceForVnode (line 3266) | function createComponentInstanceForVnode (
function installComponentHooks (line 3284) | function installComponentHooks (data) {
function mergeHook$1 (line 3296) | function mergeHook$1 (f1, f2) {
function transformModel (line 3308) | function transformModel (options, data) {
function createElement (line 3335) | function createElement (
function _createElement (line 3354) | function _createElement (
function applyNS (line 3444) | function applyNS (vnode, ns, force) {
function registerDeepBindings (line 3465) | function registerDeepBindings (data) {
function initRender (line 3476) | function initRender (vm) {
function renderMixin (line 3510) | function renderMixin (Vue) {
function ensureCtor (line 3584) | function ensureCtor (comp, base) {
function createAsyncPlaceholder (line 3596) | function createAsyncPlaceholder (
function resolveAsyncComponent (line 3609) | function resolveAsyncComponent (
function isAsyncPlaceholder (line 3733) | function isAsyncPlaceholder (node) {
function getFirstComponentChild (line 3739) | function getFirstComponentChild (children) {
function initEvents (line 3754) | function initEvents (vm) {
function add (line 3766) | function add (event, fn) {
function remove$1 (line 3770) | function remove$1 (event, fn) {
function createOnceHandler (line 3774) | function createOnceHandler (event, fn) {
function updateComponentListeners (line 3784) | function updateComponentListeners (
function eventsMixin (line 3794) | function eventsMixin (Vue) {
function setActiveInstance (line 3892) | function setActiveInstance(vm) {
function initLifecycle (line 3900) | function initLifecycle (vm) {
function lifecycleMixin (line 3926) | function lifecycleMixin (Vue) {
function mountComponent (line 4009) | function mountComponent (
function updateChildComponent (line 4083) | function updateChildComponent (
function isInInactiveTree (line 4163) | function isInInactiveTree (vm) {
function activateChildComponent (line 4170) | function activateChildComponent (vm, direct) {
function deactivateChildComponent (line 4188) | function deactivateChildComponent (vm, direct) {
function callHook (line 4204) | function callHook (vm, hook) {
function resetSchedulerState (line 4235) | function resetSchedulerState () {
function flushSchedulerQueue (line 4278) | function flushSchedulerQueue () {
function callUpdatedHooks (line 4337) | function callUpdatedHooks (queue) {
function queueActivatedComponent (line 4352) | function queueActivatedComponent (vm) {
function callActivatedHooks (line 4359) | function callActivatedHooks (queue) {
function queueWatcher (line 4371) | function queueWatcher (watcher) {
function proxy (line 4616) | function proxy (target, sourceKey, key) {
function initState (line 4626) | function initState (vm) {
function initProps (line 4642) | function initProps (vm, propsOptions) {
function initData (line 4690) | function initData (vm) {
function getData (line 4732) | function getData (data, vm) {
function initComputed (line 4747) | function initComputed (vm, computed) {
function defineComputed (line 4788) | function defineComputed (
function createComputedGetter (line 4818) | function createComputedGetter (key) {
function createGetterInvoker (line 4833) | function createGetterInvoker(fn) {
function initMethods (line 4839) | function initMethods (vm, methods) {
function initWatch (line 4867) | function initWatch (vm, watch) {
function createWatcher (line 4880) | function createWatcher (
function stateMixin (line 4896) | function stateMixin (Vue) {
function initMixin (line 4951) | function initMixin (Vue) {
function initInternalComponent (line 5008) | function initInternalComponent (vm, options) {
function resolveConstructorOptions (line 5027) | function resolveConstructorOptions (Ctor) {
function resolveModifiedOptions (line 5051) | function resolveModifiedOptions (Ctor) {
function Vue (line 5064) | function Vue (options) {
function initUse (line 5080) | function initUse (Vue) {
function initMixin$1 (line 5102) | function initMixin$1 (Vue) {
function initExtend (line 5111) | function initExtend (Vue) {
function initProps$1 (line 5187) | function initProps$1 (Comp) {
function initComputed$1 (line 5194) | function initComputed$1 (Comp) {
function initAssetRegisters (line 5203) | function initAssetRegisters (Vue) {
function getComponentName (line 5237) | function getComponentName (opts) {
function matches (line 5241) | function matches (pattern, name) {
function pruneCache (line 5253) | function pruneCache (keepAliveInstance, filter) {
function pruneCacheEntry (line 5268) | function pruneCacheEntry (
function initGlobalAPI (line 5369) | function initGlobalAPI (Vue) {
function genClassForVnode (line 5494) | function genClassForVnode (vnode) {
function mergeClassData (line 5512) | function mergeClassData (child, parent) {
function renderClass (line 5521) | function renderClass (
function concat (line 5532) | function concat (a, b) {
function stringifyClass (line 5536) | function stringifyClass (value) {
function stringifyArray (line 5550) | function stringifyArray (value) {
function stringifyObject (line 5562) | function stringifyObject (value) {
function getTagNamespace (line 5607) | function getTagNamespace (tag) {
function isUnknownElement (line 5619) | function isUnknownElement (tag) {
function query (line 5651) | function query (el) {
function createElement$1 (line 5668) | function createElement$1 (tagName, vnode) {
function createElementNS (line 5680) | function createElementNS (namespace, tagName) {
function createTextNode (line 5684) | function createTextNode (text) {
function createComment (line 5688) | function createComment (text) {
function insertBefore (line 5692) | function insertBefore (parentNode, newNode, referenceNode) {
function removeChild (line 5696) | function removeChild (node, child) {
function appendChild (line 5700) | function appendChild (node, child) {
function parentNode (line 5704) | function parentNode (node) {
function nextSibling (line 5708) | function nextSibling (node) {
function tagName (line 5712) | function tagName (node) {
function setTextContent (line 5716) | function setTextContent (node, text) {
function setStyleScope (line 5720) | function setStyleScope (node, scopeId) {
function registerRef (line 5756) | function registerRef (vnode, isRemoval) {
function sameVnode (line 5799) | function sameVnode (a, b) {
function sameInputType (line 5816) | function sameInputType (a, b) {
function createKeyToOldIdx (line 5824) | function createKeyToOldIdx (children, beginIdx, endIdx) {
function createPatchFunction (line 5834) | function createPatchFunction (backend) {
function updateDirectives (line 6562) | function updateDirectives (oldVnode, vnode) {
function _update (line 6568) | function _update (oldVnode, vnode) {
function normalizeDirectives$1 (line 6631) | function normalizeDirectives$1 (
function getRawDirName (line 6654) | function getRawDirName (dir) {
function callHook$1 (line 6658) | function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
function updateAttrs (line 6676) | function updateAttrs (oldVnode, vnode) {
function setAttr (line 6717) | function setAttr (el, key, value) {
function baseSetAttr (line 6746) | function baseSetAttr (el, key, value) {
function updateClass (line 6778) | function updateClass (oldVnode, vnode) {
function normalizeEvents (line 6833) | function normalizeEvents (on) {
function createOnceHandler$1 (line 6852) | function createOnceHandler$1 (event, handler, capture) {
function add$1 (line 6867) | function add$1 (
function remove$2 (line 6912) | function remove$2 (
function updateDOMListeners (line 6925) | function updateDOMListeners (oldVnode, vnode) {
function updateDOMProps (line 6946) | function updateDOMProps (oldVnode, vnode) {
function shouldUpdateValue (line 7019) | function shouldUpdateValue (elm, checkVal) {
function isNotInFocusAndDirty (line 7027) | function isNotInFocusAndDirty (elm, checkVal) {
function isDirtyWithModifiers (line 7037) | function isDirtyWithModifiers (elm, newVal) {
function normalizeStyleData (line 7072) | function normalizeStyleData (data) {
function normalizeStyleBinding (line 7082) | function normalizeStyleBinding (bindingStyle) {
function getStyle (line 7096) | function getStyle (vnode, checkChild) {
function updateStyle (line 7169) | function updateStyle (oldVnode, vnode) {
function addClass (line 7225) | function addClass (el, cls) {
function removeClass (line 7250) | function removeClass (el, cls) {
function resolveTransition (line 7283) | function resolveTransition (def$$1) {
function nextFrame (line 7343) | function nextFrame (fn) {
function addTransitionClass (line 7349) | function addTransitionClass (el, cls) {
function removeTransitionClass (line 7357) | function removeTransitionClass (el, cls) {
function whenTransitionEnds (line 7364) | function whenTransitionEnds (
function getTransitionInfo (line 7397) | function getTransitionInfo (el, expectedType) {
function getTimeout (line 7447) | function getTimeout (delays, durations) {
function toMs (line 7462) | function toMs (s) {
function enter (line 7468) | function enter (vnode, toggleDisplay) {
function leave (line 7619) | function leave (vnode, rm) {
function checkDuration (line 7724) | function checkDuration (val, name, vnode) {
function isValidDuration (line 7740) | function isValidDuration (val) {
function getHookArgumentsLength (line 7750) | function getHookArgumentsLength (fn) {
function _enter (line 7767) | function _enter (_, vnode) {
function setSelected (line 7872) | function setSelected (el, binding, vm) {
function actuallySetSelected (line 7882) | function actuallySetSelected (el, binding, vm) {
function hasNoMatchingOption (line 7915) | function hasNoMatchingOption (value, options) {
function getValue (line 7919) | function getValue (option) {
function onCompositionStart (line 7925) | function onCompositionStart (e) {
function onCompositionEnd (line 7929) | function onCompositionEnd (e) {
function trigger (line 7936) | function trigger (el, type) {
function locateNode (line 7945) | function locateNode (vnode) {
function getRealChild (line 8033) | function getRealChild (vnode) {
function extractTransitionData (line 8042) | function extractTransitionData (comp) {
function placeholder (line 8058) | function placeholder (h, rawChild) {
function hasParentTransition (line 8066) | function hasParentTransition (vnode) {
function isSameChild (line 8074) | function isSameChild (child, oldChild) {
function callPendingCbs (line 8341) | function callPendingCbs (c) {
function recordPosition (line 8352) | function recordPosition (c) {
function applyTranslation (line 8356) | function applyTranslation (c) {
FILE: web/controller/base.go
type BaseController (line 9) | type BaseController struct
method checkLogin (line 12) | func (a *BaseController) checkLogin(c *gin.Context) {
FILE: web/controller/inbound.go
type InboundController (line 14) | type InboundController struct
method initRouter (line 26) | func (a *InboundController) initRouter(g *gin.RouterGroup) {
method startTask (line 35) | func (a *InboundController) startTask() {
method getInbounds (line 48) | func (a *InboundController) getInbounds(c *gin.Context) {
method addInbound (line 58) | func (a *InboundController) addInbound(c *gin.Context) {
method delInbound (line 76) | func (a *InboundController) delInbound(c *gin.Context) {
method updateInbound (line 89) | func (a *InboundController) updateInbound(c *gin.Context) {
function NewInboundController (line 19) | func NewInboundController(g *gin.RouterGroup) *InboundController {
FILE: web/controller/index.go
type LoginForm (line 14) | type LoginForm struct
type IndexController (line 19) | type IndexController struct
method initRouter (line 31) | func (a *IndexController) initRouter(g *gin.RouterGroup) {
method index (line 37) | func (a *IndexController) index(c *gin.Context) {
method login (line 45) | func (a *IndexController) login(c *gin.Context) {
method logout (line 77) | func (a *IndexController) logout(c *gin.Context) {
function NewIndexController (line 25) | func NewIndexController(g *gin.RouterGroup) *IndexController {
FILE: web/controller/server.go
type ServerController (line 11) | type ServerController struct
method initRouter (line 44) | func (a *ServerController) initRouter(g *gin.RouterGroup) {
method refreshStatus (line 63) | func (a *ServerController) refreshStatus() {
method startTask (line 67) | func (a *ServerController) startTask() {
method status (line 79) | func (a *ServerController) status(c *gin.Context) {
method getXrayVersion (line 85) | func (a *ServerController) getXrayVersion(c *gin.Context) {
method stopXrayService (line 104) | func (a *ServerController) stopXrayService(c *gin.Context) {
method restartXrayService (line 114) | func (a *ServerController) restartXrayService(c *gin.Context) {
method installXray (line 124) | func (a *ServerController) installXray(c *gin.Context) {
method getLogs (line 130) | func (a *ServerController) getLogs(c *gin.Context) {
method getGeoipVersion (line 140) | func (a *ServerController) getGeoipVersion(c *gin.Context) {
method installGeoip (line 159) | func (a *ServerController) installGeoip(c *gin.Context) {
method getGeositeVersion (line 165) | func (a *ServerController) getGeositeVersion(c *gin.Context) {
method installGeosite (line 184) | func (a *ServerController) installGeosite(c *gin.Context) {
method getDatabase (line 190) | func (a *ServerController) getDatabase(c *gin.Context) {
method getConfigJson (line 205) | func (a *ServerController) getConfigJson(c *gin.Context) {
method importDatabase (line 214) | func (a *ServerController) importDatabase(c *gin.Context) {
function NewServerController (line 35) | func NewServerController(g *gin.RouterGroup) *ServerController {
FILE: web/controller/setting.go
type updateUserForm (line 12) | type updateUserForm struct
type SettingController (line 19) | type SettingController struct
method initRouter (line 31) | func (a *SettingController) initRouter(g *gin.RouterGroup) {
method getAllSetting (line 40) | func (a *SettingController) getAllSetting(c *gin.Context) {
method updateSetting (line 49) | func (a *SettingController) updateSetting(c *gin.Context) {
method updateUser (line 60) | func (a *SettingController) updateUser(c *gin.Context) {
method restartPanel (line 85) | func (a *SettingController) restartPanel(c *gin.Context) {
function NewSettingController (line 25) | func NewSettingController(g *gin.RouterGroup) *SettingController {
FILE: web/controller/util.go
function getUriId (line 13) | func getUriId(c *gin.Context) int64 {
function getRemoteIp (line 22) | func getRemoteIp(c *gin.Context) string {
function jsonMsg (line 34) | func jsonMsg(c *gin.Context, msg string, err error) {
function jsonObj (line 38) | func jsonObj(c *gin.Context, obj interface{}, err error) {
function jsonMsgObj (line 42) | func jsonMsgObj(c *gin.Context, msg string, obj interface{}, err error) {
function pureJsonMsg (line 59) | func pureJsonMsg(c *gin.Context, success bool, msg string) {
function html (line 73) | func html(c *gin.Context, name string, title string, data gin.H) {
function getContext (line 83) | func getContext(h gin.H) gin.H {
function isAjax (line 95) | func isAjax(c *gin.Context) bool {
FILE: web/controller/xui.go
type XUIController (line 7) | type XUIController struct
method initRouter (line 20) | func (a *XUIController) initRouter(g *gin.RouterGroup) {
method index (line 32) | func (a *XUIController) index(c *gin.Context) {
method inbounds (line 36) | func (a *XUIController) inbounds(c *gin.Context) {
method setting (line 40) | func (a *XUIController) setting(c *gin.Context) {
function NewXUIController (line 14) | func NewXUIController(g *gin.RouterGroup) *XUIController {
FILE: web/entity/entity.go
type Msg (line 13) | type Msg struct
type Pager (line 19) | type Pager struct
type AllSetting (line 29) | type AllSetting struct
method CheckValid (line 44) | func (s *AllSetting) CheckValid() error {
FILE: web/global/global.go
type WebServer (line 11) | type WebServer interface
function SetWebServer (line 16) | func SetWebServer(s WebServer) {
function GetWebServer (line 20) | func GetWebServer() WebServer {
FILE: web/job/check_inbound_job.go
type CheckInboundJob (line 8) | type CheckInboundJob struct
method Run (line 17) | func (j *CheckInboundJob) Run() {
function NewCheckInboundJob (line 13) | func NewCheckInboundJob() *CheckInboundJob {
FILE: web/job/check_xray_running_job.go
type CheckXrayRunningJob (line 5) | type CheckXrayRunningJob struct
method Run (line 15) | func (j *CheckXrayRunningJob) Run() {
function NewCheckXrayRunningJob (line 11) | func NewCheckXrayRunningJob() *CheckXrayRunningJob {
FILE: web/job/stats_notify_job.go
type LoginStatus (line 16) | type LoginStatus
constant LoginSuccess (line 19) | LoginSuccess LoginStatus = 1
constant LoginFail (line 20) | LoginFail LoginStatus = 0
type StatsNotifyJob (line 23) | type StatsNotifyJob struct
method Run (line 36) | func (j *StatsNotifyJob) Run() {
method UserLoginNotify (line 45) | func (j *StatsNotifyJob) UserLoginNotify(username string, ip string, t...
method SSHStatusLoginNotify (line 68) | func (j *StatsNotifyJob) SSHStatusLoginNotify(xuiStartTime string) {
method GetsystemStatus (line 134) | func (j *StatsNotifyJob) GetsystemStatus() string {
function NewStatsNotifyJob (line 31) | func NewStatsNotifyJob() *StatsNotifyJob {
FILE: web/job/xray_traffic_job.go
type XrayTrafficJob (line 8) | type XrayTrafficJob struct
method Run (line 17) | func (j *XrayTrafficJob) Run() {
function NewXrayTrafficJob (line 13) | func NewXrayTrafficJob() *XrayTrafficJob {
FILE: web/network/auto_https_listener.go
type AutoHttpsListener (line 5) | type AutoHttpsListener struct
method Accept (line 15) | func (l *AutoHttpsListener) Accept() (net.Conn, error) {
function NewAutoHttpsListener (line 9) | func NewAutoHttpsListener(listener net.Listener) net.Listener {
FILE: web/network/autp_https_conn.go
type AutoHttpsConn (line 12) | type AutoHttpsConn struct
method readRequest (line 27) | func (c *AutoHttpsConn) readRequest() bool {
method Read (line 52) | func (c *AutoHttpsConn) Read(buf []byte) (int, error) {
function NewAutoHttpsConn (line 21) | func NewAutoHttpsConn(conn net.Conn) net.Conn {
FILE: web/service/inbound.go
type InboundService (line 14) | type InboundService struct
method GetInbounds (line 17) | func (s *InboundService) GetInbounds(userId int) ([]*model.Inbound, er...
method GetAllInbounds (line 27) | func (s *InboundService) GetAllInbounds() ([]*model.Inbound, error) {
method checkPortExist (line 37) | func (s *InboundService) checkPortExist(port int, ignoreId int) (bool,...
method AddInbound (line 51) | func (s *InboundService) AddInbound(inbound *model.Inbound) error {
method AddInbounds (line 63) | func (s *InboundService) AddInbounds(inbounds []*model.Inbound) error {
method DelInbound (line 95) | func (s *InboundService) DelInbound(id int) error {
method DelInboundByPort (line 100) | func (s *InboundService) DelInboundByPort(port int) error {
method GetInbound (line 107) | func (s *InboundService) GetInbound(id int) (*model.Inbound, error) {
method UpdateInbound (line 117) | func (s *InboundService) UpdateInbound(inbound *model.Inbound) error {
method ClearTrafficByPort (line 148) | func (s *InboundService) ClearTrafficByPort(port int) error {
method ClearAllInboundTraffic (line 163) | func (s *InboundService) ClearAllInboundTraffic() error {
method AddTraffic (line 175) | func (s *InboundService) AddTraffic(traffics []*xray.Traffic) (err err...
method DisableInvalidInbounds (line 203) | func (s *InboundService) DisableInvalidInbounds() (int64, error) {
method DisableInboundByPort (line 214) | func (s *InboundService) DisableInboundByPort(port int) error {
method EnableInboundByPort (line 218) | func (s *InboundService) EnableInboundByPort(port int) error {
FILE: web/service/panel.go
type PanelService (line 10) | type PanelService struct
method RestartPanel (line 13) | func (s *PanelService) RestartPanel(delay time.Duration) error {
FILE: web/service/server.go
type ProcessState (line 32) | type ProcessState
constant Running (line 35) | Running ProcessState = "running"
constant Stop (line 36) | Stop ProcessState = "stop"
constant Error (line 37) | Error ProcessState = "error"
type Status (line 40) | type Status struct
type Release (line 74) | type Release struct
type ServerService (line 78) | type ServerService struct
method GetStatus (line 83) | func (s *ServerService) GetStatus(lastStatus *Status) *Status {
method GetXrayVersions (line 181) | func (s *ServerService) GetXrayVersions() ([]string, error) {
method GetLogs (line 208) | func (s *ServerService) GetLogs(count string) ([]string, error) {
method StopXrayService (line 231) | func (s *ServerService) StopXrayService() (string error) {
method RestartXrayService (line 241) | func (s *ServerService) RestartXrayService() (string error) {
method downloadXRay (line 253) | func (s *ServerService) downloadXRay(version string) (string, error) {
method UpdateXray (line 293) | func (s *ServerService) UpdateXray(version string) error {
method GetGeoipVersions (line 357) | func (s *ServerService) GetGeoipVersions() ([]string, error) {
method downloadGeoip (line 384) | func (s *ServerService) downloadGeoip(version string) (string, error) {
method UpdateGeoip (line 409) | func (s *ServerService) UpdateGeoip(version string) error {
method GetGeositeVersions (line 427) | func (s *ServerService) GetGeositeVersions() ([]string, error) {
method downloadGeosite (line 454) | func (s *ServerService) downloadGeosite(version string) (string, error) {
method UpdateGeosite (line 479) | func (s *ServerService) UpdateGeosite(version string) error {
method GetDatabase (line 497) | func (s *ServerService) GetDatabase() ([]byte, error) {
method GetConfigJson (line 514) | func (s *ServerService) GetConfigJson() (interface{}, error) {
method ImportDatabase (line 537) | func (s *ServerService) ImportDatabase(file multipart.File) error {
FILE: web/service/setting.go
type SettingService (line 38) | type SettingService struct
method GetAllSetting (line 41) | func (s *SettingService) GetAllSetting() (*entity.AllSetting, error) {
method ResetSettings (line 116) | func (s *SettingService) ResetSettings() error {
method getSetting (line 121) | func (s *SettingService) getSetting(key string) (*model.Setting, error) {
method saveSetting (line 131) | func (s *SettingService) saveSetting(key string, value string) error {
method getString (line 147) | func (s *SettingService) getString(key string) (string, error) {
method setString (line 161) | func (s *SettingService) setString(key string, value string) error {
method getBool (line 165) | func (s *SettingService) getBool(key string) (bool, error) {
method setBool (line 173) | func (s *SettingService) setBool(key string, value bool) error {
method getInt (line 177) | func (s *SettingService) getInt(key string) (int, error) {
method setInt (line 185) | func (s *SettingService) setInt(key string, value int) error {
method GetXrayConfigTemplate (line 189) | func (s *SettingService) GetXrayConfigTemplate() (string, error) {
method GetListen (line 193) | func (s *SettingService) GetListen() (string, error) {
method SetListen (line 197) | func (s *SettingService) SetListen(listen string) error {
method GetTgBotToken (line 201) | func (s *SettingService) GetTgBotToken() (string, error) {
method SetTgBotToken (line 205) | func (s *SettingService) SetTgBotToken(token string) error {
method GetTgBotChatId (line 209) | func (s *SettingService) GetTgBotChatId() (int, error) {
method SetTgBotChatId (line 213) | func (s *SettingService) SetTgBotChatId(chatId int) error {
method SetTgbotenabled (line 217) | func (s *SettingService) SetTgbotenabled(value bool) error {
method GetTgbotenabled (line 221) | func (s *SettingService) GetTgbotenabled() (bool, error) {
method SetTgbotRuntime (line 225) | func (s *SettingService) SetTgbotRuntime(time string) error {
method GetTgbotRuntime (line 229) | func (s *SettingService) GetTgbotRuntime() (string, error) {
method GetPort (line 233) | func (s *SettingService) GetPort() (int, error) {
method SetPort (line 237) | func (s *SettingService) SetPort(port int) error {
method GetCertFile (line 241) | func (s *SettingService) GetCertFile() (string, error) {
method GetKeyFile (line 245) | func (s *SettingService) GetKeyFile() (string, error) {
method GetSecret (line 249) | func (s *SettingService) GetSecret() ([]byte, error) {
method GetBasePath (line 260) | func (s *SettingService) GetBasePath() (string, error) {
method GetTimeLocation (line 274) | func (s *SettingService) GetTimeLocation() (*time.Location, error) {
method UpdateAllSetting (line 288) | func (s *SettingService) UpdateAllSetting(allSetting *entity.AllSettin...
FILE: web/service/telegram.go
type TelegramService (line 22) | type TelegramService struct
method GetsystemStatus (line 29) | func (s *TelegramService) GetsystemStatus() string {
method StartRun (line 74) | func (s *TelegramService) StartRun() {
method SendMsgToTgbot (line 223) | func (s *TelegramService) SendMsgToTgbot(msg string) {
method StopRunAndClose (line 244) | func (s *TelegramService) StopRunAndClose() {
FILE: web/service/user.go
type UserService (line 12) | type UserService struct
method GetFirstUser (line 15) | func (s *UserService) GetFirstUser() (*model.User, error) {
method CheckUser (line 28) | func (s *UserService) CheckUser(username string, password string) *mod...
method UpdateUser (line 45) | func (s *UserService) UpdateUser(id int, username string, password str...
method UpdateFirstUser (line 53) | func (s *UserService) UpdateFirstUser(username string, password string...
FILE: web/service/xray.go
type XrayService (line 18) | type XrayService struct
method IsXrayRunning (line 23) | func (s *XrayService) IsXrayRunning() bool {
method GetXrayErr (line 27) | func (s *XrayService) GetXrayErr() error {
method GetXrayResult (line 34) | func (s *XrayService) GetXrayResult() string {
method GetXrayVersion (line 48) | func (s *XrayService) GetXrayVersion() string {
method GetXrayConfig (line 55) | func (s *XrayService) GetXrayConfig() (*xray.Config, error) {
method GetXrayTraffic (line 81) | func (s *XrayService) GetXrayTraffic() ([]*xray.Traffic, error) {
method RestartXray (line 88) | func (s *XrayService) RestartXray(isForce bool) error {
method StopXray (line 111) | func (s *XrayService) StopXray() error {
method SetToNeedRestart (line 121) | func (s *XrayService) SetToNeedRestart() {
method IsNeedRestartAndSetFalse (line 125) | func (s *XrayService) IsNeedRestartAndSetFalse() bool {
FILE: web/session/session.go
constant loginUser (line 12) | loginUser = "LOGIN_USER"
function init (line 15) | func init() {
function SetLoginUser (line 19) | func SetLoginUser(c *gin.Context, user *model.User) error {
function GetLoginUser (line 25) | func GetLoginUser(c *gin.Context) *model.User {
function IsLogin (line 35) | func IsLogin(c *gin.Context) bool {
function ClearSession (line 39) | func ClearSession(c *gin.Context) {
FILE: web/web.go
type wrapAssetsFS (line 48) | type wrapAssetsFS struct
method Open (line 56) | func (f *wrapAssetsFS) Open(name string) (fs.File, error) {
function GetXuiStarttime (line 52) | func GetXuiStarttime() string {
type wrapAssetsFile (line 66) | type wrapAssetsFile struct
method Stat (line 70) | func (f *wrapAssetsFile) Stat() (fs.FileInfo, error) {
type wrapAssetsFileInfo (line 80) | type wrapAssetsFileInfo struct
method ModTime (line 84) | func (f *wrapAssetsFileInfo) ModTime() time.Time {
type Server (line 88) | type Server struct
method getHtmlFiles (line 115) | func (s *Server) getHtmlFiles() ([]string, error) {
method getHtmlTemplate (line 134) | func (s *Server) getHtmlTemplate(funcMap template.FuncMap) (*template....
method initRouter (line 157) | func (s *Server) initRouter() (*gin.Engine, error) {
method initI18n (line 225) | func (s *Server) initI18n(engine *gin.Engine) error {
method startTask (line 294) | func (s *Server) startTask() {
method Start (line 332) | func (s *Server) Start() (err error) {
method Stop (line 421) | func (s *Server) Stop() error {
method GetCtx (line 441) | func (s *Server) GetCtx() context.Context {
method GetCron (line 445) | func (s *Server) GetCron() *cron.Cron {
function NewServer (line 107) | func NewServer() *Server {
FILE: xray/config.go
type Config (line 8) | type Config struct
method Equals (line 22) | func (c *Config) Equals(other *Config) bool {
FILE: xray/inbound.go
type InboundConfig (line 8) | type InboundConfig struct
method Equals (line 18) | func (c *InboundConfig) Equals(other *InboundConfig) bool {
FILE: xray/process.go
function GetBinaryName (line 26) | func GetBinaryName() string {
function GetBinaryPath (line 30) | func GetBinaryPath() string {
function GetConfigPath (line 34) | func GetConfigPath() string {
function GetGeositePath (line 38) | func GetGeositePath() string {
function GetGeoipPath (line 42) | func GetGeoipPath() string {
function stopProcess (line 46) | func stopProcess(p *Process) {
type Process (line 50) | type Process struct
method GetAPIPort (line 111) | func (p *Process) GetAPIPort() int {
method GetConfig (line 115) | func (p *Process) GetConfig() *Config {
function NewProcess (line 54) | func NewProcess(xrayConfig *Config) *Process {
type process (line 60) | type process struct
method IsRunning (line 79) | func (p *process) IsRunning() bool {
method GetErr (line 89) | func (p *process) GetErr() error {
method GetResult (line 93) | func (p *process) GetResult() string {
method GetVersion (line 107) | func (p *process) GetVersion() string {
method refreshAPIPort (line 119) | func (p *process) refreshAPIPort() {
method refreshVersion (line 128) | func (p *process) refreshVersion() {
method Start (line 143) | func (p *process) Start() (err error) {
method Stop (line 225) | func (p *process) Stop() error {
method GetTraffic (line 232) | func (p *process) GetTraffic(reset bool) ([]*Traffic, error) {
function newProcess (line 71) | func newProcess(config *Config) *process {
FILE: xray/traffic.go
type Traffic (line 3) | type Traffic struct
Condensed preview — 121 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,000K chars).
[
{
"path": ".github/dependabot.yml",
"chars": 625,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/workflows/docker.yaml",
"chars": 969,
"preview": "name: \"Build and push images\"\n\non:\n push:\n tags:\n - v*\n workflow_dispatch:\n\njobs:\n Building:\n runs-on: u"
},
{
"path": ".github/workflows/release.yaml",
"chars": 7178,
"preview": "name: Release x-ui\non:\n push:\n tags:\n - v*\n workflow_dispatch:\n\njobs:\n release:\n runs-on: ubuntu-latest\n "
},
{
"path": ".gitignore",
"chars": 71,
"preview": ".idea\ntmp\ndist/\nx-ui/\nrelease.sh\n.sync*\nbin/config.json\noryxBuildBinary"
},
{
"path": "Dockerfile",
"chars": 370,
"preview": "FROM golang:latest AS builder\nWORKDIR /root\nCOPY . .\nRUN go build main.go\n\nFROM debian:12-slim\nRUN apt-get update && apt"
},
{
"path": "LICENSE",
"chars": 35148,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 3821,
"preview": "# x-ui\n\nMulti-protocol, multi-user xray panel support\n\n> [中文文档请点击这里进行查看](./README_CN.md)\n\n# Features\n\n- System status mo"
},
{
"path": "README_CN.md",
"chars": 2289,
"preview": "# x-ui\n\n支持多协议多用户的 xray 面板\n\n# 功能介绍\n\n- 系统状态监控\n- 支持多用户多协议,单端口多用户,网页可视化操作\n- 支持的协议:vmess、vless、trojan、shadowsocks、dokodemo-do"
},
{
"path": "config/config.go",
"chars": 1033,
"preview": "package config\n\nimport (\n\t_ \"embed\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n)\n\n//go:embed version\nvar version string\n\n//go:embed name\nva"
},
{
"path": "config/name",
"chars": 4,
"preview": "x-ui"
},
{
"path": "config/version",
"chars": 9,
"preview": "v0.3.3.14"
},
{
"path": "database/db.go",
"chars": 1575,
"preview": "package database\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path\"\n\t\"x-ui/config\"\n\t\"x-ui/database/model\"\n\n\t\"gorm.io/driver"
},
{
"path": "database/model/model.go",
"chars": 1978,
"preview": "package model\n\nimport (\n\t\"fmt\"\n\t\"x-ui/util/json_util\"\n\t\"x-ui/xray\"\n)\n\ntype Protocol string\n\nconst (\n\tVMess Protoco"
},
{
"path": "go.mod",
"chars": 2687,
"preview": "module x-ui\n\ngo 1.20\n\nrequire (\n\tgithub.com/BurntSushi/toml v1.3.2\n\tgithub.com/Workiva/go-datastructures v1.1.0\n\tgithub."
},
{
"path": "go.sum",
"chars": 23777,
"preview": "github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=\ngithub.com/BurntSushi/toml v1.3"
},
{
"path": "install.sh",
"chars": 8458,
"preview": "#!/bin/bash\n\nred='\\033[0;31m'\ngreen='\\033[0;32m'\nyellow='\\033[0;33m'\nplain='\\033[0m'\n\ncur_dir=$(pwd)\n\n# check root\n[[ $E"
},
{
"path": "install_CN.sh",
"chars": 7437,
"preview": "#!/bin/bash\n\nred='\\033[0;31m'\ngreen='\\033[0;32m'\nyellow='\\033[0;33m'\nplain='\\033[0m'\n\ncur_dir=$(pwd)\n\n# check root\n[[ $E"
},
{
"path": "logger/logger.go",
"chars": 1173,
"preview": "package logger\n\nimport (\n\t\"github.com/op/go-logging\"\n\t\"os\"\n)\n\nvar logger *logging.Logger\n\nfunc init() {\n\tInitLogger(logg"
},
{
"path": "main.go",
"chars": 6645,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\t_ \"unsafe\"\n\t\"x-ui/config\"\n\t\"x-ui/database\"\n\t"
},
{
"path": "util/common/err.go",
"chars": 481,
"preview": "package common\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"x-ui/logger\"\n)\n\nvar CtxDone = errors.New(\"context done\")\n\nfunc NewErrorf(for"
},
{
"path": "util/common/format.go",
"chars": 1169,
"preview": "package common\n\nimport (\n\t\"fmt\"\n)\n\nfunc FormatTraffic(trafficBytes int64) (size string) {\n\tif trafficBytes < 1024 {\n\t\tre"
},
{
"path": "util/common/multi_error.go",
"chars": 457,
"preview": "package common\n\nimport (\n\t\"strings\"\n)\n\ntype multiError []error\n\nfunc (e multiError) Error() string {\n\tvar r strings.Buil"
},
{
"path": "util/common/network.go",
"chars": 277,
"preview": "package common\n\nimport (\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\nfunc GetMyIpAddr() string {\n\tresp, err := http.Get(\"https://api.ipi"
},
{
"path": "util/common/stringUtil.go",
"chars": 605,
"preview": "package common\n\nimport (\n\t\"bytes\"\n\t\"sort\"\n)\n\nfunc IsSubString(target string, str_array []string) bool {\n\tsort.Strings(st"
},
{
"path": "util/context.go",
"chars": 146,
"preview": "package util\n\nimport \"context\"\n\nfunc IsDone(ctx context.Context) bool {\n\tselect {\n\tcase <-ctx.Done():\n\t\treturn true\n\tdef"
},
{
"path": "util/json_util/json.go",
"chars": 459,
"preview": "package json_util\n\nimport (\n\t\"errors\"\n)\n\ntype RawMessage []byte\n\n// MarshalJSON 自定义 json.RawMessage 默认行为\nfunc (m RawMess"
},
{
"path": "util/random/random.go",
"chars": 817,
"preview": "package random\n\nimport (\n\t\"math/rand\"\n\t\"time\"\n)\n\nvar numSeq [10]rune\nvar lowerSeq [26]rune\nvar upperSeq [26]rune\nvar num"
},
{
"path": "util/reflect_util/reflect.go",
"chars": 453,
"preview": "package reflect_util\n\nimport \"reflect\"\n\nfunc GetFields(t reflect.Type) []reflect.StructField {\n\tnum := t.NumField()\n\tfie"
},
{
"path": "util/sys/a.s",
"chars": 0,
"preview": ""
},
{
"path": "util/sys/psutil.go",
"chars": 159,
"preview": "package sys\n\nimport (\n\t_ \"unsafe\"\n)\n\n//go:linkname HostProc github.com/shirou/gopsutil/v3/internal/common.HostProc\nfunc "
},
{
"path": "util/sys/sys_darwin.go",
"chars": 367,
"preview": "//go:build darwin\n// +build darwin\n\npackage sys\n\nimport (\n\t\"github.com/shirou/gopsutil/v3/net\"\n)\n\nfunc GetTCPCount() (in"
},
{
"path": "util/sys/sys_linux.go",
"chars": 1119,
"preview": "// +build linux\n\npackage sys\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nfunc getLinesNum(filename string) (int, error) {\n\t"
},
{
"path": "web/assets/ant-design-vue@1.7.2/antd.less",
"chars": 74,
"preview": "@import \"../lib/style/index.less\";\n@import \"../lib/style/components.less\";"
},
{
"path": "web/assets/css/custom.css",
"chars": 4466,
"preview": "#app {\n height: 100%;\n}\n\n.ant-space {\n width: 100%;\n}\n\n.ant-layout-sider-zero-width-trigger {\n display: none;\n}"
},
{
"path": "web/assets/element-ui@2.15.0/theme-chalk/display.css",
"chars": 982,
"preview": "@media only screen and (max-width:767px){.hidden-xs-only{display:none!important}}@media only screen and (min-width:768px"
},
{
"path": "web/assets/js/axios-init.js",
"chars": 380,
"preview": "axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\naxios.defaults.headers"
},
{
"path": "web/assets/js/model/models.js",
"chars": 3971,
"preview": "class User {\n constructor() {\n this.username = \"\";\n this.password = \"\";\n }\n}\n\nclass Msg {\n\n const"
},
{
"path": "web/assets/js/model/xray.js",
"chars": 53547,
"preview": "const Protocols = {\n VMESS: 'vmess',\n VLESS: 'vless',\n TROJAN: 'trojan',\n SHADOWSOCKS: 'shadowsocks',\n DO"
},
{
"path": "web/assets/js/util/common.js",
"chars": 1378,
"preview": "const ONE_KB = 1024;\nconst ONE_MB = ONE_KB * 1024;\nconst ONE_GB = ONE_MB * 1024;\nconst ONE_TB = ONE_GB * 1024;\nconst ONE"
},
{
"path": "web/assets/js/util/date-util.js",
"chars": 2746,
"preview": "const oneMinute = 1000 * 60; // 一分钟的毫秒数\nconst oneHour = oneMinute * 60; // 一小时的毫秒数\nconst oneDay = oneHour * 24; // 一天的毫秒"
},
{
"path": "web/assets/js/util/utils.js",
"chars": 9775,
"preview": "class HttpUtil {\n static _handleMsg(msg) {\n if (!(msg instanceof Msg)) {\n return;\n }\n "
},
{
"path": "web/assets/vue@2.6.12/vue.common.dev.js",
"chars": 320275,
"preview": "/*!\n * Vue.js v2.6.12\n * (c) 2014-2020 Evan You\n * Released under the MIT License.\n */\n'use strict';\n\n/* */\n\nvar emptyO"
},
{
"path": "web/assets/vue@2.6.12/vue.common.js",
"chars": 157,
"preview": "if (process.env.NODE_ENV === 'production') {\n module.exports = require('./vue.common.prod.js')\n} else {\n module.export"
},
{
"path": "web/assets/vue@2.6.12/vue.common.prod.js",
"chars": 93504,
"preview": "/*!\n * Vue.js v2.6.12\n * (c) 2014-2020 Evan You\n * Released under the MIT License.\n */\n\"use strict\";var e=Object.freeze("
},
{
"path": "web/assets/vue@2.6.12/vue.esm.js",
"chars": 326413,
"preview": "/*!\n * Vue.js v2.6.12\n * (c) 2014-2020 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object."
},
{
"path": "web/assets/vue@2.6.12/vue.runtime.common.dev.js",
"chars": 223162,
"preview": "/*!\n * Vue.js v2.6.12\n * (c) 2014-2020 Evan You\n * Released under the MIT License.\n */\n'use strict';\n\n/* */\n\nvar emptyO"
},
{
"path": "web/assets/vue@2.6.12/vue.runtime.common.js",
"chars": 173,
"preview": "if (process.env.NODE_ENV === 'production') {\n module.exports = require('./vue.runtime.common.prod.js')\n} else {\n modul"
},
{
"path": "web/assets/vue@2.6.12/vue.runtime.common.prod.js",
"chars": 64709,
"preview": "/*!\n * Vue.js v2.6.12\n * (c) 2014-2020 Evan You\n * Released under the MIT License.\n */\n\"use strict\";var t=Object.freeze("
},
{
"path": "web/assets/vue@2.6.12/vue.runtime.esm.js",
"chars": 227323,
"preview": "/*!\n * Vue.js v2.6.12\n * (c) 2014-2020 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object."
},
{
"path": "web/assets/vue@2.6.12/vue.runtime.js",
"chars": 238608,
"preview": "/*!\n * Vue.js v2.6.12\n * (c) 2014-2020 Evan You\n * Released under the MIT License.\n */\n(function (global, factory) {\n t"
},
{
"path": "web/controller/base.go",
"chars": 385,
"preview": "package controller\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"net/http\"\n\t\"x-ui/web/session\"\n)\n\ntype BaseController struct {"
},
{
"path": "web/controller/inbound.go",
"chars": 2294,
"preview": "package controller\n\nimport (\n\t\"fmt\"\n\t\"github.com/gin-gonic/gin\"\n\t\"strconv\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\t\"x-ui/"
},
{
"path": "web/controller/index.go",
"chars": 1985,
"preview": "package controller\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\t\"x-ui/logger\"\n\t\"x-ui/web/job\"\n\t\"x-ui/web/service\"\n\t\"x-ui/web/session\"\n"
},
{
"path": "web/controller/server.go",
"chars": 5400,
"preview": "package controller\n\nimport (\n\t\"time\"\n\t\"x-ui/web/global\"\n\t\"x-ui/web/service\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype ServerC"
},
{
"path": "web/controller/setting.go",
"chars": 2199,
"preview": "package controller\n\nimport (\n\t\"errors\"\n\t\"github.com/gin-gonic/gin\"\n\t\"time\"\n\t\"x-ui/web/entity\"\n\t\"x-ui/web/service\"\n\t\"x-ui"
},
{
"path": "web/controller/util.go",
"chars": 1776,
"preview": "package controller\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"net\"\n\t\"net/http\"\n\t\"strings\"\n\t\"x-ui/config\"\n\t\"x-ui/logger\"\n\t\"x"
},
{
"path": "web/controller/xui.go",
"chars": 845,
"preview": "package controller\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n)\n\ntype XUIController struct {\n\tBaseController\n\n\tinboundControl"
},
{
"path": "web/entity/entity.go",
"chars": 2325,
"preview": "package entity\n\nimport (\n\t\"crypto/tls\"\n\t\"encoding/json\"\n\t\"net\"\n\t\"strings\"\n\t\"time\"\n\t\"x-ui/util/common\"\n\t\"x-ui/xray\"\n)\n\nty"
},
{
"path": "web/global/global.go",
"chars": 286,
"preview": "package global\n\nimport (\n\t\"context\"\n\t\"github.com/robfig/cron/v3\"\n\t_ \"unsafe\"\n)\n\nvar webServer WebServer\n\ntype WebServer "
},
{
"path": "web/html/common/head.html",
"chars": 645,
"preview": "{{define \"head\"}}\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"renderer\" content=\"webkit\">\n <meta http-equiv=\"X-"
},
{
"path": "web/html/common/js.html",
"chars": 1218,
"preview": "{{define \"js\"}}\n<script src=\"{{ .base_path }}assets/vue@2.6.12/vue.min.js\"></script>\n<script src=\"{{ .base_path }}assets"
},
{
"path": "web/html/common/prompt_modal.html",
"chars": 1870,
"preview": "{{define \"promptModal\"}}\n<a-modal id=\"prompt-modal\" v-model=\"promptModal.visible\" :title=\"promptModal.title\"\n :c"
},
{
"path": "web/html/common/qrcode_modal.html",
"chars": 1877,
"preview": "{{define \"qrcodeModal\"}}\n<a-modal id=\"qrcode-modal\" v-model=\"qrModal.visible\" :title=\"qrModal.title\"\n :closable="
},
{
"path": "web/html/common/text_modal.html",
"chars": 1734,
"preview": "{{define \"textModal\"}}\n<a-modal id=\"text-modal\" v-model=\"txtModal.visible\" :title=\"txtModal.title\" :closable=\"true\" ok-t"
},
{
"path": "web/html/login.html",
"chars": 3197,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n #app {\n padding-top: 100px;\n }\n\n h1 {\n "
},
{
"path": "web/html/xui/common_sider.html",
"chars": 2396,
"preview": "{{define \"menuItems\"}}\n<a-menu-item key=\"{{ .base_path }}xui/\">\n <a-icon type=\"dashboard\"></a-icon>\n <span>系统状态</s"
},
{
"path": "web/html/xui/component/inbound_info.html",
"chars": 3546,
"preview": "{{define \"inboundInfoStream\"}}\n<p>传输: <a-tag color=\"green\">[[ inbound.network ]]</a-tag></p>\n\n<template v-if=\"inbound.is"
},
{
"path": "web/html/xui/component/setting.html",
"chars": 1261,
"preview": "{{define \"component/settingListItem\"}}\n<a-list-item style=\"padding: 20px\">\n <a-row>\n <a-col :lg=\"24\" :xl=\"12\">"
},
{
"path": "web/html/xui/form/inbound.html",
"chars": 3370,
"preview": "{{define \"form/inbound\"}}\n<!-- base -->\n<a-form layout=\"inline\">\n <a-form-item label='{{ i18n \"remark\" }}'>\n <"
},
{
"path": "web/html/xui/form/protocol/dokodemo.html",
"chars": 659,
"preview": "{{define \"form/dokodemo\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"目标地址\">\n <a-input v-model.trim=\"inboun"
},
{
"path": "web/html/xui/form/protocol/http.html",
"chars": 316,
"preview": "{{define \"form/http\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"用户名\">\n <a-input v-model.trim=\"inbound.set"
},
{
"path": "web/html/xui/form/protocol/shadowsocks.html",
"chars": 779,
"preview": "{{define \"form/shadowsocks\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"加密方式\">\n <a-select v-model=\"inbound"
},
{
"path": "web/html/xui/form/protocol/socks.html",
"chars": 885,
"preview": "{{define \"form/socks\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"密码认证\">\n <a-switch :checked=\"inbound.sett"
},
{
"path": "web/html/xui/form/protocol/trojan.html",
"chars": 1962,
"preview": "{{define \"form/trojan\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"新增用户\">\n <a-row>\n <a-button t"
},
{
"path": "web/html/xui/form/protocol/vless.html",
"chars": 2576,
"preview": "{{define \"form/vless\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"新增用户\">\n <a-row>\n <a-button ty"
},
{
"path": "web/html/xui/form/protocol/vmess.html",
"chars": 920,
"preview": "{{define \"form/vmess\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"新增用户\">\n <a-row>\n <a-button ty"
},
{
"path": "web/html/xui/form/reality_settings.html",
"chars": 2345,
"preview": "{{define \"form/realitySettings\"}}\n<!-- reality enable -->\n<!-- <a-form layout=\"inline\" v-if=\"inbound.canEnableReality()\""
},
{
"path": "web/html/xui/form/sniffing.html",
"chars": 635,
"preview": "{{define \"form/sniffing\"}}\n<a-form layout=\"inline\">\n <a-form-item>\n <span slot=\"label\">\n sniffing\n <a-tool"
},
{
"path": "web/html/xui/form/stream/stream_grpc.html",
"chars": 203,
"preview": "{{define \"form/streamGRPC\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"serviceName\">\n <a-input v-model.tri"
},
{
"path": "web/html/xui/form/stream/stream_http.html",
"chars": 399,
"preview": "{{define \"form/streamHTTP\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"路径\">\n <a-input v-model.trim=\"inboun"
},
{
"path": "web/html/xui/form/stream/stream_kcp.html",
"chars": 1908,
"preview": "{{define \"form/streamKCP\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"伪装\">\n <a-select v-model=\"inbound.str"
},
{
"path": "web/html/xui/form/stream/stream_quic.html",
"chars": 1276,
"preview": "{{define \"form/streamQUIC\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"加密\">\n <a-select v-model=\"inbound.st"
},
{
"path": "web/html/xui/form/stream/stream_settings.html",
"chars": 1310,
"preview": "{{define \"form/streamSettings\"}}\n<!-- select stream network -->\n<a-form layout=\"inline\">\n <a-form-item label=\"传输\">\n "
},
{
"path": "web/html/xui/form/stream/stream_tcp.html",
"chars": 2966,
"preview": "{{define \"form/streamTCP\"}}\n<!-- tcp type -->\n<a-form layout=\"inline\">\n <a-form-item label=\"http 伪装\">\n <a-swit"
},
{
"path": "web/html/xui/form/stream/stream_ws.html",
"chars": 921,
"preview": "{{define \"form/streamWS\"}}\n<a-form layout=\"inline\">\n <a-form-item label=\"路径\">\n <a-input v-model.trim=\"inbound."
},
{
"path": "web/html/xui/form/stream_sockopt.html",
"chars": 2996,
"preview": "{{define \"form/streamSOCKOPT\"}}\n<!-- sockopt enable -->\n<!-- <a-form layout=\"inline\" v-if=\"inbound.canSockopt()\">\n <a"
},
{
"path": "web/html/xui/form/tls_settings.html",
"chars": 4449,
"preview": "{{define \"form/tlsSettings\"}}\n<!-- tls enable -->\n<a-form layout=\"inline\" v-if=\"inbound.canSetTls()\">\n <a-form-item l"
},
{
"path": "web/html/xui/inbound_info_modal.html",
"chars": 1856,
"preview": "{{define \"inboundInfoModal\"}}\n{{template \"component/inboundInfo\"}}\n<a-modal id=\"inbound-info-modal\" v-model=\"infoModal.v"
},
{
"path": "web/html/xui/inbound_modal.html",
"chars": 2323,
"preview": "{{define \"inboundModal\"}}\n<a-modal id=\"inbound-modal\" v-model=\"inModal.visible\" :title=\"inModal.title\" @ok=\"inModal.ok\"\n"
},
{
"path": "web/html/xui/inbounds.html",
"chars": 16125,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n @media (min-width: 769px) {\n .ant-layout-conte"
},
{
"path": "web/html/xui/index.html",
"chars": 27420,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n @media (min-width: 769px) {\n .ant-layout-conte"
},
{
"path": "web/html/xui/setting.html",
"chars": 8855,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n{{template \"head\" .}}\n<style>\n @media (min-width: 769px) {\n .ant-layout-conte"
},
{
"path": "web/job/check_inbound_job.go",
"chars": 518,
"preview": "package job\n\nimport (\n\t\"x-ui/logger\"\n\t\"x-ui/web/service\"\n)\n\ntype CheckInboundJob struct {\n\txrayService service.XraySe"
},
{
"path": "web/job/check_xray_running_job.go",
"chars": 404,
"preview": "package job\n\nimport \"x-ui/web/service\"\n\ntype CheckXrayRunningJob struct {\n\txrayService service.XrayService\n\n\tcheckTime i"
},
{
"path": "web/job/stats_notify_job.go",
"chars": 4804,
"preview": "package job\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"time\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\t\"x-ui/web/service\"\n"
},
{
"path": "web/job/xray_traffic_job.go",
"chars": 563,
"preview": "package job\n\nimport (\n\t\"x-ui/logger\"\n\t\"x-ui/web/service\"\n)\n\ntype XrayTrafficJob struct {\n\txrayService service.XraySer"
},
{
"path": "web/network/auto_https_listener.go",
"chars": 367,
"preview": "package network\n\nimport \"net\"\n\ntype AutoHttpsListener struct {\n\tnet.Listener\n}\n\nfunc NewAutoHttpsListener(listener net.L"
},
{
"path": "web/network/autp_https_conn.go",
"chars": 1189,
"preview": "package network\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"sync\"\n)\n\ntype AutoHttpsConn struct {\n\tnet.Conn\n\n"
},
{
"path": "web/service/config.json",
"chars": 2722,
"preview": "{\n \"api\": {\n \"services\": [\n \"HandlerService\",\n \"LoggerService\",\n \"StatsService\"\n ],\n \"tag\": \"ap"
},
{
"path": "web/service/inbound.go",
"chars": 5414,
"preview": "package service\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/util/common\"\n\t\"x-ui/xray\"\n\n\t\"gor"
},
{
"path": "web/service/panel.go",
"chars": 400,
"preview": "package service\n\nimport (\n\t\"os\"\n\t\"syscall\"\n\t\"time\"\n\t\"x-ui/logger\"\n)\n\ntype PanelService struct {\n}\n\nfunc (s *PanelService"
},
{
"path": "web/service/server.go",
"chars": 14174,
"preview": "package service\n\nimport (\n\t\"archive/zip\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t"
},
{
"path": "web/service/setting.go",
"chars": 7035,
"preview": "package service\n\nimport (\n\t_ \"embed\"\n\t\"errors\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"x-ui/database\"\n\t\"x-ui/d"
},
{
"path": "web/service/telegram.go",
"chars": 7984,
"preview": "package service\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"time\"\n\t\"x-ui/logger\"\n\t\"x-ui/util/common\"\n\n\ttgbotap"
},
{
"path": "web/service/user.go",
"chars": 1589,
"preview": "package service\n\nimport (\n\t\"errors\"\n\t\"x-ui/database\"\n\t\"x-ui/database/model\"\n\t\"x-ui/logger\"\n\n\t\"gorm.io/gorm\"\n)\n\ntype User"
},
{
"path": "web/service/xray.go",
"chars": 2393,
"preview": "package service\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"sync\"\n\t\"x-ui/logger\"\n\t\"x-ui/xray\"\n\n\t\"go.uber.org/atomic\"\n)\n\nvar p"
},
{
"path": "web/session/session.go",
"chars": 736,
"preview": "package session\n\nimport (\n\t\"encoding/gob\"\n\t\"x-ui/database/model\"\n\n\t\"github.com/gin-contrib/sessions\"\n\t\"github.com/gin-go"
},
{
"path": "web/translation/translate.en_US.toml",
"chars": 249,
"preview": "\"username\" = \"username\"\n\"password\" = \"password\"\n\"login\" = \"login\"\n\"confirm\" = \"confirm\"\n\"cancel\" = \"cancel\"\n\"close\" = \"c"
},
{
"path": "web/translation/translate.zh_Hans.toml",
"chars": 198,
"preview": "\"username\" = \"用户名\"\n\"password\" = \"密码\"\n\"login\" = \"登录\"\n\"confirm\" = \"确定\"\n\"cancel\" = \"取消\"\n\"close\" = \"关闭\"\n\"copy\" = \"复制\"\n\"copie"
},
{
"path": "web/translation/translate.zh_Hant.toml",
"chars": 198,
"preview": "\"username\" = \"用戶名\"\n\"password\" = \"密碼\"\n\"login\" = \"登錄\"\n\"confirm\" = \"確定\"\n\"cancel\" = \"取消\"\n\"close\" = \"關閉\"\n\"copy\" = \"複製\"\n\"copie"
},
{
"path": "web/web.go",
"chars": 9242,
"preview": "package web\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"embed\"\n\t\"html/template\"\n\t\"io\"\n\t\"io/fs\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"strco"
},
{
"path": "x-ui.service",
"chars": 274,
"preview": "[Unit]\nDescription=x-ui Service\nDocumentation=https://github.com/sing-web/x-ui\nAfter=network.target\nWants=network.target"
},
{
"path": "x-ui.sh",
"chars": 15097,
"preview": "#!/bin/bash\n\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nYELLOW='\\033[0;33m'\nPLAIN='\\033[0m'\n\nred() {\n echo -e \"\\033[31m\\033["
},
{
"path": "x-ui_CN.sh",
"chars": 12264,
"preview": "#!/bin/bash\n\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nYELLOW='\\033[0;33m'\nPLAIN='\\033[0m'\n\nred() {\n echo -e \"\\033[31m\\033["
},
{
"path": "xray/config.go",
"chars": 1583,
"preview": "package xray\n\nimport (\n\t\"bytes\"\n\t\"x-ui/util/json_util\"\n)\n\ntype Config struct {\n\tLogConfig json_util.RawMessage `js"
},
{
"path": "xray/inbound.go",
"chars": 971,
"preview": "package xray\n\nimport (\n\t\"bytes\"\n\t\"x-ui/util/json_util\"\n)\n\ntype InboundConfig struct {\n\tListen json_util.RawMessa"
},
{
"path": "xray/process.go",
"chars": 5151,
"preview": "package xray\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"os/exec\"\n\t\"regexp"
},
{
"path": "xray/traffic.go",
"chars": 106,
"preview": "package xray\n\ntype Traffic struct {\n\tIsInbound bool\n\tTag string\n\tUp int64\n\tDown int64\n}\n"
}
]
// ... and 3 more files (download for full content)
About this extraction
This page contains the full source code of the sing-web/x-ui GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 121 files (74.2 MB), approximately 518.0k tokens, and a symbol index with 2501 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.