Commit Graph

93 Commits

Author SHA1 Message Date
Adnan Hajdarević 9cd78fca1a Update README.md 2024-10-25 09:39:58 +02:00
Ian Roberts eddeb82032 Add option to bind to a Unix socket instead of a TCP port (#703)
* feat: add ability to listen on unix socket/named pipe

Add a -socket option that configures the server to listen on a Unix-domain socket or Windows named pipe instead of a TCP port.  This allows webhook to be used behind a reverse proxy on multi-tenant shared hosting without the need to choose (and the permission to bind to) a free port number.

On Windows, -socket is expected to be a named pipe such as \\.\pipe\webhook, and the code uses https://github.com/microsoft/go-winio to bind the listening socket.  On other platforms, -socket is the path to a Unix domain socket such as /tmp/webhook.sock, or an abstract socket name starting with @, bound using the regular net.Listen function with the "network" parameter set to "unix".

Note: this pushes our minimum Go version up to 1.21 as that is what go-winio requires, but that is already the minimum version against which we are testing in the CI matrix.

* tests: add test for the -socket option

Refactored webhook_test so that the test HTTP requests are made using an explicitly-provided http.Client, so we can run at least one test with the server bound to a socket instead of a port number, using an http.Client whose transport has been configured with a suitable Unix-domain or Windows named pipe dialer function.

* tests: use GOROOT to find go command

This should ensure that, even if a developer or CI server has multiple versions of go installed, the version used to build the tools under test will be the same version that is running the test harness.

* fix: clean up Unix socket file before exit

If webhook is restarted with the same settings but the socket file has not been deleted, webhook will be unable to bind and will exit with an error.

* docs: add -socket option to documentation

* docs: add a note about reverse proxies

- README mentions the idea of using webhook behind a reverse proxy, including with the -socket flag
- added a note in Hook-Rules that the ip-whitelist rule type does not work as expected behind a reverse proxy, and you should configure IP restrictions at the proxy level instead
2024-10-25 09:38:22 +02:00
Adnan Hajdarević b6f24d00a5 Update README.md 2024-06-28 09:33:04 +02:00
Adnan Hajdarević dbc6565c35 Update README.md 2024-02-20 08:01:44 +01:00
Pouria Mousavizadeh Tehrani 9a7986681d Add FreeBSD Instruction and Example to README.md (#675) 2024-02-19 19:37:19 +01:00
Adnan Hajdarević de4003a7a8 Update README.md 2024-02-19 19:35:15 +01:00
Tony Yang a4eebd6005 Update README.md (#666) 2023-12-02 00:19:29 +01:00
Óscar 3944b35d39 Add Zola Guide (#653) 2023-09-18 00:08:43 +02:00
Abhiram Satpute 5ed642354f changed src of hookdoo, previous img url was broken (#623)
Co-authored-by: abhiram11 <abhiramsatpute@gmail.com>
2023-02-27 11:35:36 +01:00
Arran 0c0bf0b244 Add Gitea and Uberspace Guide (#579) 2022-02-21 13:15:17 +01:00
Prince Mendiratta 5189c62651 Fix broken link for guide to Jira and webhook integration
Signed-off-by: Prince Mendiratta <prince.mendi@gmail.com>
2021-12-29 16:51:20 +05:30
Adnan Hajdarević 75f406845f Update README.md 2021-10-11 12:47:23 +02:00
Ankit_Susne 4f00a26293 Update README.md 2021-09-25 22:56:38 +05:30
Adnan Hajdarević d523af1b6c Fixes #497 2021-02-28 09:55:08 +01:00
TheCatLady 21549749c0 Add alternative Docker images 2021-01-28 12:16:03 -05:00
Adnan Hajdarevic b1f69564a3 Merge branch 'development' 2020-12-06 08:42:20 +01:00
Adnan Hajdarević 9c7f8c1ac4 Update README.md 2020-11-05 23:20:36 +01:00
Maxim Orlov fd50118712 Add guide to the README 2020-10-13 16:12:01 +02:00
Adnan Hajdarević 67c317e741 Merge pull request #465 from moorereason/gh-action-tests
Add Github Action to build & run tests
2020-10-02 07:52:06 +02:00
Cameron Moore a904537367 Add build badge to README.md 2020-09-28 20:48:39 -05:00
Cameron Moore d279505930 Document YAML support
Fixes #400
Updates #288
2020-09-28 14:44:21 -05:00
Gabe Gałązka fb9b22a118 Change minimum golang version to 1.14 in README 2020-07-27 13:18:35 -05:00
Adnan Hajdarević 345bf3d409 Update README.md 2020-05-14 14:22:24 +02:00
Cameron Moore 1c779a0d75 Update multipart form data logic
All form values are simply added to the payload map without processing.
JSON parsing of values happens later.
2019-12-25 09:08:23 -06:00
Cameron Moore 5b4e60e7d7 Add multipart form data section to README 2019-12-25 09:05:15 -06:00
Cameron Moore 8c46a8343b Document minimum Go release 2019-12-05 17:01:38 -06:00
Cameron Moore 13d5630e80 Update docs for TLS version and cipher suite options 2019-12-03 21:36:14 -06:00
Adnan Hajdarević 5bca86cdb2 Add snap store link to the README.md 2019-02-12 10:29:39 +01:00
Adnan Hajdarević b2899d1d3e Update README.md 2018-11-16 10:46:35 +01:00
Adnan Hajdarević e8628cd662 Add more guides to the README 2018-11-16 10:45:37 +01:00
Adnan Hajdarević b93cdc346e Update README.md 2018-08-02 11:29:49 +02:00
Awea 78c8c61bf2 📝 Update README 2018-07-23 09:54:52 +02:00
md5(donics) 681e8b6459 Include shebang info wiki/home.md in readme
A change was made in response to #60 (fork/exec: exec format error) on the wiki that would be useful to also propagate to the readme.
2018-06-04 14:44:04 -04:00
Adnan Hajdarević 10396a5434 Update README.md 2018-01-11 10:34:55 +01:00
Adnan Hajdarević d009919755 Update README.md 2018-01-11 10:34:07 +01:00
Adnan Hajdarevic 13555e1ef1 Merge 2017-12-13 20:45:22 +01:00
Adnan Hajdarević ddec431ae9 Update README.md 2017-11-29 11:17:48 +01:00
Adnan Hajdarević a49364ae93 Update README.md 2017-11-13 08:44:31 +01:00
Adnan Hajdarević 6c4e52d87e Update README.md 2017-11-13 08:39:33 +01:00
Adnan Hajdarević b161de13f2 Add DigitalOcean to sponsors 2017-11-13 08:38:55 +01:00
Adnan Hajdarević 137ded093d Update README.md 2017-11-11 12:39:18 +01:00
Cameron Moore 44d19e34a0 Add Template docs
In addition to the Template docs, README is updated to use the "w" URL
shortcut.

Fixes #193
2017-11-10 16:11:29 -06:00
Cameron Moore bab32db017 Add docs 2017-11-10 12:54:15 -06:00
Cameron Moore 5a69eab2b3 Convert README.md to unix line endings 2017-11-10 12:48:19 -06:00
Adnan Hajdarević 83e688efd3 Update README.md 2017-11-05 16:54:05 +01:00
Adnan Hajdarević 7a91168f23 Update README.md 2017-11-05 16:49:36 +01:00
Adnan Hajdarević 2adf724295 Update README.md 2017-11-05 16:23:10 +01:00
Adnan Hajdarević 2f7eb31e8d Update README.md 2017-11-05 16:09:31 +01:00
Eric Berry 1e67afc3de Remove Code Sponsor 2017-11-05 06:14:08 -08:00
Adnan Hajdarević c094740905 Update README.md 2017-11-04 21:52:26 +01:00