diff --git a/.gitignore b/.gitignore index 665f454..46e1112 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -config*.json +config_*.json diff --git a/README.md b/README.md index f6517ee..b47a89e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,23 @@ # easy-xray -*Script for Linux which make XRay installation and configuration easy.* +*Script for Linux which makes XRay installation and configuration easy.* (todo) [Readme in Russian](README.ru.md) +(todo) [Readme in Chinese](README.cn.md) [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 -a client, but it's configuration sometimes confusing for a newbie. So, here is a scripts which help +a client, but it's configuration sometimes confusing for a newcomer. So, here is a script which helps to -- install(todo /uninstall/update) *XRay* -- generate credentials and server/client config -- (todo) add/delete user and update config +- install/uninstall (todo: upgrade) *XRay* +- generate credentials and server/client configs +- (todo) add/delete users to the configs 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 -and `./ex.sh all` to start interactive prompt which installs and configures *XRay*. +and `./ex.sh install` to start interactive prompt which installs and configures *XRay*. ``` $ chmod +x ex.sh $ ./ex.sh help -$ sudo ./ex.sh all +$ sudo ./ex.sh install ``` ### Prerequisites @@ -24,9 +25,19 @@ $ sudo ./ex.sh all For manipulations with configs, [jq](https://jqlang.github.io/jq/) is needed, it can be found in repositories of almost all popular Linux distributives. +### How it works + +With current configs, *XRay* creates a [grpc](https://en.wikipedia.org/wiki/GRPC) tunnel between the client (your laptop, phone etc.) and +the server (your VPS). 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 +web browser, telegram or TorBrowser like that: + +![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) + ### Acknowledgements -[This article (in Russian)](https://habr.com/ru/articles/731608/) helped me install *XRay* for the first time. +[This article (in Russian)](https://habr.com/ru/articles/731608/) helped me to install *XRay* for the first time. [XRay config reference](https://xtls.github.io/en/config/) is brilliant and helped me much. +[Configs](https://github.com/XTLS/Xray-examples/tree/main/VLESS-gRPC-REALITY) on which the template configs are based. -(TODO) about, reality-vless, domains, browser settings, no encription(!), choose domain names or geoip +(TODO) about, reality-vless, domains, browser settings, no encription(!), choose domain names or geoip, configs for phone... diff --git a/browser-proxy-settings.png b/browser-proxy-settings.png new file mode 100644 index 0000000..92e631c Binary files /dev/null and b/browser-proxy-settings.png differ diff --git a/ex.sh b/ex.sh index 1251b01..e01a683 100755 --- a/ex.sh +++ b/ex.sh @@ -148,7 +148,6 @@ or is in the same country. Better if it is popular. fake_site="www.yahoo.com" fi echo -e "${green}mimic ${fake_site}${normal}" - port=80 email="love@xray.com" clients=" [ { @@ -171,7 +170,7 @@ or is in the same country. Better if it is popular. vnext=" [ { \"address\": \"${address}\", - \"port\": ${port}, + \"port\": 50051, \"users\": [ { \"id\": \"${id}\", diff --git a/template_config_client.json b/template_config_client.json index 605b4a6..17790ef 100644 --- a/template_config_client.json +++ b/template_config_client.json @@ -52,7 +52,7 @@ "vnext": [ { "address": "server_address", - "port": 80, + "port": 50051, "users": [ { "id": "client_id", diff --git a/template_config_server.json b/template_config_server.json index f1b8cc3..a048698 100644 --- a/template_config_server.json +++ b/template_config_server.json @@ -25,7 +25,7 @@ "inbounds": [ { "listen": "0.0.0.0", - "port": 80, + "port": 50051, "protocol": "vless", "settings": { "clients": [