なりたい(願望
すごい結果から言うと、ziproxyは古参プロキシなのでhttpsの画像圧縮に対応できてない よってhttps当たり前の今日の環境ではあまり意味がない
環境
- Ubuntu 16.04
インストール
apt install ziproxy
設定
mkdir -p /var/log/ziproxy chown ziproxy:ziproxy /var/log/ziproxy
--- ziproxy.conf_orig 2018-07-14 20:26:59.956647988 +0900 +++ ziproxy.conf 2018-07-14 20:41:52.692669599 +0900 @@ -6,13 +6,13 @@ ## Port to listen for proxy connections ## default: 8080 -# Port = 8080 +Port = 10722 ## Local address to listen for proxy connections ## If you have more than one network interface, ## it's useful for restricting to which interface you want to bind to. ## By default Ziproxy binds to all interfaces. -Address = "127.0.0.1" +#Address = "0.0.0.0" ## Accepts conections only from that address. ## WARNING: Remember to restrict the access to Ziproxy @@ -209,7 +209,7 @@ ## ziproxy will fail and no error will be displayed on the console. ## ## Default: undefined (dumps to stderr). -# ErrorLog = "/var/log/ziproxy/error.log" +ErrorLog = "/var/log/ziproxy/error.log" ## File to be used as access log. ## If undefined, there will be no access logging at all. @@ -241,7 +241,7 @@ ## 5 (SIGSYS received) ## X (SIGTERM received - also happens when interrupting the daemon while transferring) ## Disabled by default. -# AccessLog = "/var/log/ziproxy/access.log" +AccessLog = "/var/log/ziproxy/access.log" ## When enabled, Ziproxy will intercept signals indicative of ## software crash, flag the offending request in access log @@ -342,7 +342,7 @@ ## to reroute the connections from x.x.x.x:80 to ziproxy.host:PROXY_PORT ## Disabled by default. ## See also: RestrictOutPortHTTP -# TransparentProxy = false +TransparentProxy = true ## Whether to process normal proxy requests or not ## Only makes sense when TransparentProxy is enabled. @@ -361,7 +361,7 @@ ## abuse of the service. ## Enabled by default. ## See also: RestrictOutPortCONNECT -# AllowMethodCONNECT = true +AllowMethodCONNECT = true ## If defined, restricts the outgoing connections (except CONNECT methods - used by HTTPS) ## to the listed destination ports. @@ -516,7 +516,7 @@ ## Gzip compression (and only that) will be applied while streaming. ## Default: 1048576 (bytes) ## (default used to be "0" in ziproxy 2.3.0 and earlier) -# MaxSize = 1048576 +MaxSize = 0 UseContentLength = false @@ -595,9 +595,9 @@ ## Whether to try to (re)compress incoming data originally in ## the following formats (true) or not (false) ## default: true -# ProcessJPG = true -# ProcessPNG = true -# ProcessGIF = true +ProcessJPG = true +ProcessPNG = true +ProcessGIF = true ## Whether to try to optimize HTML, CSS and Javascript, thus reducing their size ## ProcessHTML: text/html @@ -645,7 +645,7 @@ ## Note: Not all images sent will be in grayscale, only the ones ## considered worth recompression that way. ## Disabled by default. -# ConvertToGrayscale = false +ConvertToGrayscale = true ## Preemptive Name Resolution ## If enabled, tries to resolve hostnames present in the processed HTML files @@ -817,7 +817,7 @@ ## If "ForceOutputNoJP2 = true", this option will be overrided ## and stay disabled. ## default: false -# ProcessToJP2 = false +# ProcessToJP2 = true ## When enabled, this option forces the conversion of all incoming ## JP2K images to another format (usually JPEG). @@ -859,7 +859,7 @@ ## Thus, prior to compression, the image is analysed in order to know which rate ## (loosely) reflects the quality had this picture be compressed using jpeg. ## This option obsoletes "JP2Rate". -# JP2ImageQuality = {20,15,15,15} +JP2ImageQuality = {20,15,15,15}