Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quix-labs/caddy-pfx-certificates
Caddy module to support .pfx certificates
https://github.com/quix-labs/caddy-pfx-certificates
caddy caddy-module certificate go pfx pkcs12 tls
Last synced: about 5 hours ago
JSON representation
Caddy module to support .pfx certificates
- Host: GitHub
- URL: https://github.com/quix-labs/caddy-pfx-certificates
- Owner: quix-labs
- License: mit
- Created: 2024-03-26T14:09:39.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T07:50:30.000Z (4 months ago)
- Last Synced: 2024-08-01T09:24:52.174Z (4 months ago)
- Topics: caddy, caddy-module, certificate, go, pfx, pkcs12, tls
- Language: Go
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
[![Build Static Releases](https://github.com/quix-labs/caddy-pfx-certificates/actions/workflows/build-on-release.yml/badge.svg)](https://github.com/quix-labs/caddy-pfx-certificates/actions/workflows/build-on-release.yml)
# Caddy PFX Certificates
This repository contains a CaddyServer module for loading PFX certificates on-demand.
## Installation and Configuration
### Using Docker
- Pull the Docker image from the GitHub Container Registry:
```bash
docker pull ghcr.io/quix-labs/caddy-pfx-certificates:latest
```### Using xcaddy
- Before building the module, ensure you have `xcaddy` installed on your system. You can install it using the following
command:```bash
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
```- To build this module into Caddy, run the following command:
```bash
CGO_ENABLED=1 xcaddy build --with github.com/quix-labs/caddy-pfx-certificates
```This command compiles Caddy with the image processing module included.
### Using prebuilt assets
- You can also install the tool using release assets.
Download the appropriate package from the [Releases page](https://github.com/quix-labs/caddy-pfx-certificates/releases), and then follow the instructions provided for your specific platform.
## Usage
### Using Docker
```bash
docker run -p 80:80 -p 443:443 \
-v $PWD/Caddyfile:/etc/caddy/Caddyfile -d \
-v $PWD/test.pfx:/srv/test.pfx -d \
ghcr.io/quix-labs/caddy-pfx-certificates:latest
```Your can see more information in the [official docker documentation for caddy](https://hub.docker.com/_/caddy)
### Using xcaddy build / prebuilt assets
```bash
/path/to/your/caddy run --config /etc/caddy/Caddyfile
```Your can see more information in the [official documentation for caddy](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debianubunturaspbian)
## Example Caddyfile
```plaintexthttps://your-domain {
tls {
get_certificate pfx {
path test.pfx
password password
}
# Or shortcut -> get_certificate pfx test.pfx password
}
encode zstd gzip
root * /var/www/html
file_server
}
```## Development
To contribute to the development of this module, follow these steps:
1. Make sure you have Go installed on your system.
2. Clone this repository to your local machine:
```bash
git clone https://github.com/quix-labs/caddy-pfx-certificates.git
```
3. Navigate to the project directory:
4. Install `xcaddy` if you haven't already:
```bash
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
```
5. Make your changes in the source code.
6. Run tests to ensure your changes haven't introduced any issues:
```bash
make test
```
7. If tests pass, you can build the project:
```bash
make build
```
8. To run the project in development mode, use the following command:
```bash
make run
```
9. Once you're satisfied with your changes, create a pull request to the main branch of the repository for review.## Credits
- [COLANT Alan](https://github.com/alancolant)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.