squid正向代理
1.正反向代理理解
-
正向代理,多指vpn,Service只知道代理的ip,不知道client的ip(说白了就是为客户端代理)
-
反向代理,nginx用的多,client只知道代理的ip,不知道service的ip(为谁代理谁的ip被隐藏)
2.http正向代理squid
顾名思义,http正向代理,代理完了跟ping也没关系,跟curl有关。
squid.conf配置文件(acl是配置一些可以访问的ip、url等,然后在http_access中应用)
https://www.cnblogs.com/echo1937/p/6728461.html
什么情况下会用到squid,当一个内网机器A访问不了外网,但是可访问某台机器B,B又可以访问外网,这样需要在机器B上安装squid代理,在A机器通过wget -e "http_proxy=http://B机器ip:3128" http://www.qq.com
可访问www.qq.com
3.如果要FQ
也可以买国外服务器,配置客户端用这个https://www.4spaces.org/digitalocean-build-v2rays-0-1/
服务端已经更新为下面的docker方式 :https://www.idcoffer.com/archives/1600
4.网关服务器
http://www.ttlsa.com/linux/linux-iptables-building-gateway/
server {
listen 80 default_server;
server_name _;
client_max_body_size 1024m;
location / {
uwsgi_pass 127.0.0.1:3031;
include uwsgi_params;
#uwsgi_ignore_client_abort on;
}
location /static/ {
root /home/nginx/5ink/;
expires 2400h;
}
location /static/journals/ {
alias /5ink_data/journals/;
expires 2400h;
}
location /static/publish/ {
alias /5ink_data/publish/;
expires 2400h;
}
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
user root;
worker_processes 1;
error_log logs/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name passport.escience.cn;
access_log logs/host.access.log main;
location / {
proxy_pass http://192.168.2.8:9099;
}
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# root html;
# }
# }
include /etc/nginx/conf/conf.d/*.conf;
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律