Code Monkey home page Code Monkey logo

xray-install's Introduction

XTLS Vision 安装指南

服务端

已有SSL证书

  • 将证书文件改名为 fullchain.cer,将私钥文件改名为 private.key,将它们上传到 /etc/ssl/private 目录,执行下面的命令
chown -R nobody:nogroup /etc/ssl/private

使用acme申请SSL证书

  • 点击查看详细步骤

  • 如果使用acme申请失败,请尝试使用cerbot

  • 备份已申请的SSL证书:进入 /etc/ssl/private 目录,下载证书文件 fullchain.cer 和私钥文件 private.key

  • SSL证书有效期是90天,acme每60天自动更新一次

具体步骤

  1. 安装Xray
  • Debian / Ubuntu
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --beta
  • 卸载Xray
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ remove --purge
  1. 安装Nginx
  • Debian 10/11/12
apt install -y gnupg2 ca-certificates lsb-release debian-archive-keyring && curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor > /usr/share/keyrings/nginx-archive-keyring.gpg && echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list && echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" > /etc/apt/preferences.d/99nginx && apt update -y && apt install -y nginx && mkdir -p /etc/systemd/system/nginx.service.d && echo -e "[Service]\nExecStartPost=/bin/sleep 0.1" > /etc/systemd/system/nginx.service.d/override.conf && systemctl daemon-reload
  • Ubuntu 18.04/20.04/22.04
apt install -y gnupg2 ca-certificates lsb-release ubuntu-keyring && curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor > /usr/share/keyrings/nginx-archive-keyring.gpg && echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list && echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" > /etc/apt/preferences.d/99nginx && apt update -y && apt install -y nginx && mkdir -p /etc/systemd/system/nginx.service.d && echo -e "[Service]\nExecStartPost=/bin/sleep 0.1" > /etc/systemd/system/nginx.service.d/override.conf && systemctl daemon-reload
  • 卸载Nginx
systemctl stop nginx && apt purge -y nginx && rm -r /etc/systemd/system/nginx.service.d/
  1. 下载配置
curl -Lo /usr/local/etc/xray/config.json https://raw.githubusercontent.com/chika0801/Xray-examples/main/VLESS-Vision-TLS/config_server.json && curl -Lo /etc/nginx/nginx.conf https://raw.githubusercontent.com/chika0801/Xray-examples/main/VLESS-Vision-TLS/nginx.conf
  1. 启动程序
systemctl restart xray && systemctl restart nginx && sleep 0.2 && systemctl status xray && systemctl status nginx
项目
程序 /usr/local/bin/xray
配置 /usr/local/etc/xray/config.json
geoip /usr/local/share/xray/geoip.dat
geosite /usr/local/share/xray/geosite.dat
重启 systemctl restart xray
状态 systemctl status xray
查看日志 journalctl -u xray -o cat -e
实时日志 journalctl -u xray -o cat -f

xray-install's People

Contributors

chika0801 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

xray-install's Issues

This error message is about the failure to download the geosite.dat and geoip.dat files due to an issue with the URL specified in the curl command.

curl -Lo /usr/local/share/xray/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat && curl -Lo /usr/local/share /xray/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4990k 100 4990k 0 0 5176k 0 --:--:-- --:--:-- --:--:-- 25.2M
curl: (3) URL using bad/illegal format or missing URL
Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: " to save to a file.


This error message is indicating that there was a problem with the URL specified in the curl command. It seems to be a typo error. The correct command to download the geosite.dat and geoip.dat files is:


curl -Lo /usr/local/share/xray/geoip.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat

curl -Lo /usr/local/share/xray/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat

反向代理www.lovelive-anime.jp失败

之前的小鸡部署后可以反向代理 亚马逊🇸🇬的小鸡dd debian11后 部署好了可以使用微屁恩 但是反向代理www.lovelive-anime.jp失败 出现502错误 我应该怎么排查呢 看nginx配置里也有

修改配置文件重启服务报错

"log": {
"loglevel": "warning",
"access": "/usr/local/etc/xray/access.log",
"error": "/usr/local/etc/xray/error.log"
},

我想要查看访问信息 加了上面两行重启xray后会报错

按照教程步骤配置了,客户端连接不上

配置了rprx-vision,服务器配置:
f563f52605e7a7510d27beaa163e391
9c7b496ea61a4be12a73f2878744f10

客户端配置:
4e707e9d6ff4c560499a08b5053b880
客户端连接,报错误:app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: failed to find an available destination > common/retry: [dial tcp XXX.XXX.XXX.XXX:443(或者服务器客户端都改为6868、其它端口号,都是错误): connectex: No connection could be made because the target machine actively refused it.] > common/retry: all retry attempts failed。
这个问题该怎么解决呢?

反馈规则问题

发现规则对google服务支持有问题,包括无法翻译,无法登录账号,新标签页面右上角图标显示不全,google搜索天气页面显示破图
Snipaste_2022-04-10_08-55-29
以为是浏览器问题,我还把浏览器恢复设置也没解决,最后一想难道是规则问题。就找来免费节点试下,发现正常。
再把自用节点重新搭建,使用x-ui面板。相同配置恢复正常

echo -e "[Service]\nExecStartPost=/bin/sleep 0.1" > /etc/systemd/ system/nginx.service.d/override.conf -bash: /etc/systemd/: Is a directory

The error message is indicating that "/etc/systemd/" is a directory, not a file. The > symbol in the command is used to redirect the output of the echo command to a file, and in this case, it is trying to create a file called "system/nginx.service.d/override.conf" inside the "/etc/systemd/" directory.

To resolve the error, you can use the following command instead to create the file "override.conf" in the correct location:

sudo bash -c "echo -e \"[Service]\nExecStartPost=/bin/sleep 0.1\" > /etc/systemd/system/nginx.service.d/override.conf"

This will create the file "/etc/systemd/system/nginx.service.d/override.conf" with the specified contents.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.