SSL 证书申请
证书申请成功
文本浏览器 lynx 安装
# dnf install lynx
Last metadata expiration check: 3:20:38 ago on Wed 10 May 2023 07:13:27 AM CST.
Dependencies resolved.
==============================================================
Package Architecture Version Repository Size
=================================================================
Installing:
lynx x86_64 2.8.9-2.2.al8 alinux3-powertools 1.6 M
Installing dependencies:
centos-indexhtml noarch 8.0-0.1.al8 alinux3-os 246 k
Transaction Summary
===================================================================
Install 2 Packages
...
Complete!
# 得到自己的 IP 地址
curl 'https://api.ipify.org?format=json'
Trojan 安装 & 配置
安装
dnf install trojan
配置文件内容
把 SSL 证书上传,放在对应的目录下
config.json 内容
cat /etc/trojan/config.json
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 443,
"remote_addr": "www.gotoschool.tk",
"remote_port": 80,
"password": [
"password0755",
"password0750"
],
"log_level": 1,
"ssl": {
"cert": "/etc/trojan/gotoschool.tk.pem",
"key": "/etc/trojan/gotoschool.tk.key",
"key_password": "",
"cipher": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384",
"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": {
"prefer_ipv4": false,
"no_delay": true,
"keep_alive": true,
"reuse_port": false,
"fast_open": false,
"fast_open_qlen": 20
},
"mysql": {
"enabled": false,
"server_addr": "127.0.0.1",
"server_port": 3306,
"database": "trojan",
"username": "trojan",
"password": ""
}
}
客户端配置
官方版本下载地址:https://github.com/Trojan-Qt5/Trojan-Qt5/releases
另外一个 地址 https://trojan-gfw.github.io/trojan/
配置信息: 服务器域名 和 访问密码。