一 troan客户端
1.1 下载地址
1.2 配置客户端配置 config.json
主要修改的配置
run_type: 改成client
添加
verify: false
verify_hostname: false
{
"run_type": "client",
"local_addr": "0.0.0.0",
"local_port": 1080,
"remote_addr": "xxxxx.com", ## 自己的远程trojan地址
"remote_port": 443,
"password": [
"psssssss" ## 自己的远程trojan密码
],
"log_level": "debug",
"ssl": {
"verify": false,
"verify_hostname": false,
"cert": "/path/to/certificate.crt",
"key": "/path/to/private.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"
],
"alpn_port_override": {
"h2": 81
},
"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": "",
"key": "",
"cert": "",
"ca": ""
}
}
1.3 运行trojan客户端
trojan -c config.json
二 安装privoxy
yum install privoxy -y
2.1 编辑配置 /etc/privoxy/config
在文件末尾追加
forward-socks5 / 127.0.0.1:1080 .
2.2 启动
systemctl start privoxy && systemctl enable privoxy
2.3 设置代理
export https_proxy=http://127.0.0.1:8118
export http_proxy=http://127.0.0.1:8118
export all_proxy=http://127.0.0.1:8118
2.4 检测ip
curl chaip.la