Giter Club home page Giter Club logo

trojanserverbyxray's Introduction

TrojanServerByXray

警告⚠:此技术仅限用于个人搭建游戏加速器使用!!!若用于其他违法目的,后果自负!!!

利用Xray搭建trojan服务器,支持Clash/Xray最新标准,可选择过CDN

KVM/XEN机器执行(CentOS7):

yum install -y gcc wget && wget https://raw.githubusercontent.com/HXHGTS/TrojanServerByXray/main/trojan.c -O trojan.c && chmod +x trojan.c && gcc -o xray trojan.c && ./xray

OVZ机器执行(CentOS7):

yum install -y gcc wget && wget https://raw.githubusercontent.com/HXHGTS/TrojanServerByXray/main/trojan_no_kernel_update.c -O trojan.c && chmod +x trojan.c && gcc -o xray trojan.c && ./xray

KVM/XEN/LXC/OVZ机器执行(CentOS8):

yum install -y gcc wget && wget https://raw.githubusercontent.com/HXHGTS/TrojanServerByXray/main/trojan_centos8.c -O trojan.c && chmod +x trojan.c && gcc -o xray trojan.c && ./xray

KVM/XEN机器执行(Debian10):

apt update && apt install -y build-essential wget && wget https://raw.githubusercontent.com/HXHGTS/TrojanServerByXray/main/trojan_debian10.c -O trojan.c && chmod +x trojan.c && gcc -o xray trojan.c && ./xray

KVM/XEN机器执行(Debian11):

apt update && apt install -y build-essential wget && wget https://raw.githubusercontent.com/HXHGTS/TrojanServerByXray/main/trojan_debian11.c -O trojan.c && chmod +x trojan.c && gcc -o xray trojan.c && ./xray

OVZ/LXC机器执行(CentOS7/8):

apt update && apt install -y build-essential wget && wget https://raw.githubusercontent.com/HXHGTS/TrojanServerByXray/main/trojan_no_kernel_update.c -O trojan.c && chmod +x trojan.c && gcc -o xray trojan.c && ./xray

第一次点击安装后会自动升级系统内核并触发重启,重启后输入

./xray

脚本生成的二维码可以用trojan客户端扫描导入,trojan链接可以直接导入trojan客户端或在这里生成Clash链接以导入Clash

安装前准备:

1.一个域名,与服务器ip做好dns解析

2.该域名必须提前申请SSL证书用于加密(后续考虑加入自动申请证书),将证书(.cer/.crt/.pem)文件命名为1.pem,将私钥(.key/*.pem)文件命名为2.pem,放在/root目录下(SSL证书申请:腾讯云 阿里云 FreeSSL)

3.脚本仅支持CentOS7/CentOS8/Debian9/Debian10系统

4.脚本执行需要root权限登录系统,AWS等特殊机型打开root权限方法看这里

5.请在服务器后台防火墙放行tcp443(https)端口

6.CDN套用方法请参看CDN套用方法

trojanserverbyxray's People

Contributors

hxhgts avatar

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.