2023-10-08 22:32:54 +03:00
|
|
|
# easy-xray
|
2023-10-18 22:09:51 +03:00
|
|
|
|
2023-10-25 13:46:27 +03:00
|
|
|
*Script for Linux which makes XRay installation and configuration easy*
|
2023-10-18 22:09:51 +03:00
|
|
|
|
|
|
|
(todo) [Readme in Russian](README.ru.md)
|
2023-10-25 13:46:27 +03:00
|
|
|
|
2023-10-25 11:35:04 +03:00
|
|
|
(todo) [Readme in Chinese](README.cn.md)
|
2023-10-18 22:09:51 +03:00
|
|
|
|
|
|
|
[XRay (aka ProjectX)](https://xtls.github.io/en/) is a frontier solution to surpass the internet censorship. It can work as a server and as
|
2023-10-25 11:35:04 +03:00
|
|
|
a client, but it's configuration sometimes confusing for a newcomer. So, here is a script which helps to
|
2023-10-18 22:09:51 +03:00
|
|
|
|
2023-10-25 11:35:04 +03:00
|
|
|
- install/uninstall (todo: upgrade) *XRay*
|
|
|
|
- generate credentials and server/client configs
|
|
|
|
- (todo) add/delete users to the configs
|
2023-10-18 22:09:51 +03:00
|
|
|
|
|
|
|
First make the script `ex.sh` executable, then run it with a desired command. Use `./ex.sh help` to see the list of all available commands
|
2023-10-25 11:35:04 +03:00
|
|
|
and `./ex.sh install` to start interactive prompt which installs and configures *XRay*.
|
2023-10-18 22:09:51 +03:00
|
|
|
```
|
|
|
|
$ chmod +x ex.sh
|
|
|
|
$ ./ex.sh help
|
2023-10-25 11:35:04 +03:00
|
|
|
$ sudo ./ex.sh install
|
2023-10-18 22:09:51 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
|
|
|
For manipulations with configs, [jq](https://jqlang.github.io/jq/) is needed, it can be found in repositories of almost all popular Linux
|
|
|
|
distributives.
|
|
|
|
|
2023-10-25 11:35:04 +03:00
|
|
|
### How it works
|
|
|
|
|
2023-10-25 13:46:27 +03:00
|
|
|
With current configs, *XRay* creates a tunnel between the client (your laptop, phone etc.) and the server (your VPS). The tunnel uses *VLESS
|
|
|
|
Reality* protocol that obfuscates traffic and in our case imitates [grpc](https://en.wikipedia.org/wiki/GRPC). For the censor the tunnel
|
|
|
|
looks like a usual connection to a site. The server responses to https requests as some popular site thus it is not suspicious for an active
|
|
|
|
probing. On the client side *XRay* creates a socks proxy which can be used by your Telegram or web
|
|
|
|
browser like this:
|
2023-10-25 11:35:04 +03:00
|
|
|
|
|
|
|
![browser proxy: http/https proxy 127.0.0.1 at port 801, socks v5 host 127.0.0.1 at port 800](browser-proxy-settings.png)
|
|
|
|
|
2023-10-25 13:46:27 +03:00
|
|
|
Note that there is no additional encryption layer in VLESS; using it you rely on the encryption that the browser (Telegram app etc.) makes.
|
|
|
|
|
|
|
|
### Other clients
|
|
|
|
|
|
|
|
For Windows, MacOS or Android you can try Nekobox, v2rayNG or ? (TODO): tests and config generation for them.
|
|
|
|
|
2023-10-18 22:09:51 +03:00
|
|
|
### Acknowledgements
|
|
|
|
|
2023-10-25 11:35:04 +03:00
|
|
|
[This article (in Russian)](https://habr.com/ru/articles/731608/) helped me to install *XRay* for the first time.
|
2023-10-18 22:09:51 +03:00
|
|
|
[XRay config reference](https://xtls.github.io/en/config/) is brilliant and helped me much.
|
2023-10-25 11:35:04 +03:00
|
|
|
[Configs](https://github.com/XTLS/Xray-examples/tree/main/VLESS-gRPC-REALITY) on which the template configs are based.
|
2023-10-18 22:09:51 +03:00
|
|
|
|
2023-10-25 13:46:27 +03:00
|
|
|
(TODO) logging, choose domain names or geoip, configs for phone...
|