centos 安装 trojan记录
从shadowsock上复制配置
点击齿轮图标 icon-config.png 打开单节点的配置窗口,点击 复制配置 即可复制节点配置
ssl 的 verfiy 改为 false,我觉得应该不用改,可以验证一下启动后我以为就是设置http_proxy为127.0.0.1:1080
其实不是,1080是socks5的,要再下载一个privoxy1
2yum install -y privoxy
改privoxy配置
1
2
3
4vim /etc/privoxy/config
末尾增加下面内容,/后面是代理服务器的地址:端口,注意最后还有个.
forward-socks5t / 127.0.0.1:1080 .启动privoxy
1
systemctl start privoxy
设置http_proxy
1
2
3export 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这时再去访问openai网站
1
2
3
4
5
6
7
8curl https://api.openai.com/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}'