目标:A外网的机器(能上网), B内网的机器(不能上网)
通过宝塔配置
resolver 219.141.136.10; ##DNS解析
server {
listen 18081; #代理端口
#正向代理,不要设定server_name
location / {
proxy_pass $scheme://$host$request_uri;
}
}
重启nginx 服务
timedatectl set-timezone Asia/Shanghai
timedatectl set-ntp no
timedatectl set-time "2022-06-22 15:22:30"
https_proxy=https://192.168.168.13:18081
http_proxy=http://192.168.168.13:18081
export http_proxy https_proxy
curl -vv www.baidu.com