Search squid archive

HTTPS cache for Java application - only getting TCP_MISS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm setting up a Squid proxy as a cache for a number (as many as possible)
of identical JAVA applications to run their web calls through. The calls are
ofc identical, and the response they get can safely be cached for 5-10
seconds. 
I do this because most of the calls is directed at a single server on the
internet that I don't want to hammer, since I will ofc be locked out of it
then.

Currently Im simply testing this on a single computer: the application and
squid

The calls from the application is done using ssl / https by telling java to
use Squid as a proxy (-Dhttps.proxyHost and -Dhttp.proxyHost). I've set up
squid and JAVA with self-signed certificates, and the application sends its
calls through squid and gets the reponse. No problem there (wasnt easy that
either I must say :P ).

The problem is that none of the calls get cached: All rows in the access.log
hava a TCP_MISS/200 tag in them. 

I've searched all through the web for a solution to this, and have tried
everything people have suggested. So I was hoping someone could help me?

Anyone have any tips on what to try?

MY config (note Ive set the refresh_pattern like that just to see if I could
catch anything. The plan is to modify it so it actualyl does refresh the
responses frmo the web calls in 5-10 seconds intervals. There are commented
out pats Ive tried with no luck there too):


#
# Recommended minimum configuration:
#

debug_options ALL,2

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

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

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



# 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


# Squid normally listens to port 3128
#http_port 3128 ssl-bump generate-host-certificates=on
dynamic_cert_mem_cache_size=4MB cert=/cygdrive/c/squid/etc/squid/correct.pem
key=/cygdrive/c/squid/etc/squid/ssl/myca.key 

http_port 3128 ssl-bump generate-host-certificates=on
dynamic_cert_mem_cache_size=4MB
cert=/cygdrive/c/squid/etc/squid/proxyCAx.pem
key=/cygdrive/c/squid/etc/squid/proxyCA.pem

#https_port 3129 cert=/cygdrive/c/squid/etc/squid/proxyCAx.pem
key=/cygdrive/c/squid/etc/squid/proxyCA.pem



# Uncomment the line below to enable disk caching - path format is
/cygdrive/<full path to cache folder>, i.e.
#cache_dir aufs /cygdrive/c/squid/var/cache/ 3000 16 256

# certificate generation program
sslcrtd_program /cygdrive/c/squid/lib/squid/ssl_crtd -s
/cygdrive/c/squid/var/cache/squid_ssldb -M 4MB

# 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 -i (/cgi-bin/|\?) 1440 100% 4320 ignore-no-store
override-lastmod override-expire ignore-must-revalidate ignore-reload
ignore-private ignore-auth
refresh_pattern .		1440	100%	4320 ignore-no-store override-lastmod
override-expire ignore-must-revalidate ignore-reload ignore-private
ignore-auth override-lastmod 

# Bumped requests have relative URLs so Squid has to use reverse proxy
# or accelerator code. By default, that code denies direct forwarding.
# The need for this option may disappear in the future.
#always_direct allow all

dns_nameservers 8.8.8.8 208.67.222.222

max_filedescriptors 3200

# Max Object Size Cache
maximum_object_size 10240 KB


acl step1 at_step SslBump1

ssl_bump peek step1
ssl_bump bump all


#acl step1 at_step SslBump1
#acl step2 at_step SslBump2
#acl step3 at_step SslBump3

#acl ssl_exclude_domains ssl::server_name
"/cygdrive/c/squid/etc/squid/ssl_exclude_domains.conf"
#acl ssl_exclude_ips     dst             
"/cygdrive/c/squid/etc/squid/ssl_exclude_ips.conf"

#ssl_bump splice localhost
#ssl_bump peek step1 all
#ssl_bump splice ssl_exclude_domains
#ssl_bump splice ssl_exclude_ips
#ssl_bump stare step2 all
#ssl_bump bump all




--
Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux