lnmp搭建小木马教程

解析域名,购买小鸡,安装lnmp,添加虚拟主机,并申请好ssl证书,优化系统,开启bbr,此处省略几百字。

小木马下载地址 https://github.com/trojan-gfw/trojan/releases/download/v1.16.0/trojan-1.16.0-linux-amd64.tar.xz

解压后把 trojan 文件夹放到 /usr/src 目录。设置trojan文件775权限。创建一个 server.conf 文件,添加如下代码,密码和证书路径自己更改。

{
    "run_type": "server",
    "local_addr": "0.0.0.0",
    "local_port": 443,
    "remote_addr": "127.0.0.1",
    "remote_port": 80,
    "password": [
        "password"
    ],
    "log_level": 1,
    "ssl": {
        "cert": "/usr/local/nginx/conf/ssl/qn2.520guge.com/fullchain.cer",
        "key": "/usr/local/nginx/conf/ssl/qn2.520guge.com/qn2.520guge.com.key",
        "key_password": "",
        "cipher_tls13":"TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",
"prefer_server_cipher": true,
        "alpn": [
            "http/1.1"
        ],
        "reuse_session": true,
        "session_ticket": false,
        "session_timeout": 600,
        "plain_http_response": "",
        "curves": "",
        "dhparam": ""
    },
    "tcp": {
        "no_delay": true,
        "keep_alive": true,
        "fast_open": false,
        "fast_open_qlen": 20
    },
    "mysql": {
        "enabled": false,
        "server_addr": "127.0.0.1",
        "server_port": 3306,
        "database": "trojan",
        "username": "trojan",
        "password": ""
    }
}

lnmp搭建V2ray教程

购买一个域名和一台国外vps,并将域名解析到vps。搭建好 LNMP环境 ,php和数据库按个人需求安装。

lnmp安装完成以后,回到vps SSH窗口,执行命令

bash <(curl L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

执行完后,修改 v2ray 的默认配置文件,路径是 /usr/local/etc/v2ray

编辑config.json文件,打开文件后先删除里面的内容,再粘贴下面代码进去并保存

{
  "log": {
    "loglevel": "info",
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log"
  },
  "inbounds": [
    {
      "port": 10000,
      "listen":"127.0.0.1",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "000fe881-b655-4212-b804-b00f9970d5aa",
            "alterId": 64
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
        "path": "/happy"
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}