Commit Graph

7 Commits (20da666d6dec25e514f322249cb3f94d10801253)

Author SHA1 Message Date
zeripath 943753f560
Support Proxy protocol ()
This PR adds functionality to allow Gitea to sit behind an
HAProxy and HAProxy protocolled connections directly.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath c96be0cd98
Make SSL cipher suite configurable ()
zeripath 3183a465d7
Make modules/context.Context a context.Context ()
* Make modules/context.Context a context.Context

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Simplify context calls

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Set the base context for requests to the HammerContext

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
zeripath c03f530212
Make internal SSH server host key path configurable ()
* Make SSH server host key path configurable

* make it possible to have multiple keys

* Make gitea.rsa the default key

* Add some more logging

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath cbaa1de9ec Add Graceful shutdown for Windows and hooks for shutdown of goroutines ()
* Graceful Shutdown for windows and others

Restructures modules/graceful, adding shutdown for windows, removing and
replacing the old minwinsvc code.

Creates a new waitGroup - terminate which allows for goroutines to
finish up after the shutdown of the servers.

Shutdown and terminate hooks are added for goroutines.

* Remove unused functions - these can be added in a different PR

* Add startup timeout functionality

* Document STARTUP_TIMEOUT
zeripath d4cd4ed442
Restrict modules/graceful to non-windows build and shim the IsChild marker ()
zeripath 167e8f18da
Restore Graceful Restarting & Socket Activation ()
* Prevent deadlock in indexer initialisation during graceful restart

* Move from gracehttp to our own service to add graceful ssh

* Add timeout for start of indexers and make hammer time configurable

* Fix issue with re-initialization in indexer during tests

* move the code to detect use of closed to graceful

* Handle logs gracefully - add a pid suffix just before restart

* Move to using a cond and a holder for indexers

* use time.Since

* Add some comments and attribution

* update modules.txt

* Use zero to disable timeout

* Move RestartProcess to its own file

* Add cleanup routine