Http 会是即时的吗?由于从我的服务器到B网站的ping时间只有1ms,我认为ping时间略高于1ms,但不超过90毫秒。我遗漏了什么吗?好的,是的,也许通过高速局域网从客户端到代理的TCP握手可以忽略不计。如果您有大量规则,或者必须咨询大量允许/阻止的站点,那么

Http 会是即时的吗?由于从我的服务器到B网站的ping时间只有1ms,我认为ping时间略高于1ms,但不超过90毫秒。我遗漏了什么吗?好的,是的,也许通过高速局域网从客户端到代理的TCP握手可以忽略不计。如果您有大量规则,或者必须咨询大量允许/阻止的站点,那么,http,proxy,server,squid,Http,Proxy,Server,Squid,会是即时的吗?由于从我的服务器到B网站的ping时间只有1ms,我认为ping时间略高于1ms,但不超过90毫秒。我遗漏了什么吗?好的,是的,也许通过高速局域网从客户端到代理的TCP握手可以忽略不计。如果您有大量规则,或者必须咨询大量允许/阻止的站点,那么代理中的其他地方就是规则检查。此外,请求的类型也会有所不同(例如,如果请求有正文,例如POST)。谢谢Adrien。我用代码更新了我的问题(我的实际代码中有10多个ip,但这里没有列出)。那么从上面的代码来看,您认为可能是什么问题?我尝试了很多


会是即时的吗?由于从我的服务器到B网站的ping时间只有1ms,我认为ping时间略高于1ms,但不超过90毫秒。我遗漏了什么吗?好的,是的,也许通过高速局域网从客户端到代理的TCP握手可以忽略不计。如果您有大量规则,或者必须咨询大量允许/阻止的站点,那么代理中的其他地方就是规则检查。此外,请求的类型也会有所不同(例如,如果请求有正文,例如POST)。谢谢Adrien。我用代码更新了我的问题(我的实际代码中有10多个ip,但这里没有列出)。那么从上面的代码来看,您认为可能是什么问题?我尝试了很多方法,只是更换dns服务器将延迟减少了约4ms
    #
# Recommended minimum configuration:
#
auth_param basic program  /cygdrive/c/squid/lib/squid/basic_ncsa_auth /cygdrive/c/squid/etc/squid/pwfile
auth_param basic children 10

# 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

acl auth_users proxy_auth REQUIRED

acl authip src 1.1.1.1

http_access allow authip

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager
http_access allow auth_users

# 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

# 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
#

# And finally deny all other access to this proxy
http_access deny all

# 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

acl ip1 myip 1.1.1.1

tcp_outgoing_address 1.1.1.1 ip1

tcp_outgoing_address 0.0.0.0 all

http_access allow ip1

# Squid normally listens to port 3128
http_port 2424

# Uncomment the line below to enable disk caching - path format is /cygdrive/<full path to cache folder>, i.e.
cache_dir awin32 d:/squidcachedir/cache 10000 16 256
# memory_cache_mode always
maximum_object_size_in_memory 102400 KB
half_closed_clients off
cache_mem 256 MB
memory_pools off

# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid

# 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

# cache_peer 23.0.13.5 parent 3128 3130 default no-query

ipcache_size 10240
negative_dns_ttl 5 minutes
positive_dns_ttl 6 hours
dns_nameservers 129.250.35.250 74.82.42.42 208.67.222.222 
cache_replacement_policy heap
cache_swap_low 90
cache_swap_high 95
quick_abort_min 0 KB
quick_abort_max 0 KB
log_icp_queries off
client_db off
buffered_logs on
half_closed_clients off

max_filedescriptors 3200

dns_v4_first on

forwarded_for delete

request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all