JimhHan
4 years ago
16 changed files with 8945 additions and 0 deletions
@ -0,0 +1,116 @@
|
||||
# Logs |
||||
logs |
||||
*.log |
||||
npm-debug.log* |
||||
yarn-debug.log* |
||||
yarn-error.log* |
||||
lerna-debug.log* |
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html) |
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
||||
|
||||
# Runtime data |
||||
pids |
||||
*.pid |
||||
*.seed |
||||
*.pid.lock |
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover |
||||
lib-cov |
||||
|
||||
# Coverage directory used by tools like istanbul |
||||
coverage |
||||
*.lcov |
||||
|
||||
# nyc test coverage |
||||
.nyc_output |
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) |
||||
.grunt |
||||
|
||||
# Bower dependency directory (https://bower.io/) |
||||
bower_components |
||||
|
||||
# node-waf configuration |
||||
.lock-wscript |
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html) |
||||
build/Release |
||||
|
||||
# Dependency directories |
||||
node_modules/ |
||||
jspm_packages/ |
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/) |
||||
web_modules/ |
||||
|
||||
# TypeScript cache |
||||
*.tsbuildinfo |
||||
|
||||
# Optional npm cache directory |
||||
.npm |
||||
|
||||
# Optional eslint cache |
||||
.eslintcache |
||||
|
||||
# Microbundle cache |
||||
.rpt2_cache/ |
||||
.rts2_cache_cjs/ |
||||
.rts2_cache_es/ |
||||
.rts2_cache_umd/ |
||||
|
||||
# Optional REPL history |
||||
.node_repl_history |
||||
|
||||
# Output of 'npm pack' |
||||
*.tgz |
||||
|
||||
# Yarn Integrity file |
||||
.yarn-integrity |
||||
|
||||
# dotenv environment variables file |
||||
.env |
||||
.env.test |
||||
|
||||
# parcel-bundler cache (https://parceljs.org/) |
||||
.cache |
||||
.parcel-cache |
||||
|
||||
# Next.js build output |
||||
.next |
||||
out |
||||
|
||||
# Nuxt.js build / generate output |
||||
.nuxt |
||||
dist |
||||
|
||||
# Gatsby files |
||||
.cache/ |
||||
# Comment in the public line in if your project uses Gatsby and not Next.js |
||||
# https://nextjs.org/blog/next-9-1#public-directory-support |
||||
# public |
||||
|
||||
# vuepress build output |
||||
.vuepress/dist |
||||
|
||||
# Serverless directories |
||||
.serverless/ |
||||
|
||||
# FuseBox cache |
||||
.fusebox/ |
||||
|
||||
# DynamoDB Local files |
||||
.dynamodb/ |
||||
|
||||
# TernJS port file |
||||
.tern-port |
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions |
||||
.vscode-test |
||||
|
||||
# yarn v2 |
||||
.yarn/cache |
||||
.yarn/unplugged |
||||
.yarn/build-state.yml |
||||
.yarn/install-state.gz |
||||
.pnp.* |
@ -0,0 +1,41 @@
|
||||
module.exports = { |
||||
plugins: [ |
||||
'@vuepress/back-to-top' |
||||
], |
||||
locales: { |
||||
'/': { |
||||
lang: 'zh-CN', |
||||
title: 'Project X', |
||||
description: 'Xray 官方文档' |
||||
} |
||||
}, |
||||
themeConfig: { |
||||
displayAllHeaders: true, |
||||
smoothScroll: true, |
||||
repo: 'xtls/xray-core', |
||||
repoLabel: '查看源码', |
||||
docsRepo: 'xtls/xtls.github.io', |
||||
editLinks: true, |
||||
editLinkText: '帮助我们改善此页面!', |
||||
nav: [ |
||||
{ text: '首页', link: '/' }, |
||||
{ text: '大史记', link: '/about/news' }, |
||||
{ text: '经典文档', link: 'https://xtls.github.io' }, |
||||
{ text: '下载核心', link: 'https://github.com/XTLS/Xray-core/releases' }, |
||||
{ |
||||
text: '多语言', |
||||
ariaLabel: 'Language Menu', |
||||
items: [ |
||||
{ text: '简体中文', link: '/' }, |
||||
{ text: 'English', link: '/en' } |
||||
] |
||||
}, |
||||
|
||||
], |
||||
}, |
||||
markdown: { |
||||
toc: { |
||||
includeLevel: [2] |
||||
} |
||||
} |
||||
} |
After Width: | Height: | Size: 257 KiB |
After Width: | Height: | Size: 90 KiB |
@ -0,0 +1,5 @@
|
||||
blockquote { |
||||
color #000 |
||||
background-color #f3f5f7 |
||||
border-left 4px solid #17a2b8 |
||||
} |
@ -0,0 +1,210 @@
|
||||
--- |
||||
title: 大史记 |
||||
lang: zh-CN |
||||
sidebar: auto |
||||
--- |
||||
|
||||
|
||||
# 大史记 |
||||
|
||||
## 2021.01.25 |
||||
- 全互联网最好最详细的秘籍入门篇同学们练熟了吗? 🍉老师开始连载[秘籍第一层](../../documents/level-1/)咯... |
||||
- [英文版文档网站](/en)逐渐增加内容ing, 感谢各位大佬的辛苦付出~! |
||||
|
||||
|
||||
|
||||
## 2021.01.22 |
||||
|
||||
### [v1.2.3](https://github.com/XTLS/Xray-core/releases/tag/v1.2.3) |
||||
|
||||
- 对 SS 协议的支持**又**变强了, 支持单端口多用户! |
||||
- 对 trojan 协议的支持也**又**变强了, trojan 的回落也解锁 SNI 分流的新姿势啦~! |
||||
- _(VLESS: 嘤嘤嘤)_ |
||||
- UDP 奇奇怪怪的 BUG 被干掉了, 一个字, "稳定". |
||||
- 嗅探可以排除你不想嗅探的域名, 可以开启一些新玩法. |
||||
- 向发现问题->开issue->自行测试->自行分析->自行找到问题->自行解决->然后给上下游提交PR的大佬 <img src="https://avatars2.githubusercontent.com/u/8384161?s=32" width="32px" height="32px" alt="a"/> [@Bohan Yang](https://github.com/bohanyang) 致敬! |
||||
- 其他美味小樱桃, 惯例更新品尝就对啦. |
||||
|
||||
|
||||
|
||||
## 2021.01.19 |
||||
- 一些数字 |
||||
- 版本发布了 10 个 tag |
||||
- 解决掉了 100 个 issue |
||||
- 复刻了 300 个 fork |
||||
- 点了 2000 个 star |
||||
- 群 3000 个 人 |
||||
|
||||
|
||||
|
||||
## 2021.01.17 |
||||
- 辛苦的翻译工作开始了, 感谢<img src="https://avatars2.githubusercontent.com/u/60207794?s=32" width="32px" height="32px" alt="a"/> [@玖柒Max](https://github.com/jiuqi9997)和其他所有的翻译大佬们. |
||||
- [English version](https://xtls.github.io/en/) |
||||
|
||||
|
||||
|
||||
## 2021.01.15 |
||||
### [v1.2.2](https://github.com/XTLS/Xray-core/releases/tag/v1.2.2) |
||||
|
||||
- 回落分流又解锁了奇怪的新姿势! 回落中可以根据 SNI 分流啦~! |
||||
- 之前预告的 UUID 修改正式上线.([往下看往下看](#2021.01.12)) |
||||
- 日志现在看起来比上一次顺眼又更顺眼了一丢丢. |
||||
- 远程 DOH 和其他的DNS模式一样学会了走路由分流. |
||||
- 当然还有其他各种小糖果.(更新品尝就对了) |
||||
- 啊, 还有, 世界上第一個 M1 上跑起 Xray 的男人是 Anthony TSE |
||||
|
||||
|
||||
|
||||
## 2021.01.12 |
||||
|
||||
- 将要到来的 UUID 修改, 支持自定义字符串和 UUID 之间的映射. 这意味着你将可以这样在配置文件中写id来对应用户. |
||||
- 客户端写 "id": "我爱🍉老师1314", |
||||
- 服务端写 "id": "5783a3e7-e373-51cd-8642-c83782b807c5" (此UUID是 `我爱🍉老师1314` 的 UUID 映射) |
||||
- 🍉老师的[小小白白话文](../../documents/level-0/)大结局, 撒花. |
||||
|
||||
|
||||
|
||||
## 2021.01.10 |
||||
|
||||
- [小小白白话文](../../documents/level-0/)连载上线啦,🍉老师呕心沥血之作, 手把手教你从什么都不会到熟练配置Xray! |
||||
- (可能是整个互联网上, 最详细最有耐心的教你从0开始配置的教程) |
||||
- [透明代理](../../documents/level-2/)也增加了更多文章. |
||||
- 还有很多细节修改, 文档将会越来越规范! |
||||
- 感谢 [@ricuhkaen](https://github.com/ricuhkaen) , [@BioniCosmos](https://github.com/BioniCosmos), [@kirin](https://github.com/kirin10000) |
||||
|
||||
### [v1.2.1](https://github.com/XTLS/Xray-core/releases/tag/v1.2.1) |
||||
|
||||
- 大量的 UDP 相关修复, 甚至可以在育碧的土豆服务器上玩彩虹六号! |
||||
- Google Voice 应该也可以正常使用 v2rayNG 拨打了. |
||||
- 日志现在看起来更顺眼. |
||||
|
||||
## 2021.01.07 |
||||
|
||||
- 礼貌和尊重本应是社区不需要明说的准则之一。 |
||||
|
||||
## 2021.01.05 |
||||
|
||||
- 文档网站正在悄悄的进行着某些神秘的变化。。。,🙊🙊🙊 |
||||
|
||||
## 2021.01.03 |
||||
|
||||
- 文档仓库第一个PR。🎉<br> |
||||
[透明代理(TProxy)配置教程 ](../../documents/level-2/tproxy) ,感谢<img src="https://avatars2.githubusercontent.com/u/41363844?s=32" width="32px" height="32px" alt="a"/> [@BioniCosmos](https://github.com/BioniCosmos) |
||||
- tg群突破2500。 |
||||
|
||||
|
||||
|
||||
## 2021.01.01 |
||||
|
||||
【祝大家新年快乐,嗨皮牛耶!】🎆🎇🎆 |
||||
|
||||
### [v1.2.0](https://github.com/XTLS/Xray-core/releases/tag/v1.2.0) |
||||
|
||||
🎁在元旦的最后几分钟,v1.2.0它来了,带着周五必更的惯例,带着各位贡献大佬的心血以及 @rprxx 的黑眼圈,不负众望的来了! |
||||
- 圣诞礼物[v1.1.5](#20201225)后的元旦礼物🎁,游戏玩家大福利,全面 FullCone。 |
||||
- (UDP还会继续增强!) |
||||
- 如果你已经拆过圣诞礼物,这次还有比圣诞礼物更精美的包装和小糖果哦。(同样不用问,更新品尝就对了) |
||||
- (不,下面不是广告,是里程碑。) |
||||
- Xray 是有史以来第一个不受限制的多协议平台:只需 Xray 即可解决问题,无需借力其它实现。 |
||||
- 一人扛起了所有!支持各大主流协议! |
||||
- 一骑绝尘的性能! |
||||
- 日趋完善的功能! |
||||
- 可怕的生命力与社区亲和力! |
||||
- Xray 将继续保持前行! 因此 [Xray 需要更多的英雄!!](https://github.com/XTLS/Xray-core/discussions/56)! |
||||
- PS:请品,请细品[release notes](https://github.com/XTLS/Xray-core/releases/tag/v1.2.0)每一句。似乎有一个小秘密小彩蛋 ~~(啊,有人敲门...我一会和你们说)~~ |
||||
|
||||
## 2020.12.29 |
||||
|
||||
透明代理的游戏玩家利好! Xray-core tproxy 入站, socks出站 UDP FullCone 测试版, [TG群](https://t.me/projectXray)火热测试中 |
||||
|
||||
## 2020.12.25 |
||||
|
||||
圣诞节快乐! |
||||
|
||||
### [v1.1.5](https://github.com/XTLS/Xray-core/releases/tag/v1.1.5) |
||||
|
||||
- 游戏玩家的圣诞礼物!你可以用xray爽快的打游戏啦!因为有了 SS/trojan UDP fullcone |
||||
- 你可以用你喜欢的格式写配置文件了,比如yaml,比如toml... |
||||
- (VLESS 的 UDP fullcone和更多增强很快就到!) |
||||
- 无须再担心证书验证被墙,OCSP stapling 已经上线! |
||||
- kirin带来了一大波 脚本更新.[脚本在此](https://github.com/XTLS/Xray-install) |
||||
- 还有更多美味小樱桃!(不用问,更新品尝就对了) |
||||
|
||||
|
||||
## 2020.12.24 |
||||
|
||||
因为某些不可描述的原因,Xray 的文档网站已在发布日前偷跑上线。<br> |
||||
网址为:[没错你正在看的就是](https://xtls.github.io) |
||||
|
||||
大家可以查阅各种内容也欢迎纠错/提出建议(可发往文档github仓库的issue区) |
||||
|
||||
文档网站需要不断完善和增加内容,以及完善设计。<br> |
||||
因此更欢迎大家一起为文档建设添砖加瓦。<br> |
||||
[文档的仓库](https://github.com/XTLS/XTLS.github.io) |
||||
|
||||
仓库的readme中有简略教程说明如何帮助xray改进文档网站.<br> |
||||
欢迎大家查看,纠错,修改,增加心得。 |
||||
|
||||
## 2020.12.23 |
||||
|
||||
Xray-core Shadowsocks UDP FullCone 测试版, [TG群](https://t.me/projectXray)火热测试中 |
||||
|
||||
## 2020.12.21 |
||||
|
||||
- Project X 群人数 2000+ |
||||
- 群消息(含游戏群) 日均破万 |
||||
|
||||
## 2020.12.18 |
||||
|
||||
### [v1.1.4](https://github.com/XTLS/Xray-core/releases/tag/v1.1.4) |
||||
|
||||
- 更低的启动内占用和内存使用优化 |
||||
- 随意定制的 TLS 提高你的SSL评级 |
||||
- 支持 XTLS 入站的 Splice 以及支持 trojan 的 XTLS |
||||
- 还有在您路由器上使用的Splice最佳使用模式建议 |
||||
|
||||
## 2020.12.17 |
||||
|
||||
鉴于日益增长群人数和游戏需求, 开启了[TG游戏群](https://t.me/joinchat/UO4NixbB_XDQJOUjS6mHEQ) |
||||
|
||||
## 2020.12.15 |
||||
|
||||
[安装脚本dev分支](https://github.com/XTLS/Xray-install/tree/dev)开启, 持续更新功能中. |
||||
|
||||
## 2020.12.11 |
||||
|
||||
### [v1.1.3](https://github.com/XTLS/Xray-core/releases/tag/v1.1.3) |
||||
|
||||
- 完整版本的 REDIRECT 透明代理模式. |
||||
- 软路由 splice 流控模式的优化建议. |
||||
|
||||
## 2020.12.06 |
||||
|
||||
### [v1.1.2](https://github.com/XTLS/Xray-core/releases/tag/v1.1.2) |
||||
|
||||
- 流控增加 splice 模式, Linux限定, 性能一骑绝尘. |
||||
- 增强了 API 兼容 |
||||
|
||||
## 2020.12.04 |
||||
|
||||
增加 splice 模式 |
||||
|
||||
## 2020.11.27 |
||||
|
||||
- Project X 的 GitHub 主仓库 Xray-core 已获 500+ stars |
||||
- 登上了 GitHub Trending |
||||
- Project X 群人数破千,频道订阅数 500+ |
||||
|
||||
## 2020.11.25 |
||||
|
||||
### [v1.0.0](https://github.com/XTLS/Xray-core/releases/tag/v1.0.0) |
||||
|
||||
Xray的第一个版本. |
||||
- 基于 v2ray-core 修改而来,改动较大 |
||||
- 全面增强, 性能卓越, 完全兼容 |
||||
|
||||
## 2020.11.23 |
||||
|
||||
project X start |
||||
|
||||
> ~~梦开始的时候~~ |
@ -0,0 +1,75 @@
|
||||
--- |
||||
title: 编译文档 |
||||
lang: zh-CN |
||||
--- |
||||
|
||||
## 前序工作 |
||||
|
||||
Xray 使用 [Golang](https://golang.org/) 作为编程语言,你需要先安装最新版本 Golang 才能够编译。 |
||||
|
||||
::: tip TIP |
||||
安装 Golang: [golang.org/doc/install](https://golang.org/doc/install) |
||||
::: |
||||
|
||||
> 如果你不幸使用 Windows, 请 **务必** 使用 Powershell |
||||
|
||||
## 拉取 Xray 源代码 |
||||
|
||||
```bash |
||||
git clone https://github.com/XTLS/Xray-core.git |
||||
cd Xray-core && go mod download |
||||
``` |
||||
|
||||
> 如果你闲的没事干,可以试试 GitHub 官方工具: `gh repo clone XTLS/Xray-core` |
||||
|
||||
注意:在无法正常访问 Google 的网络环境,依赖无法被正常拉取,需要先设置 `GOPROXY`: |
||||
|
||||
```bash |
||||
go env -w GOPROXY=https://goproxy.io,direct |
||||
``` |
||||
|
||||
## 构建二进制 |
||||
|
||||
:::warning |
||||
本小节的命令需要在 Xray 根目录内运行。 |
||||
::: |
||||
|
||||
### Windows(Powershell): |
||||
|
||||
```powershell |
||||
$env:CGO_ENABLED=0 |
||||
go build -o xray.exe -trimpath -ldflags "-s -w -buildid=" ./main |
||||
``` |
||||
|
||||
### macOS, Linux: |
||||
|
||||
```bash |
||||
CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main |
||||
``` |
||||
|
||||
运行以上命令会在目录下生成 xray 可执行文件。 |
||||
|
||||
## 交叉编译: |
||||
|
||||
这里以在 Windows(Powershell) 环境中,编译到 Linux 服务器为例: |
||||
|
||||
```powershell |
||||
$env:CGO_ENABLED=0 |
||||
$env:GOOS="linux" |
||||
$env:GOARCH="amd64" |
||||
|
||||
go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main |
||||
``` |
||||
上传到服务器后,记得在服务器终端内执行 chmod +x v2ray 和 chmod +x v2ctl |
||||
|
||||
::: tip |
||||
执行 `go tool dist list` 查看所有支持的系统与架构。 |
||||
::: |
||||
|
||||
## 可复现构建: |
||||
|
||||
按照上述步骤,能够编译出与 Release 中相同的二进制文件。 |
||||
|
||||
::: warning |
||||
请先确认您使用的 Golang 与编译 Release 一致。 |
||||
::: |
@ -0,0 +1,29 @@
|
||||
--- |
||||
title: 快速入门 |
||||
--- |
||||
|
||||
> **这个章节将告诉您如何用最简单的方式获得Xray,并且开始使用Xray.** |
||||
|
||||
## 下载安装 |
||||
|
||||
Xray支持各种平台,并且您可以从多种渠道和方式获得Xray的各种版本. |
||||
|
||||
请点击[如何下载安装Xray](./install)以获取Xray |
||||
|
||||
## 配置运行 |
||||
|
||||
下载并安装Xray后,只需对他进行配置即可使用. |
||||
|
||||
请点击[如何配置运行Xray](./config)以学习最简单的配置方式. |
||||
|
||||
## 命令参数 |
||||
|
||||
Xray有多种命令和参数可用,因此变得灵活和强大. |
||||
|
||||
请点击[Xray的命令参数](./command)查看Xray的更多命令和参数用法. |
||||
|
||||
## 使用文档 |
||||
|
||||
您正在查看的是 Project X 的文档网站. 您可以了解更多网站的使用方式, 或是帮助我们改进文档质量. |
||||
|
||||
请点击[使用文档](./document)进一步查看相关内容 |
@ -0,0 +1,117 @@
|
||||
--- |
||||
lang: zh-CN |
||||
title: 命令参数 |
||||
--- |
||||
|
||||
::: tip |
||||
Xray 使用 go 风格的命令及参数 |
||||
::: |
||||
|
||||
## 获取基本命令 |
||||
|
||||
您可以运行 xray help 来获得所有 xray 最基础的用法, 以及可用的命令及说明. |
||||
|
||||
``` |
||||
Xray is a platform for building proxies. |
||||
|
||||
Usage: |
||||
|
||||
xray <command> [arguments] |
||||
|
||||
The commands are: |
||||
|
||||
run Run Xray with config, the default command |
||||
version Show current version of Xray |
||||
api Call an API in an Xray process |
||||
tls TLS tools |
||||
uuid Generate new UUIDs |
||||
|
||||
Use "xray help <command>" for more information about a command. |
||||
``` |
||||
|
||||
### xray run |
||||
|
||||
指定一个或多个配置文件,并运行。 |
||||
|
||||
使用方法: |
||||
``` |
||||
xray run [-c config.json] [-confdir dir] |
||||
``` |
||||
|
||||
``` |
||||
Run Xray with config, the default command. |
||||
|
||||
The -config=file, -c=file flags set the config files for |
||||
Xray. Multiple assign is accepted. |
||||
|
||||
The -confdir=dir flag sets a dir with multiple json config |
||||
|
||||
The -format=json flag sets the format of config files. |
||||
Default "json". |
||||
|
||||
The -test flag tells Xray to test config files only, |
||||
without launching the server |
||||
``` |
||||
|
||||
### xray version |
||||
|
||||
输出 Xray 版本、 Golang 版本等信息。 |
||||
|
||||
使用方法: |
||||
``` |
||||
xray version |
||||
``` |
||||
|
||||
|
||||
|
||||
### xray api |
||||
|
||||
调用 Xray 的 gRPC API,需要在配置文件中开启。 |
||||
|
||||
使用方法: |
||||
``` |
||||
xray api <command> [arguments] |
||||
``` |
||||
|
||||
``` |
||||
restartlogger Restart the logger |
||||
stats Get statistics |
||||
statsquery Query statistics |
||||
statssys Get system statistics |
||||
adi Add inbounds |
||||
ado Add outbounds |
||||
rmi Remove inbounds |
||||
rmo Remove outbounds |
||||
``` |
||||
|
||||
### xray tls |
||||
|
||||
一些与 TLS 相关的工具。 |
||||
|
||||
使用方法: |
||||
``` |
||||
xray tls <command> [arguments] |
||||
``` |
||||
|
||||
``` |
||||
cert Generate TLS certificates |
||||
ping Ping the domain with TLS handshake |
||||
``` |
||||
|
||||
### xray uuid |
||||
|
||||
生成 UUID。 |
||||
|
||||
使用方法: |
||||
``` |
||||
xray uuid |
||||
``` |
||||
|
||||
|
||||
|
||||
::: tip |
||||
当`-config`没有指定时,Xray 将先后尝试从以下路径加载`config.json`: |
||||
- 工作目录(Working Directory) |
||||
- [环境变量](../config/env)中`Xray.location.asset`所指定的路径 |
||||
::: |
||||
|
@ -0,0 +1,103 @@
|
||||
--- |
||||
lang: zh-CN |
||||
title: 配置运行 |
||||
--- |
||||
|
||||
[下载并安装](../install) 了 Xray 之后,您需要对它进行一下配置。 |
||||
|
||||
为了演示,这里只介绍简单的配置方式. |
||||
|
||||
如需配置更复杂的功能,请参考更详细的 [配置文件](../../config) 中相关说明。 |
||||
|
||||
## 服务端配置 |
||||
|
||||
你需要一台防火墙外的服务器,来运行服务器端的 Xray。配置如下: |
||||
|
||||
```json |
||||
{ |
||||
"inbounds": [ |
||||
{ |
||||
"port": 10086, // 服务器监听端口 |
||||
"protocol": "vmess", |
||||
"settings": { |
||||
"clients": [ |
||||
{ |
||||
"id": "b831381d-6324-4d53-ad4f-8cda48b30811" |
||||
} |
||||
] |
||||
} |
||||
} |
||||
], |
||||
"outbounds": [ |
||||
{ |
||||
"protocol": "freedom" |
||||
} |
||||
] |
||||
} |
||||
``` |
||||
|
||||
服务器的配置中需要确保 `id` 和端口与客户端一致,就可以正常连接了。 |
||||
|
||||
## 客户端配置 |
||||
|
||||
在你的 PC(或手机)中,需要用以下配置运行 Xray : |
||||
|
||||
```json |
||||
{ |
||||
"inbounds": [ |
||||
{ |
||||
"port": 1080, // SOCKS 代理端口,在浏览器中需配置代理并指向这个端口 |
||||
"listen": "127.0.0.1", |
||||
"protocol": "socks", |
||||
"settings": { |
||||
"udp": true |
||||
} |
||||
} |
||||
], |
||||
"outbounds": [ |
||||
{ |
||||
"protocol": "vmess", |
||||
"settings": { |
||||
"vnext": [ |
||||
{ |
||||
"address": "server", // 服务器地址,请修改为你自己的服务器 ip 或域名 |
||||
"port": 10086, // 服务器端口 |
||||
"users": [ |
||||
{ |
||||
"id": "b831381d-6324-4d53-ad4f-8cda48b30811" |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
}, |
||||
{ |
||||
"protocol": "freedom", |
||||
"tag": "direct" |
||||
} |
||||
], |
||||
"routing": { |
||||
"domainStrategy": "IPOnDemand", |
||||
"rules": [ |
||||
{ |
||||
"type": "field", |
||||
"ip": ["geoip:private"], |
||||
"outboundTag": "direct" |
||||
} |
||||
] |
||||
} |
||||
} |
||||
``` |
||||
|
||||
上述配置唯一要更改的地方是你的服务器 IP,配置中已注明。上述配置会把除局域网(比如访问路由器)以外的所有流量转发至你的服务器。 |
||||
|
||||
## 运行 |
||||
|
||||
|
||||
- 在 Windows 和 macOS 中,配置文件通常是 Xray 同目录下的 `config.json` 文件。 |
||||
- 直接运行 `Xray` 或 `Xray.exe` 即可。 |
||||
- 在 Linux 中,配置文件通常位于 `/etc/xray/` 或 `/usr/local/etc/xray/` 目录下。 |
||||
- 运行 `xray run -c /etc/xray/config.json` |
||||
- 或使用 systemd 等工具将 Xray 作为服务在后台运行。 |
||||
|
||||
更多详细的说明可以参考 [配置文档](../../config) 和 [使用心得](../../documents)。 |
@ -0,0 +1,36 @@
|
||||
--- |
||||
title: 使用文档 |
||||
lang: zh-CN |
||||
--- |
||||
|
||||
## 改进文档 |
||||
|
||||
Project X 的文档托管在[github](https://github.com/XTLS/XTLS.github.io)上. |
||||
|
||||
您可以通过以下步骤, 提交您对文档的改动: |
||||
|
||||
1. 从[project X 文档仓库](https://github.com/XTLS/XTLS.github.io)打开仓库, 点击右上角的 fork, fork 一份文档仓库的镜像到您自己的 github 仓库. |
||||
|
||||
|
||||
2. 使用任何您喜欢的工具, 从您克隆的仓库获得文档的克隆, 如: |
||||
``` |
||||
git clone https://github.com/yours/XTLS.github.io |
||||
``` |
||||
|
||||
3. 基于 main 分支创建新的分支, 如: |
||||
``` |
||||
git checkout -b your-branch |
||||
``` |
||||
|
||||
4. 在新分支上做修改, 完成后提交修改 |
||||
|
||||
5. 推送创建的分支到您的仓库 |
||||
``` |
||||
git push -u origin your-branch |
||||
``` |
||||
|
||||
6. 打开 github, 点击 'Pull request' 向 [project X 文档仓库](https://github.com/XTLS/XTLS.github.io)发出PR. |
||||
|
||||
7. 请在 PR 的标题和正文中,概述此次 PR 新增/修改的内容等; |
||||
|
||||
8. 等待回应, 如果 PR 被 merge, 您做的修改将直接呈现在 [Project X 文档网站](https://xtls.github.io)。 |
@ -0,0 +1,91 @@
|
||||
--- |
||||
date: "2020-12-23T00:00:00.000Z" |
||||
description: Project X 的文档. |
||||
title: 下载安装 |
||||
weight: 1 |
||||
--- |
||||
|
||||
## 平台支持 |
||||
|
||||
|
||||
Xray 在以下平台中可用: |
||||
|
||||
- Windows 7 及之后版本(x86 / amd64 / arm32); |
||||
- macOS 10.10 Yosemite 及之后版本(amd64); |
||||
- Linux 2.6.23 及之后版本(x86 / amd64 / arm / arm64 / mips64 / mips / ppc64 / s390x / riscv64); |
||||
- 包括但不限于 Debian 7 / 8、Ubuntu 12.04 / 14.04 及后续版本、CentOS 7 / 8、Arch Linux 等; |
||||
- FreeBSD (x86 / amd64); |
||||
- OpenBSD (x86 / amd64); |
||||
- Dragonfly BSD (amd64); |
||||
|
||||
## 下载 Xray |
||||
|
||||
|
||||
预编译的二进制 ZIP 格式压缩包可在 [Github Releases](https://github.com/xtls/Xray-core/releases) 中找到。 |
||||
|
||||
下载对应平台的压缩包,解压后即可使用。 |
||||
|
||||
## 验证安装包 |
||||
|
||||
|
||||
Xray 提供两种验证方式: |
||||
|
||||
- ZIP 压缩包的 SHA1 / SHA256 摘要 |
||||
- 可复现构建:请参照 [编译 Xray](../development/build.html) |
||||
|
||||
## Windows 安装方式 |
||||
|
||||
- 在 [Github Releases](https://github.com/xtls/Xray-core/releases) 下载适用于 Windows 平台的 ZIP 压缩包,解压后可得到可执行文件 `xray.exe`,然后[通过命令行带参数运行](../command) 即可 |
||||
- 通过 [Scoop](https://scoop.sh) 包管理器安装:Xray 已经被添加到 [Mochi](https://github.com/Qv2ray/mochi)。 |
||||
- 通过 [Chocolatey](https://chocolatey.org) 包管理器安装:[Xray](https://chocolatey.org/packages/xray/1.3.1),感谢 [Markson](https://chocolatey.org/profiles/markson_ho) |
||||
|
||||
## macOS 安装方式 |
||||
|
||||
- 在 [Github Releases](https://github.com/xtls/Xray-core/releases) 下载适用于 macOS 平台的 ZIP 压缩包,解压后可得到可执行文件 `xray`,然后[通过命令行带参数运行](../command) 即可 |
||||
- 通过 [Homebrew](https://brew.sh) 包管理器安装:<Badge text="WIP" type="warning"/> |
||||
|
||||
## Linux 安装方式 |
||||
|
||||
### 安装脚本 |
||||
|
||||
- Linux Script |
||||
- [Xray-install](https://github.com/XTLS/Xray-install) |
||||
- [Xray-script](https://github.com/kirin10000/Xray-script) |
||||
|
||||
- One Click |
||||
- [ProxySU](https://github.com/proxysu/ProxySU) |
||||
- [Xray-agent](https://github.com/mack-a/Xray-agent) |
||||
|
||||
- Magisk |
||||
- [Xray4Magisk](https://github.com/CerteKim/Xray4Magisk) |
||||
- [Xray_For_Magisk](https://github.com/E7KMbb/Xray_For_Magisk) |
||||
|
||||
|
||||
### Linux 发行版包管理器 |
||||
|
||||
|
||||
Linux 发行版 Xray 包(可通过发行版相应的包管理器安装): |
||||
|
||||
- Debian <Badge text="WIP" type="warning"/> |
||||
- Arch Linux <Badge text="WIP" type="warning"/> |
||||
|
||||
### Linuxbrew 包管理器 <Badge text="WIP" type="warning"/> |
||||
|
||||
## Docker 安装方式 |
||||
|
||||
- [teddysun/xray](https://hub.docker.com/r/teddysun/xray) |
||||
- Xray-docker |
||||
|
||||
### Docker image 的文件结构 |
||||
|
||||
|
||||
- `/etc/xray/config.json`:配置文件 |
||||
- `/usr/bin/xray`:Xray 主程序 |
||||
- `/usr/local/share/xray/geoip.dat`:IP 数据文件 |
||||
- `/usr/local/share/xray/geosite.dat`:域名数据文件 |
||||
|
||||
## 更多更多... |
||||
|
||||
您可以点击 [传送至众多大佬集结区的任意门](../../links) 获取更多资源 |
||||
|
||||
## FAQ <Badge text="WIP" type="warning"/> |
@ -0,0 +1,50 @@
|
||||
--- |
||||
lang: zh-CN |
||||
title: 链接 |
||||
--- |
||||
|
||||
## 安装脚本 |
||||
|
||||
- Linux Script |
||||
- [Xray-install](https://github.com/XTLS/Xray-install) |
||||
- [Xray-script](https://github.com/kirin10000/Xray-script) 感谢[@kirin](https://github.com/kirin10000) |
||||
- Docker |
||||
- [teddysun/xray](https://hub.docker.com/r/teddysun/xray) 感谢[@秋水逸冰](https://hub.docker.com/u/teddysun) |
||||
- Xray-docker <Badge text="WIP" type="warning"/> |
||||
- One Click |
||||
- [ProxySU](https://github.com/proxysu/ProxySU) 感谢[@ProxySu](https://github.com/proxysu) |
||||
- [Xray-agent](https://github.com/mack-a/Xray-agent) 感谢[@mack-a](https://github.com/mack-a) |
||||
- Magisk |
||||
- [Xray4Magisk](https://github.com/CerteKim/Xray4Magisk) 感谢[@子曦曦](https://github.com/CerteKim) |
||||
- [Xray_For_Magisk](https://github.com/E7KMbb/Xray_For_Magisk) 感谢[@E7KMbb](https://github.com/E7KMbb) |
||||
- Homebrew |
||||
- [Repository 0](https://github.com/N4FA/homebrew-xray) 感谢[@N4FA](https://github.com/N4FA) |
||||
- [Repository 1](https://github.com/xiruizhao/homebrew-xray) 感谢[@Xirui Zhao](https://github.com/xiruizhao) |
||||
|
||||
## 配置模板 |
||||
|
||||
所有的模板请传送至: [Xray-examples](https://github.com/XTLS/Xray-examples) |
||||
|
||||
包含了各种用法示范的**终极配置**: [VLESS-TCP-XTLS-WHATEVER](https://github.com/XTLS/Xray-examples/tree/main/VLESS-TCP-XTLS-WHATEVER) |
||||
|
||||
|
||||
## 图形化客户端 |
||||
|
||||
- OpenWrt |
||||
- [PassWall](https://github.com/xiaorouji/openwrt-passwall) |
||||
- [Hello World](https://github.com/jerrykuku/luci-app-vssr) |
||||
- [ShadowSocksR Plus+](https://github.com/fw876/helloworld) |
||||
- [luci-app-xray](https://github.com/yichya/luci-app-xray) ([openwrt-xray](https://github.com/yichya/openwrt-xray)) |
||||
- Windows |
||||
- [v2rayN](https://github.com/2dust/v2rayN) |
||||
- [Qv2ray](https://github.com/Qv2ray/Qv2ray) |
||||
- Android |
||||
- [v2rayNG](https://github.com/2dust/v2rayNG) |
||||
- [Kitsunebi](https://github.com/rurirei/Kitsunebi/tree/release_xtls) |
||||
- iOS / Mac |
||||
- [Shadowrocket](https://apps.apple.com/app/shadowrocket/id932747118) |
||||
|
||||
## UUID 生成器 |
||||
|
||||
第三方的 UUID 生成器 [uuidgenerator.net](https://www.uuidgenerator.net) |
||||
|
@ -0,0 +1,16 @@
|
||||
{ |
||||
"name": "Xray-docs-next", |
||||
"version": "1.0.0", |
||||
"main": "index.js", |
||||
"repository": "https://github.com/XTLS/Xray-docs-next.git", |
||||
"author": "Project X", |
||||
"license": "CC-BY-SA-4.0", |
||||
"devDependencies": { |
||||
"@vuepress/plugin-back-to-top": "^1.8.2", |
||||
"vuepress": "^1.8.2" |
||||
}, |
||||
"scripts": { |
||||
"docs:dev": "vuepress dev docs", |
||||
"docs:build": "vuepress build docs" |
||||
} |
||||
} |
Loading…
Reference in new issue