b07f6958ac 
								
									
								
							
								 
							
						 
						
							
							
								
								Use "IsUnixNetwork" function instead of repeating the logic  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								68adfdc559 
								
							
								 
							
						 
						
							
							
								
								Fix misspellings ( #2908 )  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								db4293cb5f 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Add flush_interval to caddyfile syntax ( #1460 )  
							
							
 
							
							
							Also add godoc for Caddyfile syntax for file_server 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								8de1a76227 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Fix invalid argument to Intn in RandomChoice selection  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								1228dd7d93 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Allow buffering of client requests  
							
							
 
							
							
							This is a bad idea, but some backends apparently require it. See
discussion in #176 . 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								8025ad9107 
								
									
								
							
								 
							
						 
						
							
							
								
								cmd: Disable admin endpoint for file-server and reverse-proxy commands  
							
							
 
							
							
							This makes it easier to use multiple instances on the same machine 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								93bc1b72e3 
								
							
								 
							
						 
						
							
							
								
								core: Use port ranges to avoid OOM with bad inputs ( #2859 )  
							
							
 
							
							
							* fix OOM issue caught by fuzzing
* use ParsedAddress as the struct name for the result of ParseNetworkAddress
* simplify code using the ParsedAddress type
* minor cleanups 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								95615f5377 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Fix NTLM auth detection  
							
							
 
							
							
							D'oh. Got mixed up in a refactoring. 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								8e515289cb 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Add support for NTLM  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								97d918df3e 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Make HTTP versions configurable, don't set NextProtos  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								bf363f061d 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Add UnmarshalCaddyfile for random_choose selection policy  
							
							
 
							
							
							Also allow caddy.Duration to be given integer values which are treated
like regular time.Duration values (nanoseconds).
Fixes  #2856  
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								cb25dd72ab 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Add port to upstream address if only implied in scheme  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								8ef0a0b4f8 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Fix panic for some CLI flag values ( closes   #2848 )  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								dccba71276 
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Structured logs  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								54e458b756 
								
									
								
							
								 
							
						 
						
							
							
								
								proxy: Forgot to commit import  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								813fff0584 
								
									
								
							
								 
							
						 
						
							
							
								
								proxy: Enable HTTP/2 on transport to backend  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								442fd748f6 
								
									
								
							
								 
							
						 
						
							
							
								
								caddyhttp: Minor cleanup and fix nil pointer deref in caddyfile adapter  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								b00dfd3965 
								
									
								
							
								 
							
						 
						
							
							
								
								v2: Logging! ( #2831 )  
							
							
 
							
							
							* logging: Initial implementation
* logging: More encoder formats, better defaults
* logging: Fix repetition bug with FilterEncoder; add more presets
* logging: DiscardWriter; delete or no-op logs that discard their output
* logging: Add http.handlers.log module; enhance Replacer methods
The Replacer interface has new methods to customize how to handle empty
or unrecognized placeholders. Closes  #2815 .
* logging: Overhaul HTTP logging, fix bugs, improve filtering, etc.
* logging: General cleanup, begin transitioning to using new loggers
* Fixes after merge conflict 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								fcd8869f51 
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: optimize MaxIdleConnsPerHost default ( #2809 )  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								1e31be8de0 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Allow dynamic backends ( closes   #990  and  #1539 )  
							
							
 
							
							
							This PR enables the use of placeholders in an upstream's Dial address.
A Dial address must represent precisely one socket after replacements.
See also #998  and #1639 . 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								8715a28320 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Customize SNI value in upstream request ( closes   #2483 )  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								9c0bf311f9 
								
									
								
							
								 
							
						 
						
							
							
								
								Miscellaneous cleanups / comments  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								bcbe1c220d 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Add local circuit breaker  
							
							
 
							
							
							This migrates a feature that was previously reserved for enterprise
users, according to https://github.com/caddyserver/caddy/issues/2786 .
The local circuit breaker is a simple metrics counter that can cause
the reverse proxy to consider a backend unhealthy before it actually
goes offline, by measuring recent latencies over a sliding window.
Credit to Danny Navarro 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								be7abda7d4 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Implement retry_match; by default only retry GET requests  
							
							
 
							
							
							See https://caddy.community/t/http-proxy-and-non-get-retries/6304  
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								44cb804b9e 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Configurable request headers on active health checks  
							
							
 
							
							
							See https://caddy.community/t/health-check-user-agent/6309  
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								c11e3bffd6 
								
									
								
							
								 
							
						 
						
							
							
								
								Add file-server and reverse-proxy subcommands  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								2f684e42d5 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy/headers: Expose header replacement ability in Caddyfile  
							
							
 
							
							
							Adds header_up and header_down subdirectives to reverse_proxy 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								484cee1ac1 
								
									
								
							
								 
							
						 
						
							
							
								
								fastcgi: Implement / redirect for index.php with php_fastcgi directive ( #2754 )  
							
							
 
							
							
							* fastcgi: Implement / redirect for index.php with php_fastcgi directive
See #2752  and https://caddy.community/t/v2-redirect-path-to-path-index-php-with-assets/6196?u=matt 
* caddyhttp: MatchNegate implements json.Marshaler
* fastcgi: Add /index.php element to try_files matcher
* fastcgi: Make /index.php redirect permanent 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								db4c73dd58 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Close idle connections on module unload  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								f15f0d5839 
								
									
								
							
								 
							
						 
						
							
							
								
								Eliminate some TODOs  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								e73b117332 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Ability to mutate headers; set upstream placeholders  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								758269124e 
								
									
								
							
								 
							
						 
						
							
							
								
								reverseproxy: Fix host and port on requests; fix Caddyfile parser  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								194df652eb 
								
									
								
							
								 
							
						 
						
							
							
								
								reverseproxy: Add 'tls' option to enable HTTPS with HTTP transport  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								2459c292a4 
								
									
								
							
								 
							
						 
						
							
							
								
								caddyfile: Improve Dispenser.NextBlock() to support nesting  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								0cf592fa2e 
								
									
								
							
								 
							
						 
						
							
							
								
								New 'php_fastcgi' directive for convenient PHP+FastCGI reverse proxy  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								c32b7e8865 
								
									
								
							
								 
							
						 
						
							
							
								
								fastcgi: Make EnvVars a map instead of a slice  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								b4f4fcd437 
								
									
								
							
								 
							
						 
						
							
							
								
								Migrate some selection policy tests over to v2  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								50e62d06bc 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Caddyfile integration (and fix blocks in Dispenser)  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								14f9662f9c 
								
									
								
							
								 
							
						 
						
							
							
								
								Various fixes/tweaks to HTTP placeholder variables and file matching  
							
							
 
							
							
							- Rename http.var.* -> http.vars.* to be more consistent
- Prefixing a path matcher with * now invokes simple suffix matching
- Handlers and matchers that need a root path default to {http.vars.root}
- Clean replacer output on the file matcher's file selection suffix 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								21d7b662e7 
								
									
								
							
								 
							
						 
						
							
							
								
								fastcgi: Use request context as base, not a new one  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								d2e46c2be0 
								
									
								
							
								 
							
						 
						
							
							
								
								fastcgi: Set default root path; add interface guards  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								80b54f3b9d 
								
									
								
							
								 
							
						 
						
							
							
								
								Add original URI to request context; implement into fastcgi env  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								0830fbad03 
								
									
								
							
								 
							
						 
						
							
							
								
								Reconcile upstream dial addresses and request host/URL information  
							
							
 
							
							
							My goodness that was complicated
Blessed be request.Context
Sort of 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								a60d54dbfd 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Ignore context.Canceled errors  
							
							
 
							
							
							These happen when downstream clients cancel the request, but that's not
our problem nor a failure in our end 
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								acb8f0e0c2 
								
									
								
							
								 
							
						 
						
							
							
								
								Integrate circuit breaker modules with reverse proxy  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								652460e03e 
								
									
								
							
								 
							
						 
						
							
							
								
								Some cleanup and godoc  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								4a1e1649bc 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Implement remaining TLS config for proxy to backend  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								ccfb12347b 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: Implement active health checks  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								026df7c5cb 
								
									
								
							
								 
							
						 
						
							
							
								
								reverse_proxy: WIP refactor and support for FastCGI  
							
							
								
 
							
							
						 
						6 years ago  
				
					
						
							
							
								 
						
							
							
								
								
							
							
								
							
								c9980fd367 
								
									
								
							
								 
							
						 
						
							
							
								
								Refactor Caddyfile adapter and module registration  
							
							
 
							
							
							Use piles from which to draw config values.
Module values can return their name, so now we can do two-way mapping
from value to name and name to value; whereas before we could only map
name to value. This was problematic with the Caddyfile adapter since
it receives values and needs to know the name to put in the config. 
							
						 
						6 years ago