squid正向代理

1.正反向代理理解

  1. 正向代理,多指vpn,Service只知道代理的ip,不知道client的ip(说白了就是为客户端代理)

  2. 反向代理,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;

posted @ 2023-02-26 16:46  MISF  阅读(273)  评论(0编辑  收藏  举报
     JS过度和变形效果演示   
  
    html5.png