Commit graph

39 commits

Author SHA1 Message Date
Andrew Gaul e505655338 Add GIF to WebP transcoding 2017-08-28 22:40:45 -07:00
Andrew Gaul f69a0b7e0e Serve diagnostics and CA certificate
Fixes #21.  Reference:

https://mtersch.wordpress.com/2015/03/17/certificate-import-in-firefox-on-android/
2017-08-20 21:59:04 -07:00
Andrew Gaul 703cb4adaf Check HTTP auth before allowing CONNECT 2017-08-20 21:57:07 -07:00
Andrew Gaul defbc287f1 Allow X-Compy-Quality override header
This allows clients to override the configured compression quality.
Fixes #14.
2017-08-19 11:29:31 -07:00
Andrew Gaul 69b89413bd Add optional HTTP BASIC authorization
Fixes #18.
2017-08-19 11:23:02 -07:00
Barna Csorogi 8ac256351f turn mitm conn Set[Read|Write]Deadline methods into noops
Timeouts should be handled by the http stack for the underlying tcp
connections so noops are appropriate for this virtual connection. No
need to panic.
2017-06-09 15:17:24 +02:00
Andrew Gaul a6bb5e3308 Add unit test for GIF transcoding 2017-01-21 15:04:26 -08:00
Andrew Gaul 3760bb0a61 Simplify HTTP GETs when not adding Accept header 2017-01-21 14:19:57 -08:00
Andrew Gaul 49bceae2df Add unit tests for PNG and WebP
Also correct Content-Type when transcoding WebP.
2017-01-19 11:21:28 -08:00
Andrew Gaul 389077e0fa Transcode via Brotli
Brotli offers 20% better compression than gzip.
2017-01-18 19:35:20 -08:00
Andrew Gaul ecfa095a14 Consume gzip stream in test
Also close writer since this test previously failed due to truncated
output.
2017-01-18 19:33:36 -08:00
Andrew Gaul f8cb20ade6 Add unit tests for gzip 2017-01-18 18:27:22 -08:00
Andrew Gaul 20a9c66286 Add unit tests for JPEG and WebP
Also correct Content-Type when transcoding WebP.
2017-01-18 18:27:22 -08:00
Andrew Gaul 84b6dbd153 Improve README 2017-01-16 21:18:01 -08:00
Barna Csorogi cde47b46f3 Merge pull request #10 from andrewgaul/webp
Add PNG and JPEG to WebP transcoding
2017-01-16 22:43:40 +01:00
Andrew Gaul 9518dc2f1a Add PNG and JPEG to WebP transcoding
WebP lossy mode offers up to 30% better compression than JPEG.
2017-01-16 00:06:17 -08:00
Barna Csorogi 7b3424fd18 Merge branch 'feat/gzip-compression-level'
* feat/gzip-compression-level:
  Allow configuration of gzip compression level
2017-01-16 07:39:33 +01:00
Andrew Gaul ca005f7c97 Allow configuration of gzip compression level 2017-01-16 07:39:24 +01:00
Barna Csorogi b23411caf2 Merge pull request #7 from andrewgaul/nit
Simplify for loop
2017-01-16 06:58:12 +01:00
Barna Csorogi e4a31b89ed Merge pull request #6 from andrewgaul/accept-encoding
Honor Accept-Encoding header in gzip transcoder
2017-01-16 06:58:00 +01:00
Andrew Gaul 569bb06e52 Simplify for loop 2017-01-14 15:46:38 -08:00
Andrew Gaul 11a40b5051 Honor Accept-Encoding header in gzip transcoder
This avoids sending compressed data to clients which do not support
it.
2017-01-14 15:33:35 -08:00
Barna Csorogi cac3b84a5d Merge pull request #5 from andrewgaul/missing-cert-key-error
Add friendly error for missing cert or key
2017-01-14 04:02:23 +01:00
Barna Csorogi 4a5d1a7e8c Merge pull request #4 from andrewgaul/gitignore
Add .gitignore
2017-01-14 04:01:37 +01:00
Barna Csorogi 92f55287f4 Merge branch 'feat/logging' (pull/3)
* feat/logging:
  fix: allow ResponseReader.Reader to be wrapped by transcoders
  Add logging for startup and transcoded bytes
2017-01-14 03:48:36 +01:00
Barna Csorogi 480053a71a fix: allow ResponseReader.Reader to be wrapped by transcoders
fixes -minify errors
2017-01-14 03:44:07 +01:00
Andrew Gaul a7569356c1 Add friendly error for missing cert or key
Previously compy failed with the confusing:

2017/01/13 15:34:38 open : no such file or directory
2017-01-13 15:43:41 -08:00
Andrew Gaul 49d6ecbc34 Add .gitignore 2017-01-13 14:14:30 -08:00
Andrew Gaul 1d5b6eff72 Add logging for startup and transcoded bytes 2017-01-13 14:09:56 -08:00
Barna Csorogi 635da9b1a6 update readme
add description about pac files
2016-03-29 13:25:41 +02:00
Barna Csorogi 9a7aaedc56 update readme 2016-03-29 05:41:47 +02:00
Barna Csorogi f9a6377450 fix mitm for http1 proxy connections
Add back Hijacking support for http1.1 CONNECT requests.
2016-03-28 18:28:51 +02:00
Barna Csorogi fd53c9cb8c fix http requests over https proxy connection
Reconstruct the schema of the proxied request if it's not filled out.
2016-03-26 19:02:40 +01:00
Barna Csorogi a4a691b7b8 add http2 support
Add http2 using the go-1.6 net/http built-in support.

net/http's http2 doesn't support hijacking, so instead of hijacking the
inital CONNECT tcp connection, tunnel proxied requests/responses over
the reader and writer streams of the CONNECT request.
2016-03-26 18:56:50 +01:00
Barna Csorogi 6dae9bda0c update for github.com/tdewolff/minify api changes 2015-11-25 14:43:45 +01:00
Barna Csorogi 848c2f2028 Update for changes of tdewolff/minify dependency 2015-05-14 22:00:53 +02:00
Barna Csorogi 6202c0a479 Remove accidental duplicate file 2015-05-14 21:40:42 +02:00
Barna Csorogi 9bf55d29a9 proxy header-only responses properly
fixes redirects
2015-03-29 16:12:15 +02:00
Barna Csorogi 343bdd5266 initial commit 2015-03-28 23:07:40 +01:00