squid 정방 향 에이전트
다음 Squid 의 빠 른 설정 설 치 를 기록 합 니 다.
설치 하 다.
여러 가지 방식 으로 설치 할 수 있 습 니 다. 설치 한 후, 일반적으로
/usr/sbin/squid
기본 설정 파일 은: /etc/squid/squid.conf
입 니 다.yum install squid
프로필 수정
루트 권한 이 없 으 면 자신의 디 렉 터 리 에 squid. conf copy 아래 demo 를 만 드 는 것 을 권장 합 니 다. (이것 은 기본 / etc / squid / squid. conf 에서 복사 한 것 입 니 다.)
일반적으로 서비스 포트 http port: 10000 로그 파일 경로 와 같은 것 만 수정 해 야 합 니 다.
루트 권한 이 없 으 면 로그 경 로 를 변경 하 십시오. pid 경 로 를 수정 하 십시오.
#
# Recommended minimum configuration:
#
# Squid normally listens to port 3128
http_port 10000
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid
cache_mem 32 MB
cache_dir aufs /home/wxadmin/app/squid/cache/ 1024 16 256
access_log /home/wxadmin/app/squid/log/access.log
cache_log /home/wxadmin/app/squid/log/cache.log
pid_filename /home/wxadmin/app/squid/squid.pid
#
# Add any of your own refresh_pattern entries above these.
#
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
초기 화 / 시작 / 정지
squid 는 초기 화 를 해 야 사용 할 수 있 습 니 다.
-f
매개 변 수 는 사용자 정의 프로필 을 지정 합 니 다. 일부 상용 명령 입 니 다.#
/usr/sbin/squid -f /home/wxadmin/app/squid/squid.conf -z
#
/usr/sbin/squid -f /home/wxadmin/app/squid/squid.conf start
#
/usr/sbin/squid -f /home/wxadmin/app/squid/squid.conf restart
#
/usr/sbin/squid -f /home/wxadmin/app/squid/squid.conf -k shutdown
검사 하 다.
포트 가 서비스 에 있 는 지 확인 하 십시오.
netstat -lnp
설정 성공 여부 확인
curl -x 127.0.0.1:10000 https://www.baidu.com
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.