-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a common function to create a listening socket which supports TLS from a CertSource and the PROXY protocol which can then be used for all TCP based servers. Pronounce the difference between listeners which hold the socket for incoming connections, servers which manage connections and configuration and handlers which handle individual requests. Introduce a separate TCP server which is similar to the HTTP server and unify the ListenAndServe code across both servers. This allows using both the TCP and HTTP server to be used for (test-)servers and proxy servers depending on the handler they use. Drop the custom graceful shutdown logic in favor of the context based shutdown introduced with Go 1.8. This makes Go 1.8 the minimum requirement. Drop the legacy and unused websocket handler which uses golang.org/x/net/websocket. Move the server and listening code into the proxy package. The HTTP related code remains under the proxy package instead of an http package to avoid naming conflicts with the standard http library. Instead, the files are prefixed with http_.
- Loading branch information
1 parent
d1021b3
commit 726eb51
Showing
16 changed files
with
409 additions
and
302 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.