Hi!
Recetly I working with LittleProxy. I want to filter response content
for some websites.
To do this I have created class which implements HttpFilter interface.
Everything works perfectly when I using http protocol websites.
So, now I need to change the content for https pages. For this I using
new constructor of DefaultHttpProxyServer class. (... new
DefaultHttpProxyServer(port, filters, null, new
SelfSignedKeyStoreManager(true), null);)
After this I'm getting error, event for the websites which don't have
to be filtered:
INFO org.littleshoot.proxy.SelfSignedKeyStoreManager: Not deleting
keystore
Starting proxy server on port: 8080
INFO org.littleshoot.proxy.DefaultHttpProxyServer: Starting proxy on
port: 8080
DEBUG net.sf.ehcache.CacheManager: Configuring ehcache from classpath.
DEBUG net.sf.ehcache.config.ConfigurationFactory: Configuring ehcache
from ehcache.xml found in the classpath: file:/D:/_Projects/ALUProxy/
Proxy/bin/ehcache.xml
DEBUG net.sf.ehcache.config.ConfigurationFactory: Configuring ehcache
from URL: file:/D:/_Projects/ALUProxy/Proxy/bin/ehcache.xml
DEBUG net.sf.ehcache.config.ConfigurationFactory: Configuring ehcache
from InputStream
DEBUG net.sf.ehcache.config.ConfigurationFactory: Did not find a
system property for the ${multicastGroupPort} token specified in the
configuration.Replacing with ""
DEBUG net.sf.ehcache.config.ConfigurationFactory: Did not find a
system property for the ${token} token specified in the
configuration.Replacing with ""
DEBUG net.sf.ehcache.config.BeanHandler: Ignoring ehcache attribute
xmlns:xsi
DEBUG net.sf.ehcache.config.BeanHandler: Ignoring ehcache attribute
xsi:noNamespaceSchemaLocation
DEBUG net.sf.ehcache.config.DiskStoreConfiguration: Disk Store Path: C:
\Users\dliger\AppData\Local\Temp\
DEBUG net.sf.ehcache.config.DiskStoreConfiguration: Disk Store Path: C:
\Users\dliger\AppData\Local\Temp\
DEBUG net.sf.ehcache.util.PropertyUtil: propertiesString is null.
DEBUG net.sf.ehcache.config.ConfigurationHelper: No
CacheManagerEventListenerFactory class specified. Skipping...
DEBUG net.sf.ehcache.util.PropertyUtil: propertiesString is null.
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener:
Automatically finding a free TCP/IP port to listen on: 62950
DEBUG net.sf.ehcache.util.PropertyUtil: Value found for peerDiscovery:
automatic
DEBUG net.sf.ehcache.util.PropertyUtil: Value found for hostName: null
DEBUG net.sf.ehcache.util.PropertyUtil: Value found for
multicastGroupAddress: 230.0.0.1
DEBUG net.sf.ehcache.util.PropertyUtil: Value found for
multicastGroupPort: 4446
DEBUG net.sf.ehcache.util.PropertyUtil: Value found for timeToLive: 1
DEBUG net.sf.ehcache.Cache: No BootstrapCacheLoaderFactory class
specified. Skipping...
DEBUG net.sf.ehcache.Cache: CacheWriter factory not configured.
Skipping...
DEBUG net.sf.ehcache.config.ConfigurationHelper: No
CacheExceptionHandlerFactory class specified. Skipping...
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener: 0
RMICachePeers bound in registry for RMI listener
DEBUG
net.sf.ehcache.store.compound.factories.DiskOverflowStorageFactory:
Deleting data file DEFAULT_CACHE.data
DEBUG net.sf.ehcache.Cache: Initialised cache: DEFAULT_CACHE
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener: Adding
to RMI listener
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener: 0
RMICachePeers bound in registry for RMI listener
DEBUG net.sf.ehcache.config.ConfigurationHelper: CacheDecoratorFactory
not configured for defaultCache. Skipping for 'DEFAULT_CACHE'.
DEBUG
net.sf.ehcache.store.compound.factories.DiskOverflowStorageFactory:
Deleting data file CHUNKS_CACHE.data
DEBUG net.sf.ehcache.Cache: Initialised cache: CHUNKS_CACHE
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener: Adding
to RMI listener
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener: 0
RMICachePeers bound in registry for RMI listener
DEBUG net.sf.ehcache.config.ConfigurationHelper: CacheDecoratorFactory
not configured for defaultCache. Skipping for 'CHUNKS_CACHE'.
DEBUG
net.sf.ehcache.store.compound.factories.DiskOverflowStorageFactory:
Deleting data file CHUNK_CACHE.data
DEBUG net.sf.ehcache.Cache: Initialised cache: CHUNK_CACHE
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener: Adding
to RMI listener
DEBUG net.sf.ehcache.distribution.RMICacheManagerPeerListener: 0
RMICachePeers bound in registry for RMI listener
DEBUG net.sf.ehcache.config.ConfigurationHelper: CacheDecoratorFactory
not configured for defaultCache. Skipping for 'CHUNK_CACHE'.
INFO org.littleshoot.proxy.HttpServerPipelineFactory: Creating server
with keystore manager:
org.littleshoot.proxy.SelfSignedKeyStoreManager@1c8b24d
DEBUG net.sf.ehcache.util.UpdateChecker: Checking for update...
INFO org.littleshoot.proxy.HttpServerPipelineFactory: Accessing
pipeline
INFO org.littleshoot.proxy.HttpServerPipelineFactory: Adding SSL
handler
INFO org.littleshoot.proxy.HttpRequestHandler: New channel opened:
[id: 0x00790192, /
127.0.0.1:62958 => /
127.0.0.1:8080]
INFO org.littleshoot.proxy.HttpRequestHandler: Now 1 browser to proxy
channels...
INFO org.littleshoot.proxy.HttpRequestHandler: Now this class has 1
browser to proxy channels...
INFO org.littleshoot.proxy.HttpRequestHandler: Caught an exception on
browser to proxy channel: [id: 0x00790192, /
127.0.0.1:62958 => /
127.0.0.1:8080]
javax.net.ssl.SSLException: not an SSL/TLS record:
47455420687474703a2f2f676f6f676c652e636f6d2f20485454502f312e310d0a486f73743a20676f6f676c652e636f6d0d0a557365722d4167656e743a204d6f7a696c6c612f352e30202857696e646f7773204e5420362e313b20574f5736343b2072763a372e3029204765636b6f2f32303130303130312046697265666f782f372e300d0a4163636570743a20746578742f68746d6c2c6170706c69636174696f6e2f7868746d6c2b786d6c2c6170706c69636174696f6e2f786d6c3b713d302e392c2a2f2a3b713d302e380d0a4163636570742d4c616e67756167653a20656e2d75732c656e3b713d302e350d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a4163636570742d436861727365743a2049534f2d383835392d312c7574662d383b713d302e372c2a3b713d302e370d0a50726f78792d436f6e6e656374696f6e3a206b6565702d616c6976650d0a436f6f6b69653a20505245463d49443d323466373939366237396263303734373a544d3d313331353939353337363a4c4d3d313331353939353337363a533d4e4b7641363639396f71416d477065750d0a0d0a
at org.jboss.netty.handler.ssl.SslHandler.decode(SslHandler.java:576)
at
org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:
282)
at
org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:
216)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:
274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:
261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:
349)
at
org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:
280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:
200)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
WARN org.littleshoot.proxy.HttpRequestHandler: Closing on flush: [id:
0x00790192, /
127.0.0.1:62958 => /
127.0.0.1:8080]
WARN org.littleshoot.proxy.HttpRequestHandler: Channel closed: [id:
0x00790192, /
127.0.0.1:62958 :> /
127.0.0.1:8080]
INFO org.littleshoot.proxy.HttpRequestHandler: Now 0 total browser to
proxy channels...
INFO org.littleshoot.proxy.HttpRequestHandler: Now this class has 0
browser to proxy channels...
WARN org.littleshoot.proxy.HttpRequestHandler: Closing all proxy to
web channels for this browser to proxy connection!!!
Could you please help me to solve this issue.
Yours sincerely,
Denis Liger