• 使用squid架设自己的代理server


    主要參考了

    http://blog.chinaunix.net/uid-20778906-id-540115.html
    Ubuntu下Squid代理server的安装与配置



    1 安装

    $ sudo apt-get install squid

    安装完了之后,发现安装的是squid3。

    查看位置

    # whereis squid3
    squid3: /usr/sbin/squid3 /etc/squid3 /usr/lib/squid3 /usr/share/squid3 /usr/share/man/man8/squid3.8.gz


    2 改动配置

    配置文件是/etc/squid3/squid.conf


    找到这里的位置

    # Example rule allowing access from your local networks.
    # Adapt to list your (internal) IP networks from where browsing
    # should be allowed

    加入一下规则,表示同意指定ip訪问。

    acl linger src 10.17.49.145#这是我client机器的局域网的ip地址
    http_access allow linger
    http_access deny all


    设置监听port

    # Squid normally listens to port 3128
    #http_port 3128
    http_port 10.17.49.138:808#这个ip是server的局域网ip地址,端口能够是随意未使用的就可以。


    3 使配置生效

    之前安装了,squid会自己主动执行。要使配置生效必须关掉。

    squid3 -k shutdown

    然后运行一下命令

    squid3 -z

    /etc/init.d/squid3 reload  

    /etc/init.d/squid3 restart   

    squid3 -k parse


    最后。配置一下client机器的代理就能够了。


    相关资料:

    http://hi.baidu.com/pplboy/item/fe6d1e41b44d0514886d10e0
    # tail -f /var/log/squid/access.log | awk '{print$3 " " $8 " " $7}'
    监測Squid日志的五种方法


    http://blog.csdn.net/forgotaboutgirl/article/details/6865641
    Linux下架设代理server


    http://www.enet.com.cn/article/2007/0724/A20070724737913.shtml
    简单有用 教您在LINUX中架设代理server


    http://blog.chinaunix.net/uid-7354475-id-2643362.html
    linux 代理server安装配置。

  • 相关阅读:
    个人知识库建设:搜集、归类、整理、提纯
    vue学习:定义全局变量并使用
    flask学习:配置https请求
    flask项目部署到云服务器,并通过域名访问后端服务
    微信小程序开发学习系列
    shell数组
    RabbitMQ安装与基本原理
    bootstrap强化模态窗口插件
    多选框插件
    2022全国卷乙卷文科数学解析版|图片
  • 原文地址:https://www.cnblogs.com/yfceshi/p/6854864.html
Copyright © 2020-2023  润新知